{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.sKnSi0HM/b1/dune-grid_2.9.0-2_armhf.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.sKnSi0HM/b2/dune-grid_2.9.0-2_armhf.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,4 +1,4 @@\n \n 5b42bc8d24db05fbca613cd8cb7f58e7 8178508 debug optional libdune-grid-dev-dbgsym_2.9.0-2_armhf.deb\n 76d3889d0781791a7b7c53b49d1009b3 1007524 libdevel optional libdune-grid-dev_2.9.0-2_armhf.deb\n- 9549a3abcf101997617a72da97b45e59 6755804 doc optional libdune-grid-doc_2.9.0-2_all.deb\n+ 86df5170cbef2ededeade597990d4c07 6756304 doc optional libdune-grid-doc_2.9.0-2_all.deb\n"}, {"source1": "libdune-grid-doc_2.9.0-2_all.deb", "source2": "libdune-grid-doc_2.9.0-2_all.deb", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -1,3 +1,3 @@\n -rw-r--r-- 0 0 0 4 2023-01-12 22:10:10.000000 debian-binary\n--rw-r--r-- 0 0 0 41924 2023-01-12 22:10:10.000000 control.tar.xz\n--rw-r--r-- 0 0 0 6713688 2023-01-12 22:10:10.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 41884 2023-01-12 22:10:10.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 6714228 2023-01-12 22:10:10.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}, {"source1": "line order", "source2": "line order", "unified_diff": "@@ -1,146 +1,146 @@\n usr/share/doc/libdune-grid-doc/changelog.Debian.gz\n usr/share/doc/libdune-grid-doc/changelog.gz\n usr/share/doc/libdune-grid-doc/copyright\n+usr/share/doc/libdune-grid-doc/doxygen/a00143.html\n usr/share/doc/libdune-grid-doc/doxygen/a00146.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00149.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00152.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00152_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00155.html\n usr/share/doc/libdune-grid-doc/doxygen/a00155_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00158.html\n usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00173.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00176.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00164.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00164_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00170.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00179.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00179_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00182.html\n usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00185.html\n usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00191.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00194.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00194_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00188.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00200.html\n usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00203.html\n usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00206.html\n usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00209.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00212.html\n usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00218.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00218_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00224.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00236.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00236_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00242.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00242_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00251.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00251_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00260.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00260_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00269.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00269_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00272.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00272_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00230.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00233.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00245.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00245_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00266.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00266_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00278.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00278_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00293.html\n usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00305.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00305_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00296.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00299.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00317.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00317_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00320.html\n usr/share/doc/libdune-grid-doc/doxygen/a00320_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00323.html\n usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00329.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00329_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00335.html\n usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00338.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00347.html\n usr/share/doc/libdune-grid-doc/doxygen/a00347_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00350.html\n usr/share/doc/libdune-grid-doc/doxygen/a00350_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00359.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00359_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00572.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00572_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00575.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00353.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00353_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00356.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00356_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00566.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00569.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00569_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00578.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00578_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00581.html\n usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00584.html\n usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00587.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00587_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00590.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00596.html\n usr/share/doc/libdune-grid-doc/doxygen/a00596_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00602.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00599.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00605.html\n usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00608.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00614.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00617.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00620.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00626.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00629.html\n usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00635.html\n usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00638.html\n usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00641.html\n usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00644.html\n usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00647.html\n usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00650.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00653.html\n usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00656.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00659.html\n usr/share/doc/libdune-grid-doc/doxygen/a00662.html\n usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00665.html\n usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00668.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00671.html\n usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00674.html\n usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00677.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00680.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00683.html\n usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00686.html\n usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00689.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00692.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00692_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00695.html\n usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00698.html\n usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00701.html\n usr/share/doc/libdune-grid-doc/doxygen/a00704.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00707.html\n usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00710.html\n usr/share/doc/libdune-grid-doc/doxygen/a00713.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00713_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00716.html\n usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00719.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00722.html\n usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00725.html\n usr/share/doc/libdune-grid-doc/doxygen/a00725_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00728.html\n usr/share/doc/libdune-grid-doc/doxygen/a00728_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00731.html\n@@ -162,15 +162,14 @@\n usr/share/doc/libdune-grid-doc/doxygen/a00755.html\n usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00758.html\n usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00761.html\n usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00764.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00767.html\n usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00770.html\n usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00773.html\n usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00776.html\n@@ -204,82 +203,83 @@\n usr/share/doc/libdune-grid-doc/doxygen/a00818.html\n usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00821.html\n usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00824.html\n usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00827.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00830.html\n usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00833.html\n usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00836.html\n usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00839.html\n usr/share/doc/libdune-grid-doc/doxygen/a00839_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00842.html\n usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00845.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00845_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00848.html\n usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00851.html\n usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00854.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00854_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00857.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00857_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00860.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00860_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00863.html\n usr/share/doc/libdune-grid-doc/doxygen/a00866.html\n usr/share/doc/libdune-grid-doc/doxygen/a00869.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00872.html\n usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00875.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00878.html\n usr/share/doc/libdune-grid-doc/doxygen/a00881.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00884.html\n usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00887.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00890.html\n usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00893.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00896.html\n usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00899.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00902.html\n usr/share/doc/libdune-grid-doc/doxygen/a00905.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00908.html\n usr/share/doc/libdune-grid-doc/doxygen/a00911.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00914.html\n usr/share/doc/libdune-grid-doc/doxygen/a00917.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00920.html\n usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00923.html\n usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00926.html\n usr/share/doc/libdune-grid-doc/doxygen/a00929.html\n usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00932.html\n usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00935.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00938.html\n+usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00941.html\n usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00944.html\n usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00947.html\n usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00950.html\n usr/share/doc/libdune-grid-doc/doxygen/a00953.html\n-usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00956.html\n usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00959.html\n usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00962.html\n usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html\n usr/share/doc/libdune-grid-doc/doxygen/a00965.html\n"}]}]}]}, {"source1": "data.tar.xz", "source2": "data.tar.xz", "unified_diff": null, "details": [{"source1": "data.tar", "source2": "data.tar", "unified_diff": null, "details": [{"source1": "file list", "source2": "file list", "unified_diff": "@@ -3,333 +3,333 @@\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-12 22:10:10.000000 ./usr/share/\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-12 22:10:10.000000 ./usr/share/doc/\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/\n -rw-r--r-- 0 root (0) root (0) 969 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/changelog.Debian.gz\n -rw-r--r-- 0 root (0) root (0) 5359 2022-10-20 19:04:08.000000 ./usr/share/doc/libdune-grid-doc/changelog.gz\n -rw-r--r-- 0 root (0) root (0) 3525 2023-01-12 15:07:29.000000 ./usr/share/doc/libdune-grid-doc/copyright\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/\n+-rw-r--r-- 0 root (0) root (0) 5342 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00143.html\n -rw-r--r-- 0 root (0) root (0) 5527 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00146.html\n--rw-r--r-- 0 root (0) root (0) 5342 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00149.html\n--rw-r--r-- 0 root (0) root (0) 4615 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00155.html\n--rw-r--r-- 0 root (0) root (0) 15565 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00155_source.html\n--rw-r--r-- 0 root (0) root (0) 5127 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158.html\n--rw-r--r-- 0 root (0) root (0) 66983 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html\n--rw-r--r-- 0 root (0) root (0) 5908 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173.html\n--rw-r--r-- 0 root (0) root (0) 29352 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html\n--rw-r--r-- 0 root (0) root (0) 6467 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176.html\n--rw-r--r-- 0 root (0) root (0) 212727 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html\n--rw-r--r-- 0 root (0) root (0) 9748 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182.html\n--rw-r--r-- 0 root (0) root (0) 63125 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html\n--rw-r--r-- 0 root (0) root (0) 4880 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185.html\n--rw-r--r-- 0 root (0) root (0) 16642 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html\n--rw-r--r-- 0 root (0) root (0) 6819 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191.html\n--rw-r--r-- 0 root (0) root (0) 101824 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html\n--rw-r--r-- 0 root (0) root (0) 6429 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00194.html\n--rw-r--r-- 0 root (0) root (0) 17603 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00194_source.html\n--rw-r--r-- 0 root (0) root (0) 6117 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200.html\n--rw-r--r-- 0 root (0) root (0) 23263 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html\n--rw-r--r-- 0 root (0) root (0) 5016 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00203.html\n--rw-r--r-- 0 root (0) root (0) 25022 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html\n--rw-r--r-- 0 root (0) root (0) 9583 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206.html\n--rw-r--r-- 0 root (0) root (0) 51268 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html\n--rw-r--r-- 0 root (0) root (0) 12957 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209.html\n--rw-r--r-- 0 root (0) root (0) 189297 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html\n--rw-r--r-- 0 root (0) root (0) 4937 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212.html\n--rw-r--r-- 0 root (0) root (0) 16791 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html\n--rw-r--r-- 0 root (0) root (0) 5014 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00218.html\n--rw-r--r-- 0 root (0) root (0) 31396 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00218_source.html\n--rw-r--r-- 0 root (0) root (0) 5203 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224.html\n--rw-r--r-- 0 root (0) root (0) 19209 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html\n--rw-r--r-- 0 root (0) root (0) 18815 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00236.html\n--rw-r--r-- 0 root (0) root (0) 48651 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00236_source.html\n--rw-r--r-- 0 root (0) root (0) 4767 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00242.html\n--rw-r--r-- 0 root (0) root (0) 6855 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00242_source.html\n--rw-r--r-- 0 root (0) root (0) 4388 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00251.html\n--rw-r--r-- 0 root (0) root (0) 54472 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00251_source.html\n--rw-r--r-- 0 root (0) root (0) 12324 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00260.html\n--rw-r--r-- 0 root (0) root (0) 35349 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00260_source.html\n--rw-r--r-- 0 root (0) root (0) 6156 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00269.html\n--rw-r--r-- 0 root (0) root (0) 65728 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00269_source.html\n--rw-r--r-- 0 root (0) root (0) 10712 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00272.html\n--rw-r--r-- 0 root (0) root (0) 67550 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00272_source.html\n--rw-r--r-- 0 root (0) root (0) 6407 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293.html\n--rw-r--r-- 0 root (0) root (0) 33662 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html\n--rw-r--r-- 0 root (0) root (0) 5563 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00305.html\n--rw-r--r-- 0 root (0) root (0) 24141 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00305_source.html\n--rw-r--r-- 0 root (0) root (0) 5491 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00320.html\n--rw-r--r-- 0 root (0) root (0) 33293 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00320_source.html\n--rw-r--r-- 0 root (0) root (0) 6299 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323.html\n--rw-r--r-- 0 root (0) root (0) 35788 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html\n--rw-r--r-- 0 root (0) root (0) 5189 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335.html\n--rw-r--r-- 0 root (0) root (0) 20866 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html\n--rw-r--r-- 0 root (0) root (0) 8558 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338.html\n--rw-r--r-- 0 root (0) root (0) 107173 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html\n--rw-r--r-- 0 root (0) root (0) 5703 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00347.html\n--rw-r--r-- 0 root (0) root (0) 60559 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00347_source.html\n--rw-r--r-- 0 root (0) root (0) 6137 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00350.html\n--rw-r--r-- 0 root (0) root (0) 30257 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00350_source.html\n--rw-r--r-- 0 root (0) root (0) 7402 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00359.html\n--rw-r--r-- 0 root (0) root (0) 57620 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00359_source.html\n--rw-r--r-- 0 root (0) root (0) 3940 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572.html\n--rw-r--r-- 0 root (0) root (0) 6032 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00572_source.html\n--rw-r--r-- 0 root (0) root (0) 9182 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575.html\n--rw-r--r-- 0 root (0) root (0) 72993 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html\n--rw-r--r-- 0 root (0) root (0) 4741 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581.html\n--rw-r--r-- 0 root (0) root (0) 19971 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html\n+-rw-r--r-- 0 root (0) root (0) 6467 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00152.html\n+-rw-r--r-- 0 root (0) root (0) 212727 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00152_source.html\n+-rw-r--r-- 0 root (0) root (0) 4937 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00155.html\n+-rw-r--r-- 0 root (0) root (0) 16791 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00155_source.html\n+-rw-r--r-- 0 root (0) root (0) 6429 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158.html\n+-rw-r--r-- 0 root (0) root (0) 17603 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html\n+-rw-r--r-- 0 root (0) root (0) 5203 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00164.html\n+-rw-r--r-- 0 root (0) root (0) 19209 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00164_source.html\n+-rw-r--r-- 0 root (0) root (0) 4880 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170.html\n+-rw-r--r-- 0 root (0) root (0) 16642 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html\n+-rw-r--r-- 0 root (0) root (0) 9583 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179.html\n+-rw-r--r-- 0 root (0) root (0) 51268 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00179_source.html\n+-rw-r--r-- 0 root (0) root (0) 6819 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182.html\n+-rw-r--r-- 0 root (0) root (0) 101824 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html\n+-rw-r--r-- 0 root (0) root (0) 6117 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185.html\n+-rw-r--r-- 0 root (0) root (0) 23263 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html\n+-rw-r--r-- 0 root (0) root (0) 12957 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188.html\n+-rw-r--r-- 0 root (0) root (0) 189297 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html\n+-rw-r--r-- 0 root (0) root (0) 5127 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200.html\n+-rw-r--r-- 0 root (0) root (0) 66983 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html\n+-rw-r--r-- 0 root (0) root (0) 4615 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00203.html\n+-rw-r--r-- 0 root (0) root (0) 15565 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html\n+-rw-r--r-- 0 root (0) root (0) 9748 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206.html\n+-rw-r--r-- 0 root (0) root (0) 63125 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html\n+-rw-r--r-- 0 root (0) root (0) 5016 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212.html\n+-rw-r--r-- 0 root (0) root (0) 25022 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html\n+-rw-r--r-- 0 root (0) root (0) 5014 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230.html\n+-rw-r--r-- 0 root (0) root (0) 31396 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html\n+-rw-r--r-- 0 root (0) root (0) 5908 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233.html\n+-rw-r--r-- 0 root (0) root (0) 29352 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html\n+-rw-r--r-- 0 root (0) root (0) 5189 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00245.html\n+-rw-r--r-- 0 root (0) root (0) 20866 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00245_source.html\n+-rw-r--r-- 0 root (0) root (0) 5703 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00266.html\n+-rw-r--r-- 0 root (0) root (0) 60559 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00266_source.html\n+-rw-r--r-- 0 root (0) root (0) 6407 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00278.html\n+-rw-r--r-- 0 root (0) root (0) 33662 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00278_source.html\n+-rw-r--r-- 0 root (0) root (0) 5491 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293.html\n+-rw-r--r-- 0 root (0) root (0) 33293 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html\n+-rw-r--r-- 0 root (0) root (0) 10712 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00296.html\n+-rw-r--r-- 0 root (0) root (0) 67550 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html\n+-rw-r--r-- 0 root (0) root (0) 7402 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299.html\n+-rw-r--r-- 0 root (0) root (0) 57620 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html\n+-rw-r--r-- 0 root (0) root (0) 8558 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00317.html\n+-rw-r--r-- 0 root (0) root (0) 107173 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00317_source.html\n+-rw-r--r-- 0 root (0) root (0) 4767 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00320.html\n+-rw-r--r-- 0 root (0) root (0) 6855 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00320_source.html\n+-rw-r--r-- 0 root (0) root (0) 6137 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323.html\n+-rw-r--r-- 0 root (0) root (0) 30257 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html\n+-rw-r--r-- 0 root (0) root (0) 6156 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00329.html\n+-rw-r--r-- 0 root (0) root (0) 65728 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00329_source.html\n+-rw-r--r-- 0 root (0) root (0) 4388 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335.html\n+-rw-r--r-- 0 root (0) root (0) 54472 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html\n+-rw-r--r-- 0 root (0) root (0) 12324 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00347.html\n+-rw-r--r-- 0 root (0) root (0) 35349 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00347_source.html\n+-rw-r--r-- 0 root (0) root (0) 5563 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00350.html\n+-rw-r--r-- 0 root (0) root (0) 24141 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00350_source.html\n+-rw-r--r-- 0 root (0) root (0) 6299 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00353.html\n+-rw-r--r-- 0 root (0) root (0) 35788 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00353_source.html\n+-rw-r--r-- 0 root (0) root (0) 18815 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00356.html\n+-rw-r--r-- 0 root (0) root (0) 48651 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00356_source.html\n+-rw-r--r-- 0 root (0) root (0) 4600 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566.html\n+-rw-r--r-- 0 root (0) root (0) 12782 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html\n+-rw-r--r-- 0 root (0) root (0) 6107 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569.html\n+-rw-r--r-- 0 root (0) root (0) 44973 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00569_source.html\n+-rw-r--r-- 0 root (0) root (0) 5100 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00578.html\n+-rw-r--r-- 0 root (0) root (0) 21458 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00578_source.html\n+-rw-r--r-- 0 root (0) root (0) 3940 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581.html\n+-rw-r--r-- 0 root (0) root (0) 6032 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html\n -rw-r--r-- 0 root (0) root (0) 5167 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584.html\n -rw-r--r-- 0 root (0) root (0) 14236 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00584_source.html\n--rw-r--r-- 0 root (0) root (0) 8211 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587.html\n--rw-r--r-- 0 root (0) root (0) 114555 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00587_source.html\n--rw-r--r-- 0 root (0) root (0) 6107 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00590.html\n--rw-r--r-- 0 root (0) root (0) 44973 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html\n -rw-r--r-- 0 root (0) root (0) 5965 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00596.html\n -rw-r--r-- 0 root (0) root (0) 44597 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00596_source.html\n--rw-r--r-- 0 root (0) root (0) 5100 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602.html\n--rw-r--r-- 0 root (0) root (0) 21458 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html\n--rw-r--r-- 0 root (0) root (0) 4600 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605.html\n--rw-r--r-- 0 root (0) root (0) 12782 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html\n--rw-r--r-- 0 root (0) root (0) 4958 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html\n--rw-r--r-- 0 root (0) root (0) 4639 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617.html\n--rw-r--r-- 0 root (0) root (0) 21639 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html\n--rw-r--r-- 0 root (0) root (0) 6943 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html\n--rw-r--r-- 0 root (0) root (0) 4784 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html\n--rw-r--r-- 0 root (0) root (0) 5836 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html\n--rw-r--r-- 0 root (0) root (0) 53983 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html\n--rw-r--r-- 0 root (0) root (0) 5395 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html\n--rw-r--r-- 0 root (0) root (0) 63707 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html\n--rw-r--r-- 0 root (0) root (0) 26709 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html\n--rw-r--r-- 0 root (0) root (0) 142252 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html\n--rw-r--r-- 0 root (0) root (0) 8200 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641.html\n--rw-r--r-- 0 root (0) root (0) 88395 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html\n--rw-r--r-- 0 root (0) root (0) 5769 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html\n--rw-r--r-- 0 root (0) root (0) 105330 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html\n--rw-r--r-- 0 root (0) root (0) 3722 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html\n--rw-r--r-- 0 root (0) root (0) 128001 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html\n--rw-r--r-- 0 root (0) root (0) 8683 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650.html\n--rw-r--r-- 0 root (0) root (0) 14499 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html\n--rw-r--r-- 0 root (0) root (0) 4868 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653.html\n--rw-r--r-- 0 root (0) root (0) 18784 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html\n--rw-r--r-- 0 root (0) root (0) 6026 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html\n--rw-r--r-- 0 root (0) root (0) 4158 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html\n+-rw-r--r-- 0 root (0) root (0) 9182 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599.html\n+-rw-r--r-- 0 root (0) root (0) 72993 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html\n+-rw-r--r-- 0 root (0) root (0) 8211 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605.html\n+-rw-r--r-- 0 root (0) root (0) 114555 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html\n+-rw-r--r-- 0 root (0) root (0) 4741 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608.html\n+-rw-r--r-- 0 root (0) root (0) 19971 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html\n+-rw-r--r-- 0 root (0) root (0) 5395 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614.html\n+-rw-r--r-- 0 root (0) root (0) 63707 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00614_source.html\n+-rw-r--r-- 0 root (0) root (0) 4735 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620.html\n+-rw-r--r-- 0 root (0) root (0) 35038 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html\n+-rw-r--r-- 0 root (0) root (0) 5307 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626.html\n+-rw-r--r-- 0 root (0) root (0) 45079 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00626_source.html\n+-rw-r--r-- 0 root (0) root (0) 9236 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629.html\n+-rw-r--r-- 0 root (0) root (0) 152960 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html\n+-rw-r--r-- 0 root (0) root (0) 4639 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635.html\n+-rw-r--r-- 0 root (0) root (0) 21639 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html\n+-rw-r--r-- 0 root (0) root (0) 6365 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638.html\n+-rw-r--r-- 0 root (0) root (0) 200041 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html\n+-rw-r--r-- 0 root (0) root (0) 7869 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641.html\n+-rw-r--r-- 0 root (0) root (0) 72580 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html\n+-rw-r--r-- 0 root (0) root (0) 5062 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644.html\n+-rw-r--r-- 0 root (0) root (0) 27654 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html\n+-rw-r--r-- 0 root (0) root (0) 5937 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647.html\n+-rw-r--r-- 0 root (0) root (0) 102461 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html\n+-rw-r--r-- 0 root (0) root (0) 8200 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653.html\n+-rw-r--r-- 0 root (0) root (0) 88395 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html\n+-rw-r--r-- 0 root (0) root (0) 5836 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656.html\n+-rw-r--r-- 0 root (0) root (0) 53983 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html\n+-rw-r--r-- 0 root (0) root (0) 6239 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00659.html\n -rw-r--r-- 0 root (0) root (0) 5865 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662.html\n -rw-r--r-- 0 root (0) root (0) 84030 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html\n--rw-r--r-- 0 root (0) root (0) 5062 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html\n--rw-r--r-- 0 root (0) root (0) 27654 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html\n--rw-r--r-- 0 root (0) root (0) 5058 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html\n--rw-r--r-- 0 root (0) root (0) 27678 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html\n--rw-r--r-- 0 root (0) root (0) 4864 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html\n--rw-r--r-- 0 root (0) root (0) 26546 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html\n--rw-r--r-- 0 root (0) root (0) 5143 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html\n--rw-r--r-- 0 root (0) root (0) 39694 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html\n--rw-r--r-- 0 root (0) root (0) 5285 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html\n--rw-r--r-- 0 root (0) root (0) 32569 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html\n--rw-r--r-- 0 root (0) root (0) 3722 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html\n--rw-r--r-- 0 root (0) root (0) 67434 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html\n--rw-r--r-- 0 root (0) root (0) 7869 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html\n--rw-r--r-- 0 root (0) root (0) 72580 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html\n--rw-r--r-- 0 root (0) root (0) 4735 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html\n--rw-r--r-- 0 root (0) root (0) 35038 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html\n--rw-r--r-- 0 root (0) root (0) 5713 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html\n--rw-r--r-- 0 root (0) root (0) 41095 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html\n--rw-r--r-- 0 root (0) root (0) 9236 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698.html\n--rw-r--r-- 0 root (0) root (0) 152960 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html\n--rw-r--r-- 0 root (0) root (0) 6239 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701.html\n--rw-r--r-- 0 root (0) root (0) 4863 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html\n--rw-r--r-- 0 root (0) root (0) 5307 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html\n--rw-r--r-- 0 root (0) root (0) 45079 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html\n--rw-r--r-- 0 root (0) root (0) 4331 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html\n--rw-r--r-- 0 root (0) root (0) 5937 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html\n--rw-r--r-- 0 root (0) root (0) 102461 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713_source.html\n--rw-r--r-- 0 root (0) root (0) 6365 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html\n--rw-r--r-- 0 root (0) root (0) 200041 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html\n--rw-r--r-- 0 root (0) root (0) 12890 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html\n--rw-r--r-- 0 root (0) root (0) 29060 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html\n+-rw-r--r-- 0 root (0) root (0) 3722 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665.html\n+-rw-r--r-- 0 root (0) root (0) 128001 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00665_source.html\n+-rw-r--r-- 0 root (0) root (0) 3722 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668.html\n+-rw-r--r-- 0 root (0) root (0) 67434 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00668_source.html\n+-rw-r--r-- 0 root (0) root (0) 5285 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671.html\n+-rw-r--r-- 0 root (0) root (0) 32569 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00671_source.html\n+-rw-r--r-- 0 root (0) root (0) 4868 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674.html\n+-rw-r--r-- 0 root (0) root (0) 18784 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html\n+-rw-r--r-- 0 root (0) root (0) 6026 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00677.html\n+-rw-r--r-- 0 root (0) root (0) 6943 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00680.html\n+-rw-r--r-- 0 root (0) root (0) 5143 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683.html\n+-rw-r--r-- 0 root (0) root (0) 39694 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html\n+-rw-r--r-- 0 root (0) root (0) 26709 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686.html\n+-rw-r--r-- 0 root (0) root (0) 142252 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html\n+-rw-r--r-- 0 root (0) root (0) 4958 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00689.html\n+-rw-r--r-- 0 root (0) root (0) 5713 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692.html\n+-rw-r--r-- 0 root (0) root (0) 41095 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00692_source.html\n+-rw-r--r-- 0 root (0) root (0) 12890 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695.html\n+-rw-r--r-- 0 root (0) root (0) 29060 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html\n+-rw-r--r-- 0 root (0) root (0) 4864 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698.html\n+-rw-r--r-- 0 root (0) root (0) 26546 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html\n+-rw-r--r-- 0 root (0) root (0) 4863 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00701.html\n+-rw-r--r-- 0 root (0) root (0) 8683 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704.html\n+-rw-r--r-- 0 root (0) root (0) 14499 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html\n+-rw-r--r-- 0 root (0) root (0) 5769 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707.html\n+-rw-r--r-- 0 root (0) root (0) 105330 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html\n+-rw-r--r-- 0 root (0) root (0) 4158 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00710.html\n+-rw-r--r-- 0 root (0) root (0) 4784 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00713.html\n+-rw-r--r-- 0 root (0) root (0) 5058 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716.html\n+-rw-r--r-- 0 root (0) root (0) 27678 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html\n+-rw-r--r-- 0 root (0) root (0) 4331 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00719.html\n -rw-r--r-- 0 root (0) root (0) 3687 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00722.html\n -rw-r--r-- 0 root (0) root (0) 5927 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html\n -rw-r--r-- 0 root (0) root (0) 3470 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00725.html\n -rw-r--r-- 0 root (0) root (0) 4711 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00725_source.html\n -rw-r--r-- 0 root (0) root (0) 9395 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00728.html\n -rw-r--r-- 0 root (0) root (0) 108883 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00728_source.html\n--rw-r--r-- 0 root (0) root (0) 5084 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731.html\n--rw-r--r-- 0 root (0) root (0) 16901 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731_source.html\n--rw-r--r-- 0 root (0) root (0) 5594 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734.html\n--rw-r--r-- 0 root (0) root (0) 94047 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html\n--rw-r--r-- 0 root (0) root (0) 6215 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html\n--rw-r--r-- 0 root (0) root (0) 29014 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html\n--rw-r--r-- 0 root (0) root (0) 5827 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html\n--rw-r--r-- 0 root (0) root (0) 69043 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html\n--rw-r--r-- 0 root (0) root (0) 6067 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html\n--rw-r--r-- 0 root (0) root (0) 72942 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html\n+-rw-r--r-- 0 root (0) root (0) 5594 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731.html\n+-rw-r--r-- 0 root (0) root (0) 94047 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00731_source.html\n+-rw-r--r-- 0 root (0) root (0) 5084 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734.html\n+-rw-r--r-- 0 root (0) root (0) 16901 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html\n+-rw-r--r-- 0 root (0) root (0) 5827 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737.html\n+-rw-r--r-- 0 root (0) root (0) 69043 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html\n+-rw-r--r-- 0 root (0) root (0) 5183 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740.html\n+-rw-r--r-- 0 root (0) root (0) 16943 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html\n+-rw-r--r-- 0 root (0) root (0) 6215 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743.html\n+-rw-r--r-- 0 root (0) root (0) 29014 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html\n -rw-r--r-- 0 root (0) root (0) 5022 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746.html\n -rw-r--r-- 0 root (0) root (0) 30631 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00746_source.html\n -rw-r--r-- 0 root (0) root (0) 5079 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749.html\n -rw-r--r-- 0 root (0) root (0) 17077 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html\n--rw-r--r-- 0 root (0) root (0) 5183 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html\n--rw-r--r-- 0 root (0) root (0) 16943 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html\n--rw-r--r-- 0 root (0) root (0) 5131 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html\n--rw-r--r-- 0 root (0) root (0) 14879 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html\n--rw-r--r-- 0 root (0) root (0) 5277 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html\n--rw-r--r-- 0 root (0) root (0) 18944 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html\n--rw-r--r-- 0 root (0) root (0) 5483 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html\n--rw-r--r-- 0 root (0) root (0) 30498 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html\n--rw-r--r-- 0 root (0) root (0) 5207 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html\n--rw-r--r-- 0 root (0) root (0) 16281 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html\n--rw-r--r-- 0 root (0) root (0) 6118 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html\n--rw-r--r-- 0 root (0) root (0) 21790 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html\n--rw-r--r-- 0 root (0) root (0) 5903 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html\n--rw-r--r-- 0 root (0) root (0) 88796 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html\n--rw-r--r-- 0 root (0) root (0) 5446 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html\n--rw-r--r-- 0 root (0) root (0) 34001 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html\n--rw-r--r-- 0 root (0) root (0) 5848 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html\n--rw-r--r-- 0 root (0) root (0) 47547 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html\n--rw-r--r-- 0 root (0) root (0) 5743 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html\n--rw-r--r-- 0 root (0) root (0) 75843 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html\n--rw-r--r-- 0 root (0) root (0) 6970 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html\n--rw-r--r-- 0 root (0) root (0) 35971 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html\n--rw-r--r-- 0 root (0) root (0) 5412 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html\n--rw-r--r-- 0 root (0) root (0) 33498 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html\n--rw-r--r-- 0 root (0) root (0) 5392 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html\n--rw-r--r-- 0 root (0) root (0) 19620 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html\n--rw-r--r-- 0 root (0) root (0) 6774 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html\n--rw-r--r-- 0 root (0) root (0) 51549 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html\n--rw-r--r-- 0 root (0) root (0) 8841 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html\n--rw-r--r-- 0 root (0) root (0) 90567 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html\n--rw-r--r-- 0 root (0) root (0) 5397 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html\n--rw-r--r-- 0 root (0) root (0) 19542 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html\n--rw-r--r-- 0 root (0) root (0) 6929 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html\n--rw-r--r-- 0 root (0) root (0) 51068 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html\n--rw-r--r-- 0 root (0) root (0) 11160 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html\n--rw-r--r-- 0 root (0) root (0) 288588 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html\n--rw-r--r-- 0 root (0) root (0) 9483 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html\n--rw-r--r-- 0 root (0) root (0) 91740 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html\n--rw-r--r-- 0 root (0) root (0) 5577 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html\n--rw-r--r-- 0 root (0) root (0) 25911 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html\n--rw-r--r-- 0 root (0) root (0) 5530 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html\n--rw-r--r-- 0 root (0) root (0) 57528 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html\n--rw-r--r-- 0 root (0) root (0) 18008 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html\n--rw-r--r-- 0 root (0) root (0) 67735 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html\n--rw-r--r-- 0 root (0) root (0) 5455 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html\n--rw-r--r-- 0 root (0) root (0) 24045 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html\n--rw-r--r-- 0 root (0) root (0) 5412 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html\n--rw-r--r-- 0 root (0) root (0) 30896 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html\n--rw-r--r-- 0 root (0) root (0) 6309 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html\n--rw-r--r-- 0 root (0) root (0) 55806 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html\n--rw-r--r-- 0 root (0) root (0) 4584 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html\n--rw-r--r-- 0 root (0) root (0) 7875 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html\n--rw-r--r-- 0 root (0) root (0) 107478 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html\n--rw-r--r-- 0 root (0) root (0) 4404 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html\n--rw-r--r-- 0 root (0) root (0) 33733 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html\n--rw-r--r-- 0 root (0) root (0) 4891 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html\n--rw-r--r-- 0 root (0) root (0) 6617 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html\n--rw-r--r-- 0 root (0) root (0) 6990 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html\n--rw-r--r-- 0 root (0) root (0) 179034 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839_source.html\n--rw-r--r-- 0 root (0) root (0) 7108 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html\n--rw-r--r-- 0 root (0) root (0) 61593 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html\n--rw-r--r-- 0 root (0) root (0) 5692 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html\n--rw-r--r-- 0 root (0) root (0) 50144 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845_source.html\n--rw-r--r-- 0 root (0) root (0) 6024 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html\n--rw-r--r-- 0 root (0) root (0) 82294 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html\n--rw-r--r-- 0 root (0) root (0) 5473 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html\n--rw-r--r-- 0 root (0) root (0) 24583 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html\n--rw-r--r-- 0 root (0) root (0) 4626 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html\n--rw-r--r-- 0 root (0) root (0) 4614 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html\n--rw-r--r-- 0 root (0) root (0) 4602 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html\n--rw-r--r-- 0 root (0) root (0) 4644 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html\n--rw-r--r-- 0 root (0) root (0) 10182 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html\n--rw-r--r-- 0 root (0) root (0) 6602 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html\n--rw-r--r-- 0 root (0) root (0) 29897 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html\n--rw-r--r-- 0 root (0) root (0) 5481 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html\n--rw-r--r-- 0 root (0) root (0) 19861 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html\n--rw-r--r-- 0 root (0) root (0) 4614 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html\n--rw-r--r-- 0 root (0) root (0) 4608 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html\n--rw-r--r-- 0 root (0) root (0) 5224 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html\n--rw-r--r-- 0 root (0) root (0) 15407 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html\n--rw-r--r-- 0 root (0) root (0) 5947 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html\n--rw-r--r-- 0 root (0) root (0) 65691 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html\n--rw-r--r-- 0 root (0) root (0) 5194 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html\n--rw-r--r-- 0 root (0) root (0) 18880 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html\n--rw-r--r-- 0 root (0) root (0) 6235 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html\n--rw-r--r-- 0 root (0) root (0) 37566 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html\n--rw-r--r-- 0 root (0) root (0) 5259 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html\n--rw-r--r-- 0 root (0) root (0) 15007 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893_source.html\n+-rw-r--r-- 0 root (0) root (0) 5131 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752.html\n+-rw-r--r-- 0 root (0) root (0) 14879 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html\n+-rw-r--r-- 0 root (0) root (0) 6067 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755.html\n+-rw-r--r-- 0 root (0) root (0) 72942 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html\n+-rw-r--r-- 0 root (0) root (0) 5098 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758.html\n+-rw-r--r-- 0 root (0) root (0) 30848 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html\n+-rw-r--r-- 0 root (0) root (0) 4223 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761.html\n+-rw-r--r-- 0 root (0) root (0) 6661 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html\n+-rw-r--r-- 0 root (0) root (0) 4513 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00764.html\n+-rw-r--r-- 0 root (0) root (0) 5377 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767.html\n+-rw-r--r-- 0 root (0) root (0) 44595 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html\n+-rw-r--r-- 0 root (0) root (0) 9931 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770.html\n+-rw-r--r-- 0 root (0) root (0) 205067 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html\n+-rw-r--r-- 0 root (0) root (0) 6565 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773.html\n+-rw-r--r-- 0 root (0) root (0) 23456 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html\n+-rw-r--r-- 0 root (0) root (0) 5397 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776.html\n+-rw-r--r-- 0 root (0) root (0) 19542 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html\n+-rw-r--r-- 0 root (0) root (0) 5577 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779.html\n+-rw-r--r-- 0 root (0) root (0) 25911 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html\n+-rw-r--r-- 0 root (0) root (0) 5392 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782.html\n+-rw-r--r-- 0 root (0) root (0) 19620 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html\n+-rw-r--r-- 0 root (0) root (0) 9483 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785.html\n+-rw-r--r-- 0 root (0) root (0) 91740 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html\n+-rw-r--r-- 0 root (0) root (0) 5207 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788.html\n+-rw-r--r-- 0 root (0) root (0) 16281 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html\n+-rw-r--r-- 0 root (0) root (0) 5483 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791.html\n+-rw-r--r-- 0 root (0) root (0) 30498 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html\n+-rw-r--r-- 0 root (0) root (0) 6970 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794.html\n+-rw-r--r-- 0 root (0) root (0) 35971 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html\n+-rw-r--r-- 0 root (0) root (0) 18008 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797.html\n+-rw-r--r-- 0 root (0) root (0) 67735 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html\n+-rw-r--r-- 0 root (0) root (0) 5903 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800.html\n+-rw-r--r-- 0 root (0) root (0) 88796 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html\n+-rw-r--r-- 0 root (0) root (0) 5743 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803.html\n+-rw-r--r-- 0 root (0) root (0) 75843 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00803_source.html\n+-rw-r--r-- 0 root (0) root (0) 6929 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806.html\n+-rw-r--r-- 0 root (0) root (0) 51068 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html\n+-rw-r--r-- 0 root (0) root (0) 6774 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809.html\n+-rw-r--r-- 0 root (0) root (0) 51549 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html\n+-rw-r--r-- 0 root (0) root (0) 6118 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812.html\n+-rw-r--r-- 0 root (0) root (0) 21790 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html\n+-rw-r--r-- 0 root (0) root (0) 5446 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815.html\n+-rw-r--r-- 0 root (0) root (0) 34001 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html\n+-rw-r--r-- 0 root (0) root (0) 5530 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818.html\n+-rw-r--r-- 0 root (0) root (0) 57528 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html\n+-rw-r--r-- 0 root (0) root (0) 11160 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821.html\n+-rw-r--r-- 0 root (0) root (0) 288588 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00821_source.html\n+-rw-r--r-- 0 root (0) root (0) 5277 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824.html\n+-rw-r--r-- 0 root (0) root (0) 18944 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html\n+-rw-r--r-- 0 root (0) root (0) 8841 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827.html\n+-rw-r--r-- 0 root (0) root (0) 90567 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html\n+-rw-r--r-- 0 root (0) root (0) 5412 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830.html\n+-rw-r--r-- 0 root (0) root (0) 33498 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html\n+-rw-r--r-- 0 root (0) root (0) 5848 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833.html\n+-rw-r--r-- 0 root (0) root (0) 47547 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html\n+-rw-r--r-- 0 root (0) root (0) 5455 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836.html\n+-rw-r--r-- 0 root (0) root (0) 24045 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html\n+-rw-r--r-- 0 root (0) root (0) 5618 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839.html\n+-rw-r--r-- 0 root (0) root (0) 39509 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00839_source.html\n+-rw-r--r-- 0 root (0) root (0) 5425 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842.html\n+-rw-r--r-- 0 root (0) root (0) 45962 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html\n+-rw-r--r-- 0 root (0) root (0) 4584 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00845.html\n+-rw-r--r-- 0 root (0) root (0) 6140 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848.html\n+-rw-r--r-- 0 root (0) root (0) 26612 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html\n+-rw-r--r-- 0 root (0) root (0) 5224 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851.html\n+-rw-r--r-- 0 root (0) root (0) 15407 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html\n+-rw-r--r-- 0 root (0) root (0) 5169 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854.html\n+-rw-r--r-- 0 root (0) root (0) 12421 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00854_source.html\n+-rw-r--r-- 0 root (0) root (0) 6235 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857.html\n+-rw-r--r-- 0 root (0) root (0) 37566 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00857_source.html\n+-rw-r--r-- 0 root (0) root (0) 5194 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860.html\n+-rw-r--r-- 0 root (0) root (0) 18880 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00860_source.html\n+-rw-r--r-- 0 root (0) root (0) 4626 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00863.html\n+-rw-r--r-- 0 root (0) root (0) 4614 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00866.html\n+-rw-r--r-- 0 root (0) root (0) 4644 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00869.html\n+-rw-r--r-- 0 root (0) root (0) 5224 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872.html\n+-rw-r--r-- 0 root (0) root (0) 16522 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html\n+-rw-r--r-- 0 root (0) root (0) 5481 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875.html\n+-rw-r--r-- 0 root (0) root (0) 19861 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html\n+-rw-r--r-- 0 root (0) root (0) 4626 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00878.html\n+-rw-r--r-- 0 root (0) root (0) 4617 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00881.html\n+-rw-r--r-- 0 root (0) root (0) 6602 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884.html\n+-rw-r--r-- 0 root (0) root (0) 29897 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html\n+-rw-r--r-- 0 root (0) root (0) 4605 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00887.html\n+-rw-r--r-- 0 root (0) root (0) 5259 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890.html\n+-rw-r--r-- 0 root (0) root (0) 15007 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html\n+-rw-r--r-- 0 root (0) root (0) 4602 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00893.html\n -rw-r--r-- 0 root (0) root (0) 5221 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896.html\n -rw-r--r-- 0 root (0) root (0) 14497 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html\n--rw-r--r-- 0 root (0) root (0) 5224 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html\n--rw-r--r-- 0 root (0) root (0) 16522 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899_source.html\n--rw-r--r-- 0 root (0) root (0) 4626 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html\n--rw-r--r-- 0 root (0) root (0) 4605 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html\n--rw-r--r-- 0 root (0) root (0) 4611 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html\n--rw-r--r-- 0 root (0) root (0) 4644 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html\n--rw-r--r-- 0 root (0) root (0) 4617 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html\n--rw-r--r-- 0 root (0) root (0) 5169 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html\n--rw-r--r-- 0 root (0) root (0) 12421 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html\n--rw-r--r-- 0 root (0) root (0) 5211 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html\n--rw-r--r-- 0 root (0) root (0) 21915 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html\n--rw-r--r-- 0 root (0) root (0) 6140 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html\n--rw-r--r-- 0 root (0) root (0) 26612 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html\n--rw-r--r-- 0 root (0) root (0) 4632 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html\n--rw-r--r-- 0 root (0) root (0) 5287 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html\n--rw-r--r-- 0 root (0) root (0) 17119 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html\n+-rw-r--r-- 0 root (0) root (0) 10182 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00899.html\n+-rw-r--r-- 0 root (0) root (0) 4611 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00902.html\n+-rw-r--r-- 0 root (0) root (0) 5473 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905.html\n+-rw-r--r-- 0 root (0) root (0) 24583 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html\n+-rw-r--r-- 0 root (0) root (0) 4608 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00908.html\n+-rw-r--r-- 0 root (0) root (0) 5211 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911.html\n+-rw-r--r-- 0 root (0) root (0) 21915 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html\n+-rw-r--r-- 0 root (0) root (0) 4632 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00914.html\n+-rw-r--r-- 0 root (0) root (0) 4614 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00917.html\n+-rw-r--r-- 0 root (0) root (0) 5287 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920.html\n+-rw-r--r-- 0 root (0) root (0) 17119 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html\n+-rw-r--r-- 0 root (0) root (0) 5947 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923.html\n+-rw-r--r-- 0 root (0) root (0) 65691 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html\n+-rw-r--r-- 0 root (0) root (0) 4644 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00926.html\n+-rw-r--r-- 0 root (0) root (0) 6990 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929.html\n+-rw-r--r-- 0 root (0) root (0) 179034 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00929_source.html\n -rw-r--r-- 0 root (0) root (0) 5543 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932.html\n -rw-r--r-- 0 root (0) root (0) 48209 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00932_source.html\n--rw-r--r-- 0 root (0) root (0) 6217 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html\n--rw-r--r-- 0 root (0) root (0) 6489 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html\n--rw-r--r-- 0 root (0) root (0) 5425 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html\n--rw-r--r-- 0 root (0) root (0) 45962 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html\n+-rw-r--r-- 0 root (0) root (0) 5244 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935.html\n+-rw-r--r-- 0 root (0) root (0) 34529 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html\n+-rw-r--r-- 0 root (0) root (0) 7108 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938.html\n+-rw-r--r-- 0 root (0) root (0) 61593 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html\n+-rw-r--r-- 0 root (0) root (0) 5412 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941.html\n+-rw-r--r-- 0 root (0) root (0) 30896 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html\n -rw-r--r-- 0 root (0) root (0) 4869 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944.html\n -rw-r--r-- 0 root (0) root (0) 18998 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html\n--rw-r--r-- 0 root (0) root (0) 5244 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html\n--rw-r--r-- 0 root (0) root (0) 34529 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html\n--rw-r--r-- 0 root (0) root (0) 4513 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html\n--rw-r--r-- 0 root (0) root (0) 5377 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html\n--rw-r--r-- 0 root (0) root (0) 44595 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html\n--rw-r--r-- 0 root (0) root (0) 9931 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html\n--rw-r--r-- 0 root (0) root (0) 205067 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html\n--rw-r--r-- 0 root (0) root (0) 6565 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html\n--rw-r--r-- 0 root (0) root (0) 23456 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html\n--rw-r--r-- 0 root (0) root (0) 5618 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html\n--rw-r--r-- 0 root (0) root (0) 39509 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html\n--rw-r--r-- 0 root (0) root (0) 4223 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html\n--rw-r--r-- 0 root (0) root (0) 6661 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html\n--rw-r--r-- 0 root (0) root (0) 5098 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968.html\n--rw-r--r-- 0 root (0) root (0) 30848 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html\n+-rw-r--r-- 0 root (0) root (0) 4891 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947.html\n+-rw-r--r-- 0 root (0) root (0) 6617 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html\n+-rw-r--r-- 0 root (0) root (0) 6217 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00950.html\n+-rw-r--r-- 0 root (0) root (0) 6489 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00953.html\n+-rw-r--r-- 0 root (0) root (0) 6309 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956.html\n+-rw-r--r-- 0 root (0) root (0) 55806 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html\n+-rw-r--r-- 0 root (0) root (0) 6024 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959.html\n+-rw-r--r-- 0 root (0) root (0) 82294 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html\n+-rw-r--r-- 0 root (0) root (0) 4404 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962.html\n+-rw-r--r-- 0 root (0) root (0) 33733 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html\n+-rw-r--r-- 0 root (0) root (0) 5692 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965.html\n+-rw-r--r-- 0 root (0) root (0) 50144 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html\n+-rw-r--r-- 0 root (0) root (0) 7875 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968.html\n+-rw-r--r-- 0 root (0) root (0) 107478 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html\n -rw-r--r-- 0 root (0) root (0) 10913 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971.html\n -rw-r--r-- 0 root (0) root (0) 83026 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00971_source.html\n -rw-r--r-- 0 root (0) root (0) 19890 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00974.html\n -rw-r--r-- 0 root (0) root (0) 125516 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00974_source.html\n -rw-r--r-- 0 root (0) root (0) 6084 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00977.html\n -rw-r--r-- 0 root (0) root (0) 32956 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00977_source.html\n--rw-r--r-- 0 root (0) root (0) 4746 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980.html\n--rw-r--r-- 0 root (0) root (0) 34952 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html\n--rw-r--r-- 0 root (0) root (0) 5613 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html\n--rw-r--r-- 0 root (0) root (0) 14938 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html\n--rw-r--r-- 0 root (0) root (0) 6568 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986.html\n--rw-r--r-- 0 root (0) root (0) 35045 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html\n--rw-r--r-- 0 root (0) root (0) 8285 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989.html\n--rw-r--r-- 0 root (0) root (0) 89374 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html\n--rw-r--r-- 0 root (0) root (0) 4676 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html\n--rw-r--r-- 0 root (0) root (0) 27562 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html\n--rw-r--r-- 0 root (0) root (0) 4417 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html\n--rw-r--r-- 0 root (0) root (0) 36170 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html\n--rw-r--r-- 0 root (0) root (0) 6794 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998.html\n--rw-r--r-- 0 root (0) root (0) 70860 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html\n--rw-r--r-- 0 root (0) root (0) 3733 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html\n--rw-r--r-- 0 root (0) root (0) 7093 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html\n--rw-r--r-- 0 root (0) root (0) 5564 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html\n--rw-r--r-- 0 root (0) root (0) 72931 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html\n--rw-r--r-- 0 root (0) root (0) 5873 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html\n--rw-r--r-- 0 root (0) root (0) 30090 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html\n--rw-r--r-- 0 root (0) root (0) 4900 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html\n--rw-r--r-- 0 root (0) root (0) 40597 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html\n--rw-r--r-- 0 root (0) root (0) 5730 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html\n--rw-r--r-- 0 root (0) root (0) 34258 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html\n--rw-r--r-- 0 root (0) root (0) 6090 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html\n--rw-r--r-- 0 root (0) root (0) 44110 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html\n--rw-r--r-- 0 root (0) root (0) 5197 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html\n--rw-r--r-- 0 root (0) root (0) 12304 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html\n+-rw-r--r-- 0 root (0) root (0) 4417 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980.html\n+-rw-r--r-- 0 root (0) root (0) 36170 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html\n+-rw-r--r-- 0 root (0) root (0) 3733 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983.html\n+-rw-r--r-- 0 root (0) root (0) 7093 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html\n+-rw-r--r-- 0 root (0) root (0) 4746 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986.html\n+-rw-r--r-- 0 root (0) root (0) 34952 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html\n+-rw-r--r-- 0 root (0) root (0) 4900 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989.html\n+-rw-r--r-- 0 root (0) root (0) 40597 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html\n+-rw-r--r-- 0 root (0) root (0) 5197 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992.html\n+-rw-r--r-- 0 root (0) root (0) 12304 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html\n+-rw-r--r-- 0 root (0) root (0) 5613 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995.html\n+-rw-r--r-- 0 root (0) root (0) 14938 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html\n+-rw-r--r-- 0 root (0) root (0) 6568 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998.html\n+-rw-r--r-- 0 root (0) root (0) 35045 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html\n+-rw-r--r-- 0 root (0) root (0) 5564 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001.html\n+-rw-r--r-- 0 root (0) root (0) 72931 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html\n+-rw-r--r-- 0 root (0) root (0) 4676 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004.html\n+-rw-r--r-- 0 root (0) root (0) 27562 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html\n+-rw-r--r-- 0 root (0) root (0) 5730 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007.html\n+-rw-r--r-- 0 root (0) root (0) 34258 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html\n+-rw-r--r-- 0 root (0) root (0) 6090 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010.html\n+-rw-r--r-- 0 root (0) root (0) 44110 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html\n+-rw-r--r-- 0 root (0) root (0) 5873 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013.html\n+-rw-r--r-- 0 root (0) root (0) 30090 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html\n+-rw-r--r-- 0 root (0) root (0) 8285 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016.html\n+-rw-r--r-- 0 root (0) root (0) 89374 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html\n+-rw-r--r-- 0 root (0) root (0) 6794 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019.html\n+-rw-r--r-- 0 root (0) root (0) 70860 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html\n -rw-r--r-- 0 root (0) root (0) 16840 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022.html\n -rw-r--r-- 0 root (0) root (0) 406328 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01022_source.html\n -rw-r--r-- 0 root (0) root (0) 13475 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01025.html\n -rw-r--r-- 0 root (0) root (0) 11655 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01026.html\n -rw-r--r-- 0 root (0) root (0) 3398 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01027.html\n -rw-r--r-- 0 root (0) root (0) 11879 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01028.html\n -rw-r--r-- 0 root (0) root (0) 14648 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/a01028.png\n@@ -1943,15 +1943,15 @@\n -rw-r--r-- 0 root (0) root (0) 21235 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e5ae0335e78259a61f16e105bf289391_dep.png\n -rw-r--r-- 0 root (0) root (0) 14538 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce.html\n -rw-r--r-- 0 root (0) root (0) 3165 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce_dep.png\n -rw-r--r-- 0 root (0) root (0) 4670 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae.html\n -rw-r--r-- 0 root (0) root (0) 4414 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dir_e68e8157741866f444e17edd764ebbae_dep.png\n -rw-r--r-- 0 root (0) root (0) 746 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/doc.png\n -rw-r--r-- 0 root (0) root (0) 33676 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/doxygen.css\n--rw-r--r-- 0 root (0) root (0) 227839 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz\n+-rw-r--r-- 0 root (0) root (0) 227854 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz\n -rw-r--r-- 0 root (0) root (0) 4452 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/dynsections.js\n -rw-r--r-- 0 root (0) root (0) 1265 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1c.png\n -rw-r--r-- 0 root (0) root (0) 1949 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1cs.png\n -rw-r--r-- 0 root (0) root (0) 2042 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1gen.png\n -rw-r--r-- 0 root (0) root (0) 2422 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1genangle.png\n -rw-r--r-- 0 root (0) root (0) 2247 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid1s.png\n -rw-r--r-- 0 root (0) root (0) 5575 2023-01-12 22:10:10.000000 ./usr/share/doc/libdune-grid-doc/doxygen/examplegrid2a.png\n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00155.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00155.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgrididset.hh File Reference\n+dune-grid: yaspgridentityseed.hh File Reference\n \n \n \n \n \n \n \n@@ -65,32 +65,37 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n
    \n Classes |\n Namespaces
    \n-
    yaspgrididset.hh File Reference
    \n+
    yaspgridentityseed.hh File Reference
    \n
    \n
    \n \n+

    The YaspEntitySeed class. \n+More...

    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::YaspGlobalIdSet< GridImp >
     persistent, globally unique Ids More...
    class  Dune::YaspEntitySeed< codim, GridImp >
     Describes the minimal information necessary to create a fully functional YaspEntity. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    The YaspEntitySeed class.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,20 +6,24 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n Classes | Namespaces\n-yaspgrididset.hh File Reference\n+yaspgridentityseed.hh File Reference\n+The YaspEntitySeed class. More...\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::YaspGlobalIdSet<_GridImp_>\n-\u00a0 persistent, globally unique Ids More...\n+class \u00a0Dune::YaspEntitySeed<_codim,_GridImp_>\n+\u00a0 Describes the minimal information necessary to create a fully\n+ functional YaspEntity. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+***** Detailed Description *****\n+The YaspEntitySeed class.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00155_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00155_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgrididset.hh Source File\n+dune-grid: yaspgridentityseed.hh Source File\n \n \n \n \n \n \n \n@@ -62,80 +62,74 @@\n \n
    \n \n
    \n \n
    \n-
    yaspgrididset.hh
    \n+
    yaspgridentityseed.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRIDIDSET_HH
    \n-
    6#define DUNE_GRID_YASPGRIDIDSET_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH
    \n+
    6#define DUNE_GRID_YASPGRIDENTITYSEED_HH
    \n
    7
    \n-
    8
    \n-
    9namespace Dune {
    \n-
    10
    \n-
    11 //========================================================================
    \n-
    16 //========================================================================
    \n-
    17
    \n-
    18 template<class GridImp>
    \n-
    19 class YaspGlobalIdSet : public IdSet<GridImp,YaspGlobalIdSet<GridImp>,
    \n-
    20 typename std::remove_const<GridImp>::type::PersistentIndexType >
    \n-
    21 /*
    \n-
    22 We used the remove_const to extract the Type from the mutable class,
    \n-
    23 because the const class is not instantiated yet.
    \n-
    24 */
    \n-
    25 {
    \n-\n-
    27
    \n-
    28 public:
    \n-
    30 typedef typename std::remove_const<GridImp>::type::PersistentIndexType IdType;
    \n-
    31
    \n-
    32 using IdSet<GridImp, This, IdType>::subId;
    \n-
    33
    \n-\n+
    12namespace Dune {
    \n+
    13
    \n+
    16 template<int codim, class GridImp>
    \n+\n+
    18 {
    \n+
    20 constexpr static int dim = GridImp::dimension;
    \n+
    21
    \n+
    22 public:
    \n+
    24 constexpr static int codimension = codim;
    \n+
    25
    \n+\n+
    28 : _l(-1), _o(0)
    \n+
    29 {
    \n+
    30 std::fill(_c.begin(),_c.end(),0);
    \n+
    31 }
    \n+
    32
    \n+
    34 YaspEntitySeed (int level, std::array<int, dim> coord, int o = 0)
    \n+
    35 : _l(level), _c(coord), _o(o)
    \n
    36 {}
    \n
    37
    \n-
    39 /*
    \n-
    40 We use the remove_const to extract the Type from the mutable class,
    \n-
    41 because the const class is not instantiated yet.
    \n-
    42 */
    \n-
    43 template<int cd>
    \n-
    44 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
    \n-
    45 {
    \n-
    46 return e.impl().persistentIndex();
    \n-
    47 }
    \n-
    48
    \n-
    50 /*
    \n-
    51 We use the remove_const to extract the Type from the mutable class,
    \n-
    52 because the const class is not instantiated yet.
    \n-
    53 */
    \n-
    54 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim< 0 >::Entity &e,
    \n-
    55 int i, unsigned int codim ) const
    \n-
    56 {
    \n-
    57 return e.impl().subPersistentIndex(i,codim);
    \n-
    58 }
    \n-
    59
    \n-
    60 };
    \n-
    61
    \n-
    62} // namespace Dune
    \n-
    63
    \n-
    64#endif // DUNE_GRID_YASPGRIDIDSET_HH
    \n+
    39 bool isValid() const
    \n+
    40 {
    \n+
    41 return _l != -1;
    \n+
    42 }
    \n+
    43
    \n+
    44 int level () const { return _l; }
    \n+
    45 const std::array<int, dim> & coord() const { return _c; }
    \n+
    46 int offset () const { return _o; }
    \n+
    47
    \n+
    48 protected:
    \n+
    49 int _l; // grid level
    \n+
    50 std::array<int, dim> _c; // coord in the global grid
    \n+
    51 int _o; // the offset: which YGridComponent, does the entity belong to
    \n+
    52 };
    \n+
    53
    \n+
    54} // namespace Dune
    \n+
    55
    \n+
    56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Id Set Interface.
    Definition: indexidset.hh:452
    \n-
    persistent, globally unique Ids
    Definition: yaspgrididset.hh:25
    \n-
    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
    \n-
    std::remove_const< GridImp >::type::PersistentIndexType IdType
    define the type used for persistent indices
    Definition: yaspgrididset.hh:30
    \n-
    YaspGlobalIdSet()
    Only default-constructible.
    Definition: yaspgrididset.hh:35
    \n-
    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
    \n+
    Describes the minimal information necessary to create a fully functional YaspEntity.
    Definition: yaspgridentityseed.hh:18
    \n+
    int _o
    Definition: yaspgridentityseed.hh:51
    \n+
    std::array< int, dim > _c
    Definition: yaspgridentityseed.hh:50
    \n+
    int _l
    Definition: yaspgridentityseed.hh:49
    \n+
    int level() const
    Definition: yaspgridentityseed.hh:44
    \n+
    YaspEntitySeed()
    default construct an invalid entity seed
    Definition: yaspgridentityseed.hh:27
    \n+
    YaspEntitySeed(int level, std::array< int, dim > coord, int o=0)
    constructor
    Definition: yaspgridentityseed.hh:34
    \n+
    int offset() const
    Definition: yaspgridentityseed.hh:46
    \n+
    static constexpr int codimension
    codimension of entity
    Definition: yaspgridentityseed.hh:24
    \n+
    const std::array< int, dim > & coord() const
    Definition: yaspgridentityseed.hh:45
    \n+
    bool isValid() const
    check whether the EntitySeed refers to a valid Entity
    Definition: yaspgridentityseed.hh:39
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,99 +5,99 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-yaspgrididset.hh\n+yaspgridentityseed.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRIDIDSET_HH\n- 6#define DUNE_GRID_YASPGRIDIDSET_HH\n+ 5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH\n+ 6#define DUNE_GRID_YASPGRIDENTITYSEED_HH\n 7\n- 8\n- 9namespace Dune {\n- 10\n- 11 //========================================================================\n- 16 //========================================================================\n- 17\n- 18 template\n-19 class YaspGlobalIdSet : public IdSet,\n- 20 typename std::remove_const::type::PersistentIndexType >\n- 21 /*\n- 22 We used the remove_const to extract the Type from the mutable class,\n- 23 because the const class is not instantiated yet.\n- 24 */\n- 25 {\n- 26 typedef YaspGlobalIdSet<_GridImp_> This;\n- 27\n- 28 public:\n-30 typedef typename std::remove_const::type::PersistentIndexType\n-IdType;\n- 31\n- 32 using IdSet::subId;\n- 33\n-35 YaspGlobalIdSet()\n+ 12namespace Dune {\n+ 13\n+ 16 template\n+17 class YaspEntitySeed\n+ 18 {\n+ 20 constexpr static int dim = GridImp::dimension;\n+ 21\n+ 22 public:\n+24 constexpr static int codimension = codim;\n+ 25\n+27 YaspEntitySeed ()\n+ 28 : _l(-1), _o(0)\n+ 29 {\n+ 30 std::fill(_c.begin(),_c.end(),0);\n+ 31 }\n+ 32\n+34 YaspEntitySeed (int level, std::array coord, int o = 0)\n+ 35 : _l(level), _c(coord), _o(o)\n 36 {}\n 37\n- 39 /*\n- 40 We use the remove_const to extract the Type from the mutable class,\n- 41 because the const class is not instantiated yet.\n- 42 */\n- 43 template\n-44 IdType id (const typename std::remove_const::type::Traits::template\n-Codim::Entity& e) const\n- 45 {\n- 46 return e.impl().persistentIndex();\n- 47 }\n- 48\n- 50 /*\n- 51 We use the remove_const to extract the Type from the mutable class,\n- 52 because the const class is not instantiated yet.\n- 53 */\n-54 IdType subId (const typename std::remove_const::type::Traits::\n-template Codim< 0 >::Entity &e,\n- 55 int i, unsigned int codim ) const\n- 56 {\n- 57 return e.impl().subPersistentIndex(i,codim);\n- 58 }\n- 59\n- 60 };\n- 61\n- 62} // namespace Dune\n- 63\n- 64#endif // DUNE_GRID_YASPGRIDIDSET_HH\n+39 bool isValid() const\n+ 40 {\n+ 41 return _l != -1;\n+ 42 }\n+ 43\n+44 int level () const { return _l; }\n+45 const std::array & coord() const { return _c; }\n+46 int offset () const { return _o; }\n+ 47\n+ 48 protected:\n+49 int _l; // grid level\n+50 std::array _c; // coord in the global grid\n+51 int _o; // the offset: which YGridComponent, does the entity belong to\n+ 52 };\n+ 53\n+ 54} // namespace Dune\n+ 55\n+ 56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::IdSet\n-Id Set Interface.\n-Definition: indexidset.hh:452\n-Dune::YaspGlobalIdSet\n-persistent, globally unique Ids\n-Definition: yaspgrididset.hh:25\n-Dune::YaspGlobalIdSet::subId\n-IdType subId(const typename std::remove_const< GridImp >::type::Traits::\n-template Codim< 0 >::Entity &e, int i, unsigned int codim) const\n-get id of subentity\n-Definition: yaspgrididset.hh:54\n-Dune::YaspGlobalIdSet::IdType\n-std::remove_const< GridImp >::type::PersistentIndexType IdType\n-define the type used for persistent indices\n-Definition: yaspgrididset.hh:30\n-Dune::YaspGlobalIdSet::YaspGlobalIdSet\n-YaspGlobalIdSet()\n-Only default-constructible.\n-Definition: yaspgrididset.hh:35\n-Dune::YaspGlobalIdSet::id\n-IdType id(const typename std::remove_const< GridImp >::type::Traits::template\n-Codim< cd >::Entity &e) const\n-get id of an entity\n-Definition: yaspgrididset.hh:44\n+Dune::YaspEntitySeed\n+Describes the minimal information necessary to create a fully functional\n+YaspEntity.\n+Definition: yaspgridentityseed.hh:18\n+Dune::YaspEntitySeed::_o\n+int _o\n+Definition: yaspgridentityseed.hh:51\n+Dune::YaspEntitySeed::_c\n+std::array< int, dim > _c\n+Definition: yaspgridentityseed.hh:50\n+Dune::YaspEntitySeed::_l\n+int _l\n+Definition: yaspgridentityseed.hh:49\n+Dune::YaspEntitySeed::level\n+int level() const\n+Definition: yaspgridentityseed.hh:44\n+Dune::YaspEntitySeed::YaspEntitySeed\n+YaspEntitySeed()\n+default construct an invalid entity seed\n+Definition: yaspgridentityseed.hh:27\n+Dune::YaspEntitySeed::YaspEntitySeed\n+YaspEntitySeed(int level, std::array< int, dim > coord, int o=0)\n+constructor\n+Definition: yaspgridentityseed.hh:34\n+Dune::YaspEntitySeed::offset\n+int offset() const\n+Definition: yaspgridentityseed.hh:46\n+Dune::YaspEntitySeed::codimension\n+static constexpr int codimension\n+codimension of entity\n+Definition: yaspgridentityseed.hh:24\n+Dune::YaspEntitySeed::coord\n+const std::array< int, dim > & coord() const\n+Definition: yaspgridentityseed.hh:45\n+Dune::YaspEntitySeed::isValid\n+bool isValid() const\n+check whether the EntitySeed refers to a valid Entity\n+Definition: yaspgridentityseed.hh:39\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00158.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00158.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridintersection.hh File Reference\n+dune-grid: yaspgridgeometry.hh File Reference\n \n \n \n \n \n \n \n@@ -65,38 +65,46 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n \n-
    yaspgridintersection.hh File Reference
    \n+
    yaspgridgeometry.hh File Reference
    \n
    \n
    \n \n-

    The YaspIntersection class. \n+

    The YaspGeometry class and its specializations. \n More...

    \n \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::YaspIntersection< GridImp >
     YaspIntersection provides data about intersection with neighboring codim 0 entities. More...
    class  Dune::YaspGeometry< mydim, cdim, GridImp >
     The general version that handles all codimensions but 0 and dim. More...
     
    class  Dune::YaspGeometry< mydim, mydim, GridImp >
     specialize for dim=dimworld, i.e. a volume element More...
     
    class  Dune::YaspGeometry< 0, cdim, GridImp >
     specialization for dim=0, this is a vertex More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The YaspIntersection class.

    \n-

    YaspIntersection provides data about intersection with neighboring codim 0 entities.

    \n+

    The YaspGeometry class and its specializations.

    \n+

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

    \n+

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

    \n+

    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.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,26 +6,37 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n Classes | Namespaces\n-yaspgridintersection.hh File Reference\n-The YaspIntersection class. More...\n+yaspgridgeometry.hh File Reference\n+The YaspGeometry class and its specializations. More...\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::YaspIntersection<_GridImp_>\n-\u00a0 YaspIntersection provides data about intersection with neighboring\n- codim 0 entities. More...\n+class \u00a0Dune::YaspGeometry<_mydim,_cdim,_GridImp_>\n+\u00a0 The general version that handles all codimensions but 0 and dim.\n+ More...\n+\u00a0\n+class \u00a0Dune::YaspGeometry<_mydim,_mydim,_GridImp_>\n+\u00a0 specialize for dim=dimworld, i.e. a volume element More...\n+\u00a0\n+class \u00a0Dune::YaspGeometry<_0,_cdim,_GridImp_>\n+\u00a0 specialization for dim=0, this is a vertex More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The YaspIntersection class.\n-YaspIntersection provides data about intersection with neighboring codim 0\n-entities.\n+The YaspGeometry class and its specializations.\n+YaspGeometry realizes the concept of the geometric part of a mesh entity.\n+We have specializations for dim == dimworld (elements) and dim == 0 (vertices).\n+The general version implements all other codimensions.\n+As of September 2014, the functionality of YaspGeometry is identical to that of\n+AxisAlignedCubeGeometry. The latter cannot be used directly due to the grid\n+interface facade construction (it isn't templated to the GridImp). As soon as\n+template aliases are available, this header boils down to one line.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00158_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridintersection.hh Source File\n+dune-grid: yaspgridgeometry.hh Source File\n \n \n \n \n \n \n \n@@ -62,359 +62,81 @@\n \n \n
    \n
    \n-
    yaspgridintersection.hh
    \n+
    yaspgridgeometry.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRIDINTERSECTION_HH
    \n-
    6#define DUNE_GRID_YASPGRIDINTERSECTION_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH
    \n+
    6#define DUNE_GRID_YASPGRIDGEOMETRY_HH
    \n
    7
    \n-
    15namespace Dune {
    \n-
    16
    \n-
    20 template<class GridImp>
    \n-\n-
    22 {
    \n-
    23 constexpr static int dim = GridImp::dimension;
    \n-
    24 constexpr static int dimworld = GridImp::dimensionworld;
    \n-
    25 typedef typename GridImp::ctype ctype;
    \n-
    26
    \n-
    27 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
    \n-
    28 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
    \n-
    29
    \n-
    30 friend class YaspIntersectionIterator<GridImp>;
    \n-
    31
    \n+
    23namespace Dune {
    \n+
    24
    \n+
    29 template<int mydim,int cdim, class GridImp>
    \n+
    30 class YaspGeometry : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,cdim>
    \n+
    31 {
    \n
    32 public:
    \n-
    33 // types used from grids
    \n-
    34 typedef typename GridImp::YGridLevelIterator YGLI;
    \n-
    35 typedef typename GridImp::YGrid::Iterator I;
    \n-
    36 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n-
    37 typedef typename GridImp::template Codim<1>::Geometry Geometry;
    \n-
    38 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
    \n-
    39
    \n-
    40 void update() {
    \n-
    41
    \n-
    42 // vector with per-direction movements
    \n-
    43 std::array<int,dim> dist{{0}};
    \n-
    44
    \n-
    45 // first move: back to center
    \n-
    46 dist[_dir] = 1 - 2*_face;
    \n-
    47
    \n-
    48 // update face info
    \n-
    49 _dir = _count / 2;
    \n-
    50 _face = _count % 2;
    \n-
    51
    \n-
    52 // second move: to new neighbor
    \n-
    53 dist[_dir] += -1 + 2*_face;
    \n-
    54
    \n-
    55 // move transforming iterator
    \n-
    56 _outside.transformingsubiterator().move(dist);
    \n-
    57 }
    \n-
    58
    \n-
    62 bool boundary () const
    \n-
    63 {
    \n-
    64 // Coordinate of intersection in its direction
    \n-
    65 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
    \n-
    66 if (_inside.gridlevel()->mg->isPeriodic(_dir))
    \n-
    67 return false;
    \n-
    68 else
    \n-
    69 return coord == 0
    \n-
    70 ||
    \n-
    71 coord == _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),_dir);
    \n-
    72 }
    \n+
    34 typedef typename GridImp::ctype ctype;
    \n+
    35
    \n+
    37 YaspGeometry (const FieldVector<ctype, cdim>& ll, const FieldVector<ctype, cdim>& ur, const std::bitset<cdim>& shift)
    \n+
    38 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(ll,ur,shift)
    \n+
    39 {
    \n+
    40 assert(mydim == shift.count());
    \n+
    41 }
    \n+
    42 };
    \n+
    43
    \n+
    45 template<int mydim, class GridImp>
    \n+
    46 class YaspGeometry<mydim,mydim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,mydim>
    \n+
    47 {
    \n+
    48 public:
    \n+
    49 typedef typename GridImp::ctype ctype;
    \n+
    50
    \n+
    52 YaspGeometry (const FieldVector<ctype, mydim>& ll, const FieldVector<ctype, mydim>& ur)
    \n+
    53 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(ll,ur)
    \n+
    54 {}
    \n+
    55
    \n+\n+
    58 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(other)
    \n+
    59 {}
    \n+
    60 };
    \n+
    61
    \n+
    63 template<int cdim, class GridImp>
    \n+
    64 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>
    \n+
    65 {
    \n+
    66 public:
    \n+
    67 typedef typename GridImp::ctype ctype;
    \n+
    68
    \n+
    70 explicit YaspGeometry ( const FieldVector< ctype, cdim > &p )
    \n+
    71 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
    \n+
    72 {}
    \n
    73
    \n-
    75 bool neighbor () const
    \n-
    76 {
    \n-
    77 // Coordinate of intersection in its direction
    \n-
    78 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
    \n-
    79 return coord > _inside.gridlevel()->overlap[0].dataBegin()->min(_dir)
    \n-
    80 &&
    \n-
    81 coord <= _inside.gridlevel()->overlap[0].dataBegin()->max(_dir);
    \n-
    82 }
    \n-
    83
    \n-
    85 bool conforming () const
    \n-
    86 {
    \n-
    87 return true;
    \n-
    88 }
    \n-
    89
    \n-
    92 Entity inside() const
    \n-
    93 {
    \n-
    94 return Entity(_inside);
    \n-
    95 }
    \n-
    96
    \n-\n-
    99 {
    \n-
    100 return Entity(_outside);
    \n-
    101 }
    \n-
    102
    \n-\n-
    106 {
    \n-
    107 if(! boundary())
    \n-
    108 DUNE_THROW(GridError, "called boundarySegmentIndex while boundary() == false");
    \n-
    109 // size of local macro grid
    \n-
    110 const std::array<int, dim> & size = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size();
    \n-
    111 const std::array<int, dim> & origin = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin();
    \n-
    112 std::array<int, dim> sides;
    \n-
    113 {
    \n-
    114 for (int i=0; i<dim; i++)
    \n-
    115 {
    \n-
    116 sides[i] =
    \n-
    117 ((_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i)
    \n-
    118 == 0)+
    \n-
    119 (_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i) +
    \n-
    120 _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size(i)
    \n-
    121 ==
    \n-
    122 _inside.gridlevel()->mg->levelSize(0,i)));
    \n-
    123
    \n-
    124 }
    \n-
    125 }
    \n-
    126 // global position of the cell on macro grid
    \n-
    127 std::array<int, dim> pos = _inside.transformingsubiterator().coord();
    \n-
    128 for(int i=0; i<dim; i++)
    \n-
    129 {
    \n-
    130 pos[i] = pos[i] / (1<<_inside.level());
    \n-
    131 pos[i] = pos[i] - origin[i];
    \n-
    132 }
    \n-
    133 // compute unit-cube-face-sizes
    \n-
    134 std::array<int, dim> fsize;
    \n-
    135 {
    \n-
    136 int vol = 1;
    \n-
    137 for (int k=0; k<dim; k++)
    \n-
    138 vol *= size[k];
    \n-
    139 for (int k=0; k<dim; k++)
    \n-
    140 fsize[k] = vol/size[k];
    \n-
    141 }
    \n-
    142 // compute index in the unit-cube-face
    \n-
    143 int index = 0;
    \n-
    144 {
    \n-
    145 int localoffset = 1;
    \n-
    146 for (int k=dim-1; k>=0; k--)
    \n-
    147 {
    \n-
    148 if (k == _dir) continue;
    \n-
    149 index += (pos[k]) * localoffset;
    \n-
    150 localoffset *= size[k];
    \n-
    151 }
    \n-
    152 }
    \n-
    153 // add unit-cube-face-offsets
    \n-
    154 {
    \n-
    155 for (int k=0; k<_dir; k++)
    \n-
    156 index += sides[k] * fsize[k];
    \n-
    157 // add fsize if we are on the right face and there is a left-face-boundary on this processor
    \n-
    158 index += _face * (sides[_dir]>1) * fsize[_dir];
    \n-
    159 }
    \n-
    160
    \n-
    161 return index;
    \n-
    162 }
    \n-
    163
    \n-
    165 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& /* local */) const
    \n-
    166 {
    \n-
    167 return centerUnitOuterNormal();
    \n-
    168 }
    \n-
    169
    \n-
    171 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& /* local */) const
    \n-
    172 {
    \n-
    173 return centerUnitOuterNormal();
    \n-
    174 }
    \n-
    175
    \n-
    177 FieldVector<ctype, dimworld> centerUnitOuterNormal () const
    \n-
    178 {
    \n-
    179 FieldVector<ctype, dimworld> normal(0);
    \n-
    180 normal[_dir] = (_face==0) ? -1.0 : 1.0;
    \n-
    181 return normal;
    \n-
    182 }
    \n-
    183
    \n-
    187 FieldVector<ctype, dimworld> integrationOuterNormal ([[maybe_unused]] const FieldVector<ctype, dim-1>& local) const
    \n-
    188 {
    \n-
    189 return geometry().volume() * centerUnitOuterNormal();
    \n-
    190 }
    \n-
    191
    \n-\n-
    196 {
    \n-
    197 // set of dimensions that span the intersection
    \n-
    198 std::bitset<dim> s;
    \n-
    199 s.set();
    \n-
    200 s[_dir] = false;
    \n-
    201
    \n-
    202 // lower-left and upper-right corners
    \n-
    203 Dune::FieldVector<ctype, dim> ll(0.0);
    \n-
    204 Dune::FieldVector<ctype, dim> ur(1.0);
    \n-
    205
    \n-
    206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0;
    \n-
    207
    \n-
    208 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
    \n-
    209 }
    \n-
    210
    \n-\n-
    215 {
    \n-
    216 // set of dimensions that span the intersection
    \n-
    217 std::bitset<dim> s;
    \n-
    218 s.set();
    \n-
    219 s[_dir] = false;
    \n-
    220
    \n-
    221 // lower-left and upper-right corners
    \n-
    222 Dune::FieldVector<ctype, dim> ll(0.0);
    \n-
    223 Dune::FieldVector<ctype, dim> ur(1.0);
    \n-
    224
    \n-
    225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0;
    \n-
    226
    \n-
    227 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
    \n-
    228 }
    \n-
    229
    \n-\n-
    233 {
    \n-
    234
    \n-
    235 std::bitset<dim> shift;
    \n-
    236 shift.set();
    \n-
    237 shift[_dir] = false;
    \n-
    238
    \n-
    239 Dune::FieldVector<ctype,dimworld> ll, ur;
    \n-
    240 for (int i=0; i<dimworld; i++)
    \n-
    241 {
    \n-
    242 int coord = _inside.transformingsubiterator().coord(i);
    \n-
    243
    \n-
    244 if ((i == _dir) and (_face))
    \n-
    245 coord++;
    \n-
    246
    \n-
    247 ll[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
    \n-
    248 if (i != _dir)
    \n-
    249 coord++;
    \n-
    250 ur[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
    \n-
    251
    \n-
    252 // If on periodic overlap, transform coordinates by domain size
    \n-
    253 if (_inside.gridlevel()->mg->isPeriodic(i)) {
    \n-
    254 int coordPeriodic = _inside.transformingsubiterator().coord(i);
    \n-
    255 if (coordPeriodic < 0) {
    \n-
    256 auto size = _inside.gridlevel()->mg->domainSize()[i];
    \n-
    257 ll[i] += size;
    \n-
    258 ur[i] += size;
    \n-
    259 } else if (coordPeriodic + 1 > _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),i)) {
    \n-
    260 auto size = _inside.gridlevel()->mg->domainSize()[i];
    \n-
    261 ll[i] -= size;
    \n-
    262 ur[i] -= size;
    \n-
    263 }
    \n-
    264 }
    \n-
    265 }
    \n-
    266
    \n-
    267 GeometryImpl _is_global(ll,ur,shift);
    \n-
    268 return Geometry( _is_global );
    \n-
    269 }
    \n-
    270
    \n-\n-
    273 {
    \n-
    274 return GeometryTypes::cube(dim-1);
    \n-
    275 }
    \n-
    276
    \n-
    278 int indexInInside () const
    \n-
    279 {
    \n-
    280 return _count;
    \n-
    281 }
    \n-
    282
    \n-
    284 int indexInOutside () const
    \n-
    285 {
    \n-
    286 // flip the last bit
    \n-
    287 return _count^1;
    \n-
    288 }
    \n-
    289
    \n-\n-
    291 : _count(~std::uint8_t(0)) // Use as marker for invalid intersection
    \n-
    292 , _dir(0)
    \n-
    293 , _face(0)
    \n-
    294 {}
    \n-
    295
    \n-
    297 YaspIntersection (const YaspEntity<0,dim,GridImp>& myself, bool toend) :
    \n-
    298 _inside(myself.gridlevel(),
    \n-
    299 myself.transformingsubiterator()),
    \n-
    300 _outside(myself.gridlevel(),
    \n-
    301 myself.transformingsubiterator()),
    \n-
    302 // initialize to first neighbor
    \n-
    303 _count(0),
    \n-
    304 _dir(0),
    \n-
    305 _face(0)
    \n-
    306 {
    \n-
    307 if (toend)
    \n-
    308 {
    \n-
    309 // initialize end iterator
    \n-
    310 _count = 2*dim;
    \n-
    311 return;
    \n-
    312 }
    \n-
    313 _count = 0;
    \n-
    314
    \n-
    315 // move transforming iterator
    \n-
    316 _outside.transformingsubiterator().move(_dir,-1);
    \n-
    317 }
    \n-
    318
    \n-
    320
    \n-
    322 void assign (const YaspIntersection& it)
    \n-
    323 {
    \n-
    324 *this = it;
    \n-
    325 }
    \n-
    326
    \n-
    327 bool equals(const YaspIntersection& other) const
    \n-
    328 {
    \n-
    329 // compare counts first -- that's cheaper if the test fails
    \n-
    330 return _count == other._count && _inside.equals(other._inside);
    \n-
    331 }
    \n-
    332
    \n-
    333 private:
    \n-
    334 /* The two entities that make up the intersection */
    \n-\n-\n-
    337 /* current position */
    \n-
    338 std::uint8_t _count;
    \n-
    339 std::uint8_t _dir;
    \n-
    340 std::uint8_t _face;
    \n-
    341 };
    \n-
    342} // namespace Dune
    \n-
    343
    \n-
    344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH
    \n-
    STL namespace.
    \n+
    74 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset<cdim> &)
    \n+
    75 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
    \n+
    76 {}
    \n+
    77 };
    \n+
    78} // namespace Dune
    \n+
    79
    \n+
    80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n-\n-
    int level() const
    level of this element
    Definition: yaspgridentity.hh:282
    \n-
    const YGLI & gridlevel() const
    Definition: yaspgridentity.hh:420
    \n-
    const I & transformingsubiterator() const
    Definition: yaspgridentity.hh:419
    \n-
    bool equals(const YaspEntity &e) const
    Return true when two iterators over the same grid are equal (!).
    Definition: yaspgridentity.hh:347
    \n-
    YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.
    Definition: yaspgridintersectioniterator.hh:22
    \n-
    YaspIntersection provides data about intersection with neighboring codim 0 entities.
    Definition: yaspgridintersection.hh:22
    \n-
    FieldVector< ctype, dimworld > centerUnitOuterNormal() const
    return unit outer normal at center of intersection geometry
    Definition: yaspgridintersection.hh:177
    \n-
    bool equals(const YaspIntersection &other) const
    Definition: yaspgridintersection.hh:327
    \n-
    Entity inside() const
    Definition: yaspgridintersection.hh:92
    \n-
    Geometry geometry() const
    Definition: yaspgridintersection.hh:232
    \n-
    GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
    Definition: yaspgridintersection.hh:38
    \n-
    YaspIntersection()
    Definition: yaspgridintersection.hh:290
    \n-
    int indexInOutside() const
    local index of codim 1 entity in neighbor where intersection is contained in
    Definition: yaspgridintersection.hh:284
    \n-
    LocalGeometry geometryInInside() const
    Definition: yaspgridintersection.hh:195
    \n-
    int boundarySegmentIndex() const
    Definition: yaspgridintersection.hh:105
    \n-
    GridImp::template Codim< 1 >::Geometry Geometry
    Definition: yaspgridintersection.hh:37
    \n-
    bool conforming() const
    Yasp is always conform.
    Definition: yaspgridintersection.hh:85
    \n-
    GridImp::template Codim< 0 >::Entity Entity
    Definition: yaspgridintersection.hh:36
    \n-
    bool neighbor() const
    return true if neighbor across intersection exists in this processor
    Definition: yaspgridintersection.hh:75
    \n-
    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
    \n-
    YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend)
    make intersection iterator from entity, initialize to first neighbor
    Definition: yaspgridintersection.hh:297
    \n-
    GeometryType type() const
    obtain the type of reference element for this intersection
    Definition: yaspgridintersection.hh:272
    \n-
    void assign(const YaspIntersection &it)
    copy constructor \u2013 use default
    Definition: yaspgridintersection.hh:322
    \n-
    int indexInInside() const
    local index of codim 1 entity in self where intersection is contained in
    Definition: yaspgridintersection.hh:278
    \n-
    FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
    Definition: yaspgridintersection.hh:187
    \n-
    GridImp::YGrid::Iterator I
    Definition: yaspgridintersection.hh:35
    \n-
    LocalGeometry geometryInOutside() const
    Definition: yaspgridintersection.hh:214
    \n-
    GridImp::YGridLevelIterator YGLI
    Definition: yaspgridintersection.hh:34
    \n-
    Entity outside() const
    return Entity on the outside of this intersection
    Definition: yaspgridintersection.hh:98
    \n-
    bool boundary() const
    Definition: yaspgridintersection.hh:62
    \n-
    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
    \n-
    void update()
    Definition: yaspgridintersection.hh:40
    \n-
    Definition: yaspgridentity.hh:434
    \n+
    The general version that handles all codimensions but 0 and dim.
    Definition: yaspgridgeometry.hh:31
    \n+
    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
    \n+
    GridImp::ctype ctype
    define type used for coordinates in grid module
    Definition: yaspgridgeometry.hh:34
    \n+
    YaspGeometry(const YaspGeometry &other)
    copy constructor (skipping temporary variables)
    Definition: yaspgridgeometry.hh:57
    \n+
    GridImp::ctype ctype
    Definition: yaspgridgeometry.hh:49
    \n+
    YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, mydim > &ur)
    constructor from midpoint and extension
    Definition: yaspgridgeometry.hh:52
    \n+
    YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset< cdim > &)
    Definition: yaspgridgeometry.hh:74
    \n+
    YaspGeometry(const FieldVector< ctype, cdim > &p)
    constructor
    Definition: yaspgridgeometry.hh:70
    \n+
    GridImp::ctype ctype
    Definition: yaspgridgeometry.hh:67
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-utf-8\n+us-ascii\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,461 +5,112 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-yaspgridintersection.hh\n+yaspgridgeometry.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRIDINTERSECTION_HH\n- 6#define DUNE_GRID_YASPGRIDINTERSECTION_HH\n+ 5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH\n+ 6#define DUNE_GRID_YASPGRIDGEOMETRY_HH\n 7\n- 15namespace Dune {\n- 16\n- 20 template\n-21 class YaspIntersection\n- 22 {\n- 23 constexpr static int dim = GridImp::dimension;\n- 24 constexpr static int dimworld = GridImp::dimensionworld;\n- 25 typedef typename GridImp::ctype ctype;\n- 26\n- 27 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl\n-GeometryImpl;\n-28 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl\n-LocalGeometryImpl;\n- 29\n- 30 friend class YaspIntersectionIterator;\n- 31\n+ 23namespace Dune {\n+ 24\n+ 29 template\n+30 class YaspGeometry : public AxisAlignedCubeGeometry\n+ 31 {\n 32 public:\n- 33 // types used from grids\n-34 typedef typename GridImp::YGridLevelIterator YGLI;\n-35 typedef typename GridImp::YGrid::Iterator I;\n-36 typedef typename GridImp::template Codim<0>::Entity Entity;\n-37 typedef typename GridImp::template Codim<1>::Geometry Geometry;\n-38 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;\n- 39\n-40 void update() {\n- 41\n- 42 // vector with per-direction movements\n- 43 std::array dist{{0}};\n- 44\n- 45 // first move: back to center\n- 46 dist[_dir] = 1 - 2*_face;\n- 47\n- 48 // update face info\n- 49 _dir = _count / 2;\n- 50 _face = _count % 2;\n- 51\n- 52 // second move: to new neighbor\n- 53 dist[_dir] += -1 + 2*_face;\n- 54\n- 55 // move transforming iterator\n- 56 _outside.transformingsubiterator().move(dist);\n- 57 }\n- 58\n-62 bool boundary () const\n- 63 {\n- 64 // Coordinate of intersection in its direction\n- 65 int coord = _inside.transformingsubiterator().coord(_dir) + _face;\n- 66 if (_inside.gridlevel()->mg->isPeriodic(_dir))\n- 67 return false;\n- 68 else\n- 69 return coord == 0\n- 70 ||\n- 71 coord == _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level\n-(),_dir);\n- 72 }\n+34 typedef typename GridImp::ctype ctype;\n+ 35\n+37 YaspGeometry (const FieldVector& ll, const FieldVector& ur, const std::bitset& shift)\n+ 38 : AxisAlignedCubeGeometry(ll,ur,shift)\n+ 39 {\n+ 40 assert(mydim == shift.count());\n+ 41 }\n+ 42 };\n+ 43\n+ 45 template\n+46 class YaspGeometry : public\n+AxisAlignedCubeGeometry\n+ 47 {\n+ 48 public:\n+49 typedef typename GridImp::ctype ctype;\n+ 50\n+52 YaspGeometry (const FieldVector& ll, const FieldVector& ur)\n+ 53 : AxisAlignedCubeGeometry(ll,ur)\n+ 54 {}\n+ 55\n+57 YaspGeometry (const YaspGeometry& other)\n+ 58 : AxisAlignedCubeGeometry(other)\n+ 59 {}\n+ 60 };\n+ 61\n+ 63 template\n+64 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry\n+ 65 {\n+ 66 public:\n+67 typedef typename GridImp::ctype ctype;\n+ 68\n+70 explicit YaspGeometry ( const FieldVector< ctype, cdim > &p )\n+ 71 : AxisAlignedCubeGeometry( p )\n+ 72 {}\n 73\n-75 bool neighbor () const\n- 76 {\n- 77 // Coordinate of intersection in its direction\n- 78 int coord = _inside.transformingsubiterator().coord(_dir) + _face;\n- 79 return coord > _inside.gridlevel()->overlap[0].dataBegin()->min(_dir)\n- 80 &&\n- 81 coord <= _inside.gridlevel()->overlap[0].dataBegin()->max(_dir);\n- 82 }\n- 83\n-85 bool conforming () const\n- 86 {\n- 87 return true;\n- 88 }\n- 89\n-92 Entity inside() const\n- 93 {\n- 94 return Entity(_inside);\n- 95 }\n- 96\n-98 Entity outside() const\n- 99 {\n- 100 return Entity(_outside);\n- 101 }\n- 102\n-105 int boundarySegmentIndex() const\n- 106 {\n- 107 if(! boundary())\n- 108 DUNE_THROW(GridError, \"called boundarySegmentIndex while boundary() ==\n-false\");\n- 109 // size of local macro grid\n- 110 const std::array & size = _inside.gridlevel()->mg->begin()-\n->overlap[0].dataBegin()->size();\n- 111 const std::array & origin = _inside.gridlevel()->mg->begin()-\n->overlap[0].dataBegin()->origin();\n- 112 std::array sides;\n- 113 {\n- 114 for (int i=0; img->begin()->overlap[0].dataBegin()->origin(i)\n- 118 == 0)+\n- 119 (_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i) +\n- 120 _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size(i)\n- 121 ==\n- 122 _inside.gridlevel()->mg->levelSize(0,i)));\n- 123\n- 124 }\n- 125 }\n- 126 // global position of the cell on macro grid\n- 127 std::array pos = _inside.transformingsubiterator().coord();\n- 128 for(int i=0; i fsize;\n- 135 {\n- 136 int vol = 1;\n- 137 for (int k=0; k=0; k--)\n- 147 {\n- 148 if (k == _dir) continue;\n- 149 index += (pos[k]) * localoffset;\n- 150 localoffset *= size[k];\n- 151 }\n- 152 }\n- 153 // add unit-cube-face-offsets\n- 154 {\n- 155 for (int k=0; k<_dir; k++)\n- 156 index += sides[k] * fsize[k];\n- 157 // add fsize if we are on the right face and there is a left-face-boundary\n-on this processor\n- 158 index += _face * (sides[_dir]>1) * fsize[_dir];\n- 159 }\n- 160\n- 161 return index;\n- 162 }\n- 163\n-165 FieldVector outerNormal (const FieldVector&\n-/* local */) const\n- 166 {\n- 167 return centerUnitOuterNormal();\n- 168 }\n- 169\n-171 FieldVector unitOuterNormal (const FieldVector& /* local */) const\n- 172 {\n- 173 return centerUnitOuterNormal();\n- 174 }\n- 175\n-177 FieldVector centerUnitOuterNormal () const\n- 178 {\n- 179 FieldVector normal(0);\n- 180 normal[_dir] = (_face==0) ? -1.0 : 1.0;\n- 181 return normal;\n- 182 }\n- 183\n-187 FieldVector integrationOuterNormal ([[maybe_unused]] const\n-FieldVector& local) const\n- 188 {\n- 189 return geometry().volume() * centerUnitOuterNormal();\n- 190 }\n- 191\n-195 LocalGeometry geometryInInside () const\n- 196 {\n- 197 // set of dimensions that span the intersection\n- 198 std::bitset s;\n- 199 s.set();\n- 200 s[_dir] = false;\n- 201\n- 202 // lower-left and upper-right corners\n- 203 Dune::FieldVector ll(0.0);\n- 204 Dune::FieldVector ur(1.0);\n- 205\n- 206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0;\n- 207\n- 208 return LocalGeometry(LocalGeometryImpl(ll,ur,s));\n- 209 }\n- 210\n-214 LocalGeometry geometryInOutside () const\n- 215 {\n- 216 // set of dimensions that span the intersection\n- 217 std::bitset s;\n- 218 s.set();\n- 219 s[_dir] = false;\n- 220\n- 221 // lower-left and upper-right corners\n- 222 Dune::FieldVector ll(0.0);\n- 223 Dune::FieldVector ur(1.0);\n- 224\n- 225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0;\n- 226\n- 227 return LocalGeometry(LocalGeometryImpl(ll,ur,s));\n- 228 }\n- 229\n-232 Geometry geometry () const\n- 233 {\n- 234\n- 235 std::bitset shift;\n- 236 shift.set();\n- 237 shift[_dir] = false;\n- 238\n- 239 Dune::FieldVector ll, ur;\n- 240 for (int i=0; icoordinate\n-(i,coord);\n- 248 if (i != _dir)\n- 249 coord++;\n- 250 ur[i] = _inside.transformingsubiterator().coordCont()->coordinate\n-(i,coord);\n- 251\n- 252 // If on periodic overlap, transform coordinates by domain size\n- 253 if (_inside.gridlevel()->mg->isPeriodic(i)) {\n- 254 int coordPeriodic = _inside.transformingsubiterator().coord(i);\n- 255 if (coordPeriodic < 0) {\n- 256 auto size = _inside.gridlevel()->mg->domainSize()[i];\n- 257 ll[i] += size;\n- 258 ur[i] += size;\n- 259 } else if (coordPeriodic + 1 > _inside.gridlevel()->mg->levelSize\n-(_inside.gridlevel()->level(),i)) {\n- 260 auto size = _inside.gridlevel()->mg->domainSize()[i];\n- 261 ll[i] -= size;\n- 262 ur[i] -= size;\n- 263 }\n- 264 }\n- 265 }\n- 266\n- 267 GeometryImpl _is_global(ll,ur,shift);\n- 268 return Geometry( _is_global );\n- 269 }\n- 270\n-272 GeometryType type () const\n- 273 {\n- 274 return GeometryTypes::cube(dim-1);\n- 275 }\n- 276\n-278 int indexInInside () const\n- 279 {\n- 280 return _count;\n- 281 }\n- 282\n-284 int indexInOutside () const\n- 285 {\n- 286 // flip the last bit\n- 287 return _count^1;\n- 288 }\n- 289\n-290 YaspIntersection()\n- 291 : _count(~std::uint8_t(0)) // Use as marker for invalid intersection\n- 292 , _dir(0)\n- 293 , _face(0)\n- 294 {}\n- 295\n-297 YaspIntersection (const YaspEntity<0,dim,GridImp>& myself, bool toend) :\n- 298 _inside(myself.gridlevel(),\n- 299 myself.transformingsubiterator()),\n- 300 _outside(myself.gridlevel(),\n- 301 myself.transformingsubiterator()),\n- 302 // initialize to first neighbor\n- 303 _count(0),\n- 304 _dir(0),\n- 305 _face(0)\n- 306 {\n- 307 if (toend)\n- 308 {\n- 309 // initialize end iterator\n- 310 _count = 2*dim;\n- 311 return;\n- 312 }\n- 313 _count = 0;\n- 314\n- 315 // move transforming iterator\n- 316 _outside.transformingsubiterator().move(_dir,-1);\n- 317 }\n- 318\n- 320\n-322 void assign (const YaspIntersection& it)\n- 323 {\n- 324 *this = it;\n- 325 }\n- 326\n-327 bool equals(const YaspIntersection& other) const\n- 328 {\n- 329 // compare counts first -- that's cheaper if the test fails\n- 330 return _count == other._count && _inside.equals(other._inside);\n- 331 }\n- 332\n- 333 private:\n- 334 /* The two entities that make up the intersection */\n- 335 YaspEntity<0,GridImp::dimension,GridImp> _inside;\n- 336 YaspEntity<0,GridImp::dimension,GridImp> _outside;\n- 337 /* current position */\n- 338 std::uint8_t _count;\n- 339 std::uint8_t _dir;\n- 340 std::uint8_t _face;\n- 341 };\n- 342} // namespace Dune\n- 343\n- 344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH\n-std\n-STL namespace.\n+74 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector<\n+ctype, cdim > &, const std::bitset &)\n+ 75 : AxisAlignedCubeGeometry( p )\n+ 76 {}\n+ 77 };\n+ 78} // namespace Dune\n+ 79\n+ 80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::GridError\n-Base class for exceptions in Dune grid modules.\n-Definition: exceptions.hh:20\n-Dune::YaspEntity<_0,_GridImp::dimension,_GridImp_>\n-Dune::YaspEntity::level\n-int level() const\n-level of this element\n-Definition: yaspgridentity.hh:282\n-Dune::YaspEntity::gridlevel\n-const YGLI & gridlevel() const\n-Definition: yaspgridentity.hh:420\n-Dune::YaspEntity::transformingsubiterator\n-const I & transformingsubiterator() const\n-Definition: yaspgridentity.hh:419\n-Dune::YaspEntity::equals\n-bool equals(const YaspEntity &e) const\n-Return true when two iterators over the same grid are equal (!).\n-Definition: yaspgridentity.hh:347\n-Dune::YaspIntersectionIterator\n-YaspIntersectionIterator enables iteration over intersections with neighboring\n-codim 0 entities.\n-Definition: yaspgridintersectioniterator.hh:22\n-Dune::YaspIntersection\n-YaspIntersection provides data about intersection with neighboring codim 0\n-entities.\n-Definition: yaspgridintersection.hh:22\n-Dune::YaspIntersection::centerUnitOuterNormal\n-FieldVector< ctype, dimworld > centerUnitOuterNormal() const\n-return unit outer normal at center of intersection geometry\n-Definition: yaspgridintersection.hh:177\n-Dune::YaspIntersection::equals\n-bool equals(const YaspIntersection &other) const\n-Definition: yaspgridintersection.hh:327\n-Dune::YaspIntersection::inside\n-Entity inside() const\n-Definition: yaspgridintersection.hh:92\n-Dune::YaspIntersection::geometry\n-Geometry geometry() const\n-Definition: yaspgridintersection.hh:232\n-Dune::YaspIntersection::LocalGeometry\n-GridImp::template Codim< 1 >::LocalGeometry LocalGeometry\n-Definition: yaspgridintersection.hh:38\n-Dune::YaspIntersection::YaspIntersection\n-YaspIntersection()\n-Definition: yaspgridintersection.hh:290\n-Dune::YaspIntersection::indexInOutside\n-int indexInOutside() const\n-local index of codim 1 entity in neighbor where intersection is contained in\n-Definition: yaspgridintersection.hh:284\n-Dune::YaspIntersection::geometryInInside\n-LocalGeometry geometryInInside() const\n-Definition: yaspgridintersection.hh:195\n-Dune::YaspIntersection::boundarySegmentIndex\n-int boundarySegmentIndex() const\n-Definition: yaspgridintersection.hh:105\n-Dune::YaspIntersection::Geometry\n-GridImp::template Codim< 1 >::Geometry Geometry\n-Definition: yaspgridintersection.hh:37\n-Dune::YaspIntersection::conforming\n-bool conforming() const\n-Yasp is always conform.\n-Definition: yaspgridintersection.hh:85\n-Dune::YaspIntersection::Entity\n-GridImp::template Codim< 0 >::Entity Entity\n-Definition: yaspgridintersection.hh:36\n-Dune::YaspIntersection::neighbor\n-bool neighbor() const\n-return true if neighbor across intersection exists in this processor\n-Definition: yaspgridintersection.hh:75\n-Dune::YaspIntersection::outerNormal\n-FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &)\n-const\n-return unit outer normal, this should be dependent on local coordinates for\n-higher order boundary\n-Definition: yaspgridintersection.hh:165\n-Dune::YaspIntersection::YaspIntersection\n-YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend)\n-make intersection iterator from entity, initialize to first neighbor\n-Definition: yaspgridintersection.hh:297\n-Dune::YaspIntersection::type\n-GeometryType type() const\n-obtain the type of reference element for this intersection\n-Definition: yaspgridintersection.hh:272\n-Dune::YaspIntersection::assign\n-void assign(const YaspIntersection &it)\n-copy constructor \u2013 use default\n-Definition: yaspgridintersection.hh:322\n-Dune::YaspIntersection::indexInInside\n-int indexInInside() const\n-local index of codim 1 entity in self where intersection is contained in\n-Definition: yaspgridintersection.hh:278\n-Dune::YaspIntersection::integrationOuterNormal\n-FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype,\n-dim-1 > &local) const\n-Definition: yaspgridintersection.hh:187\n-Dune::YaspIntersection::I\n-GridImp::YGrid::Iterator I\n-Definition: yaspgridintersection.hh:35\n-Dune::YaspIntersection::geometryInOutside\n-LocalGeometry geometryInOutside() const\n-Definition: yaspgridintersection.hh:214\n-Dune::YaspIntersection::YGLI\n-GridImp::YGridLevelIterator YGLI\n-Definition: yaspgridintersection.hh:34\n-Dune::YaspIntersection::outside\n-Entity outside() const\n-return Entity on the outside of this intersection\n-Definition: yaspgridintersection.hh:98\n-Dune::YaspIntersection::boundary\n-bool boundary() const\n-Definition: yaspgridintersection.hh:62\n-Dune::YaspIntersection::unitOuterNormal\n-FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-\n-1 > &) const\n-return unit outer normal, this should be dependent on local coordinates for\n-higher order boundary\n-Definition: yaspgridintersection.hh:171\n-Dune::YaspIntersection::update\n-void update()\n-Definition: yaspgridintersection.hh:40\n-Dune::YaspEntity<_0,_dim,_GridImp_>\n-Definition: yaspgridentity.hh:434\n+Dune::YaspGeometry\n+The general version that handles all codimensions but 0 and dim.\n+Definition: yaspgridgeometry.hh:31\n+Dune::YaspGeometry::YaspGeometry\n+YaspGeometry(const FieldVector< ctype, cdim > &ll, const FieldVector< ctype,\n+cdim > &ur, const std::bitset< cdim > &shift)\n+constructor from midpoint and extension and a bitset defining which unit\n+vectors span the entity\n+Definition: yaspgridgeometry.hh:37\n+Dune::YaspGeometry::ctype\n+GridImp::ctype ctype\n+define type used for coordinates in grid module\n+Definition: yaspgridgeometry.hh:34\n+Dune::YaspGeometry<_mydim,_mydim,_GridImp_>::YaspGeometry\n+YaspGeometry(const YaspGeometry &other)\n+copy constructor (skipping temporary variables)\n+Definition: yaspgridgeometry.hh:57\n+Dune::YaspGeometry<_mydim,_mydim,_GridImp_>::ctype\n+GridImp::ctype ctype\n+Definition: yaspgridgeometry.hh:49\n+Dune::YaspGeometry<_mydim,_mydim,_GridImp_>::YaspGeometry\n+YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype,\n+mydim > &ur)\n+constructor from midpoint and extension\n+Definition: yaspgridgeometry.hh:52\n+Dune::YaspGeometry<_0,_cdim,_GridImp_>::YaspGeometry\n+YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype,\n+cdim > &, const std::bitset< cdim > &)\n+Definition: yaspgridgeometry.hh:74\n+Dune::YaspGeometry<_0,_cdim,_GridImp_>::YaspGeometry\n+YaspGeometry(const FieldVector< ctype, cdim > &p)\n+constructor\n+Definition: yaspgridgeometry.hh:70\n+Dune::YaspGeometry<_0,_cdim,_GridImp_>::ctype\n+GridImp::ctype ctype\n+Definition: yaspgridgeometry.hh:67\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00182.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00182.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: coordinates.hh File Reference\n+dune-grid: torus.hh File Reference\n \n \n \n \n \n \n \n@@ -66,64 +66,56 @@\n \n \n
    \n \n-
    coordinates.hh File Reference
    \n+
    torus.hh File Reference
    \n
    \n
    \n \n-

    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. \n+

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

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

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n-\n-\n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::EquidistantCoordinates< ct, dim >
     Container for equidistant coordinates in a YaspGrid. More...
    class  Dune::Torus< Communication, d >
     
    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...
    class  Dune::Torus< Communication, d >::ProcListIterator
     
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Yasp
     
    \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n

    \n Functions

    template<class ct , int dim>
    std::ostream & Dune::operator<< (std::ostream &s, EquidistantCoordinates< ct, dim > &c)
     
    template<class ct , int dim>
    std::ostream & Dune::operator<< (std::ostream &s, EquidistantOffsetCoordinates< ct, dim > &c)
     
    template<class ct , int dim>
    std::ostream & Dune::operator<< (std::ostream &s, TensorProductCoordinates< ct, dim > &c)
     
    template<class ctype , std::size_t dim>
    bool Dune::Yasp::checkIfMonotonous (const std::array< std::vector< ctype >, dim > &coords)
     
    template<class Communication , int d>
    std::ostream & Dune::operator<< (std::ostream &s, const Torus< Communication, d > &t)
     Output operator for Torus. More...
     
    \n

    Detailed Description

    \n-

    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.

    \n+

    This file provides the infrastructure for toroidal communication in YaspGrid.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,59 +6,42 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n Classes | Namespaces | Functions\n-coordinates.hh File Reference\n-This provides container classes for the coordinates to be used in YaspGrid Upon\n-implementation of the tensorproduct feature, the coordinate information has\n-been encapsulated to keep performance for the equidistant grid. Containers for\n-equidistant and tensorproduct grids are provided here. More...\n+torus.hh File Reference\n+This file provides the infrastructure for toroidal communication in YaspGrid.\n+More...\n #include \n #include \n+#include \n+#include \n+#include \n #include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \"partitioning.hh\"\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::EquidistantCoordinates<_ct,_dim_>\n-\u00a0 Container for equidistant coordinates in a YaspGrid. More...\n+class \u00a0Dune::Torus<_Communication,_d_>\n \u00a0\n-class \u00a0Dune::EquidistantOffsetCoordinates<_ct,_dim_>\n-\u00a0 Container for equidistant coordinates in a YaspGrid with non-trivial\n- origin. More...\n-\u00a0\n-class \u00a0Dune::TensorProductCoordinates<_ct,_dim_>\n-\u00a0 Coordinate container for a tensor product YaspGrid. More...\n+class \u00a0Dune::Torus<_Communication,_d_>::ProcListIterator\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::Yasp\n-\u00a0\n Functions\n-template\n-std::ostream &\u00a0Dune::operator<< (std::ostream &s, EquidistantCoordinates< ct,\n- dim > &c)\n-\u00a0\n-template\n-std::ostream &\u00a0Dune::operator<< (std::ostream &s,\n- EquidistantOffsetCoordinates< ct, dim > &c)\n-\u00a0\n-template\n-std::ostream &\u00a0Dune::operator<< (std::ostream &s, TensorProductCoordinates<\n- ct, dim > &c)\n-\u00a0\n-template\n- bool\u00a0Dune::Yasp::checkIfMonotonous (const std::array< std::vector<\n- ctype >, dim > &coords)\n+template\n+std::ostream &\u00a0Dune::operator<< (std::ostream &s, const Torus< Communication,\n+ d > &t)\n+\u00a0 Output operator for Torus. More...\n \u00a0\n ***** Detailed Description *****\n-This provides container classes for the coordinates to be used in YaspGrid Upon\n-implementation of the tensorproduct feature, the coordinate information has\n-been encapsulated to keep performance for the equidistant grid. Containers for\n-equidistant and tensorproduct grids are provided here.\n+This file provides the infrastructure for toroidal communication in YaspGrid.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00182_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: coordinates.hh Source File\n+dune-grid: torus.hh Source File\n \n \n \n \n \n \n \n@@ -62,334 +62,545 @@\n \n \n
    \n
    \n-
    coordinates.hh
    \n+
    torus.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH
    \n-
    6#define DUNE_GRID_YASPGRID_COORDINATES_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRID_TORUS_HH
    \n+
    6#define DUNE_GRID_YASPGRID_TORUS_HH
    \n
    7
    \n
    8#include <array>
    \n
    9#include <bitset>
    \n-
    10#include <vector>
    \n-
    11
    \n-
    12#include <dune/common/fvector.hh>
    \n-
    13
    \n-
    21namespace Dune
    \n-
    22{
    \n-
    27 template<class ct, int dim>
    \n-\n-
    29 {
    \n-
    30 public:
    \n-
    32 typedef ct ctype;
    \n-
    34 static const int dimension = dim;
    \n-
    35
    \n-\n-
    38
    \n-
    45 EquidistantCoordinates(const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
    \n-
    46 : _s(s)
    \n-
    47 {
    \n-
    48 for (int i=0; i<dim; i++)
    \n-
    49 _h[i] = upperRight[i] / _s[i];
    \n-
    50 }
    \n+
    10#include <cmath>
    \n+
    11#include <deque>
    \n+
    12#include <iostream>
    \n+
    13#include <vector>
    \n+
    14
    \n+
    15#if HAVE_MPI
    \n+
    16#include <mpi.h>
    \n+
    17#endif
    \n+
    18
    \n+
    19#include <dune/common/binaryfunctions.hh>
    \n+
    20#include <dune/common/streamoperators.hh>
    \n+\n+
    22
    \n+
    23#include "partitioning.hh"
    \n+
    24
    \n+
    29namespace Dune
    \n+
    30{
    \n+
    31
    \n+
    45 template<class Communication, int d>
    \n+
    46 class Torus {
    \n+
    47 public:
    \n+
    49 typedef std::array<int, d> iTupel;
    \n+
    50
    \n
    51
    \n-
    56 inline ct meshsize(int d, [[maybe_unused]] int i) const
    \n-
    57 {
    \n-
    58 return _h[d];
    \n-
    59 }
    \n-
    60
    \n-
    65 inline ct coordinate(int d, int i) const
    \n-
    66 {
    \n-
    67 return i*_h[d];
    \n-
    68 }
    \n+
    52 private:
    \n+
    53 struct CommPartner {
    \n+
    54 int rank;
    \n+
    55 iTupel delta;
    \n+
    56 int index;
    \n+
    57 };
    \n+
    58
    \n+
    59 struct CommTask {
    \n+
    60 int rank; // process to send to / receive from
    \n+
    61 int size; // size of buffer
    \n+
    62 void *buffer; // buffer to send / receive
    \n+
    63 };
    \n+
    64
    \n+
    65 public:
    \n+\n+
    68 {}
    \n
    69
    \n-
    73 inline int size(int d) const
    \n-
    74 {
    \n-
    75 return _s[d];
    \n-
    76 }
    \n-
    77
    \n-
    84 EquidistantCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
    \n-
    85 {
    \n-
    86 //determine new size and meshsize
    \n-
    87 std::array<int,dim> news;
    \n-
    88 Dune::FieldVector<ct,dim> newUpperRight;
    \n-
    89
    \n-
    90 for (int i=0; i<dim; i++)
    \n-
    91 {
    \n-
    92 news[i] = 2 * _s[i];
    \n-
    93 if (!keep_ovlp)
    \n-
    94 {
    \n-
    95 if (ovlp_low[i])
    \n-
    96 news[i] -= overlap;
    \n-
    97 if (ovlp_up[i])
    \n-
    98 news[i] -= overlap;
    \n-
    99 }
    \n-
    100
    \n-
    101 newUpperRight[i] = (_h[i] / ct(2.)) * news[i];
    \n-
    102 }
    \n-
    103 return EquidistantCoordinates<ct,dim>(newUpperRight,news);
    \n-
    104 }
    \n-
    105
    \n-
    107 void print(std::ostream& s) const
    \n-
    108 {
    \n-
    109 s << "Printing equidistant coordinate information:" << std::endl;
    \n-
    110 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
    \n-
    111 }
    \n-
    112
    \n-
    113 private:
    \n-
    114 Dune::FieldVector<ct,dim> _h;
    \n-
    115 std::array<int,dim> _s;
    \n-
    116 };
    \n-
    117
    \n-
    118 template<class ct, int dim>
    \n-
    119 inline std::ostream& operator<< (std::ostream& s, EquidistantCoordinates<ct,dim>& c)
    \n-
    120 {
    \n-
    121 c.print(s);
    \n-
    122 return s;
    \n-
    123 }
    \n-
    124
    \n-
    129 template<class ct, int dim>
    \n-\n-
    131 {
    \n-
    132 public:
    \n-
    134 typedef ct ctype;
    \n-
    136 static const int dimension = dim;
    \n-
    137
    \n-\n-
    140
    \n-
    149 EquidistantOffsetCoordinates(const Dune::FieldVector<ct,dim>& lowerLeft, const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
    \n-
    150 : _origin(lowerLeft), _s(s)
    \n-
    151 {
    \n-
    152 for (int i=0; i<dim; i++)
    \n-
    153 _h[i] = (upperRight[i] - lowerLeft[i]) / s[i];
    \n-
    154 }
    \n+
    71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning<d>* partitioner)
    \n+
    72 : _comm(comm), _tag(tag)
    \n+
    73 {
    \n+
    74 // determine dimensions
    \n+
    75 partitioner->partition(size, _comm.size(), _dims, overlap);
    \n+
    76
    \n+
    77 // compute increments for lexicographic ordering
    \n+
    78 int inc = 1;
    \n+
    79 for (int i=0; i<d; i++)
    \n+
    80 {
    \n+
    81 _increment[i] = inc;
    \n+
    82 inc *= _dims[i];
    \n+
    83 }
    \n+
    84
    \n+
    85 // check whether the load balancing matches the size of the communicator
    \n+
    86 if (inc != _comm.size())
    \n+
    87 DUNE_THROW(Dune::Exception, "Communicator size and result of the given load balancer do not match!");
    \n+
    88
    \n+
    89 // make full schedule
    \n+
    90 proclists();
    \n+
    91 }
    \n+
    92
    \n+
    94 int rank () const
    \n+
    95 {
    \n+
    96 return _comm.rank();
    \n+
    97 }
    \n+
    98
    \n+
    100 iTupel coord () const
    \n+
    101 {
    \n+
    102 return rank_to_coord(_comm.rank());
    \n+
    103 }
    \n+
    104
    \n+
    106 int procs () const
    \n+
    107 {
    \n+
    108 return _comm.size();
    \n+
    109 }
    \n+
    110
    \n+
    112 const iTupel & dims () const
    \n+
    113 {
    \n+
    114 return _dims;
    \n+
    115 }
    \n+
    116
    \n+
    118 int dims (int i) const
    \n+
    119 {
    \n+
    120 return _dims[i];
    \n+
    121 }
    \n+
    122
    \n+
    124 Communication comm () const
    \n+
    125 {
    \n+
    126 return _comm;
    \n+
    127 }
    \n+
    128
    \n+
    130 int tag () const
    \n+
    131 {
    \n+
    132 return _tag;
    \n+
    133 }
    \n+
    134
    \n+
    136 bool inside (iTupel c) const
    \n+
    137 {
    \n+
    138 for (int i=d-1; i>=0; i--)
    \n+
    139 if (c[i]<0 || c[i]>=_dims[i]) return false;
    \n+
    140 return true;
    \n+
    141 }
    \n+
    142
    \n+\n+
    145 {
    \n+\n+
    147 rank = rank%_comm.size();
    \n+
    148 for (int i=d-1; i>=0; i--)
    \n+
    149 {
    \n+
    150 coord[i] = rank/_increment[i];
    \n+
    151 rank = rank%_increment[i];
    \n+
    152 }
    \n+
    153 return coord;
    \n+
    154 }
    \n
    155
    \n-
    160 inline ct meshsize(int d, [[maybe_unused]] int i) const
    \n-
    161 {
    \n-
    162 return _h[d];
    \n-
    163 }
    \n+\n+
    158 {
    \n+
    159 for (int i=0; i<d; i++) coord[i] = coord[i]%_dims[i];
    \n+
    160 int rank = 0;
    \n+
    161 for (int i=0; i<d; i++) rank += coord[i]*_increment[i];
    \n+
    162 return rank;
    \n+
    163 }
    \n
    164
    \n-
    169 inline ct coordinate(int d, int i) const
    \n-
    170 {
    \n-
    171 return _origin[d] + i*_h[d];
    \n-
    172 }
    \n-
    173
    \n-
    177 inline int size(int d) const
    \n-
    178 {
    \n-
    179 return _s[d];
    \n-
    180 }
    \n-
    181
    \n-
    185 inline ct origin(int d) const
    \n-
    186 {
    \n-
    187 return _origin[d];
    \n-
    188 }
    \n-
    189
    \n-
    196 EquidistantOffsetCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
    \n-
    197 {
    \n-
    198 //determine new size and meshsize
    \n-
    199 std::array<int,dim> news;
    \n-
    200 Dune::FieldVector<ct,dim> newUpperRight;
    \n+
    166 int rank_relative (int rank, int dir, int cnt) const
    \n+
    167 {
    \n+\n+
    169 coord[dir] = (coord[dir]+_dims[dir]+cnt)%_dims[dir];
    \n+
    170 return coord_to_rank(coord);
    \n+
    171 }
    \n+
    172
    \n+
    174 int color (const iTupel & coord) const
    \n+
    175 {
    \n+
    176 int c = 0;
    \n+
    177 int power = 1;
    \n+
    178
    \n+
    179 // interior coloring
    \n+
    180 for (int i=0; i<d; i++)
    \n+
    181 {
    \n+
    182 if (coord[i]%2==1) c += power;
    \n+
    183 power *= 2;
    \n+
    184 }
    \n+
    185
    \n+
    186 // extra colors for boundary processes
    \n+
    187 for (int i=0; i<d; i++)
    \n+
    188 {
    \n+
    189 if (_dims[i]>1 && coord[i]==_dims[i]-1) c += power;
    \n+
    190 power *= 2;
    \n+
    191 }
    \n+
    192
    \n+
    193 return c;
    \n+
    194 }
    \n+
    195
    \n+
    197 int color (int rank) const
    \n+
    198 {
    \n+
    199 return color(rank_to_coord(rank));
    \n+
    200 }
    \n
    201
    \n-
    202 for (int i=0; i<dim; i++)
    \n-
    203 {
    \n-
    204 news[i] = 2 * _s[i];
    \n-
    205 if (!keep_ovlp)
    \n-
    206 {
    \n-
    207 if (ovlp_low[i])
    \n-
    208 news[i] -= overlap;
    \n-
    209 if (ovlp_up[i])
    \n-
    210 news[i] -= overlap;
    \n-
    211 }
    \n-
    212
    \n-
    213 newUpperRight[i] = _origin[i] + (_h[i] / ct(2.)) * news[i];
    \n-
    214 }
    \n-
    215 return EquidistantOffsetCoordinates<ct,dim>(_origin,newUpperRight,news);
    \n-
    216 }
    \n-
    217
    \n-
    219 void print(std::ostream& s) const
    \n-
    220 {
    \n-
    221 s << "Printing equidistant coordinate information:" << std::endl;
    \n-
    222 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
    \n-
    223 s << "Offset to origin: " << _origin << std::endl;
    \n-
    224 }
    \n-
    225
    \n-
    226 private:
    \n-
    227 Dune::FieldVector<ct,dim> _origin;
    \n-
    228 Dune::FieldVector<ct,dim> _h;
    \n-
    229 std::array<int,dim> _s;
    \n-
    230 };
    \n+
    203 int neighbors () const
    \n+
    204 {
    \n+
    205 int n=1;
    \n+
    206 for (int i=0; i<d; ++i)
    \n+
    207 n *= 3;
    \n+
    208 return n-1;
    \n+
    209 }
    \n+
    210
    \n+
    212 bool is_neighbor (iTupel delta, std::bitset<d> periodic) const
    \n+
    213 {
    \n+
    214 iTupel coord = rank_to_coord(_comm.rank()); // my own coordinate with 0 <= c_i < dims_i
    \n+
    215
    \n+
    216 for (int i=0; i<d; i++)
    \n+
    217 {
    \n+
    218 if (delta[i]<0)
    \n+
    219 {
    \n+
    220 // if I am on the boundary and domain is not periodic => no neighbor
    \n+
    221 if (coord[i]==0 && periodic[i]==false) return false;
    \n+
    222 }
    \n+
    223 if (delta[i]>0)
    \n+
    224 {
    \n+
    225 // if I am on the boundary and domain is not periodic => no neighbor
    \n+
    226 if (coord[i]==_dims[i]-1 && periodic[i]==false) return false;
    \n+
    227 }
    \n+
    228 }
    \n+
    229 return true;
    \n+
    230 }
    \n
    231
    \n-
    232 template<class ct, int dim>
    \n-
    233 inline std::ostream& operator<< (std::ostream& s, EquidistantOffsetCoordinates<ct,dim>& c)
    \n-
    234 {
    \n-
    235 c.print(s);
    \n-
    236 return s;
    \n-
    237 }
    \n-
    238
    \n-
    243 template<class ct, int dim>
    \n-\n-
    245 {
    \n-
    246 public:
    \n-
    248 typedef ct ctype;
    \n-
    250 static const int dimension = dim;
    \n+
    239 double partition (int rank, iTupel origin_in, iTupel size_in, iTupel& origin_out, iTupel& size_out) const
    \n+
    240 {
    \n+\n+
    242 double maxsize = 1;
    \n+
    243 double sz = 1;
    \n+
    244
    \n+
    245 // make a tensor product partition
    \n+
    246 for (int i=0; i<d; i++)
    \n+
    247 {
    \n+
    248 // determine
    \n+
    249 int m = size_in[i]/_dims[i];
    \n+
    250 int r = size_in[i]%_dims[i];
    \n
    251
    \n-\n-
    254
    \n-
    261 TensorProductCoordinates(const std::array<std::vector<ct>,dim>& c, const std::array<int,dim>& offset)
    \n-
    262 : _c(c),_offset(offset)
    \n-
    263 {}
    \n-
    264
    \n-
    269 inline ct meshsize(int d, int i) const
    \n-
    270 {
    \n-
    271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]];
    \n-
    272 }
    \n-
    273
    \n-
    278 inline ct coordinate(int d, int i) const
    \n-
    279 {
    \n-
    280 return _c[d][i-_offset[d]];
    \n-
    281 }
    \n-
    282
    \n-
    286 inline int size(int d) const
    \n-
    287 {
    \n-
    288 return _c[d].size() - 1;
    \n-
    289 }
    \n-
    290
    \n-
    297 TensorProductCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
    \n-
    298 {
    \n-
    299 std::array<std::vector<ct>,dim> newcoords;
    \n-
    300 std::array<int,dim> newoffset(_offset);
    \n-
    301 for (int i=0; i<dim; i++)
    \n-
    302 {
    \n-
    303 newoffset[i] *= 2;
    \n-
    304
    \n-
    305 //determine new size
    \n-
    306 int newsize = 2 * _c[i].size() - 1;
    \n-
    307 if (!keep_ovlp)
    \n-
    308 {
    \n-
    309 if (ovlp_low[i])
    \n-
    310 {
    \n-
    311 newoffset[i] += overlap;
    \n-
    312 newsize -= overlap;
    \n-
    313 }
    \n-
    314 if (ovlp_up[i])
    \n-
    315 newsize -= overlap;
    \n-
    316 }
    \n-
    317 newcoords[i].resize(newsize);
    \n+
    252 sz *= size_in[i];
    \n+
    253
    \n+
    254 if (coord[i]<_dims[i]-r)
    \n+
    255 {
    \n+
    256 origin_out[i] = origin_in[i] + coord[i]*m;
    \n+
    257 size_out[i] = m;
    \n+
    258 maxsize *= m;
    \n+
    259 }
    \n+
    260 else
    \n+
    261 {
    \n+
    262 origin_out[i] = origin_in[i] + (_dims[i]-r)*m + (coord[i]-(_dims[i]-r))*(m+1);
    \n+
    263 size_out[i] = m+1;
    \n+
    264 maxsize *= m+1;
    \n+
    265 }
    \n+
    266 }
    \n+
    267 return maxsize/(sz/_comm.size());
    \n+
    268 }
    \n+
    269
    \n+\n+
    277 public:
    \n+
    279 ProcListIterator (typename std::deque<CommPartner>::const_iterator iter)
    \n+
    280 {
    \n+
    281 i = iter;
    \n+
    282 }
    \n+
    283
    \n+
    285 int rank () const
    \n+
    286 {
    \n+
    287 return i->rank;
    \n+
    288 }
    \n+
    289
    \n+
    291 iTupel delta () const
    \n+
    292 {
    \n+
    293 return i->delta;
    \n+
    294 }
    \n+
    295
    \n+
    297 int index () const
    \n+
    298 {
    \n+
    299 return i->index;
    \n+
    300 }
    \n+
    301
    \n+
    303 int distance () const
    \n+
    304 {
    \n+
    305 int dist = 0;
    \n+
    306 iTupel delta=i->delta;
    \n+
    307 for (int j=0; j<d; ++j)
    \n+
    308 dist += std::abs(delta[j]);
    \n+
    309 return dist;
    \n+
    310 }
    \n+
    311
    \n+
    313 bool operator== (const ProcListIterator& iter) const
    \n+
    314 {
    \n+
    315 return i == iter.i;
    \n+
    316 }
    \n+
    317
    \n
    318
    \n-
    319 typename std::vector<ct>::const_iterator it = _c[i].begin();
    \n-
    320 typename std::vector<ct>::const_iterator end = _c[i].end()-1;
    \n-
    321 typename std::vector<ct>::iterator iit = newcoords[i].begin() - 1;
    \n-
    322 if (!keep_ovlp)
    \n-
    323 {
    \n-
    324 if (ovlp_low[i])
    \n-
    325 {
    \n-
    326 it += overlap/2;
    \n-
    327 if (overlap%2)
    \n-
    328 *(++iit) = (*it + *(++it)) / ct(2.);
    \n-
    329 }
    \n-
    330 if (ovlp_up[i])
    \n-
    331 end -= overlap/2;
    \n-
    332 }
    \n-
    333
    \n-
    334 for (;it!=end;)
    \n-
    335 {
    \n-
    336 *(++iit) = *it;
    \n-
    337 *(++iit) = (*it + *(++it)) / ct(2.);
    \n-
    338 }
    \n-
    339
    \n-
    340 if (++iit != newcoords[i].end())
    \n-
    341 *iit = *it;
    \n-
    342 }
    \n-
    343 return TensorProductCoordinates<ct,dim>(newcoords, newoffset);
    \n-
    344 }
    \n-
    345
    \n-
    347 void print(std::ostream& s) const
    \n-
    348 {
    \n-
    349 s << "Printing TensorProduct Coordinate information:" << std::endl;
    \n-
    350 for (int i=0; i<dim; i++)
    \n-
    351 {
    \n-
    352 s << "Direction " << i << ": " << _c[i].size() << " coordinates" << std::endl;
    \n-
    353 for (std::size_t j=0; j<_c[i].size(); j++)
    \n-
    354 s << _c[i][j] << std::endl;
    \n-
    355 }
    \n-
    356 }
    \n-
    357
    \n-
    358 private:
    \n-
    359 std::array<std::vector<ct>,dim> _c;
    \n-
    360 std::array<int,dim> _offset;
    \n-
    361 };
    \n-
    362
    \n-
    363 template<class ct, int dim>
    \n-
    364 inline std::ostream& operator<< (std::ostream& s, TensorProductCoordinates<ct,dim>& c)
    \n-
    365 {
    \n-
    366 c.print(s);
    \n-
    367 return s;
    \n-
    368 }
    \n-
    369
    \n-
    370 namespace Yasp {
    \n-
    371 template<class ctype, std::size_t dim>
    \n-
    372 bool checkIfMonotonous(const std::array<std::vector<ctype>, dim>& coords)
    \n-
    373 {
    \n-
    374 for (std::size_t i=0; i<dim; i++)
    \n-
    375 {
    \n-
    376 if (coords[i].size() <= 1)
    \n-
    377 return false;
    \n-
    378 for (std::size_t j=1; j<coords[i].size(); j++)
    \n-
    379 if (coords[i][j] < coords[i][j-1])
    \n-
    380 return false;
    \n-
    381 }
    \n-
    382 return true;
    \n-
    383 }
    \n-
    384 } // namespace Yasp
    \n-
    385} // namespace Dune
    \n-
    386
    \n-
    387#endif
    \n+
    320 bool operator!= (const ProcListIterator& iter) const
    \n+
    321 {
    \n+
    322 return i != iter.i;
    \n+
    323 }
    \n+
    324
    \n+\n+
    327 {
    \n+
    328 ++i;
    \n+
    329 return *this;
    \n+
    330 }
    \n+
    331
    \n+
    332 private:
    \n+
    333 typename std::deque<CommPartner>::const_iterator i;
    \n+
    334 };
    \n+
    335
    \n+\n+
    338 {
    \n+
    339 return ProcListIterator(_sendlist.begin());
    \n+
    340 }
    \n+
    341
    \n+\n+
    344 {
    \n+
    345 return ProcListIterator(_sendlist.end());
    \n+
    346 }
    \n+
    347
    \n+\n+
    350 {
    \n+
    351 return ProcListIterator(_recvlist.begin());
    \n+
    352 }
    \n+
    353
    \n+\n+
    356 {
    \n+
    357 return ProcListIterator(_recvlist.end());
    \n+
    358 }
    \n+
    359
    \n+
    361 void send (int rank, void* buffer, int size) const
    \n+
    362 {
    \n+
    363 CommTask task;
    \n+
    364 task.rank = rank;
    \n+
    365 task.buffer = buffer;
    \n+
    366 task.size = size;
    \n+
    367 if (rank!=_comm.rank())
    \n+
    368 _sendrequests.push_back(task);
    \n+
    369 else
    \n+
    370 _localsendrequests.push_back(task);
    \n+
    371 }
    \n+
    372
    \n+
    374 void recv (int rank, void* buffer, int size) const
    \n+
    375 {
    \n+
    376 CommTask task;
    \n+
    377 task.rank = rank;
    \n+
    378 task.buffer = buffer;
    \n+
    379 task.size = size;
    \n+
    380 if (rank!=_comm.rank())
    \n+
    381 _recvrequests.push_back(task);
    \n+
    382 else
    \n+
    383 _localrecvrequests.push_back(task);
    \n+
    384 }
    \n+
    385
    \n+
    387 void exchange () const
    \n+
    388 {
    \n+
    389 // handle local requests first
    \n+
    390 if (_localsendrequests.size()!=_localrecvrequests.size())
    \n+
    391 {
    \n+
    392 std::cout << "[" << rank() << "]: ERROR: local sends/receives do not match in exchange!" << std::endl;
    \n+
    393 return;
    \n+
    394 }
    \n+
    395 for (unsigned int i=0; i<_localsendrequests.size(); i++)
    \n+
    396 {
    \n+
    397 if (_localsendrequests[i].size!=_localrecvrequests[i].size)
    \n+
    398 {
    \n+
    399 std::cout << "[" << rank() << "]: ERROR: size in local sends/receive does not match in exchange!" << std::endl;
    \n+
    400 return;
    \n+
    401 }
    \n+
    402 memcpy(_localrecvrequests[i].buffer,_localsendrequests[i].buffer,_localsendrequests[i].size);
    \n+
    403 }
    \n+
    404 _localsendrequests.clear();
    \n+
    405 _localrecvrequests.clear();
    \n+
    406
    \n+
    407#if HAVE_MPI
    \n+
    408 // handle foreign requests
    \n+
    409
    \n+
    410 std::vector<MPI_Request> requests(_sendrequests.size() + _recvrequests.size());
    \n+
    411 MPI_Request* req = requests.data();
    \n+
    412
    \n+
    413 // issue sends to foreign processes
    \n+
    414 for (unsigned int i=0; i<_sendrequests.size(); i++)
    \n+
    415 if (_sendrequests[i].rank!=rank())
    \n+
    416 {
    \n+
    417 // std::cout << "[" << rank() << "]" << " send " << _sendrequests[i].size << " bytes "
    \n+
    418 // << "to " << _sendrequests[i].rank << " p=" << _sendrequests[i].buffer << std::endl;
    \n+
    419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE,
    \n+
    420 _sendrequests[i].rank, _tag, _comm, req++);
    \n+
    421 }
    \n+
    422
    \n+
    423 // issue receives from foreign processes
    \n+
    424 for (unsigned int i=0; i<_recvrequests.size(); i++)
    \n+
    425 if (_recvrequests[i].rank!=rank())
    \n+
    426 {
    \n+
    427 // std::cout << "[" << rank() << "]" << " recv " << _recvrequests[i].size << " bytes "
    \n+
    428 // << "fm " << _recvrequests[i].rank << " p=" << _recvrequests[i].buffer << std::endl;
    \n+
    429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE,
    \n+
    430 _recvrequests[i].rank, _tag, _comm, req++);
    \n+
    431 }
    \n+
    432
    \n+
    433 // Wait for communication to complete
    \n+
    434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
    \n+
    435
    \n+
    436 // clear request buffers
    \n+
    437 _sendrequests.clear();
    \n+
    438 _recvrequests.clear();
    \n+
    439#endif
    \n+
    440 }
    \n+
    441
    \n+
    443 double global_max (double x) const
    \n+
    444 {
    \n+
    445 double res = 0.0;
    \n+
    446 _comm.template allreduce<Dune::Max<double>,double>(&x, &res, 1);
    \n+
    447 return res;
    \n+
    448 }
    \n+
    449
    \n+
    451 void print (std::ostream& s) const
    \n+
    452 {
    \n+
    453 s << "[" << rank() << "]: Torus " << procs() << " processor(s) arranged as " << dims() << std::endl;
    \n+
    454 for (ProcListIterator i=sendbegin(); i!=sendend(); ++i)
    \n+
    455 {
    \n+
    456 s << "[" << rank() << "]: send to "
    \n+
    457 << "rank=" << i.rank()
    \n+
    458 << " index=" << i.index()
    \n+
    459 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
    \n+
    460 }
    \n+
    461 for (ProcListIterator i=recvbegin(); i!=recvend(); ++i)
    \n+
    462 {
    \n+
    463 s << "[" << rank() << "]: recv from "
    \n+
    464 << "rank=" << i.rank()
    \n+
    465 << " index=" << i.index()
    \n+
    466 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
    \n+
    467 }
    \n+
    468 }
    \n+
    469
    \n+
    470 private:
    \n+
    471
    \n+
    472 void proclists ()
    \n+
    473 {
    \n+
    474 // compile the full neighbor list
    \n+
    475 CommPartner cp;
    \n+
    476 iTupel delta;
    \n+
    477
    \n+
    478 std::fill(delta.begin(), delta.end(), -1);
    \n+
    479 bool ready = false;
    \n+
    480 iTupel me, nb;
    \n+
    481 me = rank_to_coord(_comm.rank());
    \n+
    482 int index = 0;
    \n+
    483 int last = neighbors()-1;
    \n+
    484 while (!ready)
    \n+
    485 {
    \n+
    486 // find neighbors coordinates
    \n+
    487 for (int i=0; i<d; i++)
    \n+
    488 nb[i] = ( me[i]+_dims[i]+delta[i] ) % _dims[i];
    \n+
    489
    \n+
    490 // find neighbors rank
    \n+
    491 int nbrank = coord_to_rank(nb);
    \n+
    492
    \n+
    493 // check if delta is not zero
    \n+
    494 for (int i=0; i<d; i++)
    \n+
    495 if (delta[i]!=0)
    \n+
    496 {
    \n+
    497 cp.rank = nbrank;
    \n+
    498 cp.delta = delta;
    \n+
    499 cp.index = index;
    \n+
    500 _recvlist.push_back(cp);
    \n+
    501 cp.index = last-index;
    \n+
    502 _sendlist.push_front(cp);
    \n+
    503 index++;
    \n+
    504 break;
    \n+
    505 }
    \n+
    506
    \n+
    507 // next neighbor
    \n+
    508 ready = true;
    \n+
    509 for (int i=0; i<d; i++)
    \n+
    510 if (delta[i]<1)
    \n+
    511 {
    \n+
    512 (delta[i])++;
    \n+
    513 ready=false;
    \n+
    514 break;
    \n+
    515 }
    \n+
    516 else
    \n+
    517 {
    \n+
    518 delta[i] = -1;
    \n+
    519 }
    \n+
    520 }
    \n+
    521
    \n+
    522 }
    \n+
    523
    \n+
    524 Communication _comm;
    \n+
    525
    \n+
    526 iTupel _dims;
    \n+
    527 iTupel _increment;
    \n+
    528 int _tag;
    \n+
    529 std::deque<CommPartner> _sendlist;
    \n+
    530 std::deque<CommPartner> _recvlist;
    \n+
    531
    \n+
    532 mutable std::vector<CommTask> _sendrequests;
    \n+
    533 mutable std::vector<CommTask> _recvrequests;
    \n+
    534 mutable std::vector<CommTask> _localsendrequests;
    \n+
    535 mutable std::vector<CommTask> _localrecvrequests;
    \n+
    536
    \n+
    537 };
    \n+
    538
    \n+
    540 template <class Communication, int d>
    \n+
    541 inline std::ostream& operator<< (std::ostream& s, const Torus<Communication, d> & t)
    \n+
    542 {
    \n+
    543 t.print(s);
    \n+
    544 return s;
    \n+
    545 }
    \n+
    546}
    \n+
    547
    \n+
    548#endif
    \n+
    This file provides tools to partition YaspGrids. If you want to write your own partitioner,...
    \n+\n
    std::ostream & operator<<(std::ostream &out, const PartitionType &type)
    write a PartitionType to a stream
    Definition: gridenums.hh:72
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n
    constexpr Overlap overlap
    PartitionSet for the overlap partition.
    Definition: partitionset.hh:278
    \n-
    bool checkIfMonotonous(const std::array< std::vector< ctype >, dim > &coords)
    Definition: coordinates.hh:372
    \n-
    Container for equidistant coordinates in a YaspGrid.
    Definition: coordinates.hh:29
    \n-
    ct coordinate(int d, int i) const
    Definition: coordinates.hh:65
    \n-
    int size(int d) const
    Definition: coordinates.hh:73
    \n-
    static const int dimension
    export dimension
    Definition: coordinates.hh:34
    \n-
    void print(std::ostream &s) const
    print information on this container
    Definition: coordinates.hh:107
    \n-
    EquidistantCoordinates()
    default constructor
    Definition: coordinates.hh:37
    \n-
    EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
    Definition: coordinates.hh:84
    \n-
    ct ctype
    export the coordinate type
    Definition: coordinates.hh:32
    \n-
    EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > &s)
    construct a container with all necessary information
    Definition: coordinates.hh:45
    \n-
    ct meshsize(int d, int i) const
    Definition: coordinates.hh:56
    \n-
    Container for equidistant coordinates in a YaspGrid with non-trivial origin.
    Definition: coordinates.hh:131
    \n-
    EquidistantOffsetCoordinates()
    default constructor
    Definition: coordinates.hh:139
    \n-
    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
    \n-
    EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
    Definition: coordinates.hh:196
    \n-
    void print(std::ostream &s) const
    print information on this container
    Definition: coordinates.hh:219
    \n-
    ct meshsize(int d, int i) const
    Definition: coordinates.hh:160
    \n-
    ct origin(int d) const
    Definition: coordinates.hh:185
    \n-
    int size(int d) const
    Definition: coordinates.hh:177
    \n-
    ct ctype
    export the coordinate type
    Definition: coordinates.hh:134
    \n-
    static const int dimension
    export dimension
    Definition: coordinates.hh:136
    \n-
    ct coordinate(int d, int i) const
    Definition: coordinates.hh:169
    \n-
    Coordinate container for a tensor product YaspGrid.
    Definition: coordinates.hh:245
    \n-
    void print(std::ostream &s) const
    print information on this container
    Definition: coordinates.hh:347
    \n-
    ct meshsize(int d, int i) const
    Definition: coordinates.hh:269
    \n-
    ct coordinate(int d, int i) const
    Definition: coordinates.hh:278
    \n-
    static const int dimension
    export dimension
    Definition: coordinates.hh:250
    \n-
    TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
    Definition: coordinates.hh:297
    \n-
    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
    \n-
    TensorProductCoordinates()
    the default constructor
    Definition: coordinates.hh:253
    \n-
    ct ctype
    export the coordinate type
    Definition: coordinates.hh:248
    \n-
    int size(int d) const
    Definition: coordinates.hh:286
    \n+
    a base class for the yaspgrid partitioning strategy
    Definition: partitioning.hh:39
    \n+
    virtual void partition(const iTupel &, int, iTupel &, int) const =0
    \n+
    Definition: torus.hh:46
    \n+
    Torus()
    constructor making uninitialized object
    Definition: torus.hh:67
    \n+
    int color(int rank) const
    assign color to given rank
    Definition: torus.hh:197
    \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 ...
    Definition: torus.hh:239
    \n+
    int dims(int i) const
    return dimensions of torus in direction i
    Definition: torus.hh:118
    \n+
    iTupel coord() const
    return own coordinates
    Definition: torus.hh:100
    \n+
    int rank() const
    return own rank
    Definition: torus.hh:94
    \n+
    const iTupel & dims() const
    return dimensions of torus
    Definition: torus.hh:112
    \n+
    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
    \n+
    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
    \n+
    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
    \n+
    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
    \n+
    int neighbors() const
    return the number of neighbors, which is
    Definition: torus.hh:203
    \n+
    void print(std::ostream &s) const
    print contents of torus object
    Definition: torus.hh:451
    \n+
    double global_max(double x) const
    global max
    Definition: torus.hh:443
    \n+
    Communication comm() const
    return communicator
    Definition: torus.hh:124
    \n+
    int color(const iTupel &coord) const
    assign color to given coordinate
    Definition: torus.hh:174
    \n+
    ProcListIterator recvend() const
    last process in receive list
    Definition: torus.hh:355
    \n+
    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
    \n+
    ProcListIterator sendend() const
    end of send list
    Definition: torus.hh:343
    \n+
    int procs() const
    return number of processes
    Definition: torus.hh:106
    \n+
    iTupel rank_to_coord(int rank) const
    map rank to coordinate in torus using lexicographic ordering
    Definition: torus.hh:144
    \n+
    std::array< int, d > iTupel
    type used to pass tupels in and out
    Definition: torus.hh:49
    \n+
    ProcListIterator sendbegin() const
    first process in send list
    Definition: torus.hh:337
    \n+
    void exchange() const
    exchange messages stored in request buffers; clear request buffers afterwards
    Definition: torus.hh:387
    \n+
    ProcListIterator recvbegin() const
    first process in receive list
    Definition: torus.hh:349
    \n+
    int coord_to_rank(iTupel coord) const
    map coordinate in torus to rank using lexicographic ordering
    Definition: torus.hh:157
    \n+
    bool inside(iTupel c) const
    return true if coordinate is inside torus
    Definition: torus.hh:136
    \n+
    int tag() const
    return tag used by torus
    Definition: torus.hh:130
    \n+
    Definition: torus.hh:276
    \n+
    iTupel delta() const
    return distance vector
    Definition: torus.hh:291
    \n+
    bool operator==(const ProcListIterator &iter) const
    Return true when two iterators point to same member.
    Definition: torus.hh:313
    \n+
    bool operator!=(const ProcListIterator &iter) const
    Return true when two iterators do not point to same member.
    Definition: torus.hh:320
    \n+
    int rank() const
    return rank of neighboring process
    Definition: torus.hh:285
    \n+
    ProcListIterator(typename std::deque< CommPartner >::const_iterator iter)
    make an iterator
    Definition: torus.hh:279
    \n+
    ProcListIterator & operator++()
    Increment iterator to next cell.
    Definition: torus.hh:326
    \n+
    int index() const
    return index in proclist
    Definition: torus.hh:297
    \n+
    int distance() const
    return 1-norm of distance vector
    Definition: torus.hh:303
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,434 +5,688 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-coordinates.hh\n+torus.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH\n- 6#define DUNE_GRID_YASPGRID_COORDINATES_HH\n+ 5#ifndef DUNE_GRID_YASPGRID_TORUS_HH\n+ 6#define DUNE_GRID_YASPGRID_TORUS_HH\n 7\n 8#include \n 9#include \n- 10#include \n- 11\n- 12#include \n- 13\n- 21namespace Dune\n- 22{\n- 27 template\n-28 class EquidistantCoordinates\n- 29 {\n- 30 public:\n-32 typedef ct ctype;\n-34 static const int dimension = dim;\n- 35\n-37 EquidistantCoordinates() {}\n- 38\n-45 EquidistantCoordinates(const Dune::FieldVector& upperRight, const\n-std::array& s)\n- 46 : _s(s)\n- 47 {\n- 48 for (int i=0; i\n+ 11#include \n+ 12#include \n+ 13#include \n+ 14\n+ 15#if HAVE_MPI\n+ 16#include \n+ 17#endif\n+ 18\n+ 19#include \n+ 20#include \n+ 21#include \n+ 22\n+ 23#include \"partitioning.hh\"\n+ 24\n+ 29namespace Dune\n+ 30{\n+ 31\n+ 45 template\n+46 class Torus {\n+ 47 public:\n+49 typedef std::array iTupel;\n+ 50\n 51\n-56 inline ct meshsize(int d, [[maybe_unused]] int i) const\n- 57 {\n- 58 return _h[d];\n- 59 }\n- 60\n-65 inline ct coordinate(int d, int i) const\n- 66 {\n- 67 return i*_h[d];\n- 68 }\n+ 52 private:\n+ 53 struct CommPartner {\n+ 54 int rank;\n+ 55 iTupel delta;\n+ 56 int index;\n+ 57 };\n+ 58\n+ 59 struct CommTask {\n+ 60 int rank; // process to send to / receive from\n+ 61 int size; // size of buffer\n+ 62 void *buffer; // buffer to send / receive\n+ 63 };\n+ 64\n+ 65 public:\n+67 Torus ()\n+ 68 {}\n 69\n-73 inline int size(int d) const\n- 74 {\n- 75 return _s[d];\n- 76 }\n- 77\n-84 EquidistantCoordinates refine(std::bitset ovlp_low, std::\n-bitset ovlp_up, int overlap, bool keep_ovlp) const\n- 85 {\n- 86 //determine new size and meshsize\n- 87 std::array news;\n- 88 Dune::FieldVector newUpperRight;\n- 89\n- 90 for (int i=0; i(newUpperRight,news);\n- 104 }\n- 105\n-107 void print(std::ostream& s) const\n- 108 {\n- 109 s << \"Printing equidistant coordinate information:\" << std::endl;\n- 110 s << \"Meshsize: \" << _h << std::endl << \"Size: \" << _s << std::endl;\n- 111 }\n- 112\n- 113 private:\n- 114 Dune::FieldVector _h;\n- 115 std::array _s;\n- 116 };\n- 117\n- 118 template\n-119 inline std::ostream& operator<<(std::ostream& s,\n-EquidistantCoordinates& c)\n- 120 {\n- 121 c.print(s);\n- 122 return s;\n- 123 }\n- 124\n- 129 template\n-130 class EquidistantOffsetCoordinates\n+71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::\n+Partitioning* partitioner)\n+ 72 : _comm(comm), _tag(tag)\n+ 73 {\n+ 74 // determine dimensions\n+ 75 partitioner->partition(size, _comm.size(), _dims, overlap);\n+ 76\n+ 77 // compute increments for lexicographic ordering\n+ 78 int inc = 1;\n+ 79 for (int i=0; i& lowerLeft,\n-const Dune::FieldVector& upperRight, const std::array& s)\n- 150 : _origin(lowerLeft), _s(s)\n- 151 {\n- 152 for (int i=0; i=0; i--)\n+ 139 if (c[i]<0 || c[i]>=_dims[i]) return false;\n+ 140 return true;\n+ 141 }\n+ 142\n+144 iTupel rank_to_coord (int rank) const\n+ 145 {\n+ 146 iTupel coord;\n+ 147 rank = rank%_comm.size();\n+ 148 for (int i=d-1; i>=0; i--)\n+ 149 {\n+ 150 coord[i] = rank/_increment[i];\n+ 151 rank = rank%_increment[i];\n+ 152 }\n+ 153 return coord;\n 154 }\n 155\n-160 inline ct meshsize(int d, [[maybe_unused]] int i) const\n- 161 {\n- 162 return _h[d];\n+157 int coord_to_rank (iTupel coord) const\n+ 158 {\n+ 159 for (int i=0; i refine(std::bitset ovlp_low,\n-std::bitset ovlp_up, int overlap, bool keep_ovlp) const\n- 197 {\n- 198 //determine new size and meshsize\n- 199 std::array news;\n- 200 Dune::FieldVector newUpperRight;\n+166 int rank_relative (int rank, int dir, int cnt) const\n+ 167 {\n+ 168 iTupel coord = rank_to_coord(rank);\n+ 169 coord[dir] = (coord[dir]+_dims[dir]+cnt)%_dims[dir];\n+ 170 return coord_to_rank(coord);\n+ 171 }\n+ 172\n+174 int color (const iTupel & coord) const\n+ 175 {\n+ 176 int c = 0;\n+ 177 int power = 1;\n+ 178\n+ 179 // interior coloring\n+ 180 for (int i=0; i1 && coord[i]==_dims[i]-1) c += power;\n+ 190 power *= 2;\n+ 191 }\n+ 192\n+ 193 return c;\n+ 194 }\n+ 195\n+197 int color (int rank) const\n+ 198 {\n+ 199 return color(rank_to_coord(rank));\n+ 200 }\n 201\n- 202 for (int i=0; i(_origin,newUpperRight,news);\n- 216 }\n- 217\n-219 void print(std::ostream& s) const\n- 220 {\n- 221 s << \"Printing equidistant coordinate information:\" << std::endl;\n- 222 s << \"Meshsize: \" << _h << std::endl << \"Size: \" << _s << std::endl;\n- 223 s << \"Offset to origin: \" << _origin << std::endl;\n- 224 }\n- 225\n- 226 private:\n- 227 Dune::FieldVector _origin;\n- 228 Dune::FieldVector _h;\n- 229 std::array _s;\n- 230 };\n+203 int neighbors () const\n+ 204 {\n+ 205 int n=1;\n+ 206 for (int i=0; i periodic) const\n+ 213 {\n+ 214 iTupel coord = rank_to_coord(_comm.rank()); // my own coordinate with 0 <=\n+c_i < dims_i\n+ 215\n+ 216 for (int i=0; i no neighbor\n+ 221 if (coord[i]==0 && periodic[i]==false) return false;\n+ 222 }\n+ 223 if (delta[i]>0)\n+ 224 {\n+ 225 // if I am on the boundary and domain is not periodic => no neighbor\n+ 226 if (coord[i]==_dims[i]-1 && periodic[i]==false) return false;\n+ 227 }\n+ 228 }\n+ 229 return true;\n+ 230 }\n 231\n- 232 template\n-233 inline std::ostream& operator<<(std::ostream& s,\n-EquidistantOffsetCoordinates& c)\n- 234 {\n- 235 c.print(s);\n- 236 return s;\n- 237 }\n- 238\n- 243 template\n-244 class TensorProductCoordinates\n- 245 {\n- 246 public:\n-248 typedef ct ctype;\n-250 static const int dimension = dim;\n+239 double partition (int rank, iTupel origin_in, iTupel size_in, iTupel&\n+origin_out, iTupel& size_out) const\n+ 240 {\n+ 241 iTupel coord = rank_to_coord(rank);\n+ 242 double maxsize = 1;\n+ 243 double sz = 1;\n+ 244\n+ 245 // make a tensor product partition\n+ 246 for (int i=0; i,dim>& c, const\n-std::array& offset)\n- 262 : _c(c),_offset(offset)\n- 263 {}\n- 264\n-269 inline ct meshsize(int d, int i) const\n- 270 {\n- 271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]];\n- 272 }\n- 273\n-278 inline ct coordinate(int d, int i) const\n- 279 {\n- 280 return _c[d][i-_offset[d]];\n- 281 }\n- 282\n-286 inline int size(int d) const\n- 287 {\n- 288 return _c[d].size() - 1;\n- 289 }\n- 290\n-297 TensorProductCoordinates refine(std::bitset ovlp_low, std::\n-bitset ovlp_up, int overlap, bool keep_ovlp) const\n+ 252 sz *= size_in[i];\n+ 253\n+ 254 if (coord[i]<_dims[i]-r)\n+ 255 {\n+ 256 origin_out[i] = origin_in[i] + coord[i]*m;\n+ 257 size_out[i] = m;\n+ 258 maxsize *= m;\n+ 259 }\n+ 260 else\n+ 261 {\n+ 262 origin_out[i] = origin_in[i] + (_dims[i]-r)*m + (coord[i]-(_dims[i]-r))*\n+(m+1);\n+ 263 size_out[i] = m+1;\n+ 264 maxsize *= m+1;\n+ 265 }\n+ 266 }\n+ 267 return maxsize/(sz/_comm.size());\n+ 268 }\n+ 269\n+276 class ProcListIterator {\n+ 277 public:\n+279 ProcListIterator (typename std::deque::const_iterator iter)\n+ 280 {\n+ 281 i = iter;\n+ 282 }\n+ 283\n+285 int rank () const\n+ 286 {\n+ 287 return i->rank;\n+ 288 }\n+ 289\n+291 iTupel delta () const\n+ 292 {\n+ 293 return i->delta;\n+ 294 }\n+ 295\n+297 int index () const\n 298 {\n- 299 std::array,dim> newcoords;\n- 300 std::array newoffset(_offset);\n- 301 for (int i=0; iindex;\n+ 300 }\n+ 301\n+303 int distance () const\n+ 304 {\n+ 305 int dist = 0;\n+ 306 iTupel delta=i->delta;\n+ 307 for (int j=0; j::const_iterator it = _c[i].begin();\n- 320 typename std::vector::const_iterator end = _c[i].end()-1;\n- 321 typename std::vector::iterator iit = newcoords[i].begin() - 1;\n- 322 if (!keep_ovlp)\n- 323 {\n- 324 if (ovlp_low[i])\n- 325 {\n- 326 it += overlap/2;\n- 327 if (overlap%2)\n- 328 *(++iit) = (*it + *(++it)) / ct(2.);\n- 329 }\n- 330 if (ovlp_up[i])\n- 331 end -= overlap/2;\n- 332 }\n- 333\n- 334 for (;it!=end;)\n- 335 {\n- 336 *(++iit) = *it;\n- 337 *(++iit) = (*it + *(++it)) / ct(2.);\n- 338 }\n- 339\n- 340 if (++iit != newcoords[i].end())\n- 341 *iit = *it;\n- 342 }\n- 343 return TensorProductCoordinates(newcoords, newoffset);\n- 344 }\n- 345\n-347 void print(std::ostream& s) const\n- 348 {\n- 349 s << \"Printing TensorProduct Coordinate information:\" << std::endl;\n- 350 for (int i=0; i,dim> _c;\n- 360 std::array _offset;\n- 361 };\n- 362\n- 363 template\n-364 inline std::ostream& operator<<(std::ostream& s,\n-TensorProductCoordinates& c)\n- 365 {\n- 366 c.print(s);\n- 367 return s;\n- 368 }\n- 369\n-370 namespace Yasp {\n- 371 template\n-372 bool checkIfMonotonous(const std::array, dim>& coords)\n- 373 {\n- 374 for (std::size_t i=0; i::const_iterator i;\n+ 334 };\n+ 335\n+337 ProcListIterator sendbegin () const\n+ 338 {\n+ 339 return ProcListIterator(_sendlist.begin());\n+ 340 }\n+ 341\n+343 ProcListIterator sendend () const\n+ 344 {\n+ 345 return ProcListIterator(_sendlist.end());\n+ 346 }\n+ 347\n+349 ProcListIterator recvbegin () const\n+ 350 {\n+ 351 return ProcListIterator(_recvlist.begin());\n+ 352 }\n+ 353\n+355 ProcListIterator recvend () const\n+ 356 {\n+ 357 return ProcListIterator(_recvlist.end());\n+ 358 }\n+ 359\n+361 void send (int rank, void* buffer, int size) const\n+ 362 {\n+ 363 CommTask task;\n+ 364 task.rank = rank;\n+ 365 task.buffer = buffer;\n+ 366 task.size = size;\n+ 367 if (rank!=_comm.rank())\n+ 368 _sendrequests.push_back(task);\n+ 369 else\n+ 370 _localsendrequests.push_back(task);\n+ 371 }\n+ 372\n+374 void recv (int rank, void* buffer, int size) const\n 375 {\n- 376 if (coords[i].size() <= 1)\n- 377 return false;\n- 378 for (std::size_t j=1; j requests(_sendrequests.size() +\n+_recvrequests.size());\n+ 411 MPI_Request* req = requests.data();\n+ 412\n+ 413 // issue sends to foreign processes\n+ 414 for (unsigned int i=0; i<_sendrequests.size(); i++)\n+ 415 if (_sendrequests[i].rank!=rank())\n+ 416 {\n+ 417 // std::cout << \"[\" << rank() << \"]\" << \" send \" << _sendrequests[i].size\n+<< \" bytes \"\n+ 418 // << \"to \" << _sendrequests[i].rank << \" p=\" << _sendrequests[i].buffer\n+<< std::endl;\n+ 419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE,\n+ 420 _sendrequests[i].rank, _tag, _comm, req++);\n+ 421 }\n+ 422\n+ 423 // issue receives from foreign processes\n+ 424 for (unsigned int i=0; i<_recvrequests.size(); i++)\n+ 425 if (_recvrequests[i].rank!=rank())\n+ 426 {\n+ 427 // std::cout << \"[\" << rank() << \"]\" << \" recv \" << _recvrequests[i].size\n+<< \" bytes \"\n+ 428 // << \"fm \" << _recvrequests[i].rank << \" p=\" << _recvrequests[i].buffer\n+<< std::endl;\n+ 429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE,\n+ 430 _recvrequests[i].rank, _tag, _comm, req++);\n+ 431 }\n+ 432\n+ 433 // Wait for communication to complete\n+ 434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);\n+ 435\n+ 436 // clear request buffers\n+ 437 _sendrequests.clear();\n+ 438 _recvrequests.clear();\n+ 439#endif\n+ 440 }\n+ 441\n+443 double global_max (double x) const\n+ 444 {\n+ 445 double res = 0.0;\n+ 446 _comm.template allreduce,double>(&x, &res, 1);\n+ 447 return res;\n+ 448 }\n+ 449\n+451 void print (std::ostream& s) const\n+ 452 {\n+ 453 s << \"[\" << rank() << \"]: Torus \" << procs() << \" processor(s) arranged as\n+\" << dims() << std::endl;\n+ 454 for (ProcListIterator i=sendbegin(); i!=sendend(); ++i)\n+ 455 {\n+ 456 s << \"[\" << rank() << \"]: send to \"\n+ 457 << \"rank=\" << i.rank()\n+ 458 << \" index=\" << i.index()\n+ 459 << \" delta=\" << i.delta() << \" dist=\" << i.distance() << std::endl;\n+ 460 }\n+ 461 for (ProcListIterator i=recvbegin(); i!=recvend(); ++i)\n+ 462 {\n+ 463 s << \"[\" << rank() << \"]: recv from \"\n+ 464 << \"rank=\" << i.rank()\n+ 465 << \" index=\" << i.index()\n+ 466 << \" delta=\" << i.delta() << \" dist=\" << i.distance() << std::endl;\n+ 467 }\n+ 468 }\n+ 469\n+ 470 private:\n+ 471\n+ 472 void proclists ()\n+ 473 {\n+ 474 // compile the full neighbor list\n+ 475 CommPartner cp;\n+ 476 iTupel delta;\n+ 477\n+ 478 std::fill(delta.begin(), delta.end(), -1);\n+ 479 bool ready = false;\n+ 480 iTupel me, nb;\n+ 481 me = rank_to_coord(_comm.rank());\n+ 482 int index = 0;\n+ 483 int last = neighbors()-1;\n+ 484 while (!ready)\n+ 485 {\n+ 486 // find neighbors coordinates\n+ 487 for (int i=0; i _sendlist;\n+ 530 std::deque _recvlist;\n+ 531\n+ 532 mutable std::vector _sendrequests;\n+ 533 mutable std::vector _recvrequests;\n+ 534 mutable std::vector _localsendrequests;\n+ 535 mutable std::vector _localrecvrequests;\n+ 536\n+ 537 };\n+ 538\n+ 540 template \n+541 inline std::ostream& operator<<(std::ostream& s, const Torus & t)\n+ 542 {\n+ 543 t.print(s);\n+ 544 return s;\n+ 545 }\n+ 546}\n+ 547\n+ 548#endif\n+partitioning.hh\n+This file provides tools to partition YaspGrids. If you want to write your own\n+partitioner,...\n+exceptions.hh\n Dune::operator<<\n std::ostream & operator<<(std::ostream &out, const PartitionType &type)\n write a PartitionType to a stream\n Definition: gridenums.hh:72\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::Alberta::abs\n+void abs(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:328\n Dune::Partitions::overlap\n constexpr Overlap overlap\n PartitionSet for the overlap partition.\n Definition: partitionset.hh:278\n-Dune::Yasp::checkIfMonotonous\n-bool checkIfMonotonous(const std::array< std::vector< ctype >, dim > &coords)\n-Definition: coordinates.hh:372\n-Dune::EquidistantCoordinates\n-Container for equidistant coordinates in a YaspGrid.\n-Definition: coordinates.hh:29\n-Dune::EquidistantCoordinates::coordinate\n-ct coordinate(int d, int i) const\n-Definition: coordinates.hh:65\n-Dune::EquidistantCoordinates::size\n-int size(int d) const\n-Definition: coordinates.hh:73\n-Dune::EquidistantCoordinates::dimension\n-static const int dimension\n-export dimension\n-Definition: coordinates.hh:34\n-Dune::EquidistantCoordinates::print\n+Dune::Yasp::Partitioning\n+a base class for the yaspgrid partitioning strategy\n+Definition: partitioning.hh:39\n+Dune::Yasp::Partitioning::partition\n+virtual void partition(const iTupel &, int, iTupel &, int) const =0\n+Dune::Torus\n+Definition: torus.hh:46\n+Dune::Torus::Torus\n+Torus()\n+constructor making uninitialized object\n+Definition: torus.hh:67\n+Dune::Torus::color\n+int color(int rank) const\n+assign color to given rank\n+Definition: torus.hh:197\n+Dune::Torus::partition\n+double partition(int rank, iTupel origin_in, iTupel size_in, iTupel\n+&origin_out, iTupel &size_out) const\n+partition the given grid onto the torus and return the piece of the process\n+with given rank; returns ...\n+Definition: torus.hh:239\n+Dune::Torus::dims\n+int dims(int i) const\n+return dimensions of torus in direction i\n+Definition: torus.hh:118\n+Dune::Torus::coord\n+iTupel coord() const\n+return own coordinates\n+Definition: torus.hh:100\n+Dune::Torus::rank\n+int rank() const\n+return own rank\n+Definition: torus.hh:94\n+Dune::Torus::dims\n+const iTupel & dims() const\n+return dimensions of torus\n+Definition: torus.hh:112\n+Dune::Torus::rank_relative\n+int rank_relative(int rank, int dir, int cnt) const\n+return rank of process where its coordinate in direction dir has offset cnt\n+(handles periodic case)\n+Definition: torus.hh:166\n+Dune::Torus::recv\n+void recv(int rank, void *buffer, int size) const\n+store a receive request; buffers are received in order; handles also local\n+requests with memcpy\n+Definition: torus.hh:374\n+Dune::Torus::send\n+void send(int rank, void *buffer, int size) const\n+store a send request; buffers are sent in order; handles also local requests\n+with memcpy\n+Definition: torus.hh:361\n+Dune::Torus::Torus\n+Torus(Communication comm, int tag, iTupel size, int overlap, const Yasp::\n+Partitioning< d > *partitioner)\n+make partitioner from communicator and coarse mesh size\n+Definition: torus.hh:71\n+Dune::Torus::neighbors\n+int neighbors() const\n+return the number of neighbors, which is\n+Definition: torus.hh:203\n+Dune::Torus::print\n void print(std::ostream &s) const\n-print information on this container\n-Definition: coordinates.hh:107\n-Dune::EquidistantCoordinates::EquidistantCoordinates\n-EquidistantCoordinates()\n-default constructor\n-Definition: coordinates.hh:37\n-Dune::EquidistantCoordinates::refine\n-EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::\n-bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const\n-Definition: coordinates.hh:84\n-Dune::EquidistantCoordinates::ctype\n-ct ctype\n-export the coordinate type\n-Definition: coordinates.hh:32\n-Dune::EquidistantCoordinates::EquidistantCoordinates\n-EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const\n-std::array< int, dim > &s)\n-construct a container with all necessary information\n-Definition: coordinates.hh:45\n-Dune::EquidistantCoordinates::meshsize\n-ct meshsize(int d, int i) const\n-Definition: coordinates.hh:56\n-Dune::EquidistantOffsetCoordinates\n-Container for equidistant coordinates in a YaspGrid with non-trivial origin.\n-Definition: coordinates.hh:131\n-Dune::EquidistantOffsetCoordinates::EquidistantOffsetCoordinates\n-EquidistantOffsetCoordinates()\n-default constructor\n-Definition: coordinates.hh:139\n-Dune::EquidistantOffsetCoordinates::EquidistantOffsetCoordinates\n-EquidistantOffsetCoordinates(const Dune::FieldVector< ct, dim > &lowerLeft,\n-const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim >\n-&s)\n-construct a container with all necessary information\n-Definition: coordinates.hh:149\n-Dune::EquidistantOffsetCoordinates::refine\n-EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low,\n-std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const\n-Definition: coordinates.hh:196\n-Dune::EquidistantOffsetCoordinates::print\n-void print(std::ostream &s) const\n-print information on this container\n-Definition: coordinates.hh:219\n-Dune::EquidistantOffsetCoordinates::meshsize\n-ct meshsize(int d, int i) const\n-Definition: coordinates.hh:160\n-Dune::EquidistantOffsetCoordinates::origin\n-ct origin(int d) const\n-Definition: coordinates.hh:185\n-Dune::EquidistantOffsetCoordinates::size\n-int size(int d) const\n-Definition: coordinates.hh:177\n-Dune::EquidistantOffsetCoordinates::ctype\n-ct ctype\n-export the coordinate type\n-Definition: coordinates.hh:134\n-Dune::EquidistantOffsetCoordinates::dimension\n-static const int dimension\n-export dimension\n-Definition: coordinates.hh:136\n-Dune::EquidistantOffsetCoordinates::coordinate\n-ct coordinate(int d, int i) const\n-Definition: coordinates.hh:169\n-Dune::TensorProductCoordinates\n-Coordinate container for a tensor product YaspGrid.\n-Definition: coordinates.hh:245\n-Dune::TensorProductCoordinates::print\n-void print(std::ostream &s) const\n-print information on this container\n-Definition: coordinates.hh:347\n-Dune::TensorProductCoordinates::meshsize\n-ct meshsize(int d, int i) const\n-Definition: coordinates.hh:269\n-Dune::TensorProductCoordinates::coordinate\n-ct coordinate(int d, int i) const\n-Definition: coordinates.hh:278\n-Dune::TensorProductCoordinates::dimension\n-static const int dimension\n-export dimension\n-Definition: coordinates.hh:250\n-Dune::TensorProductCoordinates::refine\n-TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::\n-bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const\n-Definition: coordinates.hh:297\n-Dune::TensorProductCoordinates::TensorProductCoordinates\n-TensorProductCoordinates(const std::array< std::vector< ct >, dim > &c, const\n-std::array< int, dim > &offset)\n-construct a container with all necessary information\n-Definition: coordinates.hh:261\n-Dune::TensorProductCoordinates::TensorProductCoordinates\n-TensorProductCoordinates()\n-the default constructor\n-Definition: coordinates.hh:253\n-Dune::TensorProductCoordinates::ctype\n-ct ctype\n-export the coordinate type\n-Definition: coordinates.hh:248\n-Dune::TensorProductCoordinates::size\n-int size(int d) const\n-Definition: coordinates.hh:286\n+print contents of torus object\n+Definition: torus.hh:451\n+Dune::Torus::global_max\n+double global_max(double x) const\n+global max\n+Definition: torus.hh:443\n+Dune::Torus::comm\n+Communication comm() const\n+return communicator\n+Definition: torus.hh:124\n+Dune::Torus::color\n+int color(const iTupel &coord) const\n+assign color to given coordinate\n+Definition: torus.hh:174\n+Dune::Torus::recvend\n+ProcListIterator recvend() const\n+last process in receive list\n+Definition: torus.hh:355\n+Dune::Torus::is_neighbor\n+bool is_neighbor(iTupel delta, std::bitset< d > periodic) const\n+return true if neighbor with given delta is a neighbor under the given\n+periodicity\n+Definition: torus.hh:212\n+Dune::Torus::sendend\n+ProcListIterator sendend() const\n+end of send list\n+Definition: torus.hh:343\n+Dune::Torus::procs\n+int procs() const\n+return number of processes\n+Definition: torus.hh:106\n+Dune::Torus::rank_to_coord\n+iTupel rank_to_coord(int rank) const\n+map rank to coordinate in torus using lexicographic ordering\n+Definition: torus.hh:144\n+Dune::Torus::iTupel\n+std::array< int, d > iTupel\n+type used to pass tupels in and out\n+Definition: torus.hh:49\n+Dune::Torus::sendbegin\n+ProcListIterator sendbegin() const\n+first process in send list\n+Definition: torus.hh:337\n+Dune::Torus::exchange\n+void exchange() const\n+exchange messages stored in request buffers; clear request buffers afterwards\n+Definition: torus.hh:387\n+Dune::Torus::recvbegin\n+ProcListIterator recvbegin() const\n+first process in receive list\n+Definition: torus.hh:349\n+Dune::Torus::coord_to_rank\n+int coord_to_rank(iTupel coord) const\n+map coordinate in torus to rank using lexicographic ordering\n+Definition: torus.hh:157\n+Dune::Torus::inside\n+bool inside(iTupel c) const\n+return true if coordinate is inside torus\n+Definition: torus.hh:136\n+Dune::Torus::tag\n+int tag() const\n+return tag used by torus\n+Definition: torus.hh:130\n+Dune::Torus::ProcListIterator\n+Definition: torus.hh:276\n+Dune::Torus::ProcListIterator::delta\n+iTupel delta() const\n+return distance vector\n+Definition: torus.hh:291\n+Dune::Torus::ProcListIterator::operator==\n+bool operator==(const ProcListIterator &iter) const\n+Return true when two iterators point to same member.\n+Definition: torus.hh:313\n+Dune::Torus::ProcListIterator::operator!=\n+bool operator!=(const ProcListIterator &iter) const\n+Return true when two iterators do not point to same member.\n+Definition: torus.hh:320\n+Dune::Torus::ProcListIterator::rank\n+int rank() const\n+return rank of neighboring process\n+Definition: torus.hh:285\n+Dune::Torus::ProcListIterator::ProcListIterator\n+ProcListIterator(typename std::deque< CommPartner >::const_iterator iter)\n+make an iterator\n+Definition: torus.hh:279\n+Dune::Torus::ProcListIterator::operator++\n+ProcListIterator & operator++()\n+Increment iterator to next cell.\n+Definition: torus.hh:326\n+Dune::Torus::ProcListIterator::index\n+int index() const\n+return index in proclist\n+Definition: torus.hh:297\n+Dune::Torus::ProcListIterator::distance\n+int distance() const\n+return 1-norm of distance vector\n+Definition: torus.hh:303\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00185.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00185.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridleveliterator.hh File Reference\n+dune-grid: structuredyaspgridfactory.hh File Reference\n \n \n \n \n \n \n \n@@ -65,37 +65,42 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n \n-
    yaspgridleveliterator.hh File Reference
    \n+
    structuredyaspgridfactory.hh File Reference
    \n
    \n
    \n \n-

    The YaspLevelIterator class. \n+

    Specialization of the StructuredGridFactory class for YaspGrid. \n More...

    \n-\n+
    #include <memory>
    \n+#include <dune/grid/utility/structuredgridfactory.hh>
    \n+
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::YaspLevelIterator< codim, pitype, GridImp >
     Iterates over entities of one grid level. More...
    class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
     Specialization of the StructuredGridFactory for YaspGrid. More...
     
    class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
     Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The YaspLevelIterator class.

    \n+

    Specialization of the StructuredGridFactory class for YaspGrid.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,23 +6,31 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n Classes | Namespaces\n-yaspgridleveliterator.hh File Reference\n-The YaspLevelIterator class. More...\n+structuredyaspgridfactory.hh File Reference\n+Specialization of the StructuredGridFactory class for YaspGrid. More...\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::YaspLevelIterator<_codim,_pitype,_GridImp_>\n-\u00a0 Iterates over entities of one grid level. More...\n+class \u00a0Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<\n+ ctype,_dim_>_>_>\n+\u00a0 Specialization of the StructuredGridFactory for YaspGrid. More...\n+\u00a0\n+class \u00a0Dune::StructuredGridFactory<_YaspGrid<_dim,\n+ EquidistantOffsetCoordinates<_ctype,_dim_>_>_>\n+\u00a0 Specialization of the StructuredGridFactory for\n+ YaspGrid More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The YaspLevelIterator class.\n+Specialization of the StructuredGridFactory class for YaspGrid.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00185_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridleveliterator.hh Source File\n+dune-grid: structuredyaspgridfactory.hh Source File\n \n \n \n \n \n \n \n@@ -62,79 +62,115 @@\n \n \n
    \n
    \n-
    yaspgridleveliterator.hh
    \n+
    structuredyaspgridfactory.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH
    \n-
    6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
    \n+
    6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
    \n
    7
    \n-
    12namespace Dune {
    \n-
    13
    \n-
    14
    \n-
    17 template<int codim, PartitionIteratorType pitype, class GridImp>
    \n-\n-
    19 {
    \n-
    21 constexpr static int dim = GridImp::dimension;
    \n-
    23 constexpr static int dimworld = GridImp::dimensionworld;
    \n-
    24 typedef typename GridImp::ctype ctype;
    \n-
    25 public:
    \n-
    26 typedef typename GridImp::template Codim<codim>::Entity Entity;
    \n-
    27 typedef typename GridImp::YGridLevelIterator YGLI;
    \n-
    28 typedef typename GridImp::YGrid::Iterator I;
    \n-
    29
    \n-\n-
    32 {}
    \n-
    33
    \n-
    35 YaspLevelIterator (const YGLI & g, const I& it)
    \n-
    36 : _entity(YaspEntity<codim, dim, GridImp>(g,it))
    \n-
    37 {}
    \n-
    38
    \n-
    40 void increment()
    \n-
    41 {
    \n-
    42 ++(_entity.impl()._it);
    \n-
    43 }
    \n-
    44
    \n-
    46 bool equals (const YaspLevelIterator& rhs) const
    \n-
    47 {
    \n-
    48 return (_entity == rhs._entity);
    \n-
    49 }
    \n-
    50
    \n-
    52 const Entity& dereference() const
    \n-
    53 {
    \n-
    54 return _entity;
    \n-
    55 }
    \n+
    8#include <memory>
    \n+
    9
    \n+\n+
    11
    \n+
    16namespace Dune
    \n+
    17{
    \n+
    27 template<class ctype, int dim>
    \n+\n+
    29 {
    \n+\n+
    31 static const int dimworld = GridType::dimensionworld;
    \n+
    32
    \n+
    33 public:
    \n+
    44 static std::unique_ptr<GridType>
    \n+
    45 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n+
    46 const FieldVector<ctype,dimworld>& upperRight,
    \n+
    47 const std::array<unsigned int,dim>& elements)
    \n+
    48 {
    \n+
    49 using std::abs;
    \n+
    50 for(int d = 0; d < dimworld; ++d)
    \n+
    51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10)
    \n+
    52 DUNE_THROW(GridError, className<StructuredGridFactory>()
    \n+
    53 << "::createCubeGrid(): You have to use Yaspgrid<dim"
    \n+
    54 ", EquidistantOffsetCoordinates<ctype,dim> > as your"
    \n+
    55 "grid type for non-trivial origin." );
    \n
    56
    \n-
    57 protected:
    \n-\n-
    59 };
    \n+
    57 // construct array of ints instead of unsigned ints
    \n+
    58 std::array<int, dim> elem;
    \n+
    59 std::copy(elements.begin(), elements.end(), elem.begin());
    \n
    60
    \n-
    61}
    \n-
    62
    \n-
    63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH
    \n+
    61 return std::make_unique<GridType>(upperRight, elem,
    \n+
    62 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
    \n+
    63 }
    \n+
    64
    \n+
    70 static std::unique_ptr<GridType>
    \n+
    71 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n+
    72 const FieldVector<ctype,dimworld>& upperRight,
    \n+
    73 const std::array<unsigned int,dim>& elements)
    \n+
    74 {
    \n+
    75 DUNE_THROW(GridError, className<StructuredGridFactory>()
    \n+
    76 << "::createSimplexGrid(): Simplices are not supported "
    \n+
    77 "by YaspGrid.");
    \n+
    78 }
    \n+
    79
    \n+
    80 };
    \n+
    81
    \n+
    89 template<class ctype, int dim>
    \n+\n+\n+
    92 static const int dimworld = GridType::dimensionworld;
    \n+
    93
    \n+
    94 public:
    \n+
    101 static std::unique_ptr<GridType>
    \n+
    102 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n+
    103 const FieldVector<ctype,dimworld>& upperRight,
    \n+
    104 const std::array<unsigned int,dim>& elements)
    \n+
    105 {
    \n+
    106 // construct array of ints instead of unsigned ints
    \n+
    107 std::array<int, dim> elem;
    \n+
    108 std::copy(elements.begin(), elements.end(), elem.begin());
    \n+
    109
    \n+
    110 return std::make_unique<GridType>(lowerLeft, upperRight, elem,
    \n+
    111 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
    \n+
    112 }
    \n+
    113
    \n+
    119 static std::unique_ptr<GridType>
    \n+
    120 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n+
    121 const FieldVector<ctype,dimworld>& upperRight,
    \n+
    122 const std::array<unsigned int,dim>& elements)
    \n+
    123 {
    \n+
    124 DUNE_THROW(GridError, className<StructuredGridFactory>()
    \n+
    125 << "::createSimplexGrid(): Simplices are not supported "
    \n+
    126 "by YaspGrid.");
    \n+
    127 }
    \n+
    128
    \n+
    129 };
    \n+
    130
    \n+
    131} // namespace Dune
    \n+
    132#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: yaspgridentity.hh:268
    \n-
    Iterates over entities of one grid level.
    Definition: yaspgridleveliterator.hh:19
    \n-
    Entity _entity
    entity
    Definition: yaspgridleveliterator.hh:58
    \n-
    GridImp::YGridLevelIterator YGLI
    Definition: yaspgridleveliterator.hh:27
    \n-
    GridImp::template Codim< codim >::Entity Entity
    Definition: yaspgridleveliterator.hh:26
    \n-
    void increment()
    increment
    Definition: yaspgridleveliterator.hh:40
    \n-
    GridImp::YGrid::Iterator I
    Definition: yaspgridleveliterator.hh:28
    \n-
    YaspLevelIterator(const YGLI &g, const I &it)
    constructor
    Definition: yaspgridleveliterator.hh:35
    \n-
    bool equals(const YaspLevelIterator &rhs) const
    equality
    Definition: yaspgridleveliterator.hh:46
    \n-
    YaspLevelIterator()
    default constructor
    Definition: yaspgridleveliterator.hh:31
    \n-
    const Entity & dereference() const
    dereferencing
    Definition: yaspgridleveliterator.hh:52
    \n+
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n+
    Construct structured cube and simplex grids in unstructured grid managers.
    Definition: utility/structuredgridfactory.hh:31
    \n+
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n+
    [ provides Dune::Grid ]
    Definition: yaspgrid.hh:163
    \n+
    Container for equidistant coordinates in a YaspGrid.
    Definition: coordinates.hh:29
    \n+
    Container for equidistant coordinates in a YaspGrid with non-trivial origin.
    Definition: coordinates.hh:131
    \n+
    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
    \n+
    static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    Create a structured simplex grid.
    Definition: structuredyaspgridfactory.hh:71
    \n+
    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
    \n+
    static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    Create a structured simplex grid.
    Definition: structuredyaspgridfactory.hh:120
    \n+
    A class to construct structured cube and simplex grids using the grid factory.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,104 +5,152 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-yaspgridleveliterator.hh\n+structuredyaspgridfactory.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH\n- 6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH\n+ 5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH\n+ 6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH\n 7\n- 12namespace Dune {\n- 13\n- 14\n- 17 template\n-18 class YaspLevelIterator\n- 19 {\n- 21 constexpr static int dim = GridImp::dimension;\n- 23 constexpr static int dimworld = GridImp::dimensionworld;\n- 24 typedef typename GridImp::ctype ctype;\n- 25 public:\n-26 typedef typename GridImp::template Codim::Entity Entity;\n-27 typedef typename GridImp::YGridLevelIterator YGLI;\n-28 typedef typename GridImp::YGrid::Iterator I;\n- 29\n-31 YaspLevelIterator ()\n- 32 {}\n- 33\n-35 YaspLevelIterator (const YGLI & g, const I& it)\n- 36 : _entity(YaspEntity(g,it))\n- 37 {}\n- 38\n-40 void increment()\n- 41 {\n- 42 ++(_entity.impl()._it);\n- 43 }\n- 44\n-46 bool equals (const YaspLevelIterator& rhs) const\n- 47 {\n- 48 return (_entity == rhs._entity);\n- 49 }\n- 50\n-52 const Entity& dereference() const\n- 53 {\n- 54 return _entity;\n- 55 }\n+ 8#include \n+ 9\n+ 10#include \n+ 11\n+ 16namespace Dune\n+ 17{\n+ 27 template\n+28 class StructuredGridFactory\n+> >\n+ 29 {\n+ 30 typedef YaspGrid > GridType;\n+ 31 static const int dimworld = GridType::dimensionworld;\n+ 32\n+ 33 public:\n+ 44 static std::unique_ptr\n+45 createCubeGrid(const FieldVector& lowerLeft,\n+ 46 const FieldVector& upperRight,\n+ 47 const std::array& elements)\n+ 48 {\n+ 49 using std::abs;\n+ 50 for(int d = 0; d < dimworld; ++d)\n+ 51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10)\n+ 52 DUNE_THROW(GridError, className()\n+ 53 << \"::createCubeGrid(): You have to use Yaspgrid > as your\"\n+ 55 \"grid type for non-trivial origin.\" );\n 56\n- 57 protected:\n-58 Entity _entity;\n- 59 };\n+ 57 // construct array of ints instead of unsigned ints\n+ 58 std::array elem;\n+ 59 std::copy(elements.begin(), elements.end(), elem.begin());\n 60\n- 61}\n- 62\n- 63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH\n+ 61 return std::make_unique(upperRight, elem,\n+ 62 std::bitset(), 1); // default constructor of bitset sets to zero\n+ 63 }\n+ 64\n+ 70 static std::unique_ptr\n+71 createSimplexGrid(const FieldVector& lowerLeft,\n+ 72 const FieldVector& upperRight,\n+ 73 const std::array& elements)\n+ 74 {\n+ 75 DUNE_THROW(GridError, className()\n+ 76 << \"::createSimplexGrid(): Simplices are not supported \"\n+ 77 \"by YaspGrid.\");\n+ 78 }\n+ 79\n+ 80 };\n+ 81\n+ 89 template\n+90 class StructuredGridFactory > > {\n+ 91 typedef YaspGrid > GridType;\n+ 92 static const int dimworld = GridType::dimensionworld;\n+ 93\n+ 94 public:\n+ 101 static std::unique_ptr\n+102 createCubeGrid(const FieldVector& lowerLeft,\n+ 103 const FieldVector& upperRight,\n+ 104 const std::array& elements)\n+ 105 {\n+ 106 // construct array of ints instead of unsigned ints\n+ 107 std::array elem;\n+ 108 std::copy(elements.begin(), elements.end(), elem.begin());\n+ 109\n+ 110 return std::make_unique(lowerLeft, upperRight, elem,\n+ 111 std::bitset(), 1); // default constructor of bitset sets to zero\n+ 112 }\n+ 113\n+ 119 static std::unique_ptr\n+120 createSimplexGrid(const FieldVector& lowerLeft,\n+ 121 const FieldVector& upperRight,\n+ 122 const std::array& elements)\n+ 123 {\n+ 124 DUNE_THROW(GridError, className()\n+ 125 << \"::createSimplexGrid(): Simplices are not supported \"\n+ 126 \"by YaspGrid.\");\n+ 127 }\n+ 128\n+ 129 };\n+ 130\n+ 131} // namespace Dune\n+ 132#endif\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::YaspEntity\n-Definition: yaspgridentity.hh:268\n-Dune::YaspLevelIterator\n-Iterates over entities of one grid level.\n-Definition: yaspgridleveliterator.hh:19\n-Dune::YaspLevelIterator::_entity\n-Entity _entity\n-entity\n-Definition: yaspgridleveliterator.hh:58\n-Dune::YaspLevelIterator::YGLI\n-GridImp::YGridLevelIterator YGLI\n-Definition: yaspgridleveliterator.hh:27\n-Dune::YaspLevelIterator::Entity\n-GridImp::template Codim< codim >::Entity Entity\n-Definition: yaspgridleveliterator.hh:26\n-Dune::YaspLevelIterator::increment\n-void increment()\n-increment\n-Definition: yaspgridleveliterator.hh:40\n-Dune::YaspLevelIterator::I\n-GridImp::YGrid::Iterator I\n-Definition: yaspgridleveliterator.hh:28\n-Dune::YaspLevelIterator::YaspLevelIterator\n-YaspLevelIterator(const YGLI &g, const I &it)\n-constructor\n-Definition: yaspgridleveliterator.hh:35\n-Dune::YaspLevelIterator::equals\n-bool equals(const YaspLevelIterator &rhs) const\n-equality\n-Definition: yaspgridleveliterator.hh:46\n-Dune::YaspLevelIterator::YaspLevelIterator\n-YaspLevelIterator()\n-default constructor\n-Definition: yaspgridleveliterator.hh:31\n-Dune::YaspLevelIterator::dereference\n-const Entity & dereference() const\n-dereferencing\n-Definition: yaspgridleveliterator.hh:52\n+Dune::Alberta::abs\n+void abs(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:328\n+Dune::StructuredGridFactory\n+Construct structured cube and simplex grids in unstructured grid managers.\n+Definition: utility/structuredgridfactory.hh:31\n+Dune::GridError\n+Base class for exceptions in Dune grid modules.\n+Definition: exceptions.hh:20\n+Dune::YaspGrid\n+[ provides Dune::Grid ]\n+Definition: yaspgrid.hh:163\n+Dune::EquidistantCoordinates\n+Container for equidistant coordinates in a YaspGrid.\n+Definition: coordinates.hh:29\n+Dune::EquidistantOffsetCoordinates\n+Container for equidistant coordinates in a YaspGrid with non-trivial origin.\n+Definition: coordinates.hh:131\n+Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim\n+>_>_>::createCubeGrid\n+static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype,\n+dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n+std::array< unsigned int, dim > &elements)\n+Create a structured cube grid.\n+Definition: structuredyaspgridfactory.hh:45\n+Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim\n+>_>_>::createSimplexGrid\n+static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype,\n+dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n+std::array< unsigned int, dim > &elements)\n+Create a structured simplex grid.\n+Definition: structuredyaspgridfactory.hh:71\n+Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<\n+ctype,_dim_>_>_>::createCubeGrid\n+static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype,\n+dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n+std::array< unsigned int, dim > &elements)\n+Create a structured cube grid.\n+Definition: structuredyaspgridfactory.hh:102\n+Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<\n+ctype,_dim_>_>_>::createSimplexGrid\n+static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype,\n+dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n+std::array< unsigned int, dim > &elements)\n+Create a structured simplex grid.\n+Definition: structuredyaspgridfactory.hh:120\n+structuredgridfactory.hh\n+A class to construct structured cube and simplex grids using the grid factory.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00200.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00200.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: structuredyaspgridfactory.hh File Reference\n+dune-grid: yaspgridintersection.hh File Reference\n \n \n \n \n \n \n \n@@ -65,42 +65,38 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n \n-
    structuredyaspgridfactory.hh File Reference
    \n+
    yaspgridintersection.hh File Reference
    \n
    \n
    \n \n-

    Specialization of the StructuredGridFactory class for YaspGrid. \n+

    The YaspIntersection class. \n More...

    \n-
    #include <memory>
    \n-#include <dune/grid/utility/structuredgridfactory.hh>
    \n-
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
     Specialization of the StructuredGridFactory for YaspGrid. More...
     
    class  Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
     Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> More...
    class  Dune::YaspIntersection< GridImp >
     YaspIntersection provides data about intersection with neighboring codim 0 entities. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    Specialization of the StructuredGridFactory class for YaspGrid.

    \n+

    The YaspIntersection class.

    \n+

    YaspIntersection provides data about intersection with neighboring codim 0 entities.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,31 +6,26 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n Classes | Namespaces\n-structuredyaspgridfactory.hh File Reference\n-Specialization of the StructuredGridFactory class for YaspGrid. More...\n-#include \n-#include \n+yaspgridintersection.hh File Reference\n+The YaspIntersection class. More...\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<\n- ctype,_dim_>_>_>\n-\u00a0 Specialization of the StructuredGridFactory for YaspGrid. More...\n-\u00a0\n-class \u00a0Dune::StructuredGridFactory<_YaspGrid<_dim,\n- EquidistantOffsetCoordinates<_ctype,_dim_>_>_>\n-\u00a0 Specialization of the StructuredGridFactory for\n- YaspGrid More...\n+class \u00a0Dune::YaspIntersection<_GridImp_>\n+\u00a0 YaspIntersection provides data about intersection with neighboring\n+ codim 0 entities. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-Specialization of the StructuredGridFactory class for YaspGrid.\n+The YaspIntersection class.\n+YaspIntersection provides data about intersection with neighboring codim 0\n+entities.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00200_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: structuredyaspgridfactory.hh Source File\n+dune-grid: yaspgridintersection.hh Source File\n \n \n \n \n \n \n \n@@ -62,115 +62,359 @@\n \n \n
    \n
    \n-
    structuredyaspgridfactory.hh
    \n+
    yaspgridintersection.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
    \n-
    6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRIDINTERSECTION_HH
    \n+
    6#define DUNE_GRID_YASPGRIDINTERSECTION_HH
    \n
    7
    \n-
    8#include <memory>
    \n-
    9
    \n-\n-
    11
    \n-
    16namespace Dune
    \n-
    17{
    \n-
    27 template<class ctype, int dim>
    \n-\n-
    29 {
    \n-\n-
    31 static const int dimworld = GridType::dimensionworld;
    \n-
    32
    \n-
    33 public:
    \n-
    44 static std::unique_ptr<GridType>
    \n-
    45 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n-
    46 const FieldVector<ctype,dimworld>& upperRight,
    \n-
    47 const std::array<unsigned int,dim>& elements)
    \n-
    48 {
    \n-
    49 using std::abs;
    \n-
    50 for(int d = 0; d < dimworld; ++d)
    \n-
    51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10)
    \n-
    52 DUNE_THROW(GridError, className<StructuredGridFactory>()
    \n-
    53 << "::createCubeGrid(): You have to use Yaspgrid<dim"
    \n-
    54 ", EquidistantOffsetCoordinates<ctype,dim> > as your"
    \n-
    55 "grid type for non-trivial origin." );
    \n-
    56
    \n-
    57 // construct array of ints instead of unsigned ints
    \n-
    58 std::array<int, dim> elem;
    \n-
    59 std::copy(elements.begin(), elements.end(), elem.begin());
    \n-
    60
    \n-
    61 return std::make_unique<GridType>(upperRight, elem,
    \n-
    62 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
    \n-
    63 }
    \n-
    64
    \n-
    70 static std::unique_ptr<GridType>
    \n-
    71 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n-
    72 const FieldVector<ctype,dimworld>& upperRight,
    \n-
    73 const std::array<unsigned int,dim>& elements)
    \n-
    74 {
    \n-
    75 DUNE_THROW(GridError, className<StructuredGridFactory>()
    \n-
    76 << "::createSimplexGrid(): Simplices are not supported "
    \n-
    77 "by YaspGrid.");
    \n-
    78 }
    \n-
    79
    \n-
    80 };
    \n-
    81
    \n-
    89 template<class ctype, int dim>
    \n-\n-\n-
    92 static const int dimworld = GridType::dimensionworld;
    \n-
    93
    \n-
    94 public:
    \n-
    101 static std::unique_ptr<GridType>
    \n-
    102 createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n-
    103 const FieldVector<ctype,dimworld>& upperRight,
    \n-
    104 const std::array<unsigned int,dim>& elements)
    \n-
    105 {
    \n-
    106 // construct array of ints instead of unsigned ints
    \n-
    107 std::array<int, dim> elem;
    \n-
    108 std::copy(elements.begin(), elements.end(), elem.begin());
    \n-
    109
    \n-
    110 return std::make_unique<GridType>(lowerLeft, upperRight, elem,
    \n-
    111 std::bitset<dim>(), 1); // default constructor of bitset sets to zero
    \n-
    112 }
    \n-
    113
    \n-
    119 static std::unique_ptr<GridType>
    \n-
    120 createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
    \n-
    121 const FieldVector<ctype,dimworld>& upperRight,
    \n-
    122 const std::array<unsigned int,dim>& elements)
    \n-
    123 {
    \n-
    124 DUNE_THROW(GridError, className<StructuredGridFactory>()
    \n-
    125 << "::createSimplexGrid(): Simplices are not supported "
    \n-
    126 "by YaspGrid.");
    \n-
    127 }
    \n-
    128
    \n-
    129 };
    \n-
    130
    \n-
    131} // namespace Dune
    \n-
    132#endif
    \n+
    15namespace Dune {
    \n+
    16
    \n+
    20 template<class GridImp>
    \n+\n+
    22 {
    \n+
    23 constexpr static int dim = GridImp::dimension;
    \n+
    24 constexpr static int dimworld = GridImp::dimensionworld;
    \n+
    25 typedef typename GridImp::ctype ctype;
    \n+
    26
    \n+
    27 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
    \n+
    28 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
    \n+
    29
    \n+
    30 friend class YaspIntersectionIterator<GridImp>;
    \n+
    31
    \n+
    32 public:
    \n+
    33 // types used from grids
    \n+
    34 typedef typename GridImp::YGridLevelIterator YGLI;
    \n+
    35 typedef typename GridImp::YGrid::Iterator I;
    \n+
    36 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n+
    37 typedef typename GridImp::template Codim<1>::Geometry Geometry;
    \n+
    38 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
    \n+
    39
    \n+
    40 void update() {
    \n+
    41
    \n+
    42 // vector with per-direction movements
    \n+
    43 std::array<int,dim> dist{{0}};
    \n+
    44
    \n+
    45 // first move: back to center
    \n+
    46 dist[_dir] = 1 - 2*_face;
    \n+
    47
    \n+
    48 // update face info
    \n+
    49 _dir = _count / 2;
    \n+
    50 _face = _count % 2;
    \n+
    51
    \n+
    52 // second move: to new neighbor
    \n+
    53 dist[_dir] += -1 + 2*_face;
    \n+
    54
    \n+
    55 // move transforming iterator
    \n+
    56 _outside.transformingsubiterator().move(dist);
    \n+
    57 }
    \n+
    58
    \n+
    62 bool boundary () const
    \n+
    63 {
    \n+
    64 // Coordinate of intersection in its direction
    \n+
    65 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
    \n+
    66 if (_inside.gridlevel()->mg->isPeriodic(_dir))
    \n+
    67 return false;
    \n+
    68 else
    \n+
    69 return coord == 0
    \n+
    70 ||
    \n+
    71 coord == _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),_dir);
    \n+
    72 }
    \n+
    73
    \n+
    75 bool neighbor () const
    \n+
    76 {
    \n+
    77 // Coordinate of intersection in its direction
    \n+
    78 int coord = _inside.transformingsubiterator().coord(_dir) + _face;
    \n+
    79 return coord > _inside.gridlevel()->overlap[0].dataBegin()->min(_dir)
    \n+
    80 &&
    \n+
    81 coord <= _inside.gridlevel()->overlap[0].dataBegin()->max(_dir);
    \n+
    82 }
    \n+
    83
    \n+
    85 bool conforming () const
    \n+
    86 {
    \n+
    87 return true;
    \n+
    88 }
    \n+
    89
    \n+
    92 Entity inside() const
    \n+
    93 {
    \n+
    94 return Entity(_inside);
    \n+
    95 }
    \n+
    96
    \n+\n+
    99 {
    \n+
    100 return Entity(_outside);
    \n+
    101 }
    \n+
    102
    \n+\n+
    106 {
    \n+
    107 if(! boundary())
    \n+
    108 DUNE_THROW(GridError, "called boundarySegmentIndex while boundary() == false");
    \n+
    109 // size of local macro grid
    \n+
    110 const std::array<int, dim> & size = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size();
    \n+
    111 const std::array<int, dim> & origin = _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin();
    \n+
    112 std::array<int, dim> sides;
    \n+
    113 {
    \n+
    114 for (int i=0; i<dim; i++)
    \n+
    115 {
    \n+
    116 sides[i] =
    \n+
    117 ((_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i)
    \n+
    118 == 0)+
    \n+
    119 (_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i) +
    \n+
    120 _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size(i)
    \n+
    121 ==
    \n+
    122 _inside.gridlevel()->mg->levelSize(0,i)));
    \n+
    123
    \n+
    124 }
    \n+
    125 }
    \n+
    126 // global position of the cell on macro grid
    \n+
    127 std::array<int, dim> pos = _inside.transformingsubiterator().coord();
    \n+
    128 for(int i=0; i<dim; i++)
    \n+
    129 {
    \n+
    130 pos[i] = pos[i] / (1<<_inside.level());
    \n+
    131 pos[i] = pos[i] - origin[i];
    \n+
    132 }
    \n+
    133 // compute unit-cube-face-sizes
    \n+
    134 std::array<int, dim> fsize;
    \n+
    135 {
    \n+
    136 int vol = 1;
    \n+
    137 for (int k=0; k<dim; k++)
    \n+
    138 vol *= size[k];
    \n+
    139 for (int k=0; k<dim; k++)
    \n+
    140 fsize[k] = vol/size[k];
    \n+
    141 }
    \n+
    142 // compute index in the unit-cube-face
    \n+
    143 int index = 0;
    \n+
    144 {
    \n+
    145 int localoffset = 1;
    \n+
    146 for (int k=dim-1; k>=0; k--)
    \n+
    147 {
    \n+
    148 if (k == _dir) continue;
    \n+
    149 index += (pos[k]) * localoffset;
    \n+
    150 localoffset *= size[k];
    \n+
    151 }
    \n+
    152 }
    \n+
    153 // add unit-cube-face-offsets
    \n+
    154 {
    \n+
    155 for (int k=0; k<_dir; k++)
    \n+
    156 index += sides[k] * fsize[k];
    \n+
    157 // add fsize if we are on the right face and there is a left-face-boundary on this processor
    \n+
    158 index += _face * (sides[_dir]>1) * fsize[_dir];
    \n+
    159 }
    \n+
    160
    \n+
    161 return index;
    \n+
    162 }
    \n+
    163
    \n+
    165 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& /* local */) const
    \n+
    166 {
    \n+
    167 return centerUnitOuterNormal();
    \n+
    168 }
    \n+
    169
    \n+
    171 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& /* local */) const
    \n+
    172 {
    \n+
    173 return centerUnitOuterNormal();
    \n+
    174 }
    \n+
    175
    \n+
    177 FieldVector<ctype, dimworld> centerUnitOuterNormal () const
    \n+
    178 {
    \n+
    179 FieldVector<ctype, dimworld> normal(0);
    \n+
    180 normal[_dir] = (_face==0) ? -1.0 : 1.0;
    \n+
    181 return normal;
    \n+
    182 }
    \n+
    183
    \n+
    187 FieldVector<ctype, dimworld> integrationOuterNormal ([[maybe_unused]] const FieldVector<ctype, dim-1>& local) const
    \n+
    188 {
    \n+
    189 return geometry().volume() * centerUnitOuterNormal();
    \n+
    190 }
    \n+
    191
    \n+\n+
    196 {
    \n+
    197 // set of dimensions that span the intersection
    \n+
    198 std::bitset<dim> s;
    \n+
    199 s.set();
    \n+
    200 s[_dir] = false;
    \n+
    201
    \n+
    202 // lower-left and upper-right corners
    \n+
    203 Dune::FieldVector<ctype, dim> ll(0.0);
    \n+
    204 Dune::FieldVector<ctype, dim> ur(1.0);
    \n+
    205
    \n+
    206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0;
    \n+
    207
    \n+
    208 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
    \n+
    209 }
    \n+
    210
    \n+\n+
    215 {
    \n+
    216 // set of dimensions that span the intersection
    \n+
    217 std::bitset<dim> s;
    \n+
    218 s.set();
    \n+
    219 s[_dir] = false;
    \n+
    220
    \n+
    221 // lower-left and upper-right corners
    \n+
    222 Dune::FieldVector<ctype, dim> ll(0.0);
    \n+
    223 Dune::FieldVector<ctype, dim> ur(1.0);
    \n+
    224
    \n+
    225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0;
    \n+
    226
    \n+
    227 return LocalGeometry(LocalGeometryImpl(ll,ur,s));
    \n+
    228 }
    \n+
    229
    \n+\n+
    233 {
    \n+
    234
    \n+
    235 std::bitset<dim> shift;
    \n+
    236 shift.set();
    \n+
    237 shift[_dir] = false;
    \n+
    238
    \n+
    239 Dune::FieldVector<ctype,dimworld> ll, ur;
    \n+
    240 for (int i=0; i<dimworld; i++)
    \n+
    241 {
    \n+
    242 int coord = _inside.transformingsubiterator().coord(i);
    \n+
    243
    \n+
    244 if ((i == _dir) and (_face))
    \n+
    245 coord++;
    \n+
    246
    \n+
    247 ll[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
    \n+
    248 if (i != _dir)
    \n+
    249 coord++;
    \n+
    250 ur[i] = _inside.transformingsubiterator().coordCont()->coordinate(i,coord);
    \n+
    251
    \n+
    252 // If on periodic overlap, transform coordinates by domain size
    \n+
    253 if (_inside.gridlevel()->mg->isPeriodic(i)) {
    \n+
    254 int coordPeriodic = _inside.transformingsubiterator().coord(i);
    \n+
    255 if (coordPeriodic < 0) {
    \n+
    256 auto size = _inside.gridlevel()->mg->domainSize()[i];
    \n+
    257 ll[i] += size;
    \n+
    258 ur[i] += size;
    \n+
    259 } else if (coordPeriodic + 1 > _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level(),i)) {
    \n+
    260 auto size = _inside.gridlevel()->mg->domainSize()[i];
    \n+
    261 ll[i] -= size;
    \n+
    262 ur[i] -= size;
    \n+
    263 }
    \n+
    264 }
    \n+
    265 }
    \n+
    266
    \n+
    267 GeometryImpl _is_global(ll,ur,shift);
    \n+
    268 return Geometry( _is_global );
    \n+
    269 }
    \n+
    270
    \n+\n+
    273 {
    \n+
    274 return GeometryTypes::cube(dim-1);
    \n+
    275 }
    \n+
    276
    \n+
    278 int indexInInside () const
    \n+
    279 {
    \n+
    280 return _count;
    \n+
    281 }
    \n+
    282
    \n+
    284 int indexInOutside () const
    \n+
    285 {
    \n+
    286 // flip the last bit
    \n+
    287 return _count^1;
    \n+
    288 }
    \n+
    289
    \n+\n+
    291 : _count(~std::uint8_t(0)) // Use as marker for invalid intersection
    \n+
    292 , _dir(0)
    \n+
    293 , _face(0)
    \n+
    294 {}
    \n+
    295
    \n+
    297 YaspIntersection (const YaspEntity<0,dim,GridImp>& myself, bool toend) :
    \n+
    298 _inside(myself.gridlevel(),
    \n+
    299 myself.transformingsubiterator()),
    \n+
    300 _outside(myself.gridlevel(),
    \n+
    301 myself.transformingsubiterator()),
    \n+
    302 // initialize to first neighbor
    \n+
    303 _count(0),
    \n+
    304 _dir(0),
    \n+
    305 _face(0)
    \n+
    306 {
    \n+
    307 if (toend)
    \n+
    308 {
    \n+
    309 // initialize end iterator
    \n+
    310 _count = 2*dim;
    \n+
    311 return;
    \n+
    312 }
    \n+
    313 _count = 0;
    \n+
    314
    \n+
    315 // move transforming iterator
    \n+
    316 _outside.transformingsubiterator().move(_dir,-1);
    \n+
    317 }
    \n+
    318
    \n+
    320
    \n+
    322 void assign (const YaspIntersection& it)
    \n+
    323 {
    \n+
    324 *this = it;
    \n+
    325 }
    \n+
    326
    \n+
    327 bool equals(const YaspIntersection& other) const
    \n+
    328 {
    \n+
    329 // compare counts first -- that's cheaper if the test fails
    \n+
    330 return _count == other._count && _inside.equals(other._inside);
    \n+
    331 }
    \n+
    332
    \n+
    333 private:
    \n+
    334 /* The two entities that make up the intersection */
    \n+\n+\n+
    337 /* current position */
    \n+
    338 std::uint8_t _count;
    \n+
    339 std::uint8_t _dir;
    \n+
    340 std::uint8_t _face;
    \n+
    341 };
    \n+
    342} // namespace Dune
    \n+
    343
    \n+
    344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH
    \n+
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n-
    Construct structured cube and simplex grids in unstructured grid managers.
    Definition: utility/structuredgridfactory.hh:31
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n-
    [ provides Dune::Grid ]
    Definition: yaspgrid.hh:163
    \n-
    Container for equidistant coordinates in a YaspGrid.
    Definition: coordinates.hh:29
    \n-
    Container for equidistant coordinates in a YaspGrid with non-trivial origin.
    Definition: coordinates.hh:131
    \n-
    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
    \n-
    static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    Create a structured simplex grid.
    Definition: structuredyaspgridfactory.hh:71
    \n-
    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
    \n-
    static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    Create a structured simplex grid.
    Definition: structuredyaspgridfactory.hh:120
    \n-
    A class to construct structured cube and simplex grids using the grid factory.
    \n+\n+
    int level() const
    level of this element
    Definition: yaspgridentity.hh:282
    \n+
    const YGLI & gridlevel() const
    Definition: yaspgridentity.hh:420
    \n+
    const I & transformingsubiterator() const
    Definition: yaspgridentity.hh:419
    \n+
    bool equals(const YaspEntity &e) const
    Return true when two iterators over the same grid are equal (!).
    Definition: yaspgridentity.hh:347
    \n+
    YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities.
    Definition: yaspgridintersectioniterator.hh:22
    \n+
    YaspIntersection provides data about intersection with neighboring codim 0 entities.
    Definition: yaspgridintersection.hh:22
    \n+
    FieldVector< ctype, dimworld > centerUnitOuterNormal() const
    return unit outer normal at center of intersection geometry
    Definition: yaspgridintersection.hh:177
    \n+
    bool equals(const YaspIntersection &other) const
    Definition: yaspgridintersection.hh:327
    \n+
    Entity inside() const
    Definition: yaspgridintersection.hh:92
    \n+
    Geometry geometry() const
    Definition: yaspgridintersection.hh:232
    \n+
    GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
    Definition: yaspgridintersection.hh:38
    \n+
    YaspIntersection()
    Definition: yaspgridintersection.hh:290
    \n+
    int indexInOutside() const
    local index of codim 1 entity in neighbor where intersection is contained in
    Definition: yaspgridintersection.hh:284
    \n+
    LocalGeometry geometryInInside() const
    Definition: yaspgridintersection.hh:195
    \n+
    int boundarySegmentIndex() const
    Definition: yaspgridintersection.hh:105
    \n+
    GridImp::template Codim< 1 >::Geometry Geometry
    Definition: yaspgridintersection.hh:37
    \n+
    bool conforming() const
    Yasp is always conform.
    Definition: yaspgridintersection.hh:85
    \n+
    GridImp::template Codim< 0 >::Entity Entity
    Definition: yaspgridintersection.hh:36
    \n+
    bool neighbor() const
    return true if neighbor across intersection exists in this processor
    Definition: yaspgridintersection.hh:75
    \n+
    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
    \n+
    YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend)
    make intersection iterator from entity, initialize to first neighbor
    Definition: yaspgridintersection.hh:297
    \n+
    GeometryType type() const
    obtain the type of reference element for this intersection
    Definition: yaspgridintersection.hh:272
    \n+
    void assign(const YaspIntersection &it)
    copy constructor \u2013 use default
    Definition: yaspgridintersection.hh:322
    \n+
    int indexInInside() const
    local index of codim 1 entity in self where intersection is contained in
    Definition: yaspgridintersection.hh:278
    \n+
    FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
    Definition: yaspgridintersection.hh:187
    \n+
    GridImp::YGrid::Iterator I
    Definition: yaspgridintersection.hh:35
    \n+
    LocalGeometry geometryInOutside() const
    Definition: yaspgridintersection.hh:214
    \n+
    GridImp::YGridLevelIterator YGLI
    Definition: yaspgridintersection.hh:34
    \n+
    Entity outside() const
    return Entity on the outside of this intersection
    Definition: yaspgridintersection.hh:98
    \n+
    bool boundary() const
    Definition: yaspgridintersection.hh:62
    \n+
    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
    \n+
    void update()
    Definition: yaspgridintersection.hh:40
    \n+
    Definition: yaspgridentity.hh:434
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-us-ascii\n+utf-8\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,152 +5,461 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-structuredyaspgridfactory.hh\n+yaspgridintersection.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH\n- 6#define DUNE_GRID_YASPGRID_STRUCTUREDYASPGRIDFACTORY_HH\n+ 5#ifndef DUNE_GRID_YASPGRIDINTERSECTION_HH\n+ 6#define DUNE_GRID_YASPGRIDINTERSECTION_HH\n 7\n- 8#include \n- 9\n- 10#include \n- 11\n- 16namespace Dune\n- 17{\n- 27 template\n-28 class StructuredGridFactory\n-> >\n- 29 {\n- 30 typedef YaspGrid > GridType;\n- 31 static const int dimworld = GridType::dimensionworld;\n- 32\n- 33 public:\n- 44 static std::unique_ptr\n-45 createCubeGrid(const FieldVector& lowerLeft,\n- 46 const FieldVector& upperRight,\n- 47 const std::array& elements)\n- 48 {\n- 49 using std::abs;\n- 50 for(int d = 0; d < dimworld; ++d)\n- 51 if(abs(lowerLeft[d]) > abs(upperRight[d])*1e-10)\n- 52 DUNE_THROW(GridError, className()\n- 53 << \"::createCubeGrid(): You have to use Yaspgrid > as your\"\n- 55 \"grid type for non-trivial origin.\" );\n- 56\n- 57 // construct array of ints instead of unsigned ints\n- 58 std::array elem;\n- 59 std::copy(elements.begin(), elements.end(), elem.begin());\n- 60\n- 61 return std::make_unique(upperRight, elem,\n- 62 std::bitset(), 1); // default constructor of bitset sets to zero\n- 63 }\n- 64\n- 70 static std::unique_ptr\n-71 createSimplexGrid(const FieldVector& lowerLeft,\n- 72 const FieldVector& upperRight,\n- 73 const std::array& elements)\n- 74 {\n- 75 DUNE_THROW(GridError, className()\n- 76 << \"::createSimplexGrid(): Simplices are not supported \"\n- 77 \"by YaspGrid.\");\n- 78 }\n- 79\n- 80 };\n- 81\n- 89 template\n-90 class StructuredGridFactory > > {\n- 91 typedef YaspGrid > GridType;\n- 92 static const int dimworld = GridType::dimensionworld;\n- 93\n- 94 public:\n- 101 static std::unique_ptr\n-102 createCubeGrid(const FieldVector& lowerLeft,\n- 103 const FieldVector& upperRight,\n- 104 const std::array& elements)\n- 105 {\n- 106 // construct array of ints instead of unsigned ints\n- 107 std::array elem;\n- 108 std::copy(elements.begin(), elements.end(), elem.begin());\n- 109\n- 110 return std::make_unique(lowerLeft, upperRight, elem,\n- 111 std::bitset(), 1); // default constructor of bitset sets to zero\n- 112 }\n- 113\n- 119 static std::unique_ptr\n-120 createSimplexGrid(const FieldVector& lowerLeft,\n- 121 const FieldVector& upperRight,\n- 122 const std::array& elements)\n- 123 {\n- 124 DUNE_THROW(GridError, className()\n- 125 << \"::createSimplexGrid(): Simplices are not supported \"\n- 126 \"by YaspGrid.\");\n- 127 }\n- 128\n- 129 };\n- 130\n- 131} // namespace Dune\n- 132#endif\n+ 15namespace Dune {\n+ 16\n+ 20 template\n+21 class YaspIntersection\n+ 22 {\n+ 23 constexpr static int dim = GridImp::dimension;\n+ 24 constexpr static int dimworld = GridImp::dimensionworld;\n+ 25 typedef typename GridImp::ctype ctype;\n+ 26\n+ 27 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl\n+GeometryImpl;\n+28 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl\n+LocalGeometryImpl;\n+ 29\n+ 30 friend class YaspIntersectionIterator;\n+ 31\n+ 32 public:\n+ 33 // types used from grids\n+34 typedef typename GridImp::YGridLevelIterator YGLI;\n+35 typedef typename GridImp::YGrid::Iterator I;\n+36 typedef typename GridImp::template Codim<0>::Entity Entity;\n+37 typedef typename GridImp::template Codim<1>::Geometry Geometry;\n+38 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;\n+ 39\n+40 void update() {\n+ 41\n+ 42 // vector with per-direction movements\n+ 43 std::array dist{{0}};\n+ 44\n+ 45 // first move: back to center\n+ 46 dist[_dir] = 1 - 2*_face;\n+ 47\n+ 48 // update face info\n+ 49 _dir = _count / 2;\n+ 50 _face = _count % 2;\n+ 51\n+ 52 // second move: to new neighbor\n+ 53 dist[_dir] += -1 + 2*_face;\n+ 54\n+ 55 // move transforming iterator\n+ 56 _outside.transformingsubiterator().move(dist);\n+ 57 }\n+ 58\n+62 bool boundary () const\n+ 63 {\n+ 64 // Coordinate of intersection in its direction\n+ 65 int coord = _inside.transformingsubiterator().coord(_dir) + _face;\n+ 66 if (_inside.gridlevel()->mg->isPeriodic(_dir))\n+ 67 return false;\n+ 68 else\n+ 69 return coord == 0\n+ 70 ||\n+ 71 coord == _inside.gridlevel()->mg->levelSize(_inside.gridlevel()->level\n+(),_dir);\n+ 72 }\n+ 73\n+75 bool neighbor () const\n+ 76 {\n+ 77 // Coordinate of intersection in its direction\n+ 78 int coord = _inside.transformingsubiterator().coord(_dir) + _face;\n+ 79 return coord > _inside.gridlevel()->overlap[0].dataBegin()->min(_dir)\n+ 80 &&\n+ 81 coord <= _inside.gridlevel()->overlap[0].dataBegin()->max(_dir);\n+ 82 }\n+ 83\n+85 bool conforming () const\n+ 86 {\n+ 87 return true;\n+ 88 }\n+ 89\n+92 Entity inside() const\n+ 93 {\n+ 94 return Entity(_inside);\n+ 95 }\n+ 96\n+98 Entity outside() const\n+ 99 {\n+ 100 return Entity(_outside);\n+ 101 }\n+ 102\n+105 int boundarySegmentIndex() const\n+ 106 {\n+ 107 if(! boundary())\n+ 108 DUNE_THROW(GridError, \"called boundarySegmentIndex while boundary() ==\n+false\");\n+ 109 // size of local macro grid\n+ 110 const std::array & size = _inside.gridlevel()->mg->begin()-\n+>overlap[0].dataBegin()->size();\n+ 111 const std::array & origin = _inside.gridlevel()->mg->begin()-\n+>overlap[0].dataBegin()->origin();\n+ 112 std::array sides;\n+ 113 {\n+ 114 for (int i=0; img->begin()->overlap[0].dataBegin()->origin(i)\n+ 118 == 0)+\n+ 119 (_inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->origin(i) +\n+ 120 _inside.gridlevel()->mg->begin()->overlap[0].dataBegin()->size(i)\n+ 121 ==\n+ 122 _inside.gridlevel()->mg->levelSize(0,i)));\n+ 123\n+ 124 }\n+ 125 }\n+ 126 // global position of the cell on macro grid\n+ 127 std::array pos = _inside.transformingsubiterator().coord();\n+ 128 for(int i=0; i fsize;\n+ 135 {\n+ 136 int vol = 1;\n+ 137 for (int k=0; k=0; k--)\n+ 147 {\n+ 148 if (k == _dir) continue;\n+ 149 index += (pos[k]) * localoffset;\n+ 150 localoffset *= size[k];\n+ 151 }\n+ 152 }\n+ 153 // add unit-cube-face-offsets\n+ 154 {\n+ 155 for (int k=0; k<_dir; k++)\n+ 156 index += sides[k] * fsize[k];\n+ 157 // add fsize if we are on the right face and there is a left-face-boundary\n+on this processor\n+ 158 index += _face * (sides[_dir]>1) * fsize[_dir];\n+ 159 }\n+ 160\n+ 161 return index;\n+ 162 }\n+ 163\n+165 FieldVector outerNormal (const FieldVector&\n+/* local */) const\n+ 166 {\n+ 167 return centerUnitOuterNormal();\n+ 168 }\n+ 169\n+171 FieldVector unitOuterNormal (const FieldVector& /* local */) const\n+ 172 {\n+ 173 return centerUnitOuterNormal();\n+ 174 }\n+ 175\n+177 FieldVector centerUnitOuterNormal () const\n+ 178 {\n+ 179 FieldVector normal(0);\n+ 180 normal[_dir] = (_face==0) ? -1.0 : 1.0;\n+ 181 return normal;\n+ 182 }\n+ 183\n+187 FieldVector integrationOuterNormal ([[maybe_unused]] const\n+FieldVector& local) const\n+ 188 {\n+ 189 return geometry().volume() * centerUnitOuterNormal();\n+ 190 }\n+ 191\n+195 LocalGeometry geometryInInside () const\n+ 196 {\n+ 197 // set of dimensions that span the intersection\n+ 198 std::bitset s;\n+ 199 s.set();\n+ 200 s[_dir] = false;\n+ 201\n+ 202 // lower-left and upper-right corners\n+ 203 Dune::FieldVector ll(0.0);\n+ 204 Dune::FieldVector ur(1.0);\n+ 205\n+ 206 ll[_dir] = ur[_dir] = (_face==0) ? 0.0 : 1.0;\n+ 207\n+ 208 return LocalGeometry(LocalGeometryImpl(ll,ur,s));\n+ 209 }\n+ 210\n+214 LocalGeometry geometryInOutside () const\n+ 215 {\n+ 216 // set of dimensions that span the intersection\n+ 217 std::bitset s;\n+ 218 s.set();\n+ 219 s[_dir] = false;\n+ 220\n+ 221 // lower-left and upper-right corners\n+ 222 Dune::FieldVector ll(0.0);\n+ 223 Dune::FieldVector ur(1.0);\n+ 224\n+ 225 ll[_dir] = ur[_dir] = (_face==1) ? 0.0 : 1.0;\n+ 226\n+ 227 return LocalGeometry(LocalGeometryImpl(ll,ur,s));\n+ 228 }\n+ 229\n+232 Geometry geometry () const\n+ 233 {\n+ 234\n+ 235 std::bitset shift;\n+ 236 shift.set();\n+ 237 shift[_dir] = false;\n+ 238\n+ 239 Dune::FieldVector ll, ur;\n+ 240 for (int i=0; icoordinate\n+(i,coord);\n+ 248 if (i != _dir)\n+ 249 coord++;\n+ 250 ur[i] = _inside.transformingsubiterator().coordCont()->coordinate\n+(i,coord);\n+ 251\n+ 252 // If on periodic overlap, transform coordinates by domain size\n+ 253 if (_inside.gridlevel()->mg->isPeriodic(i)) {\n+ 254 int coordPeriodic = _inside.transformingsubiterator().coord(i);\n+ 255 if (coordPeriodic < 0) {\n+ 256 auto size = _inside.gridlevel()->mg->domainSize()[i];\n+ 257 ll[i] += size;\n+ 258 ur[i] += size;\n+ 259 } else if (coordPeriodic + 1 > _inside.gridlevel()->mg->levelSize\n+(_inside.gridlevel()->level(),i)) {\n+ 260 auto size = _inside.gridlevel()->mg->domainSize()[i];\n+ 261 ll[i] -= size;\n+ 262 ur[i] -= size;\n+ 263 }\n+ 264 }\n+ 265 }\n+ 266\n+ 267 GeometryImpl _is_global(ll,ur,shift);\n+ 268 return Geometry( _is_global );\n+ 269 }\n+ 270\n+272 GeometryType type () const\n+ 273 {\n+ 274 return GeometryTypes::cube(dim-1);\n+ 275 }\n+ 276\n+278 int indexInInside () const\n+ 279 {\n+ 280 return _count;\n+ 281 }\n+ 282\n+284 int indexInOutside () const\n+ 285 {\n+ 286 // flip the last bit\n+ 287 return _count^1;\n+ 288 }\n+ 289\n+290 YaspIntersection()\n+ 291 : _count(~std::uint8_t(0)) // Use as marker for invalid intersection\n+ 292 , _dir(0)\n+ 293 , _face(0)\n+ 294 {}\n+ 295\n+297 YaspIntersection (const YaspEntity<0,dim,GridImp>& myself, bool toend) :\n+ 298 _inside(myself.gridlevel(),\n+ 299 myself.transformingsubiterator()),\n+ 300 _outside(myself.gridlevel(),\n+ 301 myself.transformingsubiterator()),\n+ 302 // initialize to first neighbor\n+ 303 _count(0),\n+ 304 _dir(0),\n+ 305 _face(0)\n+ 306 {\n+ 307 if (toend)\n+ 308 {\n+ 309 // initialize end iterator\n+ 310 _count = 2*dim;\n+ 311 return;\n+ 312 }\n+ 313 _count = 0;\n+ 314\n+ 315 // move transforming iterator\n+ 316 _outside.transformingsubiterator().move(_dir,-1);\n+ 317 }\n+ 318\n+ 320\n+322 void assign (const YaspIntersection& it)\n+ 323 {\n+ 324 *this = it;\n+ 325 }\n+ 326\n+327 bool equals(const YaspIntersection& other) const\n+ 328 {\n+ 329 // compare counts first -- that's cheaper if the test fails\n+ 330 return _count == other._count && _inside.equals(other._inside);\n+ 331 }\n+ 332\n+ 333 private:\n+ 334 /* The two entities that make up the intersection */\n+ 335 YaspEntity<0,GridImp::dimension,GridImp> _inside;\n+ 336 YaspEntity<0,GridImp::dimension,GridImp> _outside;\n+ 337 /* current position */\n+ 338 std::uint8_t _count;\n+ 339 std::uint8_t _dir;\n+ 340 std::uint8_t _face;\n+ 341 };\n+ 342} // namespace Dune\n+ 343\n+ 344#endif // DUNE_GRID_YASPGRIDINTERSECTION_HH\n+std\n+STL namespace.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::abs\n-void abs(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:328\n-Dune::StructuredGridFactory\n-Construct structured cube and simplex grids in unstructured grid managers.\n-Definition: utility/structuredgridfactory.hh:31\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n Dune::GridError\n Base class for exceptions in Dune grid modules.\n Definition: exceptions.hh:20\n-Dune::YaspGrid\n-[ provides Dune::Grid ]\n-Definition: yaspgrid.hh:163\n-Dune::EquidistantCoordinates\n-Container for equidistant coordinates in a YaspGrid.\n-Definition: coordinates.hh:29\n-Dune::EquidistantOffsetCoordinates\n-Container for equidistant coordinates in a YaspGrid with non-trivial origin.\n-Definition: coordinates.hh:131\n-Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim\n->_>_>::createCubeGrid\n-static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype,\n-dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n-std::array< unsigned int, dim > &elements)\n-Create a structured cube grid.\n-Definition: structuredyaspgridfactory.hh:45\n-Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim\n->_>_>::createSimplexGrid\n-static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype,\n-dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n-std::array< unsigned int, dim > &elements)\n-Create a structured simplex grid.\n-Definition: structuredyaspgridfactory.hh:71\n-Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<\n-ctype,_dim_>_>_>::createCubeGrid\n-static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype,\n-dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n-std::array< unsigned int, dim > &elements)\n-Create a structured cube grid.\n-Definition: structuredyaspgridfactory.hh:102\n-Dune::StructuredGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<\n-ctype,_dim_>_>_>::createSimplexGrid\n-static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype,\n-dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const\n-std::array< unsigned int, dim > &elements)\n-Create a structured simplex grid.\n-Definition: structuredyaspgridfactory.hh:120\n-structuredgridfactory.hh\n-A class to construct structured cube and simplex grids using the grid factory.\n+Dune::YaspEntity<_0,_GridImp::dimension,_GridImp_>\n+Dune::YaspEntity::level\n+int level() const\n+level of this element\n+Definition: yaspgridentity.hh:282\n+Dune::YaspEntity::gridlevel\n+const YGLI & gridlevel() const\n+Definition: yaspgridentity.hh:420\n+Dune::YaspEntity::transformingsubiterator\n+const I & transformingsubiterator() const\n+Definition: yaspgridentity.hh:419\n+Dune::YaspEntity::equals\n+bool equals(const YaspEntity &e) const\n+Return true when two iterators over the same grid are equal (!).\n+Definition: yaspgridentity.hh:347\n+Dune::YaspIntersectionIterator\n+YaspIntersectionIterator enables iteration over intersections with neighboring\n+codim 0 entities.\n+Definition: yaspgridintersectioniterator.hh:22\n+Dune::YaspIntersection\n+YaspIntersection provides data about intersection with neighboring codim 0\n+entities.\n+Definition: yaspgridintersection.hh:22\n+Dune::YaspIntersection::centerUnitOuterNormal\n+FieldVector< ctype, dimworld > centerUnitOuterNormal() const\n+return unit outer normal at center of intersection geometry\n+Definition: yaspgridintersection.hh:177\n+Dune::YaspIntersection::equals\n+bool equals(const YaspIntersection &other) const\n+Definition: yaspgridintersection.hh:327\n+Dune::YaspIntersection::inside\n+Entity inside() const\n+Definition: yaspgridintersection.hh:92\n+Dune::YaspIntersection::geometry\n+Geometry geometry() const\n+Definition: yaspgridintersection.hh:232\n+Dune::YaspIntersection::LocalGeometry\n+GridImp::template Codim< 1 >::LocalGeometry LocalGeometry\n+Definition: yaspgridintersection.hh:38\n+Dune::YaspIntersection::YaspIntersection\n+YaspIntersection()\n+Definition: yaspgridintersection.hh:290\n+Dune::YaspIntersection::indexInOutside\n+int indexInOutside() const\n+local index of codim 1 entity in neighbor where intersection is contained in\n+Definition: yaspgridintersection.hh:284\n+Dune::YaspIntersection::geometryInInside\n+LocalGeometry geometryInInside() const\n+Definition: yaspgridintersection.hh:195\n+Dune::YaspIntersection::boundarySegmentIndex\n+int boundarySegmentIndex() const\n+Definition: yaspgridintersection.hh:105\n+Dune::YaspIntersection::Geometry\n+GridImp::template Codim< 1 >::Geometry Geometry\n+Definition: yaspgridintersection.hh:37\n+Dune::YaspIntersection::conforming\n+bool conforming() const\n+Yasp is always conform.\n+Definition: yaspgridintersection.hh:85\n+Dune::YaspIntersection::Entity\n+GridImp::template Codim< 0 >::Entity Entity\n+Definition: yaspgridintersection.hh:36\n+Dune::YaspIntersection::neighbor\n+bool neighbor() const\n+return true if neighbor across intersection exists in this processor\n+Definition: yaspgridintersection.hh:75\n+Dune::YaspIntersection::outerNormal\n+FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &)\n+const\n+return unit outer normal, this should be dependent on local coordinates for\n+higher order boundary\n+Definition: yaspgridintersection.hh:165\n+Dune::YaspIntersection::YaspIntersection\n+YaspIntersection(const YaspEntity< 0, dim, GridImp > &myself, bool toend)\n+make intersection iterator from entity, initialize to first neighbor\n+Definition: yaspgridintersection.hh:297\n+Dune::YaspIntersection::type\n+GeometryType type() const\n+obtain the type of reference element for this intersection\n+Definition: yaspgridintersection.hh:272\n+Dune::YaspIntersection::assign\n+void assign(const YaspIntersection &it)\n+copy constructor \u2013 use default\n+Definition: yaspgridintersection.hh:322\n+Dune::YaspIntersection::indexInInside\n+int indexInInside() const\n+local index of codim 1 entity in self where intersection is contained in\n+Definition: yaspgridintersection.hh:278\n+Dune::YaspIntersection::integrationOuterNormal\n+FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype,\n+dim-1 > &local) const\n+Definition: yaspgridintersection.hh:187\n+Dune::YaspIntersection::I\n+GridImp::YGrid::Iterator I\n+Definition: yaspgridintersection.hh:35\n+Dune::YaspIntersection::geometryInOutside\n+LocalGeometry geometryInOutside() const\n+Definition: yaspgridintersection.hh:214\n+Dune::YaspIntersection::YGLI\n+GridImp::YGridLevelIterator YGLI\n+Definition: yaspgridintersection.hh:34\n+Dune::YaspIntersection::outside\n+Entity outside() const\n+return Entity on the outside of this intersection\n+Definition: yaspgridintersection.hh:98\n+Dune::YaspIntersection::boundary\n+bool boundary() const\n+Definition: yaspgridintersection.hh:62\n+Dune::YaspIntersection::unitOuterNormal\n+FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-\n+1 > &) const\n+return unit outer normal, this should be dependent on local coordinates for\n+higher order boundary\n+Definition: yaspgridintersection.hh:171\n+Dune::YaspIntersection::update\n+void update()\n+Definition: yaspgridintersection.hh:40\n+Dune::YaspEntity<_0,_dim,_GridImp_>\n+Definition: yaspgridentity.hh:434\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00203.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00203.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridindexsets.hh File Reference\n+dune-grid: yaspgrididset.hh File Reference\n \n \n \n \n \n \n \n@@ -65,37 +65,32 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n \n-
    yaspgridindexsets.hh File Reference
    \n+
    yaspgrididset.hh File Reference
    \n
    \n
    \n \n-

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

    \n-\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::YaspIndexSet< GridImp, isLeafIndexSet >
     Implementation of Level- and LeafIndexSets for YaspGrid. More...
    class  Dune::YaspGlobalIdSet< GridImp >
     persistent, globally unique Ids More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-

    Detailed Description

    \n-

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

    \n-
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,23 +6,20 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n Classes | Namespaces\n-yaspgridindexsets.hh File Reference\n-level-wise, non-persistent, consecutive indices for YaspGrid More...\n+yaspgrididset.hh File Reference\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::YaspIndexSet<_GridImp,_isLeafIndexSet_>\n-\u00a0 Implementation of Level- and LeafIndexSets for YaspGrid. More...\n+class \u00a0Dune::YaspGlobalIdSet<_GridImp_>\n+\u00a0 persistent, globally unique Ids More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-level-wise, non-persistent, consecutive indices for YaspGrid\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00203_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridindexsets.hh Source File\n+dune-grid: yaspgrididset.hh Source File\n \n \n \n \n \n \n \n@@ -62,126 +62,80 @@\n \n \n \n
    \n-
    yaspgridindexsets.hh
    \n+
    yaspgrididset.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH
    \n-
    6#define DUNE_GRID_YASPGRIDINDEXSET_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRIDIDSET_HH
    \n+
    6#define DUNE_GRID_YASPGRIDIDSET_HH
    \n
    7
    \n-
    14namespace Dune {
    \n-
    15
    \n-
    22 template<class GridImp, bool isLeafIndexSet>
    \n-\n-
    24 : public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, unsigned int >
    \n+
    8
    \n+
    9namespace Dune {
    \n+
    10
    \n+
    11 //========================================================================
    \n+
    16 //========================================================================
    \n+
    17
    \n+
    18 template<class GridImp>
    \n+
    19 class YaspGlobalIdSet : public IdSet<GridImp,YaspGlobalIdSet<GridImp>,
    \n+
    20 typename std::remove_const<GridImp>::type::PersistentIndexType >
    \n+
    21 /*
    \n+
    22 We used the remove_const to extract the Type from the mutable class,
    \n+
    23 because the const class is not instantiated yet.
    \n+
    24 */
    \n
    25 {
    \n-\n-\n-
    28
    \n-
    29 public:
    \n-
    30 typedef typename Base::IndexType IndexType;
    \n+\n+
    27
    \n+
    28 public:
    \n+
    30 typedef typename std::remove_const<GridImp>::type::PersistentIndexType IdType;
    \n
    31
    \n-
    32 using Base::subIndex;
    \n+
    32 using IdSet<GridImp, This, IdType>::subId;
    \n
    33
    \n-
    35 YaspIndexSet ( const GridImp &g, int l )
    \n-
    36 : grid( g ),
    \n-
    37 level( l )
    \n-
    38 {
    \n-
    39 assert(not isLeafIndexSet);
    \n-
    40
    \n-
    41 // contains a single element type;
    \n-
    42 for (int codim=0; codim<=GridImp::dimension; codim++)
    \n-
    43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
    \n-
    44 }
    \n-
    45
    \n-
    47 YaspIndexSet ( const GridImp &g )
    \n-
    48 : grid( g )
    \n-
    49 {
    \n-
    50 assert(isLeafIndexSet);
    \n-
    51
    \n-
    52 // contains a single element type;
    \n-
    53 for (int codim=0; codim<=GridImp::dimension; codim++)
    \n-
    54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
    \n-
    55 }
    \n-
    56
    \n-
    58 template<int cc>
    \n-
    59 IndexType index (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e) const
    \n-
    60 {
    \n-
    61 return e.impl().compressedIndex();
    \n-
    62 }
    \n+\n+
    36 {}
    \n+
    37
    \n+
    39 /*
    \n+
    40 We use the remove_const to extract the Type from the mutable class,
    \n+
    41 because the const class is not instantiated yet.
    \n+
    42 */
    \n+
    43 template<int cd>
    \n+
    44 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
    \n+
    45 {
    \n+
    46 return e.impl().persistentIndex();
    \n+
    47 }
    \n+
    48
    \n+
    50 /*
    \n+
    51 We use the remove_const to extract the Type from the mutable class,
    \n+
    52 because the const class is not instantiated yet.
    \n+
    53 */
    \n+
    54 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim< 0 >::Entity &e,
    \n+
    55 int i, unsigned int codim ) const
    \n+
    56 {
    \n+
    57 return e.impl().subPersistentIndex(i,codim);
    \n+
    58 }
    \n+
    59
    \n+
    60 };
    \n+
    61
    \n+
    62} // namespace Dune
    \n
    63
    \n-
    65 template< int cc >
    \n-
    66 IndexType subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e,
    \n-
    67 int i, unsigned int codim ) const
    \n-
    68 {
    \n-
    69 return e.impl().subCompressedIndex(i, codim);
    \n-
    70 }
    \n-
    71
    \n-
    73 std::size_t size (GeometryType type) const
    \n-
    74 {
    \n-
    75 return (isLeafIndexSet)
    \n-
    76 ? grid.size( type )
    \n-
    77 : grid.size( level, type );
    \n-
    78 }
    \n-
    79
    \n-
    81 std::size_t size (int codim) const
    \n-
    82 {
    \n-
    83 return (isLeafIndexSet)
    \n-
    84 ? grid.size( codim )
    \n-
    85 : grid.size( level, codim );
    \n-
    86 }
    \n-
    87
    \n-
    89 template<class EntityType>
    \n-
    90 bool contains (const EntityType& e) const
    \n-
    91 {
    \n-
    92 return (isLeafIndexSet)
    \n-
    93 ? e.level() == grid.maxLevel()
    \n-
    94 : e.level() == level;
    \n-
    95 }
    \n-
    96
    \n-
    97 std::vector< GeometryType > types ( int codim ) const { return mytypes[ codim ]; }
    \n-
    98
    \n-
    100 const std::vector<GeometryType>& geomTypes (int codim) const
    \n-
    101 {
    \n-
    102 return mytypes[codim];
    \n-
    103 }
    \n-
    104
    \n-
    105 private:
    \n-
    106 const GridImp& grid;
    \n-
    107 int level;
    \n-
    108 std::vector<GeometryType> mytypes[std::remove_const<GridImp>::type::dimension+1];
    \n-
    109 };
    \n-
    110
    \n-
    111} // namespace Dune
    \n-
    112
    \n-
    113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH
    \n+
    64#endif // DUNE_GRID_YASPGRIDIDSET_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n-
    IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
    Map a subentity to an index.
    Definition: indexidset.hh:153
    \n-
    IndexTypeImp IndexType
    The type used for the indices.
    Definition: indexidset.hh:92
    \n-
    Implementation of Level- and LeafIndexSets for YaspGrid.
    Definition: yaspgridindexsets.hh:25
    \n-
    const std::vector< GeometryType > & geomTypes(int codim) const
    deliver all geometry types used in this grid
    Definition: yaspgridindexsets.hh:100
    \n-
    YaspIndexSet(const GridImp &g)
    Level grid view constructor stores reference to a grid and level.
    Definition: yaspgridindexsets.hh:47
    \n-
    YaspIndexSet(const GridImp &g, int l)
    Level grid view constructor stores reference to a grid and level.
    Definition: yaspgridindexsets.hh:35
    \n-
    IndexType index(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e) const
    get index of an entity
    Definition: yaspgridindexsets.hh:59
    \n-
    bool contains(const EntityType &e) const
    return true if the given entity is contained in .
    Definition: yaspgridindexsets.hh:90
    \n-
    std::size_t size(GeometryType type) const
    get number of entities of given type and level (the level is known to the object)
    Definition: yaspgridindexsets.hh:73
    \n-
    IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
    get index of subentity of an entity
    Definition: yaspgridindexsets.hh:66
    \n-
    std::vector< GeometryType > types(int codim) const
    Definition: yaspgridindexsets.hh:97
    \n-
    std::size_t size(int codim) const
    return size of set for a given codim
    Definition: yaspgridindexsets.hh:81
    \n-
    Base::IndexType IndexType
    Definition: yaspgridindexsets.hh:30
    \n+
    Id Set Interface.
    Definition: indexidset.hh:452
    \n+
    persistent, globally unique Ids
    Definition: yaspgrididset.hh:25
    \n+
    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
    \n+
    std::remove_const< GridImp >::type::PersistentIndexType IdType
    define the type used for persistent indices
    Definition: yaspgrididset.hh:30
    \n+
    YaspGlobalIdSet()
    Only default-constructible.
    Definition: yaspgrididset.hh:35
    \n+
    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
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,174 +5,99 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-yaspgridindexsets.hh\n+yaspgrididset.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH\n- 6#define DUNE_GRID_YASPGRIDINDEXSET_HH\n+ 5#ifndef DUNE_GRID_YASPGRIDIDSET_HH\n+ 6#define DUNE_GRID_YASPGRIDIDSET_HH\n 7\n- 14namespace Dune {\n- 15\n- 22 template\n-23 class YaspIndexSet\n- 24 : public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >,\n-unsigned int >\n+ 8\n+ 9namespace Dune {\n+ 10\n+ 11 //========================================================================\n+ 16 //========================================================================\n+ 17\n+ 18 template\n+19 class YaspGlobalIdSet : public IdSet,\n+ 20 typename std::remove_const::type::PersistentIndexType >\n+ 21 /*\n+ 22 We used the remove_const to extract the Type from the mutable class,\n+ 23 because the const class is not instantiated yet.\n+ 24 */\n 25 {\n- 26 typedef YaspIndexSet<_GridImp,_isLeafIndexSet_> This;\n- 27 typedef IndexSet<_GridImp,_This,_unsigned_int_> Base;\n- 28\n- 29 public:\n-30 typedef typename Base::IndexType IndexType;\n+ 26 typedef YaspGlobalIdSet<_GridImp_> This;\n+ 27\n+ 28 public:\n+30 typedef typename std::remove_const::type::PersistentIndexType\n+IdType;\n 31\n- 32 using Base::subIndex;\n+ 32 using IdSet::subId;\n 33\n-35 YaspIndexSet ( const GridImp &g, int l )\n- 36 : grid( g ),\n- 37 level( l )\n- 38 {\n- 39 assert(not isLeafIndexSet);\n- 40\n- 41 // contains a single element type;\n- 42 for (int codim=0; codim<=GridImp::dimension; codim++)\n- 43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));\n- 44 }\n- 45\n-47 YaspIndexSet ( const GridImp &g )\n- 48 : grid( g )\n- 49 {\n- 50 assert(isLeafIndexSet);\n- 51\n- 52 // contains a single element type;\n- 53 for (int codim=0; codim<=GridImp::dimension; codim++)\n- 54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));\n- 55 }\n- 56\n- 58 template\n-59 IndexType index (const typename std::remove_const::type::Traits::\n-template Codim::Entity& e) const\n- 60 {\n- 61 return e.impl().compressedIndex();\n- 62 }\n+35 YaspGlobalIdSet()\n+ 36 {}\n+ 37\n+ 39 /*\n+ 40 We use the remove_const to extract the Type from the mutable class,\n+ 41 because the const class is not instantiated yet.\n+ 42 */\n+ 43 template\n+44 IdType id (const typename std::remove_const::type::Traits::template\n+Codim::Entity& e) const\n+ 45 {\n+ 46 return e.impl().persistentIndex();\n+ 47 }\n+ 48\n+ 50 /*\n+ 51 We use the remove_const to extract the Type from the mutable class,\n+ 52 because the const class is not instantiated yet.\n+ 53 */\n+54 IdType subId (const typename std::remove_const::type::Traits::\n+template Codim< 0 >::Entity &e,\n+ 55 int i, unsigned int codim ) const\n+ 56 {\n+ 57 return e.impl().subPersistentIndex(i,codim);\n+ 58 }\n+ 59\n+ 60 };\n+ 61\n+ 62} // namespace Dune\n 63\n- 65 template< int cc >\n-66 IndexType subIndex ( const typename std::remove_const< GridImp >::type::\n-Traits::template Codim< cc >::Entity &e,\n- 67 int i, unsigned int codim ) const\n- 68 {\n- 69 return e.impl().subCompressedIndex(i, codim);\n- 70 }\n- 71\n-73 std::size_t size (GeometryType type) const\n- 74 {\n- 75 return (isLeafIndexSet)\n- 76 ? grid.size( type )\n- 77 : grid.size( level, type );\n- 78 }\n- 79\n-81 std::size_t size (int codim) const\n- 82 {\n- 83 return (isLeafIndexSet)\n- 84 ? grid.size( codim )\n- 85 : grid.size( level, codim );\n- 86 }\n- 87\n- 89 template\n-90 bool contains (const EntityType& e) const\n- 91 {\n- 92 return (isLeafIndexSet)\n- 93 ? e.level() == grid.maxLevel()\n- 94 : e.level() == level;\n- 95 }\n- 96\n-97 std::vector< GeometryType > types ( int codim ) const { return mytypes\n-[ codim ]; }\n- 98\n-100 const std::vector& geomTypes (int codim) const\n- 101 {\n- 102 return mytypes[codim];\n- 103 }\n- 104\n- 105 private:\n- 106 const GridImp& grid;\n- 107 int level;\n- 108 std::vector mytypes[std::remove_const::type::\n-dimension+1];\n- 109 };\n- 110\n- 111} // namespace Dune\n- 112\n- 113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH\n+ 64#endif // DUNE_GRID_YASPGRIDIDSET_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::IndexSet\n-Index Set Interface base class.\n-Definition: indexidset.hh:78\n-Dune::IndexSet::subIndex\n-IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int\n-i, unsigned int codim) const\n-Map a subentity to an index.\n-Definition: indexidset.hh:153\n-Dune::IndexSet::IndexType\n-IndexTypeImp IndexType\n-The type used for the indices.\n-Definition: indexidset.hh:92\n-Dune::YaspIndexSet\n-Implementation of Level- and LeafIndexSets for YaspGrid.\n-Definition: yaspgridindexsets.hh:25\n-Dune::YaspIndexSet::geomTypes\n-const std::vector< GeometryType > & geomTypes(int codim) const\n-deliver all geometry types used in this grid\n-Definition: yaspgridindexsets.hh:100\n-Dune::YaspIndexSet::YaspIndexSet\n-YaspIndexSet(const GridImp &g)\n-Level grid view constructor stores reference to a grid and level.\n-Definition: yaspgridindexsets.hh:47\n-Dune::YaspIndexSet::YaspIndexSet\n-YaspIndexSet(const GridImp &g, int l)\n-Level grid view constructor stores reference to a grid and level.\n-Definition: yaspgridindexsets.hh:35\n-Dune::YaspIndexSet::index\n-IndexType index(const typename std::remove_const< GridImp >::type::Traits::\n-template Codim< cc >::Entity &e) const\n-get index of an entity\n-Definition: yaspgridindexsets.hh:59\n-Dune::YaspIndexSet::contains\n-bool contains(const EntityType &e) const\n-return true if the given entity is contained in .\n-Definition: yaspgridindexsets.hh:90\n-Dune::YaspIndexSet::size\n-std::size_t size(GeometryType type) const\n-get number of entities of given type and level (the level is known to the\n-object)\n-Definition: yaspgridindexsets.hh:73\n-Dune::YaspIndexSet::subIndex\n-IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits::\n-template Codim< cc >::Entity &e, int i, unsigned int codim) const\n-get index of subentity of an entity\n-Definition: yaspgridindexsets.hh:66\n-Dune::YaspIndexSet::types\n-std::vector< GeometryType > types(int codim) const\n-Definition: yaspgridindexsets.hh:97\n-Dune::YaspIndexSet::size\n-std::size_t size(int codim) const\n-return size of set for a given codim\n-Definition: yaspgridindexsets.hh:81\n-Dune::YaspIndexSet::IndexType\n-Base::IndexType IndexType\n-Definition: yaspgridindexsets.hh:30\n+Dune::IdSet\n+Id Set Interface.\n+Definition: indexidset.hh:452\n+Dune::YaspGlobalIdSet\n+persistent, globally unique Ids\n+Definition: yaspgrididset.hh:25\n+Dune::YaspGlobalIdSet::subId\n+IdType subId(const typename std::remove_const< GridImp >::type::Traits::\n+template Codim< 0 >::Entity &e, int i, unsigned int codim) const\n+get id of subentity\n+Definition: yaspgrididset.hh:54\n+Dune::YaspGlobalIdSet::IdType\n+std::remove_const< GridImp >::type::PersistentIndexType IdType\n+define the type used for persistent indices\n+Definition: yaspgrididset.hh:30\n+Dune::YaspGlobalIdSet::YaspGlobalIdSet\n+YaspGlobalIdSet()\n+Only default-constructible.\n+Definition: yaspgrididset.hh:35\n+Dune::YaspGlobalIdSet::id\n+IdType id(const typename std::remove_const< GridImp >::type::Traits::template\n+Codim< cd >::Entity &e) const\n+get id of an entity\n+Definition: yaspgrididset.hh:44\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00206.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00206.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: partitioning.hh File Reference\n+dune-grid: coordinates.hh File Reference\n \n \n \n \n \n \n \n@@ -64,65 +64,66 @@\n \n \n \n
    \n \n-
    partitioning.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    coordinates.hh File Reference
    \n \n
    \n \n-

    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. \n+

    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. \n More...

    \n
    #include <array>
    \n-#include <dune/common/math.hh>
    \n-#include <dune/common/deprecated.hh>
    \n+#include <bitset>
    \n+#include <vector>
    \n+#include <dune/common/fvector.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n-\n+\n+\n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::Yasp::Partitioning< d >
     a base class for the yaspgrid partitioning strategy More...
    class  Dune::EquidistantCoordinates< ct, dim >
     Container for equidistant coordinates in a YaspGrid. More...
     
    class  Dune::Yasp::DefaultPartitioning< d >
    class  Dune::EquidistantOffsetCoordinates< ct, dim >
     Container for equidistant coordinates in a YaspGrid with non-trivial origin. More...
     
    class  Dune::Yasp::PowerDPartitioning< d >
     Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
     
    class  Dune::Yasp::FixedSizePartitioning< d >
     Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
     
    class  Dune::YLoadBalance< d >
     a base class for the yaspgrid partitioning strategy More...
     
    class  Dune::YLoadBalanceForward< d >
     
    class  Dune::YLoadBalanceDefault< d >
     Implement the default load balance strategy of yaspgrid. More...
     
    class  Dune::YLoadBalancePowerD< d >
     Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
     
    class  Dune::YaspFixedSizePartitioner< d >
     Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
    class  Dune::TensorProductCoordinates< ct, dim >
     Coordinate container for a tensor product YaspGrid. More...
     
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Yasp
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n

    \n+Functions

    template<class ct , int dim>
    std::ostream & Dune::operator<< (std::ostream &s, EquidistantCoordinates< ct, dim > &c)
     
    template<class ct , int dim>
    std::ostream & Dune::operator<< (std::ostream &s, EquidistantOffsetCoordinates< ct, dim > &c)
     
    template<class ct , int dim>
    std::ostream & Dune::operator<< (std::ostream &s, TensorProductCoordinates< ct, dim > &c)
     
    template<class ctype , std::size_t dim>
    bool Dune::Yasp::checkIfMonotonous (const std::array< std::vector< ctype >, dim > &coords)
     
    \n

    Detailed Description

    \n-

    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.

    \n+

    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.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,63 +5,60 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-Classes | Namespaces\n-partitioning.hh File Reference\n-This file provides tools to partition YaspGrids. If you want to write your own\n-partitioner, inherit from Yasp::Partitioning and implement the partition()\n-method. You can also browse this file for already available useful\n-partitioners, like Yasp::FixedSizePartitioning. More...\n+Classes | Namespaces | Functions\n+coordinates.hh File Reference\n+This provides container classes for the coordinates to be used in YaspGrid Upon\n+implementation of the tensorproduct feature, the coordinate information has\n+been encapsulated to keep performance for the equidistant grid. Containers for\n+equidistant and tensorproduct grids are provided here. More...\n #include \n-#include \n-#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::Yasp::Partitioning<_d_>\n-\u00a0 a base class for the yaspgrid partitioning strategy More...\n+class \u00a0Dune::EquidistantCoordinates<_ct,_dim_>\n+\u00a0 Container for equidistant coordinates in a YaspGrid. More...\n \u00a0\n-class \u00a0Dune::Yasp::DefaultPartitioning<_d_>\n+class \u00a0Dune::EquidistantOffsetCoordinates<_ct,_dim_>\n+\u00a0 Container for equidistant coordinates in a YaspGrid with non-trivial\n+ origin. More...\n \u00a0\n-class \u00a0Dune::Yasp::PowerDPartitioning<_d_>\n-\u00a0 Implement yaspgrid load balance strategy for P=x^{dim} processors.\n- More...\n-\u00a0\n-class \u00a0Dune::Yasp::FixedSizePartitioning<_d_>\n- Implement partitioner that gets a fixed partitioning from an array If\n-\u00a0 the given partitioning doesn't match the number of processors, the grid\n- should be distributed to, an exception is thrown. More...\n-\u00a0\n-class \u00a0Dune::YLoadBalance<_d_>\n-\u00a0 a base class for the yaspgrid partitioning strategy More...\n-\u00a0\n-class \u00a0Dune::YLoadBalanceForward<_d_>\n-\u00a0\n-class \u00a0Dune::YLoadBalanceDefault<_d_>\n-\u00a0 Implement the default load balance strategy of yaspgrid. More...\n-\u00a0\n-class \u00a0Dune::YLoadBalancePowerD<_d_>\n-\u00a0 Implement yaspgrid load balance strategy for P=x^{dim} processors.\n- More...\n-\u00a0\n-class \u00a0Dune::YaspFixedSizePartitioner<_d_>\n- Implement partitioner that gets a fixed partitioning from an array If\n-\u00a0 the given partitioning doesn't match the number of processors, the grid\n- should be distributed to, an exception is thrown. More...\n+class \u00a0Dune::TensorProductCoordinates<_ct,_dim_>\n+\u00a0 Coordinate container for a tensor product YaspGrid. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Yasp\n \u00a0\n+ Functions\n+template\n+std::ostream &\u00a0Dune::operator<< (std::ostream &s, EquidistantCoordinates< ct,\n+ dim > &c)\n+\u00a0\n+template\n+std::ostream &\u00a0Dune::operator<< (std::ostream &s,\n+ EquidistantOffsetCoordinates< ct, dim > &c)\n+\u00a0\n+template\n+std::ostream &\u00a0Dune::operator<< (std::ostream &s, TensorProductCoordinates<\n+ ct, dim > &c)\n+\u00a0\n+template\n+ bool\u00a0Dune::Yasp::checkIfMonotonous (const std::array< std::vector<\n+ ctype >, dim > &coords)\n+\u00a0\n ***** Detailed Description *****\n-This file provides tools to partition YaspGrids. If you want to write your own\n-partitioner, inherit from Yasp::Partitioning and implement the partition()\n-method. You can also browse this file for already available useful\n-partitioners, like Yasp::FixedSizePartitioning.\n+This provides container classes for the coordinates to be used in YaspGrid Upon\n+implementation of the tensorproduct feature, the coordinate information has\n+been encapsulated to keep performance for the equidistant grid. Containers for\n+equidistant and tensorproduct grids are provided here.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00206_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: partitioning.hh Source File\n+dune-grid: coordinates.hh Source File\n \n \n \n \n \n \n \n@@ -62,252 +62,334 @@\n \n \n
    \n
    \n-
    partitioning.hh
    \n+
    coordinates.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3#ifndef DUNE_GRID_YASPGRID_PARTITIONING_HH
    \n-
    4#define DUNE_GRID_YASPGRID_PARTITIONING_HH
    \n-
    5
    \n-
    13#include<array>
    \n-
    14
    \n-
    15#include<dune/common/math.hh>
    \n-
    16#include <dune/common/deprecated.hh>
    \n-
    17
    \n-
    18namespace Dune
    \n-
    19{
    \n-
    20
    \n-
    21 namespace Yasp
    \n-
    22 {
    \n-
    23
    \n-
    37 template<int d>
    \n-\n-
    39 {
    \n-
    40 public:
    \n-
    41 using iTupel = std::array<int, d>;
    \n-
    42 virtual ~Partitioning() = default;
    \n-
    43 virtual void partition(const iTupel&, int, iTupel&, int) const = 0;
    \n-
    44 };
    \n-
    45
    \n-
    46 template<int d>
    \n-\n-
    48 {
    \n-
    49 public:
    \n-
    50 using iTupel = std::array<int, d>;
    \n+
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    4// vi: set et ts=4 sw=2 sts=2:
    \n+
    5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH
    \n+
    6#define DUNE_GRID_YASPGRID_COORDINATES_HH
    \n+
    7
    \n+
    8#include <array>
    \n+
    9#include <bitset>
    \n+
    10#include <vector>
    \n+
    11
    \n+
    12#include <dune/common/fvector.hh>
    \n+
    13
    \n+
    21namespace Dune
    \n+
    22{
    \n+
    27 template<class ct, int dim>
    \n+\n+
    29 {
    \n+
    30 public:
    \n+
    32 typedef ct ctype;
    \n+
    34 static const int dimension = dim;
    \n+
    35
    \n+\n+
    38
    \n+
    45 EquidistantCoordinates(const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
    \n+
    46 : _s(s)
    \n+
    47 {
    \n+
    48 for (int i=0; i<dim; i++)
    \n+
    49 _h[i] = upperRight[i] / _s[i];
    \n+
    50 }
    \n
    51
    \n-
    57 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
    \n-
    58 {
    \n-
    59 double opt=1E100;
    \n-
    60 iTupel trydims;
    \n-
    61
    \n-
    62 trydims.fill(-1);
    \n-
    63 dims.fill(-1);
    \n-
    64
    \n-
    65 optimize_dims(d-1,size,P,dims,trydims,opt,overlap);
    \n-
    66 if (dims[0] == -1)
    \n-
    67 DUNE_THROW(Dune::GridError, "Failed to find a suitable partition");
    \n-
    68 }
    \n+
    56 inline ct meshsize(int d, [[maybe_unused]] int i) const
    \n+
    57 {
    \n+
    58 return _h[d];
    \n+
    59 }
    \n+
    60
    \n+
    65 inline ct coordinate(int d, int i) const
    \n+
    66 {
    \n+
    67 return i*_h[d];
    \n+
    68 }
    \n
    69
    \n-
    70 private:
    \n-
    71 void optimize_dims (int i, const iTupel& size, int P, iTupel& dims, iTupel& trydims, double &opt, int overlap ) const
    \n-
    72 {
    \n-
    73 if (i>0) // test all subdivisions recursively
    \n-
    74 {
    \n-
    75 for (int k=1; k<=P; k++)
    \n-
    76 if (
    \n-
    77 P%k==0 // k devides P
    \n-
    78 and (
    \n-
    79 k == 1 // no neighbors
    \n-
    80 or
    \n-
    81 size[i] / k >= 2*overlap // size sufficient for overlap
    \n-
    82 )
    \n-
    83 )
    \n-
    84 {
    \n-
    85 // P divisible by k
    \n-
    86 trydims[i] = k;
    \n-
    87 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap);
    \n-
    88 }
    \n-
    89 }
    \n-
    90 else
    \n-
    91 {
    \n-
    92 // found a possible combination
    \n-
    93 if (
    \n-
    94 P == 1 // no neighbors
    \n-
    95 or
    \n-
    96 size[0] / P >= 2*overlap // size sufficient for overlap
    \n-
    97 )
    \n-
    98 trydims[0] = P;
    \n-
    99 else
    \n-
    100 return;
    \n-
    101
    \n-
    102 // check for optimality
    \n-
    103 double m = -1.0;
    \n-
    104
    \n-
    105 for (int k=0; k<d; k++)
    \n-
    106 {
    \n-
    107 double mm=((double)size[k])/((double)trydims[k]);
    \n-
    108 if (fmod((double)size[k],(double)trydims[k])>0.0001) mm*=3;
    \n-
    109 if ( mm > m ) m = mm;
    \n-
    110 }
    \n-
    111 //if (_rank==0) std::cout << "optimize_dims: " << size << " | " << trydims << " norm=" << m << std::endl;
    \n-
    112 if (m<opt)
    \n-
    113 {
    \n-
    114 opt = m;
    \n-
    115 dims = trydims;
    \n-
    116 }
    \n-
    117 }
    \n-
    118 }
    \n-
    119 };
    \n-
    120
    \n-
    123 template<int d>
    \n-\n-
    125 {
    \n-
    126 public:
    \n-
    127 typedef std::array<int, d> iTupel;
    \n-\n-
    129
    \n-
    130 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final
    \n-
    131 {
    \n-
    132 for (int i=1; i<=P; ++i)
    \n-
    133 if (Dune::power(i, d) == P) {
    \n-
    134 std::fill(dims.begin(), dims.end(),i);
    \n-
    135 return;
    \n-
    136 }
    \n+
    73 inline int size(int d) const
    \n+
    74 {
    \n+
    75 return _s[d];
    \n+
    76 }
    \n+
    77
    \n+
    84 EquidistantCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
    \n+
    85 {
    \n+
    86 //determine new size and meshsize
    \n+
    87 std::array<int,dim> news;
    \n+
    88 Dune::FieldVector<ct,dim> newUpperRight;
    \n+
    89
    \n+
    90 for (int i=0; i<dim; i++)
    \n+
    91 {
    \n+
    92 news[i] = 2 * _s[i];
    \n+
    93 if (!keep_ovlp)
    \n+
    94 {
    \n+
    95 if (ovlp_low[i])
    \n+
    96 news[i] -= overlap;
    \n+
    97 if (ovlp_up[i])
    \n+
    98 news[i] -= overlap;
    \n+
    99 }
    \n+
    100
    \n+
    101 newUpperRight[i] = (_h[i] / ct(2.)) * news[i];
    \n+
    102 }
    \n+
    103 return EquidistantCoordinates<ct,dim>(newUpperRight,news);
    \n+
    104 }
    \n+
    105
    \n+
    107 void print(std::ostream& s) const
    \n+
    108 {
    \n+
    109 s << "Printing equidistant coordinate information:" << std::endl;
    \n+
    110 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
    \n+
    111 }
    \n+
    112
    \n+
    113 private:
    \n+
    114 Dune::FieldVector<ct,dim> _h;
    \n+
    115 std::array<int,dim> _s;
    \n+
    116 };
    \n+
    117
    \n+
    118 template<class ct, int dim>
    \n+
    119 inline std::ostream& operator<< (std::ostream& s, EquidistantCoordinates<ct,dim>& c)
    \n+
    120 {
    \n+
    121 c.print(s);
    \n+
    122 return s;
    \n+
    123 }
    \n+
    124
    \n+
    129 template<class ct, int dim>
    \n+\n+
    131 {
    \n+
    132 public:
    \n+
    134 typedef ct ctype;
    \n+
    136 static const int dimension = dim;
    \n
    137
    \n-
    138 DUNE_THROW(GridError, "Power partitioning failed: your number of processes needs to be a " << d << "-th power.");
    \n-
    139 }
    \n-
    140 };
    \n-
    141
    \n-
    146 template<int d>
    \n-\n-
    148 {
    \n-
    149 public:
    \n-
    150 FixedSizePartitioning(const std::array<int,d>& dims) : _dims(dims) {}
    \n-
    151
    \n-\n-
    153
    \n-
    154 void partition(const std::array<int,d>&, int P, std::array<int,d>& dims, int overlap) const final
    \n-
    155 {
    \n-
    156 int prod = 1;
    \n-
    157 for (int i=0; i<d; i++)
    \n-
    158 prod *= _dims[i];
    \n-
    159 if (P != prod)
    \n-
    160 DUNE_THROW(Dune::Exception,"Your processor number doesn't match your partitioning information");
    \n-
    161 dims = _dims;
    \n-
    162 }
    \n-
    163
    \n-
    164 private:
    \n-
    165 std::array<int,d> _dims;
    \n-
    166 };
    \n-
    167
    \n-
    169 }
    \n-
    170
    \n-
    174 template<int d>
    \n-\n-
    176 {
    \n-
    177 public:
    \n-
    178 typedef std::array<int, d> iTupel;
    \n-
    179 [[deprecated("use the new interface of Yasp::Partitioning")]]
    \n-
    180 virtual ~YLoadBalance() {}
    \n-
    181 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const final {
    \n-
    182 this->loadbalance(size,P,dims);
    \n-
    183 }
    \n-
    184 virtual void loadbalance(const iTupel&, int, iTupel&) const = 0;
    \n-
    185 };
    \n-
    186
    \n-
    187DUNE_NO_DEPRECATED_BEGIN
    \n-
    188 template<int d>
    \n-\n-
    190 {
    \n-
    191 std::unique_ptr<Yasp::Partitioning<d>> p_;
    \n-
    192 public:
    \n-
    193 typedef std::array<int, d> iTupel;
    \n-
    194 YLoadBalanceForward(std::unique_ptr<Yasp::Partitioning<d>> && p) : p_(std::move(p)) {}
    \n-\n-
    196 void loadbalance(const iTupel& size, int P, iTupel& dims) const final {
    \n-
    197 return p_->partition(size,P,dims,1); // assuming the usual overlap of 1
    \n-
    198 }
    \n-
    199 };
    \n-
    200
    \n-
    204 template<int d>
    \n-\n-
    206 {
    \n-
    207 public:
    \n-\n-
    209 YLoadBalanceForward<d>(std::make_unique<Yasp::DefaultPartitioning<d>>())
    \n-
    210 {}
    \n-
    211 };
    \n+\n+
    140
    \n+
    149 EquidistantOffsetCoordinates(const Dune::FieldVector<ct,dim>& lowerLeft, const Dune::FieldVector<ct,dim>& upperRight, const std::array<int,dim>& s)
    \n+
    150 : _origin(lowerLeft), _s(s)
    \n+
    151 {
    \n+
    152 for (int i=0; i<dim; i++)
    \n+
    153 _h[i] = (upperRight[i] - lowerLeft[i]) / s[i];
    \n+
    154 }
    \n+
    155
    \n+
    160 inline ct meshsize(int d, [[maybe_unused]] int i) const
    \n+
    161 {
    \n+
    162 return _h[d];
    \n+
    163 }
    \n+
    164
    \n+
    169 inline ct coordinate(int d, int i) const
    \n+
    170 {
    \n+
    171 return _origin[d] + i*_h[d];
    \n+
    172 }
    \n+
    173
    \n+
    177 inline int size(int d) const
    \n+
    178 {
    \n+
    179 return _s[d];
    \n+
    180 }
    \n+
    181
    \n+
    185 inline ct origin(int d) const
    \n+
    186 {
    \n+
    187 return _origin[d];
    \n+
    188 }
    \n+
    189
    \n+
    196 EquidistantOffsetCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
    \n+
    197 {
    \n+
    198 //determine new size and meshsize
    \n+
    199 std::array<int,dim> news;
    \n+
    200 Dune::FieldVector<ct,dim> newUpperRight;
    \n+
    201
    \n+
    202 for (int i=0; i<dim; i++)
    \n+
    203 {
    \n+
    204 news[i] = 2 * _s[i];
    \n+
    205 if (!keep_ovlp)
    \n+
    206 {
    \n+
    207 if (ovlp_low[i])
    \n+
    208 news[i] -= overlap;
    \n+
    209 if (ovlp_up[i])
    \n+
    210 news[i] -= overlap;
    \n+
    211 }
    \n
    212
    \n-
    216 template<int d>
    \n-\n-
    218 {
    \n-
    219 public:
    \n-
    220 typedef std::array<int, d> iTupel;
    \n-\n-
    222 YLoadBalanceForward<d>(std::make_unique<Yasp::PowerDPartitioning<d>>())
    \n-
    223 {}
    \n-
    224 };
    \n+
    213 newUpperRight[i] = _origin[i] + (_h[i] / ct(2.)) * news[i];
    \n+
    214 }
    \n+
    215 return EquidistantOffsetCoordinates<ct,dim>(_origin,newUpperRight,news);
    \n+
    216 }
    \n+
    217
    \n+
    219 void print(std::ostream& s) const
    \n+
    220 {
    \n+
    221 s << "Printing equidistant coordinate information:" << std::endl;
    \n+
    222 s << "Meshsize: " << _h << std::endl << "Size: " << _s << std::endl;
    \n+
    223 s << "Offset to origin: " << _origin << std::endl;
    \n+
    224 }
    \n
    225
    \n-
    231 template<int d>
    \n-\n-
    233 {
    \n-
    234 public:
    \n-
    235 typedef std::array<int, d> iTupel;
    \n-
    236 YaspFixedSizePartitioner(const std::array<int,d>& dims) :
    \n-
    237 YLoadBalanceForward<d>(std::make_unique<Yasp::FixedSizePartitioning<d>>(dims))
    \n-
    238 {}
    \n-
    239 };
    \n-
    240
    \n-
    241DUNE_NO_DEPRECATED_END
    \n-
    242}
    \n-
    243
    \n-
    244#endif
    \n-
    STL namespace.
    \n+
    226 private:
    \n+
    227 Dune::FieldVector<ct,dim> _origin;
    \n+
    228 Dune::FieldVector<ct,dim> _h;
    \n+
    229 std::array<int,dim> _s;
    \n+
    230 };
    \n+
    231
    \n+
    232 template<class ct, int dim>
    \n+
    233 inline std::ostream& operator<< (std::ostream& s, EquidistantOffsetCoordinates<ct,dim>& c)
    \n+
    234 {
    \n+
    235 c.print(s);
    \n+
    236 return s;
    \n+
    237 }
    \n+
    238
    \n+
    243 template<class ct, int dim>
    \n+\n+
    245 {
    \n+
    246 public:
    \n+
    248 typedef ct ctype;
    \n+
    250 static const int dimension = dim;
    \n+
    251
    \n+\n+
    254
    \n+
    261 TensorProductCoordinates(const std::array<std::vector<ct>,dim>& c, const std::array<int,dim>& offset)
    \n+
    262 : _c(c),_offset(offset)
    \n+
    263 {}
    \n+
    264
    \n+
    269 inline ct meshsize(int d, int i) const
    \n+
    270 {
    \n+
    271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]];
    \n+
    272 }
    \n+
    273
    \n+
    278 inline ct coordinate(int d, int i) const
    \n+
    279 {
    \n+
    280 return _c[d][i-_offset[d]];
    \n+
    281 }
    \n+
    282
    \n+
    286 inline int size(int d) const
    \n+
    287 {
    \n+
    288 return _c[d].size() - 1;
    \n+
    289 }
    \n+
    290
    \n+
    297 TensorProductCoordinates<ct,dim> refine(std::bitset<dim> ovlp_low, std::bitset<dim> ovlp_up, int overlap, bool keep_ovlp) const
    \n+
    298 {
    \n+
    299 std::array<std::vector<ct>,dim> newcoords;
    \n+
    300 std::array<int,dim> newoffset(_offset);
    \n+
    301 for (int i=0; i<dim; i++)
    \n+
    302 {
    \n+
    303 newoffset[i] *= 2;
    \n+
    304
    \n+
    305 //determine new size
    \n+
    306 int newsize = 2 * _c[i].size() - 1;
    \n+
    307 if (!keep_ovlp)
    \n+
    308 {
    \n+
    309 if (ovlp_low[i])
    \n+
    310 {
    \n+
    311 newoffset[i] += overlap;
    \n+
    312 newsize -= overlap;
    \n+
    313 }
    \n+
    314 if (ovlp_up[i])
    \n+
    315 newsize -= overlap;
    \n+
    316 }
    \n+
    317 newcoords[i].resize(newsize);
    \n+
    318
    \n+
    319 typename std::vector<ct>::const_iterator it = _c[i].begin();
    \n+
    320 typename std::vector<ct>::const_iterator end = _c[i].end()-1;
    \n+
    321 typename std::vector<ct>::iterator iit = newcoords[i].begin() - 1;
    \n+
    322 if (!keep_ovlp)
    \n+
    323 {
    \n+
    324 if (ovlp_low[i])
    \n+
    325 {
    \n+
    326 it += overlap/2;
    \n+
    327 if (overlap%2)
    \n+
    328 *(++iit) = (*it + *(++it)) / ct(2.);
    \n+
    329 }
    \n+
    330 if (ovlp_up[i])
    \n+
    331 end -= overlap/2;
    \n+
    332 }
    \n+
    333
    \n+
    334 for (;it!=end;)
    \n+
    335 {
    \n+
    336 *(++iit) = *it;
    \n+
    337 *(++iit) = (*it + *(++it)) / ct(2.);
    \n+
    338 }
    \n+
    339
    \n+
    340 if (++iit != newcoords[i].end())
    \n+
    341 *iit = *it;
    \n+
    342 }
    \n+
    343 return TensorProductCoordinates<ct,dim>(newcoords, newoffset);
    \n+
    344 }
    \n+
    345
    \n+
    347 void print(std::ostream& s) const
    \n+
    348 {
    \n+
    349 s << "Printing TensorProduct Coordinate information:" << std::endl;
    \n+
    350 for (int i=0; i<dim; i++)
    \n+
    351 {
    \n+
    352 s << "Direction " << i << ": " << _c[i].size() << " coordinates" << std::endl;
    \n+
    353 for (std::size_t j=0; j<_c[i].size(); j++)
    \n+
    354 s << _c[i][j] << std::endl;
    \n+
    355 }
    \n+
    356 }
    \n+
    357
    \n+
    358 private:
    \n+
    359 std::array<std::vector<ct>,dim> _c;
    \n+
    360 std::array<int,dim> _offset;
    \n+
    361 };
    \n+
    362
    \n+
    363 template<class ct, int dim>
    \n+
    364 inline std::ostream& operator<< (std::ostream& s, TensorProductCoordinates<ct,dim>& c)
    \n+
    365 {
    \n+
    366 c.print(s);
    \n+
    367 return s;
    \n+
    368 }
    \n+
    369
    \n+
    370 namespace Yasp {
    \n+
    371 template<class ctype, std::size_t dim>
    \n+
    372 bool checkIfMonotonous(const std::array<std::vector<ctype>, dim>& coords)
    \n+
    373 {
    \n+
    374 for (std::size_t i=0; i<dim; i++)
    \n+
    375 {
    \n+
    376 if (coords[i].size() <= 1)
    \n+
    377 return false;
    \n+
    378 for (std::size_t j=1; j<coords[i].size(); j++)
    \n+
    379 if (coords[i][j] < coords[i][j-1])
    \n+
    380 return false;
    \n+
    381 }
    \n+
    382 return true;
    \n+
    383 }
    \n+
    384 } // namespace Yasp
    \n+
    385} // namespace Dune
    \n+
    386
    \n+
    387#endif
    \n+
    std::ostream & operator<<(std::ostream &out, const PartitionType &type)
    write a PartitionType to a stream
    Definition: gridenums.hh:72
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    constexpr Overlap overlap
    PartitionSet for the overlap partition.
    Definition: partitionset.hh:278
    \n-
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n-
    a base class for the yaspgrid partitioning strategy
    Definition: partitioning.hh:39
    \n-
    std::array< int, d > iTupel
    Definition: partitioning.hh:41
    \n-
    virtual ~Partitioning()=default
    \n-
    virtual void partition(const iTupel &, int, iTupel &, int) const =0
    \n-
    Definition: partitioning.hh:48
    \n-
    void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
    Distribute a structured grid across a set of processors.
    Definition: partitioning.hh:57
    \n-
    std::array< int, d > iTupel
    Definition: partitioning.hh:50
    \n-
    Implement yaspgrid load balance strategy for P=x^{dim} processors.
    Definition: partitioning.hh:125
    \n-
    virtual ~PowerDPartitioning()
    Definition: partitioning.hh:128
    \n-
    std::array< int, d > iTupel
    Definition: partitioning.hh:127
    \n-
    void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
    Definition: partitioning.hh:130
    \n-
    Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
    Definition: partitioning.hh:148
    \n-
    void partition(const std::array< int, d > &, int P, std::array< int, d > &dims, int overlap) const final
    Definition: partitioning.hh:154
    \n-
    FixedSizePartitioning(const std::array< int, d > &dims)
    Definition: partitioning.hh:150
    \n-
    virtual ~FixedSizePartitioning()
    Definition: partitioning.hh:152
    \n-
    a base class for the yaspgrid partitioning strategy
    Definition: partitioning.hh:176
    \n-
    void partition(const iTupel &size, int P, iTupel &dims, int overlap) const final
    Definition: partitioning.hh:181
    \n-
    virtual void loadbalance(const iTupel &, int, iTupel &) const =0
    \n-
    virtual ~YLoadBalance()
    Definition: partitioning.hh:180
    \n-
    std::array< int, d > iTupel
    Definition: partitioning.hh:178
    \n-
    Definition: partitioning.hh:190
    \n-
    void loadbalance(const iTupel &size, int P, iTupel &dims) const final
    Definition: partitioning.hh:196
    \n-
    YLoadBalanceForward(std::unique_ptr< Yasp::Partitioning< d > > &&p)
    Definition: partitioning.hh:194
    \n-
    virtual ~YLoadBalanceForward()
    Definition: partitioning.hh:195
    \n-
    std::array< int, d > iTupel
    Definition: partitioning.hh:193
    \n-
    Implement the default load balance strategy of yaspgrid.
    Definition: partitioning.hh:206
    \n-
    YLoadBalanceDefault()
    Definition: partitioning.hh:208
    \n-
    Implement yaspgrid load balance strategy for P=x^{dim} processors.
    Definition: partitioning.hh:218
    \n-
    std::array< int, d > iTupel
    Definition: partitioning.hh:220
    \n-
    YLoadBalancePowerD()
    Definition: partitioning.hh:221
    \n-
    Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't ...
    Definition: partitioning.hh:233
    \n-
    YaspFixedSizePartitioner(const std::array< int, d > &dims)
    Definition: partitioning.hh:236
    \n-
    std::array< int, d > iTupel
    Definition: partitioning.hh:235
    \n+
    bool checkIfMonotonous(const std::array< std::vector< ctype >, dim > &coords)
    Definition: coordinates.hh:372
    \n+
    Container for equidistant coordinates in a YaspGrid.
    Definition: coordinates.hh:29
    \n+
    ct coordinate(int d, int i) const
    Definition: coordinates.hh:65
    \n+
    int size(int d) const
    Definition: coordinates.hh:73
    \n+
    static const int dimension
    export dimension
    Definition: coordinates.hh:34
    \n+
    void print(std::ostream &s) const
    print information on this container
    Definition: coordinates.hh:107
    \n+
    EquidistantCoordinates()
    default constructor
    Definition: coordinates.hh:37
    \n+
    EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
    Definition: coordinates.hh:84
    \n+
    ct ctype
    export the coordinate type
    Definition: coordinates.hh:32
    \n+
    EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim > &s)
    construct a container with all necessary information
    Definition: coordinates.hh:45
    \n+
    ct meshsize(int d, int i) const
    Definition: coordinates.hh:56
    \n+
    Container for equidistant coordinates in a YaspGrid with non-trivial origin.
    Definition: coordinates.hh:131
    \n+
    EquidistantOffsetCoordinates()
    default constructor
    Definition: coordinates.hh:139
    \n+
    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
    \n+
    EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
    Definition: coordinates.hh:196
    \n+
    void print(std::ostream &s) const
    print information on this container
    Definition: coordinates.hh:219
    \n+
    ct meshsize(int d, int i) const
    Definition: coordinates.hh:160
    \n+
    ct origin(int d) const
    Definition: coordinates.hh:185
    \n+
    int size(int d) const
    Definition: coordinates.hh:177
    \n+
    ct ctype
    export the coordinate type
    Definition: coordinates.hh:134
    \n+
    static const int dimension
    export dimension
    Definition: coordinates.hh:136
    \n+
    ct coordinate(int d, int i) const
    Definition: coordinates.hh:169
    \n+
    Coordinate container for a tensor product YaspGrid.
    Definition: coordinates.hh:245
    \n+
    void print(std::ostream &s) const
    print information on this container
    Definition: coordinates.hh:347
    \n+
    ct meshsize(int d, int i) const
    Definition: coordinates.hh:269
    \n+
    ct coordinate(int d, int i) const
    Definition: coordinates.hh:278
    \n+
    static const int dimension
    export dimension
    Definition: coordinates.hh:250
    \n+
    TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const
    Definition: coordinates.hh:297
    \n+
    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
    \n+
    TensorProductCoordinates()
    the default constructor
    Definition: coordinates.hh:253
    \n+
    ct ctype
    export the coordinate type
    Definition: coordinates.hh:248
    \n+
    int size(int d) const
    Definition: coordinates.hh:286
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,334 +5,434 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-partitioning.hh\n+coordinates.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3#ifndef DUNE_GRID_YASPGRID_PARTITIONING_HH\n- 4#define DUNE_GRID_YASPGRID_PARTITIONING_HH\n- 5\n- 13#include\n- 14\n- 15#include\n- 16#include \n- 17\n- 18namespace Dune\n- 19{\n- 20\n- 21 namespace Yasp\n- 22 {\n- 23\n- 37 template\n-38 class Partitioning\n- 39 {\n- 40 public:\n-41 using iTupel = std::array;\n-42 virtual ~Partitioning() = default;\n-43 virtual void partition(const iTupel&, int, iTupel&, int) const = 0;\n- 44 };\n- 45\n- 46 template\n-47 class DefaultPartitioning : public Partitioning\n- 48 {\n- 49 public:\n-50 using iTupel = std::array;\n+ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+ 4// vi: set et ts=4 sw=2 sts=2:\n+ 5#ifndef DUNE_GRID_YASPGRID_COORDINATES_HH\n+ 6#define DUNE_GRID_YASPGRID_COORDINATES_HH\n+ 7\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11\n+ 12#include \n+ 13\n+ 21namespace Dune\n+ 22{\n+ 27 template\n+28 class EquidistantCoordinates\n+ 29 {\n+ 30 public:\n+32 typedef ct ctype;\n+34 static const int dimension = dim;\n+ 35\n+37 EquidistantCoordinates() {}\n+ 38\n+45 EquidistantCoordinates(const Dune::FieldVector& upperRight, const\n+std::array& s)\n+ 46 : _s(s)\n+ 47 {\n+ 48 for (int i=0; i0) // test all subdivisions recursively\n+73 inline int size(int d) const\n 74 {\n- 75 for (int k=1; k<=P; k++)\n- 76 if (\n- 77 P%k==0 // k devides P\n- 78 and (\n- 79 k == 1 // no neighbors\n- 80 or\n- 81 size[i] / k >= 2*overlap // size sufficient for overlap\n- 82 )\n- 83 )\n- 84 {\n- 85 // P divisible by k\n- 86 trydims[i] = k;\n- 87 optimize_dims(i-1,size,P/k,dims,trydims,opt,overlap);\n- 88 }\n- 89 }\n- 90 else\n+ 75 return _s[d];\n+ 76 }\n+ 77\n+84 EquidistantCoordinates refine(std::bitset ovlp_low, std::\n+bitset ovlp_up, int overlap, bool keep_ovlp) const\n+ 85 {\n+ 86 //determine new size and meshsize\n+ 87 std::array news;\n+ 88 Dune::FieldVector newUpperRight;\n+ 89\n+ 90 for (int i=0; i= 2*overlap // size sufficient for overlap\n- 97 )\n- 98 trydims[0] = P;\n- 99 else\n- 100 return;\n- 101\n- 102 // check for optimality\n- 103 double m = -1.0;\n- 104\n- 105 for (int k=0; k0.0001) mm*=3;\n- 109 if ( mm > m ) m = mm;\n- 110 }\n- 111 //if (_rank==0) std::cout << \"optimize_dims: \" << size << \" | \" << trydims\n-<< \" norm=\" << m << std::endl;\n- 112 if (m\n-124 class PowerDPartitioning : public Partitioning\n- 125 {\n- 126 public:\n-127 typedef std::array iTupel;\n-128 virtual ~PowerDPartitioning() {}\n- 129\n-130 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const\n-final\n+ 92 news[i] = 2 * _s[i];\n+ 93 if (!keep_ovlp)\n+ 94 {\n+ 95 if (ovlp_low[i])\n+ 96 news[i] -= overlap;\n+ 97 if (ovlp_up[i])\n+ 98 news[i] -= overlap;\n+ 99 }\n+ 100\n+ 101 newUpperRight[i] = (_h[i] / ct(2.)) * news[i];\n+ 102 }\n+ 103 return EquidistantCoordinates(newUpperRight,news);\n+ 104 }\n+ 105\n+107 void print(std::ostream& s) const\n+ 108 {\n+ 109 s << \"Printing equidistant coordinate information:\" << std::endl;\n+ 110 s << \"Meshsize: \" << _h << std::endl << \"Size: \" << _s << std::endl;\n+ 111 }\n+ 112\n+ 113 private:\n+ 114 Dune::FieldVector _h;\n+ 115 std::array _s;\n+ 116 };\n+ 117\n+ 118 template\n+119 inline std::ostream& operator<<(std::ostream& s,\n+EquidistantCoordinates& c)\n+ 120 {\n+ 121 c.print(s);\n+ 122 return s;\n+ 123 }\n+ 124\n+ 129 template\n+130 class EquidistantOffsetCoordinates\n 131 {\n- 132 for (int i=1; i<=P; ++i)\n- 133 if (Dune::power(i, d) == P) {\n- 134 std::fill(dims.begin(), dims.end(),i);\n- 135 return;\n- 136 }\n+ 132 public:\n+134 typedef ct ctype;\n+136 static const int dimension = dim;\n 137\n- 138 DUNE_THROW(GridError, \"Power partitioning failed: your number of processes\n-needs to be a \" << d << \"-th power.\");\n- 139 }\n- 140 };\n- 141\n- 146 template\n-147 class FixedSizePartitioning : public Partitioning\n- 148 {\n- 149 public:\n-150 FixedSizePartitioning(const std::array& dims) : _dims(dims) {}\n- 151\n-152 virtual ~FixedSizePartitioning() {}\n- 153\n-154 void partition(const std::array&, int P, std::array& dims,\n-int overlap) const final\n- 155 {\n- 156 int prod = 1;\n- 157 for (int i=0; i _dims;\n- 166 };\n- 167\n- 169 }\n- 170\n- 174 template\n-175 class YLoadBalance : public Yasp::Partitioning\n- 176 {\n- 177 public:\n-178 typedef std::array iTupel;\n- 179 [[deprecated(\"use the new interface of Yasp::Partitioning\")]]\n-180 virtual ~YLoadBalance() {}\n-181 void partition (const iTupel& size, int P, iTupel& dims, int overlap) const\n-final {\n- 182 this->loadbalance(size,P,dims);\n- 183 }\n-184 virtual void loadbalance(const iTupel&, int, iTupel&) const = 0;\n- 185 };\n- 186\n- 187DUNE_NO_DEPRECATED_BEGIN\n- 188 template\n-189 class YLoadBalanceForward : public YLoadBalance\n- 190 {\n- 191 std::unique_ptr> p_;\n- 192 public:\n-193 typedef std::array iTupel;\n-194 YLoadBalanceForward(std::unique_ptr> && p) : p_(std::\n-move(p)) {}\n-195 virtual ~YLoadBalanceForward() {}\n-196 void loadbalance(const iTupel& size, int P, iTupel& dims) const final {\n- 197 return p_->partition(size,P,dims,1); // assuming the usual overlap of 1\n- 198 }\n- 199 };\n- 200\n- 204 template\n-205 class YLoadBalanceDefault : public YLoadBalanceForward\n+139 EquidistantOffsetCoordinates() {}\n+ 140\n+149 EquidistantOffsetCoordinates(const Dune::FieldVector& lowerLeft,\n+const Dune::FieldVector& upperRight, const std::array& s)\n+ 150 : _origin(lowerLeft), _s(s)\n+ 151 {\n+ 152 for (int i=0; i refine(std::bitset ovlp_low,\n+std::bitset ovlp_up, int overlap, bool keep_ovlp) const\n+ 197 {\n+ 198 //determine new size and meshsize\n+ 199 std::array news;\n+ 200 Dune::FieldVector newUpperRight;\n+ 201\n+ 202 for (int i=0; i(std::make_unique>())\n- 210 {}\n- 211 };\n+ 207 if (ovlp_low[i])\n+ 208 news[i] -= overlap;\n+ 209 if (ovlp_up[i])\n+ 210 news[i] -= overlap;\n+ 211 }\n 212\n- 216 template\n-217 class YLoadBalancePowerD : public YLoadBalanceForward\n- 218 {\n- 219 public:\n-220 typedef std::array iTupel;\n-221 YLoadBalancePowerD() :\n- 222 YLoadBalanceForward(std::make_unique>())\n- 223 {}\n- 224 };\n+ 213 newUpperRight[i] = _origin[i] + (_h[i] / ct(2.)) * news[i];\n+ 214 }\n+ 215 return EquidistantOffsetCoordinates(_origin,newUpperRight,news);\n+ 216 }\n+ 217\n+219 void print(std::ostream& s) const\n+ 220 {\n+ 221 s << \"Printing equidistant coordinate information:\" << std::endl;\n+ 222 s << \"Meshsize: \" << _h << std::endl << \"Size: \" << _s << std::endl;\n+ 223 s << \"Offset to origin: \" << _origin << std::endl;\n+ 224 }\n 225\n- 231 template\n-232 class YaspFixedSizePartitioner : public YLoadBalanceForward\n- 233 {\n- 234 public:\n-235 typedef std::array iTupel;\n-236 YaspFixedSizePartitioner(const std::array& dims) :\n- 237 YLoadBalanceForward(std::make_unique>\n-(dims))\n- 238 {}\n- 239 };\n- 240\n- 241DUNE_NO_DEPRECATED_END\n- 242}\n- 243\n- 244#endif\n-std\n-STL namespace.\n+ 226 private:\n+ 227 Dune::FieldVector _origin;\n+ 228 Dune::FieldVector _h;\n+ 229 std::array _s;\n+ 230 };\n+ 231\n+ 232 template\n+233 inline std::ostream& operator<<(std::ostream& s,\n+EquidistantOffsetCoordinates& c)\n+ 234 {\n+ 235 c.print(s);\n+ 236 return s;\n+ 237 }\n+ 238\n+ 243 template\n+244 class TensorProductCoordinates\n+ 245 {\n+ 246 public:\n+248 typedef ct ctype;\n+250 static const int dimension = dim;\n+ 251\n+253 TensorProductCoordinates() {}\n+ 254\n+261 TensorProductCoordinates(const std::array,dim>& c, const\n+std::array& offset)\n+ 262 : _c(c),_offset(offset)\n+ 263 {}\n+ 264\n+269 inline ct meshsize(int d, int i) const\n+ 270 {\n+ 271 return _c[d][i+1-_offset[d]] - _c[d][i-_offset[d]];\n+ 272 }\n+ 273\n+278 inline ct coordinate(int d, int i) const\n+ 279 {\n+ 280 return _c[d][i-_offset[d]];\n+ 281 }\n+ 282\n+286 inline int size(int d) const\n+ 287 {\n+ 288 return _c[d].size() - 1;\n+ 289 }\n+ 290\n+297 TensorProductCoordinates refine(std::bitset ovlp_low, std::\n+bitset ovlp_up, int overlap, bool keep_ovlp) const\n+ 298 {\n+ 299 std::array,dim> newcoords;\n+ 300 std::array newoffset(_offset);\n+ 301 for (int i=0; i::const_iterator it = _c[i].begin();\n+ 320 typename std::vector::const_iterator end = _c[i].end()-1;\n+ 321 typename std::vector::iterator iit = newcoords[i].begin() - 1;\n+ 322 if (!keep_ovlp)\n+ 323 {\n+ 324 if (ovlp_low[i])\n+ 325 {\n+ 326 it += overlap/2;\n+ 327 if (overlap%2)\n+ 328 *(++iit) = (*it + *(++it)) / ct(2.);\n+ 329 }\n+ 330 if (ovlp_up[i])\n+ 331 end -= overlap/2;\n+ 332 }\n+ 333\n+ 334 for (;it!=end;)\n+ 335 {\n+ 336 *(++iit) = *it;\n+ 337 *(++iit) = (*it + *(++it)) / ct(2.);\n+ 338 }\n+ 339\n+ 340 if (++iit != newcoords[i].end())\n+ 341 *iit = *it;\n+ 342 }\n+ 343 return TensorProductCoordinates(newcoords, newoffset);\n+ 344 }\n+ 345\n+347 void print(std::ostream& s) const\n+ 348 {\n+ 349 s << \"Printing TensorProduct Coordinate information:\" << std::endl;\n+ 350 for (int i=0; i,dim> _c;\n+ 360 std::array _offset;\n+ 361 };\n+ 362\n+ 363 template\n+364 inline std::ostream& operator<<(std::ostream& s,\n+TensorProductCoordinates& c)\n+ 365 {\n+ 366 c.print(s);\n+ 367 return s;\n+ 368 }\n+ 369\n+370 namespace Yasp {\n+ 371 template\n+372 bool checkIfMonotonous(const std::array, dim>& coords)\n+ 373 {\n+ 374 for (std::size_t i=0; i iTupel\n-Definition: partitioning.hh:41\n-Dune::Yasp::Partitioning::~Partitioning\n-virtual ~Partitioning()=default\n-Dune::Yasp::Partitioning::partition\n-virtual void partition(const iTupel &, int, iTupel &, int) const =0\n-Dune::Yasp::DefaultPartitioning\n-Definition: partitioning.hh:48\n-Dune::Yasp::DefaultPartitioning::partition\n-void partition(const iTupel &size, int P, iTupel &dims, int overlap) const\n-final\n-Distribute a structured grid across a set of processors.\n-Definition: partitioning.hh:57\n-Dune::Yasp::DefaultPartitioning::iTupel\n-std::array< int, d > iTupel\n-Definition: partitioning.hh:50\n-Dune::Yasp::PowerDPartitioning\n-Implement yaspgrid load balance strategy for P=x^{dim} processors.\n-Definition: partitioning.hh:125\n-Dune::Yasp::PowerDPartitioning::~PowerDPartitioning\n-virtual ~PowerDPartitioning()\n-Definition: partitioning.hh:128\n-Dune::Yasp::PowerDPartitioning::iTupel\n-std::array< int, d > iTupel\n-Definition: partitioning.hh:127\n-Dune::Yasp::PowerDPartitioning::partition\n-void partition(const iTupel &size, int P, iTupel &dims, int overlap) const\n-final\n-Definition: partitioning.hh:130\n-Dune::Yasp::FixedSizePartitioning\n-Implement partitioner that gets a fixed partitioning from an array If the given\n-partitioning doesn't ...\n-Definition: partitioning.hh:148\n-Dune::Yasp::FixedSizePartitioning::partition\n-void partition(const std::array< int, d > &, int P, std::array< int, d > &dims,\n-int overlap) const final\n-Definition: partitioning.hh:154\n-Dune::Yasp::FixedSizePartitioning::FixedSizePartitioning\n-FixedSizePartitioning(const std::array< int, d > &dims)\n-Definition: partitioning.hh:150\n-Dune::Yasp::FixedSizePartitioning::~FixedSizePartitioning\n-virtual ~FixedSizePartitioning()\n-Definition: partitioning.hh:152\n-Dune::YLoadBalance\n-a base class for the yaspgrid partitioning strategy\n-Definition: partitioning.hh:176\n-Dune::YLoadBalance::partition\n-void partition(const iTupel &size, int P, iTupel &dims, int overlap) const\n-final\n-Definition: partitioning.hh:181\n-Dune::YLoadBalance::loadbalance\n-virtual void loadbalance(const iTupel &, int, iTupel &) const =0\n-Dune::YLoadBalance::~YLoadBalance\n-virtual ~YLoadBalance()\n-Definition: partitioning.hh:180\n-Dune::YLoadBalance::iTupel\n-std::array< int, d > iTupel\n-Definition: partitioning.hh:178\n-Dune::YLoadBalanceForward\n-Definition: partitioning.hh:190\n-Dune::YLoadBalanceForward::loadbalance\n-void loadbalance(const iTupel &size, int P, iTupel &dims) const final\n-Definition: partitioning.hh:196\n-Dune::YLoadBalanceForward::YLoadBalanceForward\n-YLoadBalanceForward(std::unique_ptr< Yasp::Partitioning< d > > &&p)\n-Definition: partitioning.hh:194\n-Dune::YLoadBalanceForward::~YLoadBalanceForward\n-virtual ~YLoadBalanceForward()\n-Definition: partitioning.hh:195\n-Dune::YLoadBalanceForward::iTupel\n-std::array< int, d > iTupel\n-Definition: partitioning.hh:193\n-Dune::YLoadBalanceDefault\n-Implement the default load balance strategy of yaspgrid.\n-Definition: partitioning.hh:206\n-Dune::YLoadBalanceDefault::YLoadBalanceDefault\n-YLoadBalanceDefault()\n-Definition: partitioning.hh:208\n-Dune::YLoadBalancePowerD\n-Implement yaspgrid load balance strategy for P=x^{dim} processors.\n-Definition: partitioning.hh:218\n-Dune::YLoadBalancePowerD::iTupel\n-std::array< int, d > iTupel\n-Definition: partitioning.hh:220\n-Dune::YLoadBalancePowerD::YLoadBalancePowerD\n-YLoadBalancePowerD()\n-Definition: partitioning.hh:221\n-Dune::YaspFixedSizePartitioner\n-Implement partitioner that gets a fixed partitioning from an array If the given\n-partitioning doesn't ...\n-Definition: partitioning.hh:233\n-Dune::YaspFixedSizePartitioner::YaspFixedSizePartitioner\n-YaspFixedSizePartitioner(const std::array< int, d > &dims)\n-Definition: partitioning.hh:236\n-Dune::YaspFixedSizePartitioner::iTupel\n-std::array< int, d > iTupel\n-Definition: partitioning.hh:235\n+Dune::Yasp::checkIfMonotonous\n+bool checkIfMonotonous(const std::array< std::vector< ctype >, dim > &coords)\n+Definition: coordinates.hh:372\n+Dune::EquidistantCoordinates\n+Container for equidistant coordinates in a YaspGrid.\n+Definition: coordinates.hh:29\n+Dune::EquidistantCoordinates::coordinate\n+ct coordinate(int d, int i) const\n+Definition: coordinates.hh:65\n+Dune::EquidistantCoordinates::size\n+int size(int d) const\n+Definition: coordinates.hh:73\n+Dune::EquidistantCoordinates::dimension\n+static const int dimension\n+export dimension\n+Definition: coordinates.hh:34\n+Dune::EquidistantCoordinates::print\n+void print(std::ostream &s) const\n+print information on this container\n+Definition: coordinates.hh:107\n+Dune::EquidistantCoordinates::EquidistantCoordinates\n+EquidistantCoordinates()\n+default constructor\n+Definition: coordinates.hh:37\n+Dune::EquidistantCoordinates::refine\n+EquidistantCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::\n+bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const\n+Definition: coordinates.hh:84\n+Dune::EquidistantCoordinates::ctype\n+ct ctype\n+export the coordinate type\n+Definition: coordinates.hh:32\n+Dune::EquidistantCoordinates::EquidistantCoordinates\n+EquidistantCoordinates(const Dune::FieldVector< ct, dim > &upperRight, const\n+std::array< int, dim > &s)\n+construct a container with all necessary information\n+Definition: coordinates.hh:45\n+Dune::EquidistantCoordinates::meshsize\n+ct meshsize(int d, int i) const\n+Definition: coordinates.hh:56\n+Dune::EquidistantOffsetCoordinates\n+Container for equidistant coordinates in a YaspGrid with non-trivial origin.\n+Definition: coordinates.hh:131\n+Dune::EquidistantOffsetCoordinates::EquidistantOffsetCoordinates\n+EquidistantOffsetCoordinates()\n+default constructor\n+Definition: coordinates.hh:139\n+Dune::EquidistantOffsetCoordinates::EquidistantOffsetCoordinates\n+EquidistantOffsetCoordinates(const Dune::FieldVector< ct, dim > &lowerLeft,\n+const Dune::FieldVector< ct, dim > &upperRight, const std::array< int, dim >\n+&s)\n+construct a container with all necessary information\n+Definition: coordinates.hh:149\n+Dune::EquidistantOffsetCoordinates::refine\n+EquidistantOffsetCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low,\n+std::bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const\n+Definition: coordinates.hh:196\n+Dune::EquidistantOffsetCoordinates::print\n+void print(std::ostream &s) const\n+print information on this container\n+Definition: coordinates.hh:219\n+Dune::EquidistantOffsetCoordinates::meshsize\n+ct meshsize(int d, int i) const\n+Definition: coordinates.hh:160\n+Dune::EquidistantOffsetCoordinates::origin\n+ct origin(int d) const\n+Definition: coordinates.hh:185\n+Dune::EquidistantOffsetCoordinates::size\n+int size(int d) const\n+Definition: coordinates.hh:177\n+Dune::EquidistantOffsetCoordinates::ctype\n+ct ctype\n+export the coordinate type\n+Definition: coordinates.hh:134\n+Dune::EquidistantOffsetCoordinates::dimension\n+static const int dimension\n+export dimension\n+Definition: coordinates.hh:136\n+Dune::EquidistantOffsetCoordinates::coordinate\n+ct coordinate(int d, int i) const\n+Definition: coordinates.hh:169\n+Dune::TensorProductCoordinates\n+Coordinate container for a tensor product YaspGrid.\n+Definition: coordinates.hh:245\n+Dune::TensorProductCoordinates::print\n+void print(std::ostream &s) const\n+print information on this container\n+Definition: coordinates.hh:347\n+Dune::TensorProductCoordinates::meshsize\n+ct meshsize(int d, int i) const\n+Definition: coordinates.hh:269\n+Dune::TensorProductCoordinates::coordinate\n+ct coordinate(int d, int i) const\n+Definition: coordinates.hh:278\n+Dune::TensorProductCoordinates::dimension\n+static const int dimension\n+export dimension\n+Definition: coordinates.hh:250\n+Dune::TensorProductCoordinates::refine\n+TensorProductCoordinates< ct, dim > refine(std::bitset< dim > ovlp_low, std::\n+bitset< dim > ovlp_up, int overlap, bool keep_ovlp) const\n+Definition: coordinates.hh:297\n+Dune::TensorProductCoordinates::TensorProductCoordinates\n+TensorProductCoordinates(const std::array< std::vector< ct >, dim > &c, const\n+std::array< int, dim > &offset)\n+construct a container with all necessary information\n+Definition: coordinates.hh:261\n+Dune::TensorProductCoordinates::TensorProductCoordinates\n+TensorProductCoordinates()\n+the default constructor\n+Definition: coordinates.hh:253\n+Dune::TensorProductCoordinates::ctype\n+ct ctype\n+export the coordinate type\n+Definition: coordinates.hh:248\n+Dune::TensorProductCoordinates::size\n+int size(int d) const\n+Definition: coordinates.hh:286\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00212.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00212.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridentityseed.hh File Reference\n+dune-grid: yaspgridindexsets.hh File Reference\n \n \n \n \n \n \n \n@@ -65,37 +65,37 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n \n-
    yaspgridentityseed.hh File Reference
    \n+
    yaspgridindexsets.hh File Reference
    \n
    \n
    \n \n-

    The YaspEntitySeed class. \n+

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

    \n \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::YaspEntitySeed< codim, GridImp >
     Describes the minimal information necessary to create a fully functional YaspEntity. More...
    class  Dune::YaspIndexSet< GridImp, isLeafIndexSet >
     Implementation of Level- and LeafIndexSets for YaspGrid. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The YaspEntitySeed class.

    \n+

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

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,24 +6,23 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n Classes | Namespaces\n-yaspgridentityseed.hh File Reference\n-The YaspEntitySeed class. More...\n+yaspgridindexsets.hh File Reference\n+level-wise, non-persistent, consecutive indices for YaspGrid More...\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::YaspEntitySeed<_codim,_GridImp_>\n-\u00a0 Describes the minimal information necessary to create a fully\n- functional YaspEntity. More...\n+class \u00a0Dune::YaspIndexSet<_GridImp,_isLeafIndexSet_>\n+\u00a0 Implementation of Level- and LeafIndexSets for YaspGrid. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The YaspEntitySeed class.\n+level-wise, non-persistent, consecutive indices for YaspGrid\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00212_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridentityseed.hh Source File\n+dune-grid: yaspgridindexsets.hh Source File\n \n \n \n \n \n \n \n@@ -62,74 +62,126 @@\n \n \n
    \n
    \n-
    yaspgridentityseed.hh
    \n+
    yaspgridindexsets.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH
    \n-
    6#define DUNE_GRID_YASPGRIDENTITYSEED_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH
    \n+
    6#define DUNE_GRID_YASPGRIDINDEXSET_HH
    \n
    7
    \n-
    12namespace Dune {
    \n-
    13
    \n-
    16 template<int codim, class GridImp>
    \n-\n-
    18 {
    \n-
    20 constexpr static int dim = GridImp::dimension;
    \n-
    21
    \n-
    22 public:
    \n-
    24 constexpr static int codimension = codim;
    \n-
    25
    \n-\n-
    28 : _l(-1), _o(0)
    \n-
    29 {
    \n-
    30 std::fill(_c.begin(),_c.end(),0);
    \n-
    31 }
    \n-
    32
    \n-
    34 YaspEntitySeed (int level, std::array<int, dim> coord, int o = 0)
    \n-
    35 : _l(level), _c(coord), _o(o)
    \n-
    36 {}
    \n-
    37
    \n-
    39 bool isValid() const
    \n-
    40 {
    \n-
    41 return _l != -1;
    \n-
    42 }
    \n-
    43
    \n-
    44 int level () const { return _l; }
    \n-
    45 const std::array<int, dim> & coord() const { return _c; }
    \n-
    46 int offset () const { return _o; }
    \n-
    47
    \n-
    48 protected:
    \n-
    49 int _l; // grid level
    \n-
    50 std::array<int, dim> _c; // coord in the global grid
    \n-
    51 int _o; // the offset: which YGridComponent, does the entity belong to
    \n-
    52 };
    \n-
    53
    \n-
    54} // namespace Dune
    \n-
    55
    \n-
    56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH
    \n+
    14namespace Dune {
    \n+
    15
    \n+
    22 template<class GridImp, bool isLeafIndexSet>
    \n+\n+
    24 : public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >, unsigned int >
    \n+
    25 {
    \n+\n+\n+
    28
    \n+
    29 public:
    \n+
    30 typedef typename Base::IndexType IndexType;
    \n+
    31
    \n+
    32 using Base::subIndex;
    \n+
    33
    \n+
    35 YaspIndexSet ( const GridImp &g, int l )
    \n+
    36 : grid( g ),
    \n+
    37 level( l )
    \n+
    38 {
    \n+
    39 assert(not isLeafIndexSet);
    \n+
    40
    \n+
    41 // contains a single element type;
    \n+
    42 for (int codim=0; codim<=GridImp::dimension; codim++)
    \n+
    43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
    \n+
    44 }
    \n+
    45
    \n+
    47 YaspIndexSet ( const GridImp &g )
    \n+
    48 : grid( g )
    \n+
    49 {
    \n+
    50 assert(isLeafIndexSet);
    \n+
    51
    \n+
    52 // contains a single element type;
    \n+
    53 for (int codim=0; codim<=GridImp::dimension; codim++)
    \n+
    54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));
    \n+
    55 }
    \n+
    56
    \n+
    58 template<int cc>
    \n+
    59 IndexType index (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e) const
    \n+
    60 {
    \n+
    61 return e.impl().compressedIndex();
    \n+
    62 }
    \n+
    63
    \n+
    65 template< int cc >
    \n+
    66 IndexType subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e,
    \n+
    67 int i, unsigned int codim ) const
    \n+
    68 {
    \n+
    69 return e.impl().subCompressedIndex(i, codim);
    \n+
    70 }
    \n+
    71
    \n+
    73 std::size_t size (GeometryType type) const
    \n+
    74 {
    \n+
    75 return (isLeafIndexSet)
    \n+
    76 ? grid.size( type )
    \n+
    77 : grid.size( level, type );
    \n+
    78 }
    \n+
    79
    \n+
    81 std::size_t size (int codim) const
    \n+
    82 {
    \n+
    83 return (isLeafIndexSet)
    \n+
    84 ? grid.size( codim )
    \n+
    85 : grid.size( level, codim );
    \n+
    86 }
    \n+
    87
    \n+
    89 template<class EntityType>
    \n+
    90 bool contains (const EntityType& e) const
    \n+
    91 {
    \n+
    92 return (isLeafIndexSet)
    \n+
    93 ? e.level() == grid.maxLevel()
    \n+
    94 : e.level() == level;
    \n+
    95 }
    \n+
    96
    \n+
    97 std::vector< GeometryType > types ( int codim ) const { return mytypes[ codim ]; }
    \n+
    98
    \n+
    100 const std::vector<GeometryType>& geomTypes (int codim) const
    \n+
    101 {
    \n+
    102 return mytypes[codim];
    \n+
    103 }
    \n+
    104
    \n+
    105 private:
    \n+
    106 const GridImp& grid;
    \n+
    107 int level;
    \n+
    108 std::vector<GeometryType> mytypes[std::remove_const<GridImp>::type::dimension+1];
    \n+
    109 };
    \n+
    110
    \n+
    111} // namespace Dune
    \n+
    112
    \n+
    113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Describes the minimal information necessary to create a fully functional YaspEntity.
    Definition: yaspgridentityseed.hh:18
    \n-
    int _o
    Definition: yaspgridentityseed.hh:51
    \n-
    std::array< int, dim > _c
    Definition: yaspgridentityseed.hh:50
    \n-
    int _l
    Definition: yaspgridentityseed.hh:49
    \n-
    int level() const
    Definition: yaspgridentityseed.hh:44
    \n-
    YaspEntitySeed()
    default construct an invalid entity seed
    Definition: yaspgridentityseed.hh:27
    \n-
    YaspEntitySeed(int level, std::array< int, dim > coord, int o=0)
    constructor
    Definition: yaspgridentityseed.hh:34
    \n-
    int offset() const
    Definition: yaspgridentityseed.hh:46
    \n-
    static constexpr int codimension
    codimension of entity
    Definition: yaspgridentityseed.hh:24
    \n-
    const std::array< int, dim > & coord() const
    Definition: yaspgridentityseed.hh:45
    \n-
    bool isValid() const
    check whether the EntitySeed refers to a valid Entity
    Definition: yaspgridentityseed.hh:39
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n+
    IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
    Map a subentity to an index.
    Definition: indexidset.hh:153
    \n+
    IndexTypeImp IndexType
    The type used for the indices.
    Definition: indexidset.hh:92
    \n+
    Implementation of Level- and LeafIndexSets for YaspGrid.
    Definition: yaspgridindexsets.hh:25
    \n+
    const std::vector< GeometryType > & geomTypes(int codim) const
    deliver all geometry types used in this grid
    Definition: yaspgridindexsets.hh:100
    \n+
    YaspIndexSet(const GridImp &g)
    Level grid view constructor stores reference to a grid and level.
    Definition: yaspgridindexsets.hh:47
    \n+
    YaspIndexSet(const GridImp &g, int l)
    Level grid view constructor stores reference to a grid and level.
    Definition: yaspgridindexsets.hh:35
    \n+
    IndexType index(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e) const
    get index of an entity
    Definition: yaspgridindexsets.hh:59
    \n+
    bool contains(const EntityType &e) const
    return true if the given entity is contained in .
    Definition: yaspgridindexsets.hh:90
    \n+
    std::size_t size(GeometryType type) const
    get number of entities of given type and level (the level is known to the object)
    Definition: yaspgridindexsets.hh:73
    \n+
    IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
    get index of subentity of an entity
    Definition: yaspgridindexsets.hh:66
    \n+
    std::vector< GeometryType > types(int codim) const
    Definition: yaspgridindexsets.hh:97
    \n+
    std::size_t size(int codim) const
    return size of set for a given codim
    Definition: yaspgridindexsets.hh:81
    \n+
    Base::IndexType IndexType
    Definition: yaspgridindexsets.hh:30
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,99 +5,174 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-yaspgridentityseed.hh\n+yaspgridindexsets.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRIDENTITYSEED_HH\n- 6#define DUNE_GRID_YASPGRIDENTITYSEED_HH\n+ 5#ifndef DUNE_GRID_YASPGRIDINDEXSET_HH\n+ 6#define DUNE_GRID_YASPGRIDINDEXSET_HH\n 7\n- 12namespace Dune {\n- 13\n- 16 template\n-17 class YaspEntitySeed\n- 18 {\n- 20 constexpr static int dim = GridImp::dimension;\n- 21\n- 22 public:\n-24 constexpr static int codimension = codim;\n- 25\n-27 YaspEntitySeed ()\n- 28 : _l(-1), _o(0)\n- 29 {\n- 30 std::fill(_c.begin(),_c.end(),0);\n- 31 }\n- 32\n-34 YaspEntitySeed (int level, std::array coord, int o = 0)\n- 35 : _l(level), _c(coord), _o(o)\n- 36 {}\n- 37\n-39 bool isValid() const\n- 40 {\n- 41 return _l != -1;\n- 42 }\n- 43\n-44 int level () const { return _l; }\n-45 const std::array & coord() const { return _c; }\n-46 int offset () const { return _o; }\n- 47\n- 48 protected:\n-49 int _l; // grid level\n-50 std::array _c; // coord in the global grid\n-51 int _o; // the offset: which YGridComponent, does the entity belong to\n- 52 };\n- 53\n- 54} // namespace Dune\n- 55\n- 56#endif // DUNE_GRID_YASPGRIDENTITYSEED_HH\n+ 14namespace Dune {\n+ 15\n+ 22 template\n+23 class YaspIndexSet\n+ 24 : public IndexSet< GridImp, YaspIndexSet< GridImp, isLeafIndexSet >,\n+unsigned int >\n+ 25 {\n+ 26 typedef YaspIndexSet<_GridImp,_isLeafIndexSet_> This;\n+ 27 typedef IndexSet<_GridImp,_This,_unsigned_int_> Base;\n+ 28\n+ 29 public:\n+30 typedef typename Base::IndexType IndexType;\n+ 31\n+ 32 using Base::subIndex;\n+ 33\n+35 YaspIndexSet ( const GridImp &g, int l )\n+ 36 : grid( g ),\n+ 37 level( l )\n+ 38 {\n+ 39 assert(not isLeafIndexSet);\n+ 40\n+ 41 // contains a single element type;\n+ 42 for (int codim=0; codim<=GridImp::dimension; codim++)\n+ 43 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));\n+ 44 }\n+ 45\n+47 YaspIndexSet ( const GridImp &g )\n+ 48 : grid( g )\n+ 49 {\n+ 50 assert(isLeafIndexSet);\n+ 51\n+ 52 // contains a single element type;\n+ 53 for (int codim=0; codim<=GridImp::dimension; codim++)\n+ 54 mytypes[codim].push_back(GeometryTypes::cube(GridImp::dimension-codim));\n+ 55 }\n+ 56\n+ 58 template\n+59 IndexType index (const typename std::remove_const::type::Traits::\n+template Codim::Entity& e) const\n+ 60 {\n+ 61 return e.impl().compressedIndex();\n+ 62 }\n+ 63\n+ 65 template< int cc >\n+66 IndexType subIndex ( const typename std::remove_const< GridImp >::type::\n+Traits::template Codim< cc >::Entity &e,\n+ 67 int i, unsigned int codim ) const\n+ 68 {\n+ 69 return e.impl().subCompressedIndex(i, codim);\n+ 70 }\n+ 71\n+73 std::size_t size (GeometryType type) const\n+ 74 {\n+ 75 return (isLeafIndexSet)\n+ 76 ? grid.size( type )\n+ 77 : grid.size( level, type );\n+ 78 }\n+ 79\n+81 std::size_t size (int codim) const\n+ 82 {\n+ 83 return (isLeafIndexSet)\n+ 84 ? grid.size( codim )\n+ 85 : grid.size( level, codim );\n+ 86 }\n+ 87\n+ 89 template\n+90 bool contains (const EntityType& e) const\n+ 91 {\n+ 92 return (isLeafIndexSet)\n+ 93 ? e.level() == grid.maxLevel()\n+ 94 : e.level() == level;\n+ 95 }\n+ 96\n+97 std::vector< GeometryType > types ( int codim ) const { return mytypes\n+[ codim ]; }\n+ 98\n+100 const std::vector& geomTypes (int codim) const\n+ 101 {\n+ 102 return mytypes[codim];\n+ 103 }\n+ 104\n+ 105 private:\n+ 106 const GridImp& grid;\n+ 107 int level;\n+ 108 std::vector mytypes[std::remove_const::type::\n+dimension+1];\n+ 109 };\n+ 110\n+ 111} // namespace Dune\n+ 112\n+ 113#endif // DUNE_GRID_YASPGRIDINDEXSET_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::YaspEntitySeed\n-Describes the minimal information necessary to create a fully functional\n-YaspEntity.\n-Definition: yaspgridentityseed.hh:18\n-Dune::YaspEntitySeed::_o\n-int _o\n-Definition: yaspgridentityseed.hh:51\n-Dune::YaspEntitySeed::_c\n-std::array< int, dim > _c\n-Definition: yaspgridentityseed.hh:50\n-Dune::YaspEntitySeed::_l\n-int _l\n-Definition: yaspgridentityseed.hh:49\n-Dune::YaspEntitySeed::level\n-int level() const\n-Definition: yaspgridentityseed.hh:44\n-Dune::YaspEntitySeed::YaspEntitySeed\n-YaspEntitySeed()\n-default construct an invalid entity seed\n-Definition: yaspgridentityseed.hh:27\n-Dune::YaspEntitySeed::YaspEntitySeed\n-YaspEntitySeed(int level, std::array< int, dim > coord, int o=0)\n-constructor\n-Definition: yaspgridentityseed.hh:34\n-Dune::YaspEntitySeed::offset\n-int offset() const\n-Definition: yaspgridentityseed.hh:46\n-Dune::YaspEntitySeed::codimension\n-static constexpr int codimension\n-codimension of entity\n-Definition: yaspgridentityseed.hh:24\n-Dune::YaspEntitySeed::coord\n-const std::array< int, dim > & coord() const\n-Definition: yaspgridentityseed.hh:45\n-Dune::YaspEntitySeed::isValid\n-bool isValid() const\n-check whether the EntitySeed refers to a valid Entity\n-Definition: yaspgridentityseed.hh:39\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::IndexSet\n+Index Set Interface base class.\n+Definition: indexidset.hh:78\n+Dune::IndexSet::subIndex\n+IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int\n+i, unsigned int codim) const\n+Map a subentity to an index.\n+Definition: indexidset.hh:153\n+Dune::IndexSet::IndexType\n+IndexTypeImp IndexType\n+The type used for the indices.\n+Definition: indexidset.hh:92\n+Dune::YaspIndexSet\n+Implementation of Level- and LeafIndexSets for YaspGrid.\n+Definition: yaspgridindexsets.hh:25\n+Dune::YaspIndexSet::geomTypes\n+const std::vector< GeometryType > & geomTypes(int codim) const\n+deliver all geometry types used in this grid\n+Definition: yaspgridindexsets.hh:100\n+Dune::YaspIndexSet::YaspIndexSet\n+YaspIndexSet(const GridImp &g)\n+Level grid view constructor stores reference to a grid and level.\n+Definition: yaspgridindexsets.hh:47\n+Dune::YaspIndexSet::YaspIndexSet\n+YaspIndexSet(const GridImp &g, int l)\n+Level grid view constructor stores reference to a grid and level.\n+Definition: yaspgridindexsets.hh:35\n+Dune::YaspIndexSet::index\n+IndexType index(const typename std::remove_const< GridImp >::type::Traits::\n+template Codim< cc >::Entity &e) const\n+get index of an entity\n+Definition: yaspgridindexsets.hh:59\n+Dune::YaspIndexSet::contains\n+bool contains(const EntityType &e) const\n+return true if the given entity is contained in .\n+Definition: yaspgridindexsets.hh:90\n+Dune::YaspIndexSet::size\n+std::size_t size(GeometryType type) const\n+get number of entities of given type and level (the level is known to the\n+object)\n+Definition: yaspgridindexsets.hh:73\n+Dune::YaspIndexSet::subIndex\n+IndexType subIndex(const typename std::remove_const< GridImp >::type::Traits::\n+template Codim< cc >::Entity &e, int i, unsigned int codim) const\n+get index of subentity of an entity\n+Definition: yaspgridindexsets.hh:66\n+Dune::YaspIndexSet::types\n+std::vector< GeometryType > types(int codim) const\n+Definition: yaspgridindexsets.hh:97\n+Dune::YaspIndexSet::size\n+std::size_t size(int codim) const\n+return size of set for a given codim\n+Definition: yaspgridindexsets.hh:81\n+Dune::YaspIndexSet::IndexType\n+Base::IndexType IndexType\n+Definition: yaspgridindexsets.hh:30\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00293.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00293.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: datahandleif.hh File Reference\n+dune-grid: entityiterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,42 +65,39 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n \n-
    datahandleif.hh File Reference
    \n+
    entityiterator.hh File Reference
    \n
    \n
    \n-\n-

    Describes the parallel communication interface class for MessageBuffers and DataHandles. \n-More...

    \n-
    #include <dune/common/bartonnackmanifcheck.hh>
    \n+
    #include <cstddef>
    \n+#include <iterator>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n-\n-\n+\n \n

    \n 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::EntityIterator< codim, Grid, IteratorImp >
     interface class for an iterator over grid entities More...
     
    class  Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >
     CommDataHandleIF describes the features of a data handle for communication in parallel runs using the Grid::communicate methods. Here the Barton-Nackman trick is used to interprete data handle objects as its interface. Therefore usable data handle classes need to be derived from this class. More...
    struct  std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
     
    \n \n \n \n \n+\n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  std
     STL namespace.
     
    \n-

    Detailed Description

    \n-

    Describes the parallel communication interface class for MessageBuffers and DataHandles.

    \n-
    Author
    Robert Kloefkorn
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,41 +6,28 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n Classes | Namespaces\n-datahandleif.hh File Reference\n-Describes the parallel communication interface class for MessageBuffers and\n-DataHandles. More...\n-#include \n+entityiterator.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::MessageBufferIF<_MessageBufferImp_>\n- Communication message buffer interface. This class describes the\n- interface for reading and writing data to the communication message\n- buffer. As message buffers might be deeply implemented in various\n-\u00a0 packages the message buffers implementations cannot be derived from\n- this interface class. Therefore we just apply the engine concept to\n- wrap the message buffer call and make sure that the interface is\n- fulfilled. More...\n+ class \u00a0Dune::EntityIterator<_codim,_Grid,_IteratorImp_>\n+\u00a0 interface class for an iterator over grid entities More...\n \u00a0\n-class \u00a0Dune::CommDataHandleIF<_DataHandleImp,_DataTypeImp_>\n- CommDataHandleIF describes the features of a data handle for\n- communication in parallel runs using the Grid::communicate methods.\n-\u00a0 Here the Barton-Nackman trick is used to interprete data handle objects\n- as its interface. Therefore usable data handle classes need to be\n- derived from this class. More...\n+struct \u00a0std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>\n+ >\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Describes the parallel communication interface class for MessageBuffers and\n-DataHandles.\n- Author\n- Robert Kloefkorn\n+namespace \u00a0std\n+\u00a0 STL namespace.\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00293_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: datahandleif.hh Source File\n+dune-grid: entityiterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,177 +62,163 @@\n \n
    \n \n
    \n \n
    \n-
    datahandleif.hh
    \n+
    entityiterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH
    \n-
    6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH
    \n+
    5#ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH
    \n+
    6#define DUNE_GRID_COMMON_ENTITYITERATOR_HH
    \n
    7
    \n-
    14#include <dune/common/bartonnackmanifcheck.hh>
    \n-
    15
    \n-
    16namespace Dune
    \n-
    17{
    \n-
    18
    \n-
    31 template <class MessageBufferImp>
    \n-\n-
    33 {
    \n-
    34 MessageBufferImp & buff_;
    \n-
    35 public:
    \n-
    37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}
    \n-
    38
    \n-
    44 template <class T>
    \n-
    45 void write(const T & val)
    \n-
    46 {
    \n-
    47 buff_.write(val);
    \n-
    48 }
    \n-
    49
    \n-
    58 template <class T>
    \n-
    59 void read(T & val)
    \n-
    60 {
    \n-
    61 buff_.read(val);
    \n-
    62 }
    \n-
    63 }; // end class MessageBufferIF
    \n-
    64
    \n-
    65
    \n-
    76 template <class DataHandleImp, class DataTypeImp>
    \n-\n-
    78 {
    \n-
    79 template <class M>
    \n-
    80 class CheckFixedSizeMethod
    \n-
    81 {
    \n-
    82 // check for old signature of deprecated fixedsize method.
    \n-
    83 template <class T>
    \n-
    84 static std::true_type testSignature(bool (T::*)(int, int) const);
    \n-
    85
    \n-
    86 template <class T>
    \n-
    87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t);
    \n-
    88
    \n-
    89 template <class T>
    \n-
    90 static std::false_type test(...);
    \n+
    8#include <cstddef>
    \n+
    9#include <iterator>
    \n+
    10
    \n+
    11namespace Dune
    \n+
    12{
    \n+
    13
    \n+
    30 template< int codim, class Grid, class IteratorImp >
    \n+\n+
    32 {
    \n+
    33 protected:
    \n+
    34 IteratorImp realIterator;
    \n+
    35
    \n+
    36 public:
    \n+
    42 typedef IteratorImp Implementation;
    \n+
    43
    \n+\n+
    55 const Implementation &impl () const { return realIterator; }
    \n+
    56
    \n+
    57 typedef typename Grid::template Codim< codim >::Entity Entity;
    \n+
    58
    \n+
    60 typedef typename std::conditional<
    \n+
    61 std::is_lvalue_reference<
    \n+
    62 decltype(realIterator.dereference())
    \n+
    63 >::value,
    \n+
    64 const Entity&,
    \n+
    65 Entity
    \n+
    66 >::type Reference;
    \n+
    67
    \n+\n+
    70 {
    \n+
    71 realIterator.increment();
    \n+
    72 return *this;
    \n+
    73 }
    \n+
    74
    \n+\n+
    77 {
    \n+
    78 EntityIterator tmp(*this);
    \n+
    79 realIterator.increment();
    \n+
    80 return tmp;
    \n+
    81 }
    \n+
    82
    \n+
    83 // The behavior when dereferencing the EntityIterator facade depends on
    \n+
    84 // the way the grid implementation handles returning entities. The implementation
    \n+
    85 // may either return a reference to an entity stored inside the EntityIterator
    \n+
    86 // implementation or a temporary Entity object. This object has to be forwarded through
    \n+
    87 // the facade to the user, which requires a little trickery, especially for operator->().
    \n+
    88 //
    \n+
    89 // In order to avoid confusing users reading the Doxygen documentation, we provide "clean"
    \n+
    90 // function signatures to Doxygen and hide the actual implementations.
    \n
    91
    \n-
    92 using type = decltype(test<M>(nullptr));
    \n-
    93 public:
    \n-
    94 static const bool value = type::value;
    \n-
    95 };
    \n-
    96
    \n+
    92
    \n+
    93#ifdef DOXYGEN
    \n+
    94
    \n+
    96 const Entity& operator*() const;
    \n
    97
    \n-
    98 template <class DH, bool>
    \n-
    99 struct CallFixedSize
    \n-
    100 {
    \n-
    101 static bool fixedSize( const DH& dh, int dim, int codim )
    \n-
    102 {
    \n-
    103 return dh.fixedSize( dim, codim );
    \n-
    104 }
    \n-
    105 };
    \n-
    106
    \n-
    107 // old, deprecated implementation
    \n-
    108 template <class DH>
    \n-
    109 struct CallFixedSize< DH, true >
    \n-
    110 {
    \n-
    111 static bool fixedSize( const DH& dh, int dim, int codim )
    \n-
    112 {
    \n-
    113 return dh.overloaded_deprecated_fixedsize( dim, codim );
    \n-
    114 }
    \n-
    115 };
    \n-
    116
    \n-
    117 public:
    \n-
    119 typedef DataTypeImp DataType;
    \n-
    120
    \n-
    121 protected:
    \n-
    122 // one should not create an explicit instance of this interface object
    \n-\n+
    99 const Entity& operator->() const;
    \n+
    100
    \n+
    101#else // DOXYGEN
    \n+
    102
    \n+
    104 typename std::conditional<
    \n+
    105 std::is_lvalue_reference<
    \n+
    106 decltype(realIterator.dereference())
    \n+
    107 >::value,
    \n+
    108 const Entity&,
    \n+
    109 Entity
    \n+
    110 >::type
    \n+
    111 operator*() const
    \n+
    112 {
    \n+
    113 return realIterator.dereference();
    \n+
    114 }
    \n+
    115
    \n+
    117 decltype(handle_proxy_member_access(realIterator.dereference()))
    \n+
    118 operator->() const
    \n+
    119 {
    \n+
    120 return handle_proxy_member_access(realIterator.dereference());
    \n+
    121 }
    \n+
    122
    \n+
    123#endif // DOXYGEN
    \n
    124
    \n-
    125 public:
    \n-
    131 bool contains (int dim, int codim) const
    \n-
    132 {
    \n-
    133 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));
    \n-
    134 return asImp().contains(dim,codim);
    \n-
    135 }
    \n-
    136
    \n-
    147 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
    \n-
    148 int fixedsize (int dim, int codim) const
    \n-
    149 {
    \n-
    150 return int(fixedSize( dim, codim ));
    \n-
    151 }
    \n-
    152
    \n-
    153 // if this deprecation appears then the DataHandle implementation
    \n-
    154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize'
    \n-
    155 // method.
    \n-
    156 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
    \n-
    157 bool overloaded_deprecated_fixedsize( int dim, int codim ) const
    \n-
    158 {
    \n-
    159 return asImp().fixedsize( dim, codim );
    \n-
    160 }
    \n-
    161
    \n-
    169 bool fixedSize (int dim, int codim) const
    \n-
    170 {
    \n-
    171 // this should be enabled once the old fixedsize is removed
    \n-
    172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim)));
    \n-
    173 return CallFixedSize< DataHandleImp,
    \n-
    174 CheckFixedSizeMethod< DataHandleImp >::value >::fixedSize( asImp(), dim, codim );
    \n-
    175 }
    \n-
    176
    \n-
    181 template<class EntityType>
    \n-
    182 size_t size (const EntityType& e) const
    \n-
    183 {
    \n-
    184 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));
    \n-
    185 return asImp().size(e);
    \n-
    186 }
    \n-
    187
    \n-
    192 template<class MessageBufferImp, class EntityType>
    \n-
    193 void gather (MessageBufferImp& buff, const EntityType& e) const
    \n-
    194 {
    \n-\n-
    196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));
    \n-
    197 }
    \n-
    198
    \n-
    206 template<class MessageBufferImp, class EntityType>
    \n-
    207 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)
    \n-
    208 {
    \n-\n-
    210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));
    \n-
    211 }
    \n-
    212
    \n-
    213 private:
    \n-
    215 DataHandleImp& asImp () {return static_cast<DataHandleImp &> (*this);}
    \n-
    217 const DataHandleImp& asImp () const
    \n-
    218 {
    \n-
    219 return static_cast<const DataHandleImp &>(*this);
    \n-
    220 }
    \n-
    221 }; // end class CommDataHandleIF
    \n-
    222
    \n-
    223#undef CHECK_INTERFACE_IMPLEMENTATION
    \n-
    224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
    \n-
    225
    \n-
    226} // end namespace Dune
    \n-
    227#endif
    \n+
    125
    \n+
    127 bool operator==(const EntityIterator& rhs) const
    \n+
    128 {
    \n+
    129 return this->realIterator.equals(rhs.realIterator);
    \n+
    130 }
    \n+
    131
    \n+
    133 bool operator!=(const EntityIterator& rhs) const
    \n+
    134 {
    \n+
    135 return !this->realIterator.equals(rhs.realIterator);
    \n+
    136 }
    \n+
    137
    \n+
    138
    \n+\n+
    145 {}
    \n+
    146
    \n+
    148 EntityIterator ( const IteratorImp &imp )
    \n+
    149 : realIterator( imp )
    \n+
    150 {}
    \n+
    151
    \n+
    153 };
    \n+
    154
    \n+
    155} // namespace Dune
    \n+
    156
    \n+
    157namespace std
    \n+
    158{
    \n+
    159
    \n+
    160 template< int codim, class Grid, class IteratorImp >
    \n+
    161 struct iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
    \n+
    162 {
    \n+
    163 typedef ptrdiff_t difference_type;
    \n+
    164 typedef const typename IteratorImp::Entity value_type;
    \n+\n+\n+
    167 typedef forward_iterator_tag iterator_category;
    \n+
    168 };
    \n+
    169
    \n+
    170} // namespace std
    \n+
    171
    \n+
    172#endif // #ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH
    \n+
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Communication message buffer interface. This class describes the interface for reading and writing da...
    Definition: datahandleif.hh:33
    \n-
    MessageBufferIF(MessageBufferImp &buff)
    stores reference to original buffer buff
    Definition: datahandleif.hh:37
    \n-
    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
    \n-
    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
    \n-
    CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
    Definition: datahandleif.hh:78
    \n-
    CommDataHandleIF()
    Definition: datahandleif.hh:123
    \n-
    void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
    unpack data from message buffer to user.
    Definition: datahandleif.hh:207
    \n-
    int fixedsize(int dim, int codim) const
    returns true if size of data per entity of given dim and codim is a constant
    Definition: datahandleif.hh:148
    \n-
    bool contains(int dim, int codim) const
    returns true if data for given valid codim should be communicated
    Definition: datahandleif.hh:131
    \n-
    size_t size(const EntityType &e) const
    how many objects of type DataType have to be sent for a given entity
    Definition: datahandleif.hh:182
    \n-
    void gather(MessageBufferImp &buff, const EntityType &e) const
    pack data from user to message buffer
    Definition: datahandleif.hh:193
    \n-
    bool fixedSize(int dim, int codim) const
    returns true if size of data per entity of given dim and codim is a constant
    Definition: datahandleif.hh:169
    \n-
    DataTypeImp DataType
    data type of data to communicate
    Definition: datahandleif.hh:119
    \n-
    bool overloaded_deprecated_fixedsize(int dim, int codim) const
    Definition: datahandleif.hh:157
    \n+
    interface class for an iterator over grid entities
    Definition: entityiterator.hh:32
    \n+
    IteratorImp Implementation
    type of underlying implementation
    Definition: entityiterator.hh:42
    \n+
    Implementation & impl()
    access to the underlying implementation
    Definition: entityiterator.hh:49
    \n+
    IteratorImp realIterator
    Definition: entityiterator.hh:34
    \n+
    Grid::template Codim< codim >::Entity Entity
    Definition: entityiterator.hh:57
    \n+
    EntityIterator(const IteratorImp &imp)
    copy constructor from implementaton
    Definition: entityiterator.hh:148
    \n+
    const Entity & operator*() const
    Dereferencing operator.
    \n+
    bool operator!=(const EntityIterator &rhs) const
    Checks for inequality.
    Definition: entityiterator.hh:133
    \n+
    EntityIterator()
    default construct (undefined) iterator
    Definition: entityiterator.hh:144
    \n+
    EntityIterator & operator++()
    prefix increment operator
    Definition: entityiterator.hh:69
    \n+
    const Implementation & impl() const
    access to the underlying implementation
    Definition: entityiterator.hh:55
    \n+
    std::conditional< std::is_lvalue_reference< decltype(realIterator.dereference())>::value, constEntity &, Entity >::type Reference
    Type of the reference used when derefencing the Ptr.
    Definition: entityiterator.hh:66
    \n+
    bool operator==(const EntityIterator &rhs) const
    Checks for equality.
    Definition: entityiterator.hh:127
    \n+
    const Entity & operator->() const
    Pointer operator.
    \n+
    const IteratorImp::Entity value_type
    Definition: entityiterator.hh:164
    \n+
    forward_iterator_tag iterator_category
    Definition: entityiterator.hh:167
    \n+\n+\n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,220 +5,220 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n-datahandleif.hh\n+entityiterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH\n- 6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH\n+ 5#ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH\n+ 6#define DUNE_GRID_COMMON_ENTITYITERATOR_HH\n 7\n- 14#include \n- 15\n- 16namespace Dune\n- 17{\n- 18\n- 31 template \n-32 class MessageBufferIF\n- 33 {\n- 34 MessageBufferImp & buff_;\n- 35 public:\n-37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}\n- 38\n- 44 template \n-45 void write(const T & val)\n- 46 {\n- 47 buff_.write(val);\n- 48 }\n- 49\n- 58 template \n-59 void read(T & val)\n- 60 {\n- 61 buff_.read(val);\n- 62 }\n- 63 }; // end class MessageBufferIF\n- 64\n- 65\n- 76 template \n-77 class CommDataHandleIF\n- 78 {\n- 79 template \n- 80 class CheckFixedSizeMethod\n- 81 {\n- 82 // check for old signature of deprecated fixedsize method.\n- 83 template \n- 84 static std::true_type testSignature(bool (T::*)(int, int) const);\n- 85\n- 86 template \n- 87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t);\n- 88\n- 89 template \n- 90 static std::false_type test(...);\n+ 8#include \n+ 9#include \n+ 10\n+ 11namespace Dune\n+ 12{\n+ 13\n+ 30 template< int codim, class Grid, class IteratorImp >\n+31 class EntityIterator\n+ 32 {\n+ 33 protected:\n+34 IteratorImp realIterator;\n+ 35\n+ 36 public:\n+42 typedef IteratorImp Implementation;\n+ 43\n+49 Implementation &impl () { return realIterator; }\n+55 const Implementation &impl () const { return realIterator; }\n+ 56\n+57 typedef typename Grid::template Codim< codim >::Entity Entity;\n+ 58\n+ 60 typedef typename std::conditional<\n+ 61 std::is_lvalue_reference<\n+ 62 decltype(realIterator.dereference())\n+ 63 >::value,\n+ 64 const Entity&,\n+ 65 Entity\n+66 >::type Reference;\n+ 67\n+69 EntityIterator &operator++()\n+ 70 {\n+ 71 realIterator.increment();\n+ 72 return *this;\n+ 73 }\n+ 74\n+76 EntityIterator operator++(int)\n+ 77 {\n+ 78 EntityIterator tmp(*this);\n+ 79 realIterator.increment();\n+ 80 return tmp;\n+ 81 }\n+ 82\n+ 83 // The behavior when dereferencing the EntityIterator facade depends on\n+ 84 // the way the grid implementation handles returning entities. The\n+implementation\n+ 85 // may either return a reference to an entity stored inside the\n+EntityIterator\n+ 86 // implementation or a temporary Entity object. This object has to be\n+forwarded through\n+ 87 // the facade to the user, which requires a little trickery, especially for\n+operator->().\n+ 88 //\n+ 89 // In order to avoid confusing users reading the Doxygen documentation, we\n+provide \"clean\"\n+ 90 // function signatures to Doxygen and hide the actual implementations.\n 91\n- 92 using type = decltype(test(nullptr));\n- 93 public:\n- 94 static const bool value = type::value;\n- 95 };\n- 96\n+ 92\n+ 93#ifdef DOXYGEN\n+ 94\n+96 const Entity& operator*() const;\n 97\n- 98 template \n- 99 struct CallFixedSize\n- 100 {\n- 101 static bool fixedSize( const DH& dh, int dim, int codim )\n- 102 {\n- 103 return dh.fixedSize( dim, codim );\n- 104 }\n- 105 };\n- 106\n- 107 // old, deprecated implementation\n- 108 template \n- 109 struct CallFixedSize< DH, true >\n- 110 {\n- 111 static bool fixedSize( const DH& dh, int dim, int codim )\n+99 const Entity& operator->() const;\n+ 100\n+ 101#else // DOXYGEN\n+ 102\n+ 104 typename std::conditional<\n+ 105 std::is_lvalue_reference<\n+ 106 decltype(realIterator.dereference())\n+ 107 >::value,\n+ 108 const Entity&,\n+ 109 Entity\n+ 110 >::type\n+ 111 operator*() const\n 112 {\n- 113 return dh.overloaded_deprecated_fixedsize( dim, codim );\n+ 113 return realIterator.dereference();\n 114 }\n- 115 };\n- 116\n- 117 public:\n-119 typedef DataTypeImp DataType;\n- 120\n- 121 protected:\n- 122 // one should not create an explicit instance of this interface object\n-123 CommDataHandleIF() {}\n+ 115\n+ 117 decltype(handle_proxy_member_access(realIterator.dereference()))\n+ 118 operator->() const\n+ 119 {\n+ 120 return handle_proxy_member_access(realIterator.dereference());\n+ 121 }\n+ 122\n+ 123#endif // DOXYGEN\n 124\n- 125 public:\n-131 bool contains (int dim, int codim) const\n- 132 {\n- 133 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));\n- 134 return asImp().contains(dim,codim);\n- 135 }\n- 136\n- 147 [[deprecated(\"fixedsize (lower case s) will be removed after release 2.8.\n-Implement and call fixedSize (camelCase) instead!\")]]\n-148 int fixedsize (int dim, int codim) const\n- 149 {\n- 150 return int(fixedSize( dim, codim ));\n- 151 }\n- 152\n- 153 // if this deprecation appears then the DataHandle implementation\n- 154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize'\n- 155 // method.\n- 156 [[deprecated(\"fixedsize (lower case s) will be removed after release 2.8.\n-Implement and call fixedSize (camelCase) instead!\")]]\n-157 bool overloaded_deprecated_fixedsize( int dim, int codim ) const\n- 158 {\n- 159 return asImp().fixedsize( dim, codim );\n- 160 }\n- 161\n-169 bool fixedSize (int dim, int codim) const\n- 170 {\n- 171 // this should be enabled once the old fixedsize is removed\n- 172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim)));\n- 173 return CallFixedSize< DataHandleImp,\n- 174 CheckFixedSizeMethod< DataHandleImp >::value >::fixedSize( asImp(), dim,\n-codim );\n- 175 }\n- 176\n- 181 template\n-182 size_t size (const EntityType& e) const\n- 183 {\n- 184 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));\n- 185 return asImp().size(e);\n- 186 }\n- 187\n- 192 template\n-193 void gather (MessageBufferImp& buff, const EntityType& e) const\n- 194 {\n- 195 MessageBufferIF buffIF(buff);\n- 196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));\n- 197 }\n- 198\n- 206 template\n-207 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)\n- 208 {\n- 209 MessageBufferIF buffIF(buff);\n- 210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));\n- 211 }\n- 212\n- 213 private:\n- 215 DataHandleImp& asImp () {return static_cast (*this);}\n- 217 const DataHandleImp& asImp () const\n- 218 {\n- 219 return static_cast(*this);\n- 220 }\n- 221 }; // end class CommDataHandleIF\n- 222\n- 223#undef CHECK_INTERFACE_IMPLEMENTATION\n- 224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION\n- 225\n- 226} // end namespace Dune\n- 227#endif\n+ 125\n+127 bool operator==(const EntityIterator& rhs) const\n+ 128 {\n+ 129 return this->realIterator.equals(rhs.realIterator);\n+ 130 }\n+ 131\n+133 bool operator!=(const EntityIterator& rhs) const\n+ 134 {\n+ 135 return !this->realIterator.equals(rhs.realIterator);\n+ 136 }\n+ 137\n+ 138\n+144 EntityIterator ( )\n+ 145 {}\n+ 146\n+148 EntityIterator ( const IteratorImp &imp )\n+ 149 : realIterator( imp )\n+ 150 {}\n+ 151\n+ 153 };\n+ 154\n+ 155} // namespace Dune\n+ 156\n+ 157namespace std\n+ 158{\n+ 159\n+ 160 template< int codim, class Grid, class IteratorImp >\n+161 struct iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >\n+ 162 {\n+163 typedef ptrdiff_t difference_type;\n+164 typedef const typename IteratorImp::Entity value_type;\n+165 typedef value_type *pointer;\n+166 typedef value_type &reference;\n+167 typedef forward_iterator_tag iterator_category;\n+ 168 };\n+ 169\n+ 170} // namespace std\n+ 171\n+ 172#endif // #ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH\n+std\n+STL namespace.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::MessageBufferIF\n-Communication message buffer interface. This class describes the interface for\n-reading and writing da...\n-Definition: datahandleif.hh:33\n-Dune::MessageBufferIF::MessageBufferIF\n-MessageBufferIF(MessageBufferImp &buff)\n-stores reference to original buffer buff\n-Definition: datahandleif.hh:37\n-Dune::MessageBufferIF::write\n-void write(const T &val)\n-just wraps the call of the internal buffer method write which writes the data\n-of type T from the buff...\n-Definition: datahandleif.hh:45\n-Dune::MessageBufferIF::read\n-void read(T &val)\n-just wraps the call of the internal buffer method read which reads the data of\n-type T from the buffer...\n-Definition: datahandleif.hh:59\n-Dune::CommDataHandleIF\n-CommDataHandleIF describes the features of a data handle for communication in\n-parallel runs using the...\n-Definition: datahandleif.hh:78\n-Dune::CommDataHandleIF::CommDataHandleIF\n-CommDataHandleIF()\n-Definition: datahandleif.hh:123\n-Dune::CommDataHandleIF::scatter\n-void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)\n-unpack data from message buffer to user.\n-Definition: datahandleif.hh:207\n-Dune::CommDataHandleIF::fixedsize\n-int fixedsize(int dim, int codim) const\n-returns true if size of data per entity of given dim and codim is a constant\n-Definition: datahandleif.hh:148\n-Dune::CommDataHandleIF::contains\n-bool contains(int dim, int codim) const\n-returns true if data for given valid codim should be communicated\n-Definition: datahandleif.hh:131\n-Dune::CommDataHandleIF::size\n-size_t size(const EntityType &e) const\n-how many objects of type DataType have to be sent for a given entity\n-Definition: datahandleif.hh:182\n-Dune::CommDataHandleIF::gather\n-void gather(MessageBufferImp &buff, const EntityType &e) const\n-pack data from user to message buffer\n-Definition: datahandleif.hh:193\n-Dune::CommDataHandleIF::fixedSize\n-bool fixedSize(int dim, int codim) const\n-returns true if size of data per entity of given dim and codim is a constant\n-Definition: datahandleif.hh:169\n-Dune::CommDataHandleIF::DataType\n-DataTypeImp DataType\n-data type of data to communicate\n-Definition: datahandleif.hh:119\n-Dune::CommDataHandleIF::overloaded_deprecated_fixedsize\n-bool overloaded_deprecated_fixedsize(int dim, int codim) const\n-Definition: datahandleif.hh:157\n+Dune::EntityIterator\n+interface class for an iterator over grid entities\n+Definition: entityiterator.hh:32\n+Dune::EntityIterator::Implementation\n+IteratorImp Implementation\n+type of underlying implementation\n+Definition: entityiterator.hh:42\n+Dune::EntityIterator::impl\n+Implementation & impl()\n+access to the underlying implementation\n+Definition: entityiterator.hh:49\n+Dune::EntityIterator::realIterator\n+IteratorImp realIterator\n+Definition: entityiterator.hh:34\n+Dune::EntityIterator::Entity\n+Grid::template Codim< codim >::Entity Entity\n+Definition: entityiterator.hh:57\n+Dune::EntityIterator::EntityIterator\n+EntityIterator(const IteratorImp &imp)\n+copy constructor from implementaton\n+Definition: entityiterator.hh:148\n+Dune::EntityIterator::operator*\n+const Entity & operator*() const\n+Dereferencing operator.\n+Dune::EntityIterator::operator!=\n+bool operator!=(const EntityIterator &rhs) const\n+Checks for inequality.\n+Definition: entityiterator.hh:133\n+Dune::EntityIterator::EntityIterator\n+EntityIterator()\n+default construct (undefined) iterator\n+Definition: entityiterator.hh:144\n+Dune::EntityIterator::operator++\n+EntityIterator & operator++()\n+prefix increment operator\n+Definition: entityiterator.hh:69\n+Dune::EntityIterator::impl\n+const Implementation & impl() const\n+access to the underlying implementation\n+Definition: entityiterator.hh:55\n+Dune::EntityIterator::Reference\n+std::conditional< std::is_lvalue_reference< decltype(realIterator.dereference\n+())>::value, constEntity &, Entity >::type Reference\n+Type of the reference used when derefencing the Ptr.\n+Definition: entityiterator.hh:66\n+Dune::EntityIterator::operator==\n+bool operator==(const EntityIterator &rhs) const\n+Checks for equality.\n+Definition: entityiterator.hh:127\n+Dune::EntityIterator::operator->\n+const Entity & operator->() const\n+Pointer operator.\n+std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n+value_type\n+const IteratorImp::Entity value_type\n+Definition: entityiterator.hh:164\n+std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n+iterator_category\n+forward_iterator_tag iterator_category\n+Definition: entityiterator.hh:167\n+std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n+difference_type\n+ptrdiff_t difference_type\n+Definition: entityiterator.hh:163\n+std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n+reference\n+value_type & reference\n+Definition: entityiterator.hh:166\n+std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n+pointer\n+value_type * pointer\n+Definition: entityiterator.hh:165\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00320.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00320.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entityiterator.hh File Reference\n+dune-grid: exceptions.hh File Reference\n \n \n \n \n \n \n \n@@ -65,38 +65,32 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n \n-
    entityiterator.hh File Reference
    \n+
    exceptions.hh File Reference
    \n
    \n
    \n-
    #include <cstddef>
    \n-#include <iterator>
    \n+
    #include <dune/common/exceptions.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::EntityIterator< codim, Grid, IteratorImp >
     interface class for an iterator over grid entities More...
     
    struct  std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
    class  Dune::GridError
     Base class for exceptions in Dune grid modules. More...
     
    \n \n \n \n \n-\n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  std
     STL namespace.
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,28 +6,21 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n Classes | Namespaces\n-entityiterator.hh File Reference\n-#include \n-#include \n+exceptions.hh File Reference\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::EntityIterator<_codim,_Grid,_IteratorImp_>\n-\u00a0 interface class for an iterator over grid entities More...\n-\u00a0\n-struct \u00a0std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>\n- >\n+class \u00a0Dune::GridError\n+\u00a0 Base class for exceptions in Dune grid modules. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0std\n-\u00a0 STL namespace.\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00320_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00320_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entityiterator.hh Source File\n+dune-grid: exceptions.hh Source File\n \n \n \n \n \n \n \n@@ -62,163 +62,41 @@\n \n
    \n \n
    \n
    \n
    \n-
    entityiterator.hh
    \n+
    exceptions.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH
    \n-
    6#define DUNE_GRID_COMMON_ENTITYITERATOR_HH
    \n+
    5#ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH
    \n+
    6#define DUNE_GRID_COMMON_EXCEPTIONS_HH
    \n
    7
    \n-
    8#include <cstddef>
    \n-
    9#include <iterator>
    \n-
    10
    \n-
    11namespace Dune
    \n-
    12{
    \n-
    13
    \n-
    30 template< int codim, class Grid, class IteratorImp >
    \n-\n-
    32 {
    \n-
    33 protected:
    \n-
    34 IteratorImp realIterator;
    \n-
    35
    \n-
    36 public:
    \n-
    42 typedef IteratorImp Implementation;
    \n-
    43
    \n-\n-
    55 const Implementation &impl () const { return realIterator; }
    \n-
    56
    \n-
    57 typedef typename Grid::template Codim< codim >::Entity Entity;
    \n-
    58
    \n-
    60 typedef typename std::conditional<
    \n-
    61 std::is_lvalue_reference<
    \n-
    62 decltype(realIterator.dereference())
    \n-
    63 >::value,
    \n-
    64 const Entity&,
    \n-
    65 Entity
    \n-
    66 >::type Reference;
    \n-
    67
    \n-\n-
    70 {
    \n-
    71 realIterator.increment();
    \n-
    72 return *this;
    \n-
    73 }
    \n-
    74
    \n-\n-
    77 {
    \n-
    78 EntityIterator tmp(*this);
    \n-
    79 realIterator.increment();
    \n-
    80 return tmp;
    \n-
    81 }
    \n-
    82
    \n-
    83 // The behavior when dereferencing the EntityIterator facade depends on
    \n-
    84 // the way the grid implementation handles returning entities. The implementation
    \n-
    85 // may either return a reference to an entity stored inside the EntityIterator
    \n-
    86 // implementation or a temporary Entity object. This object has to be forwarded through
    \n-
    87 // the facade to the user, which requires a little trickery, especially for operator->().
    \n-
    88 //
    \n-
    89 // In order to avoid confusing users reading the Doxygen documentation, we provide "clean"
    \n-
    90 // function signatures to Doxygen and hide the actual implementations.
    \n-
    91
    \n-
    92
    \n-
    93#ifdef DOXYGEN
    \n-
    94
    \n-
    96 const Entity& operator*() const;
    \n-
    97
    \n-
    99 const Entity& operator->() const;
    \n-
    100
    \n-
    101#else // DOXYGEN
    \n-
    102
    \n-
    104 typename std::conditional<
    \n-
    105 std::is_lvalue_reference<
    \n-
    106 decltype(realIterator.dereference())
    \n-
    107 >::value,
    \n-
    108 const Entity&,
    \n-
    109 Entity
    \n-
    110 >::type
    \n-
    111 operator*() const
    \n-
    112 {
    \n-
    113 return realIterator.dereference();
    \n-
    114 }
    \n-
    115
    \n-
    117 decltype(handle_proxy_member_access(realIterator.dereference()))
    \n-
    118 operator->() const
    \n-
    119 {
    \n-
    120 return handle_proxy_member_access(realIterator.dereference());
    \n-
    121 }
    \n-
    122
    \n-
    123#endif // DOXYGEN
    \n-
    124
    \n-
    125
    \n-
    127 bool operator==(const EntityIterator& rhs) const
    \n-
    128 {
    \n-
    129 return this->realIterator.equals(rhs.realIterator);
    \n-
    130 }
    \n-
    131
    \n-
    133 bool operator!=(const EntityIterator& rhs) const
    \n-
    134 {
    \n-
    135 return !this->realIterator.equals(rhs.realIterator);
    \n-
    136 }
    \n-
    137
    \n-
    138
    \n-\n-
    145 {}
    \n-
    146
    \n-
    148 EntityIterator ( const IteratorImp &imp )
    \n-
    149 : realIterator( imp )
    \n-
    150 {}
    \n-
    151
    \n-
    153 };
    \n-
    154
    \n-
    155} // namespace Dune
    \n-
    156
    \n-
    157namespace std
    \n-
    158{
    \n-
    159
    \n-
    160 template< int codim, class Grid, class IteratorImp >
    \n-
    161 struct iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
    \n-
    162 {
    \n-
    163 typedef ptrdiff_t difference_type;
    \n-
    164 typedef const typename IteratorImp::Entity value_type;
    \n-\n-\n-
    167 typedef forward_iterator_tag iterator_category;
    \n-
    168 };
    \n-
    169
    \n-
    170} // namespace std
    \n-
    171
    \n-
    172#endif // #ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH
    \n-
    STL namespace.
    \n+
    8#include <dune/common/exceptions.hh>
    \n+
    9
    \n+
    10namespace Dune
    \n+
    11{
    \n+
    12
    \n+
    13 // GridError
    \n+
    14 // ---------
    \n+
    15
    \n+\n+
    19 : public Exception
    \n+
    20 {};
    \n+
    21
    \n+
    22}
    \n+
    23
    \n+
    24#endif // #ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    interface class for an iterator over grid entities
    Definition: entityiterator.hh:32
    \n-
    IteratorImp Implementation
    type of underlying implementation
    Definition: entityiterator.hh:42
    \n-
    Implementation & impl()
    access to the underlying implementation
    Definition: entityiterator.hh:49
    \n-
    IteratorImp realIterator
    Definition: entityiterator.hh:34
    \n-
    Grid::template Codim< codim >::Entity Entity
    Definition: entityiterator.hh:57
    \n-
    EntityIterator(const IteratorImp &imp)
    copy constructor from implementaton
    Definition: entityiterator.hh:148
    \n-
    const Entity & operator*() const
    Dereferencing operator.
    \n-
    bool operator!=(const EntityIterator &rhs) const
    Checks for inequality.
    Definition: entityiterator.hh:133
    \n-
    EntityIterator()
    default construct (undefined) iterator
    Definition: entityiterator.hh:144
    \n-
    EntityIterator & operator++()
    prefix increment operator
    Definition: entityiterator.hh:69
    \n-
    const Implementation & impl() const
    access to the underlying implementation
    Definition: entityiterator.hh:55
    \n-
    std::conditional< std::is_lvalue_reference< decltype(realIterator.dereference())>::value, constEntity &, Entity >::type Reference
    Type of the reference used when derefencing the Ptr.
    Definition: entityiterator.hh:66
    \n-
    bool operator==(const EntityIterator &rhs) const
    Checks for equality.
    Definition: entityiterator.hh:127
    \n-
    const Entity & operator->() const
    Pointer operator.
    \n-
    const IteratorImp::Entity value_type
    Definition: entityiterator.hh:164
    \n-
    forward_iterator_tag iterator_category
    Definition: entityiterator.hh:167
    \n-\n-\n-\n+
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,220 +5,41 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n-entityiterator.hh\n+exceptions.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH\n- 6#define DUNE_GRID_COMMON_ENTITYITERATOR_HH\n+ 5#ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH\n+ 6#define DUNE_GRID_COMMON_EXCEPTIONS_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11namespace Dune\n- 12{\n- 13\n- 30 template< int codim, class Grid, class IteratorImp >\n-31 class EntityIterator\n- 32 {\n- 33 protected:\n-34 IteratorImp realIterator;\n- 35\n- 36 public:\n-42 typedef IteratorImp Implementation;\n- 43\n-49 Implementation &impl () { return realIterator; }\n-55 const Implementation &impl () const { return realIterator; }\n- 56\n-57 typedef typename Grid::template Codim< codim >::Entity Entity;\n- 58\n- 60 typedef typename std::conditional<\n- 61 std::is_lvalue_reference<\n- 62 decltype(realIterator.dereference())\n- 63 >::value,\n- 64 const Entity&,\n- 65 Entity\n-66 >::type Reference;\n- 67\n-69 EntityIterator &operator++()\n- 70 {\n- 71 realIterator.increment();\n- 72 return *this;\n- 73 }\n- 74\n-76 EntityIterator operator++(int)\n- 77 {\n- 78 EntityIterator tmp(*this);\n- 79 realIterator.increment();\n- 80 return tmp;\n- 81 }\n- 82\n- 83 // The behavior when dereferencing the EntityIterator facade depends on\n- 84 // the way the grid implementation handles returning entities. The\n-implementation\n- 85 // may either return a reference to an entity stored inside the\n-EntityIterator\n- 86 // implementation or a temporary Entity object. This object has to be\n-forwarded through\n- 87 // the facade to the user, which requires a little trickery, especially for\n-operator->().\n- 88 //\n- 89 // In order to avoid confusing users reading the Doxygen documentation, we\n-provide \"clean\"\n- 90 // function signatures to Doxygen and hide the actual implementations.\n- 91\n- 92\n- 93#ifdef DOXYGEN\n- 94\n-96 const Entity& operator*() const;\n- 97\n-99 const Entity& operator->() const;\n- 100\n- 101#else // DOXYGEN\n- 102\n- 104 typename std::conditional<\n- 105 std::is_lvalue_reference<\n- 106 decltype(realIterator.dereference())\n- 107 >::value,\n- 108 const Entity&,\n- 109 Entity\n- 110 >::type\n- 111 operator*() const\n- 112 {\n- 113 return realIterator.dereference();\n- 114 }\n- 115\n- 117 decltype(handle_proxy_member_access(realIterator.dereference()))\n- 118 operator->() const\n- 119 {\n- 120 return handle_proxy_member_access(realIterator.dereference());\n- 121 }\n- 122\n- 123#endif // DOXYGEN\n- 124\n- 125\n-127 bool operator==(const EntityIterator& rhs) const\n- 128 {\n- 129 return this->realIterator.equals(rhs.realIterator);\n- 130 }\n- 131\n-133 bool operator!=(const EntityIterator& rhs) const\n- 134 {\n- 135 return !this->realIterator.equals(rhs.realIterator);\n- 136 }\n- 137\n- 138\n-144 EntityIterator ( )\n- 145 {}\n- 146\n-148 EntityIterator ( const IteratorImp &imp )\n- 149 : realIterator( imp )\n- 150 {}\n- 151\n- 153 };\n- 154\n- 155} // namespace Dune\n- 156\n- 157namespace std\n- 158{\n- 159\n- 160 template< int codim, class Grid, class IteratorImp >\n-161 struct iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >\n- 162 {\n-163 typedef ptrdiff_t difference_type;\n-164 typedef const typename IteratorImp::Entity value_type;\n-165 typedef value_type *pointer;\n-166 typedef value_type &reference;\n-167 typedef forward_iterator_tag iterator_category;\n- 168 };\n- 169\n- 170} // namespace std\n- 171\n- 172#endif // #ifndef DUNE_GRID_COMMON_ENTITYITERATOR_HH\n-std\n-STL namespace.\n+ 8#include \n+ 9\n+ 10namespace Dune\n+ 11{\n+ 12\n+ 13 // GridError\n+ 14 // ---------\n+ 15\n+18 class GridError\n+ 19 : public Exception\n+ 20 {};\n+ 21\n+ 22}\n+ 23\n+ 24#endif // #ifndef DUNE_GRID_COMMON_EXCEPTIONS_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::EntityIterator\n-interface class for an iterator over grid entities\n-Definition: entityiterator.hh:32\n-Dune::EntityIterator::Implementation\n-IteratorImp Implementation\n-type of underlying implementation\n-Definition: entityiterator.hh:42\n-Dune::EntityIterator::impl\n-Implementation & impl()\n-access to the underlying implementation\n-Definition: entityiterator.hh:49\n-Dune::EntityIterator::realIterator\n-IteratorImp realIterator\n-Definition: entityiterator.hh:34\n-Dune::EntityIterator::Entity\n-Grid::template Codim< codim >::Entity Entity\n-Definition: entityiterator.hh:57\n-Dune::EntityIterator::EntityIterator\n-EntityIterator(const IteratorImp &imp)\n-copy constructor from implementaton\n-Definition: entityiterator.hh:148\n-Dune::EntityIterator::operator*\n-const Entity & operator*() const\n-Dereferencing operator.\n-Dune::EntityIterator::operator!=\n-bool operator!=(const EntityIterator &rhs) const\n-Checks for inequality.\n-Definition: entityiterator.hh:133\n-Dune::EntityIterator::EntityIterator\n-EntityIterator()\n-default construct (undefined) iterator\n-Definition: entityiterator.hh:144\n-Dune::EntityIterator::operator++\n-EntityIterator & operator++()\n-prefix increment operator\n-Definition: entityiterator.hh:69\n-Dune::EntityIterator::impl\n-const Implementation & impl() const\n-access to the underlying implementation\n-Definition: entityiterator.hh:55\n-Dune::EntityIterator::Reference\n-std::conditional< std::is_lvalue_reference< decltype(realIterator.dereference\n-())>::value, constEntity &, Entity >::type Reference\n-Type of the reference used when derefencing the Ptr.\n-Definition: entityiterator.hh:66\n-Dune::EntityIterator::operator==\n-bool operator==(const EntityIterator &rhs) const\n-Checks for equality.\n-Definition: entityiterator.hh:127\n-Dune::EntityIterator::operator->\n-const Entity & operator->() const\n-Pointer operator.\n-std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n-value_type\n-const IteratorImp::Entity value_type\n-Definition: entityiterator.hh:164\n-std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n-iterator_category\n-forward_iterator_tag iterator_category\n-Definition: entityiterator.hh:167\n-std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n-difference_type\n-ptrdiff_t difference_type\n-Definition: entityiterator.hh:163\n-std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n-reference\n-value_type & reference\n-Definition: entityiterator.hh:166\n-std::iterator_traits<_Dune::EntityIterator<_codim,_Grid,_IteratorImp_>_>::\n-pointer\n-value_type * pointer\n-Definition: entityiterator.hh:165\n+Dune::GridError\n+Base class for exceptions in Dune grid modules.\n+Definition: exceptions.hh:20\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00323.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00323.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: scsgmapper.hh File Reference\n+dune-grid: adaptcallback.hh File Reference\n \n \n \n \n \n \n \n@@ -65,47 +65,43 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n \n-
    scsgmapper.hh File Reference
    \n+
    adaptcallback.hh File Reference
    \n
    \n
    \n \n-

    Mapper classes are used to attach data to a grid. \n+

    interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid \n More...

    \n-
    #include <iostream>
    \n-#include "mapper.hh"
    \n-#include <dune/grid/common/grid.hh>
    \n-
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n-\n-\n+\n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::SingleCodimSingleGeomTypeMapper< GV, c >
     Implementation class for a single codim and single geometry type mapper. More...
    class  Dune::AdaptDataHandleInterface< Grid, Impl >
     Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface. More...
     
    class  Dune::LeafSingleCodimSingleGeomTypeMapper< G, c >
     Single codim and single geometry type mapper for leaf entities. More...
    class  Dune::AdaptDataHandle< Grid, Impl >
     
    class  Dune::LevelSingleCodimSingleGeomTypeMapper< G, c >
     Single codim and single geometry type mapper for entities of one level. More...
    class  Dune::CombinedAdaptProlongRestrict< A, B >
     class for combining 2 index sets together for adaptation process More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    Mapper classes are used to attach data to a grid.

    \n-
    Author
    Peter Bastian
    \n+

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

    \n+
    Author
    Martin Nolte
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,36 +6,34 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n Classes | Namespaces\n-scsgmapper.hh File Reference\n-Mapper classes are used to attach data to a grid. More...\n-#include \n-#include \"mapper.hh\"\n-#include \n+adaptcallback.hh File Reference\n+interfaces and wrappers needed for the callback adaptation provided by\n+AlbertaGrid and dune-ALUGrid More...\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::SingleCodimSingleGeomTypeMapper<_GV,_c_>\n-\u00a0 Implementation class for a single codim and single geometry type\n- mapper. More...\n+class \u00a0Dune::AdaptDataHandleInterface<_Grid,_Impl_>\n+\u00a0 Interface class for the Grid's adapt method where the parameter is a\n+ AdaptDataHandleInterface. More...\n \u00a0\n-class \u00a0Dune::LeafSingleCodimSingleGeomTypeMapper<_G,_c_>\n-\u00a0 Single codim and single geometry type mapper for leaf entities. More...\n+class \u00a0Dune::AdaptDataHandle<_Grid,_Impl_>\n \u00a0\n-class \u00a0Dune::LevelSingleCodimSingleGeomTypeMapper<_G,_c_>\n-\u00a0 Single codim and single geometry type mapper for entities of one level.\n+class \u00a0Dune::CombinedAdaptProlongRestrict<_A,_B_>\n+\u00a0 class for combining 2 index sets together for adaptation process\n More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-Mapper classes are used to attach data to a grid.\n+interfaces and wrappers needed for the callback adaptation provided by\n+AlbertaGrid and dune-ALUGrid\n Author\n- Peter Bastian\n+ Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00323_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: scsgmapper.hh Source File\n+dune-grid: adaptcallback.hh Source File\n \n \n \n \n \n \n \n@@ -62,176 +62,157 @@\n \n
    \n \n
    \n
    \n
    \n-
    scsgmapper.hh
    \n+
    adaptcallback.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH
    \n-
    6#define DUNE_GRID_COMMON_SCSGMAPPER_HH
    \n+
    5#ifndef DUNE_GRID_COMMON_ADAPTCALLBACK_HH
    \n+
    6#define DUNE_GRID_COMMON_ADAPTCALLBACK_HH
    \n
    7
    \n-
    8#include <iostream>
    \n-
    9#include "mapper.hh"
    \n-
    10
    \n-\n-
    12
    \n-
    19namespace Dune
    \n-
    20{
    \n-
    37 template <typename GV, int c>
    \n-\n-
    39 public Mapper<typename GV::Grid,SingleCodimSingleGeomTypeMapper<GV,c>, typename GV::IndexSet::IndexType >
    \n-
    40 {
    \n-
    41 public:
    \n-
    42
    \n-
    44 typedef typename GV::IndexSet::IndexType Index;
    \n-
    45
    \n-
    50 using size_type = decltype(std::declval<typename GV::IndexSet>().size(0));
    \n-
    51
    \n-\n-
    57 : gridView_(gridView)
    \n-
    58 , indexSet_(&gridView_.indexSet())
    \n-
    59 {
    \n-
    60 // check that grid has only a single geometry type
    \n-
    61 if (indexSet_->types(c).size() != 1)
    \n-
    62 DUNE_THROW(GridError, "mapper treats only a single codim and a single geometry type");
    \n-
    63 }
    \n-
    64
    \n-
    70 template<class EntityType>
    \n-
    71 Index index (const EntityType& e) const
    \n-
    72 {
    \n-
    73 static_assert(EntityType::codimension == c, "Entity of wrong codim passed to SingleCodimSingleGeomTypeMapper");
    \n-
    74 return indexSet_->index(e);
    \n-
    75 }
    \n-
    76
    \n-
    84 Index subIndex (const typename GV::template Codim<0>::Entity& e,
    \n-
    85 int i, unsigned int codim) const
    \n-
    86 {
    \n-
    87 if (codim != c)
    \n-
    88 DUNE_THROW(GridError, "Id of wrong codim requested from SingleCodimSingleGeomTypeMapper");
    \n-
    89 return indexSet_->subIndex(e,i,codim);
    \n-
    90 }
    \n-
    91
    \n-\n-
    101 {
    \n-
    102 return indexSet_->size(c);
    \n-
    103 }
    \n-
    104
    \n-
    111 template<class EntityType>
    \n-
    112 bool contains (const EntityType& e, Index& result) const
    \n-
    113 {
    \n-
    114 result = index(e);
    \n-
    115 return true;
    \n-
    116 }
    \n-
    117
    \n-
    126 bool contains (const typename GV::template Codim<0>::Entity& e, int i, int cc, Index& result) const
    \n-
    127 {
    \n-
    128 result = subIndex(e,i,cc);
    \n-
    129 return true;
    \n-
    130 }
    \n-
    131
    \n-
    137 void update (const GV& gridView)
    \n+
    14namespace Dune
    \n+
    15{
    \n+
    16
    \n+
    17 // Internal Forward Declarations
    \n+
    18 // -----------------------------
    \n+
    19
    \n+
    20 template< class Grid, class Impl >
    \n+
    21 class AdaptDataHandle;
    \n+
    22
    \n+
    23
    \n+
    24
    \n+
    25 // AdaptDataHandleInterface
    \n+
    26 // ------------------------
    \n+
    27
    \n+
    31 template< class Grid, class Impl >
    \n+\n+
    33 {
    \n+\n+
    35
    \n+
    36 friend class AdaptDataHandle< Grid, Impl >;
    \n+
    37
    \n+
    38 public:
    \n+
    39 typedef typename Grid::template Codim< 0 >::Entity Entity;
    \n+
    40
    \n+
    41 private:
    \n+\n+
    43 {}
    \n+
    44
    \n+
    45 AdaptDataHandleInterface ( const This & );
    \n+
    46 This &operator= ( const This & );
    \n+
    47
    \n+
    48 public:
    \n+
    54 void preCoarsening ( const Entity &father )
    \n+
    55 {
    \n+
    56 asImp().preCoarsening( father );
    \n+
    57 }
    \n+
    58
    \n+
    64 void postRefinement ( const Entity &father )
    \n+
    65 {
    \n+
    66 asImp().postRefinement( father );
    \n+
    67 }
    \n+
    68
    \n+
    69 void restrictLocal( const Entity &father, const Entity& son, bool initialize )
    \n+
    70 {
    \n+
    71 asImp().restrictLocal( father, son, initialize );
    \n+
    72 }
    \n+
    73
    \n+
    74 void prolongLocal( const Entity &father, const Entity& son, bool initialize )
    \n+
    75 {
    \n+
    76 asImp().prolongLocal( father, son, initialize );
    \n+
    77 }
    \n+
    78
    \n+
    79 protected:
    \n+
    80 const Impl &asImp () const { return static_cast< const Impl & >( *this ); }
    \n+
    81 Impl &asImp () { return static_cast< Impl & >( *this ); }
    \n+
    82 };
    \n+
    83
    \n+
    84
    \n+
    85
    \n+
    86 // AdaptDataHandle
    \n+
    87 // ---------------
    \n+
    88
    \n+
    89 template< class Grid, class Impl >
    \n+\n+
    91 : public AdaptDataHandleInterface< Grid, Impl >
    \n+
    92 {
    \n+\n+\n+
    95
    \n+
    96 public:
    \n+
    97 typedef typename Base::Entity Entity;
    \n+
    98
    \n+
    99 protected:
    \n+\n+
    101 {}
    \n+
    102
    \n+
    103 private:
    \n+
    104 AdaptDataHandle ( const This & );
    \n+
    105 This &operator= ( const This & );
    \n+
    106
    \n+
    107 void preCoarsening ( const Entity &father );
    \n+
    108 void postRefinement ( const Entity &father );
    \n+
    109 };
    \n+
    110
    \n+
    111
    \n+
    112 // CombinedAdaptProlongRestrict
    \n+
    113 // ----------------------------
    \n+
    114
    \n+
    116 template <class A, class B >
    \n+\n+
    118 {
    \n+
    120 A& _a;
    \n+
    121 B& _b;
    \n+
    122 public:
    \n+
    124 CombinedAdaptProlongRestrict ( A& a, B& b ) : _a ( a ) , _b ( b )
    \n+
    125 {}
    \n+
    126
    \n+
    128 template <class Entity>
    \n+
    129 void restrictLocal ( const Entity &father, const Entity &son, bool initialize )
    \n+
    130 {
    \n+
    131 _a.restrictLocal(father,son,initialize);
    \n+
    132 _b.restrictLocal(father,son,initialize);
    \n+
    133 }
    \n+
    134
    \n+
    136 template <class Entity>
    \n+
    137 void prolongLocal ( const Entity &father, const Entity &son, bool initialize )
    \n
    138 {
    \n-
    139 gridView_ = gridView;
    \n-
    140 indexSet_ = &gridView_.indexSet();
    \n+
    139 _a.prolongLocal(father,son,initialize);
    \n+
    140 _b.prolongLocal(father,son,initialize);
    \n
    141 }
    \n-
    142
    \n-
    148 void update (GV&& gridView)
    \n-
    149 {
    \n-
    150 gridView_ = std::move(gridView);
    \n-
    151 indexSet_ = &gridView_.indexSet();
    \n-
    152 }
    \n-
    153
    \n-
    156 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8.")]]
    \n-
    157 void update ()
    \n-
    158 { // nothing to do here
    \n-
    159 }
    \n-
    160
    \n-
    161 private:
    \n-
    162 GV gridView_;
    \n-
    163 const typename GV::IndexSet* indexSet_;
    \n-
    164 };
    \n-
    165
    \n-
    184 template <typename G, int c>
    \n-
    185 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
    \n-
    186 LeafSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LeafGridView,c> {
    \n-\n-
    188 public:
    \n-\n-
    193 : Base(grid.leafGridView())
    \n-
    194 , gridPtr_(&grid)
    \n-
    195 {}
    \n-
    196
    \n-
    202 void update ()
    \n-
    203 {
    \n-
    204 Base::update(gridPtr_->leafGridView());
    \n-
    205 }
    \n-
    206
    \n-
    207 private:
    \n-
    208 const G* gridPtr_;
    \n-
    209 };
    \n-
    210
    \n-
    222 template <typename G, int c>
    \n-
    223 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
    \n-
    224 LevelSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LevelGridView,c> {
    \n-\n-
    226 public:
    \n-
    227 /* @brief The constructor
    \n-
    228 @param grid A reference to a grid.
    \n-
    229 @param level A valid level of the grid.
    \n-
    230 */
    \n-
    231 LevelSingleCodimSingleGeomTypeMapper (const G& grid, int level)
    \n-
    232 : Base(grid.levelGridView(level))
    \n-
    233 , gridPtr_(&grid)
    \n-
    234 , level_(level)
    \n-
    235 {}
    \n-
    236
    \n-
    242 void update ()
    \n-
    243 {
    \n-
    244 Base::update(gridPtr_->levelGridView(level_));
    \n-
    245 }
    \n-
    246
    \n-
    247 private:
    \n-
    248 const G* gridPtr_;
    \n-
    249 int level_;
    \n-
    250 };
    \n-
    251
    \n-
    253}
    \n-
    254#endif
    \n-
    Provides classes with basic mappers which are used to attach data to a grid.
    \n-
    Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
    leaf grid view for the given grid
    Definition: common/grid.hh:819
    \n-
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n+
    142 };
    \n+
    143
    \n+
    144} // end namespace Dune
    \n+
    145
    \n+
    146#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n-
    Mapper interface.
    Definition: mapper.hh:110
    \n-
    Implementation class for a single codim and single geometry type mapper.
    Definition: scsgmapper.hh:40
    \n-
    bool contains(const EntityType &e, Index &result) const
    Returns true if the entity is contained in the index set.
    Definition: scsgmapper.hh:112
    \n-
    GV::IndexSet::IndexType Index
    Number type used for indices.
    Definition: scsgmapper.hh:44
    \n-
    bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc, Index &result) const
    Returns true if the entity is contained in the index set.
    Definition: scsgmapper.hh:126
    \n-
    decltype(std::declval< typename GV::IndexSet >().size(0)) size_type
    Number type used for the overall size (the return value of the 'size' method)
    Definition: scsgmapper.hh:50
    \n-
    Index index(const EntityType &e) const
    Map entity to array index.
    Definition: scsgmapper.hh:71
    \n-
    Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
    Map subentity of codim 0 entity to array index.
    Definition: scsgmapper.hh:84
    \n-
    SingleCodimSingleGeomTypeMapper(const GV &gridView)
    Construct mapper from grid and one of its index sets.
    Definition: scsgmapper.hh:56
    \n-
    void update(GV &&gridView)
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:148
    \n-
    size_type size() const
    Return total number of entities in the entity set managed by the mapper.
    Definition: scsgmapper.hh:100
    \n-
    void update()
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:157
    \n-
    void update(const GV &gridView)
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:137
    \n-
    Single codim and single geometry type mapper for leaf entities.
    Definition: scsgmapper.hh:186
    \n-
    LeafSingleCodimSingleGeomTypeMapper(const G &grid)
    The constructor.
    Definition: scsgmapper.hh:192
    \n-
    void update()
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:202
    \n-
    Single codim and single geometry type mapper for entities of one level.
    Definition: scsgmapper.hh:224
    \n-
    LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level)
    Definition: scsgmapper.hh:231
    \n-
    void update()
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:242
    \n-
    Different resources needed by all grid implementations.
    \n+
    Definition: adaptcallback.hh:92
    \n+
    Base::Entity Entity
    Definition: adaptcallback.hh:97
    \n+
    AdaptDataHandle()
    Definition: adaptcallback.hh:100
    \n+
    Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
    Definition: adaptcallback.hh:33
    \n+
    void prolongLocal(const Entity &father, const Entity &son, bool initialize)
    Definition: adaptcallback.hh:74
    \n+
    void postRefinement(const Entity &father)
    call back for activity to take place on newly created elements below the father element.
    Definition: adaptcallback.hh:64
    \n+
    Grid::template Codim< 0 >::Entity Entity
    Definition: adaptcallback.hh:39
    \n+
    Impl & asImp()
    Definition: adaptcallback.hh:81
    \n+
    const Impl & asImp() const
    Definition: adaptcallback.hh:80
    \n+
    void restrictLocal(const Entity &father, const Entity &son, bool initialize)
    Definition: adaptcallback.hh:69
    \n+
    void preCoarsening(const Entity &father)
    call back for activity to take place on father and all descendants before the descendants are removed
    Definition: adaptcallback.hh:54
    \n+
    class for combining 2 index sets together for adaptation process
    Definition: adaptcallback.hh:118
    \n+
    CombinedAdaptProlongRestrict(A &a, B &b)
    constructor storing the two references
    Definition: adaptcallback.hh:124
    \n+
    void restrictLocal(const Entity &father, const Entity &son, bool initialize)
    restrict data to father
    Definition: adaptcallback.hh:129
    \n+
    void prolongLocal(const Entity &father, const Entity &son, bool initialize)
    prolong data to children
    Definition: adaptcallback.hh:137
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,251 +5,200 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n-scsgmapper.hh\n+adaptcallback.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH\n- 6#define DUNE_GRID_COMMON_SCSGMAPPER_HH\n+ 5#ifndef DUNE_GRID_COMMON_ADAPTCALLBACK_HH\n+ 6#define DUNE_GRID_COMMON_ADAPTCALLBACK_HH\n 7\n- 8#include \n- 9#include \"mapper.hh\"\n- 10\n- 11#include \n- 12\n- 19namespace Dune\n- 20{\n- 37 template \n-38 class SingleCodimSingleGeomTypeMapper :\n- 39 public Mapper,\n-typename GV::IndexSet::IndexType >\n- 40 {\n- 41 public:\n- 42\n-44 typedef typename GV::IndexSet::IndexType Index;\n- 45\n-50 using size_type = decltype(std::declval().size(0));\n- 51\n-56 SingleCodimSingleGeomTypeMapper (const GV& gridView)\n- 57 : gridView_(gridView)\n- 58 , indexSet_(&gridView_.indexSet())\n- 59 {\n- 60 // check that grid has only a single geometry type\n- 61 if (indexSet_->types(c).size() != 1)\n- 62 DUNE_THROW(GridError, \"mapper treats only a single codim and a single\n-geometry type\");\n- 63 }\n- 64\n- 70 template\n-71 Index index (const EntityType& e) const\n- 72 {\n- 73 static_assert(EntityType::codimension == c, \"Entity of wrong codim passed\n-to SingleCodimSingleGeomTypeMapper\");\n- 74 return indexSet_->index(e);\n- 75 }\n- 76\n-84 Index subIndex (const typename GV::template Codim<0>::Entity& e,\n- 85 int i, unsigned int codim) const\n- 86 {\n- 87 if (codim != c)\n- 88 DUNE_THROW(GridError, \"Id of wrong codim requested from\n-SingleCodimSingleGeomTypeMapper\");\n- 89 return indexSet_->subIndex(e,i,codim);\n- 90 }\n- 91\n-100 size_type size () const\n- 101 {\n- 102 return indexSet_->size(c);\n- 103 }\n- 104\n- 111 template\n-112 bool contains (const EntityType& e, Index& result) const\n- 113 {\n- 114 result = index(e);\n- 115 return true;\n- 116 }\n- 117\n-126 bool contains (const typename GV::template Codim<0>::Entity& e, int i, int\n-cc, Index& result) const\n- 127 {\n- 128 result = subIndex(e,i,cc);\n- 129 return true;\n- 130 }\n- 131\n-137 void update (const GV& gridView)\n+ 14namespace Dune\n+ 15{\n+ 16\n+ 17 // Internal Forward Declarations\n+ 18 // -----------------------------\n+ 19\n+ 20 template< class Grid, class Impl >\n+ 21 class AdaptDataHandle;\n+ 22\n+ 23\n+ 24\n+ 25 // AdaptDataHandleInterface\n+ 26 // ------------------------\n+ 27\n+ 31 template< class Grid, class Impl >\n+32 class AdaptDataHandleInterface\n+ 33 {\n+ 34 typedef AdaptDataHandleInterface<_Grid,_Impl_> This;\n+ 35\n+ 36 friend class AdaptDataHandle< Grid, Impl >;\n+ 37\n+ 38 public:\n+39 typedef typename Grid::template Codim< 0 >::Entity Entity;\n+ 40\n+ 41 private:\n+ 42 AdaptDataHandleInterface ()\n+ 43 {}\n+ 44\n+ 45 AdaptDataHandleInterface ( const This & );\n+ 46 This &operator= ( const This & );\n+ 47\n+ 48 public:\n+54 void preCoarsening ( const Entity &father )\n+ 55 {\n+ 56 asImp().preCoarsening( father );\n+ 57 }\n+ 58\n+64 void postRefinement ( const Entity &father )\n+ 65 {\n+ 66 asImp().postRefinement( father );\n+ 67 }\n+ 68\n+69 void restrictLocal( const Entity &father, const Entity& son, bool initialize\n+)\n+ 70 {\n+ 71 asImp().restrictLocal( father, son, initialize );\n+ 72 }\n+ 73\n+74 void prolongLocal( const Entity &father, const Entity& son, bool initialize\n+)\n+ 75 {\n+ 76 asImp().prolongLocal( father, son, initialize );\n+ 77 }\n+ 78\n+ 79 protected:\n+80 const Impl &asImp () const { return static_cast< const Impl & >( *this ); }\n+81 Impl &asImp () { return static_cast< Impl & >( *this ); }\n+ 82 };\n+ 83\n+ 84\n+ 85\n+ 86 // AdaptDataHandle\n+ 87 // ---------------\n+ 88\n+ 89 template< class Grid, class Impl >\n+90 class AdaptDataHandle\n+ 91 : public AdaptDataHandleInterface< Grid, Impl >\n+ 92 {\n+ 93 typedef AdaptDataHandle<_Grid,_Impl_> This;\n+ 94 typedef AdaptDataHandleInterface<_Grid,_Impl_> Base;\n+ 95\n+ 96 public:\n+97 typedef typename Base::Entity Entity;\n+ 98\n+ 99 protected:\n+100 AdaptDataHandle ()\n+ 101 {}\n+ 102\n+ 103 private:\n+ 104 AdaptDataHandle ( const This & );\n+ 105 This &operator= ( const This & );\n+ 106\n+ 107 void preCoarsening ( const Entity &father );\n+ 108 void postRefinement ( const Entity &father );\n+ 109 };\n+ 110\n+ 111\n+ 112 // CombinedAdaptProlongRestrict\n+ 113 // ----------------------------\n+ 114\n+ 116 template \n+117 class CombinedAdaptProlongRestrict\n+ 118 {\n+ 120 A& _a;\n+ 121 B& _b;\n+ 122 public:\n+124 CombinedAdaptProlongRestrict ( A& a, B& b ) : _a ( a ) , _b ( b )\n+ 125 {}\n+ 126\n+ 128 template \n+129 void restrictLocal ( const Entity &father, const Entity &son, bool\n+initialize )\n+ 130 {\n+ 131 _a.restrictLocal(father,son,initialize);\n+ 132 _b.restrictLocal(father,son,initialize);\n+ 133 }\n+ 134\n+ 136 template \n+137 void prolongLocal ( const Entity &father, const Entity &son, bool\n+initialize )\n 138 {\n- 139 gridView_ = gridView;\n- 140 indexSet_ = &gridView_.indexSet();\n+ 139 _a.prolongLocal(father,son,initialize);\n+ 140 _b.prolongLocal(father,son,initialize);\n 141 }\n- 142\n-148 void update (GV&& gridView)\n- 149 {\n- 150 gridView_ = std::move(gridView);\n- 151 indexSet_ = &gridView_.indexSet();\n- 152 }\n- 153\n- 156 [[deprecated(\"Use update(gridView) instead! Will be removed after release\n-2.8.\")]]\n-157 void update ()\n- 158 { // nothing to do here\n- 159 }\n- 160\n- 161 private:\n- 162 GV gridView_;\n- 163 const typename GV::IndexSet* indexSet_;\n- 164 };\n- 165\n- 184 template \n-185 class [[deprecated(\"Use SingleCodimSingleGeomTypeMapper instead! Will be\n-removed after release 2.8.\")]]\n- 186 LeafSingleCodimSingleGeomTypeMapper : public\n-SingleCodimSingleGeomTypeMapper {\n- 187 using Base = SingleCodimSingleGeomTypeMapper;\n- 188 public:\n-192 LeafSingleCodimSingleGeomTypeMapper (const G& grid)\n- 193 : Base(grid.leafGridView())\n- 194 , gridPtr_(&grid)\n- 195 {}\n- 196\n-202 void update ()\n- 203 {\n- 204 Base::update(gridPtr_->leafGridView());\n- 205 }\n- 206\n- 207 private:\n- 208 const G* gridPtr_;\n- 209 };\n- 210\n- 222 template \n-223 class [[deprecated(\"Use SingleCodimSingleGeomTypeMapper instead! Will be\n-removed after release 2.8.\")]]\n- 224 LevelSingleCodimSingleGeomTypeMapper : public\n-SingleCodimSingleGeomTypeMapper {\n- 225 using Base = SingleCodimSingleGeomTypeMapper;\n- 226 public:\n- 227 /* @brief The constructor\n- 228 @param grid A reference to a grid.\n- 229 @param level A valid level of the grid.\n- 230 */\n-231 LevelSingleCodimSingleGeomTypeMapper (const G& grid, int level)\n- 232 : Base(grid.levelGridView(level))\n- 233 , gridPtr_(&grid)\n- 234 , level_(level)\n- 235 {}\n- 236\n-242 void update ()\n- 243 {\n- 244 Base::update(gridPtr_->levelGridView(level_));\n- 245 }\n- 246\n- 247 private:\n- 248 const G* gridPtr_;\n- 249 int level_;\n- 250 };\n- 251\n- 253}\n- 254#endif\n-mapper.hh\n-Provides classes with basic mappers which are used to attach data to a grid.\n-Dune::leafGridView\n-Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid<\n-dim, dimworld, ct, GridFamily > &grid)\n-leaf grid view for the given grid\n-Definition: common/grid.hh:819\n-Dune::levelGridView\n-Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid<\n-dim, dimworld, ct, GridFamily > &grid, int level)\n-level grid view for the given grid and level.\n-Definition: common/grid.hh:802\n+ 142 };\n+ 143\n+ 144} // end namespace Dune\n+ 145\n+ 146#endif\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::GridError\n-Base class for exceptions in Dune grid modules.\n-Definition: exceptions.hh:20\n-Dune::Mapper\n-Mapper interface.\n-Definition: mapper.hh:110\n-Dune::SingleCodimSingleGeomTypeMapper\n-Implementation class for a single codim and single geometry type mapper.\n-Definition: scsgmapper.hh:40\n-Dune::SingleCodimSingleGeomTypeMapper::contains\n-bool contains(const EntityType &e, Index &result) const\n-Returns true if the entity is contained in the index set.\n-Definition: scsgmapper.hh:112\n-Dune::SingleCodimSingleGeomTypeMapper::Index\n-GV::IndexSet::IndexType Index\n-Number type used for indices.\n-Definition: scsgmapper.hh:44\n-Dune::SingleCodimSingleGeomTypeMapper::contains\n-bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc,\n-Index &result) const\n-Returns true if the entity is contained in the index set.\n-Definition: scsgmapper.hh:126\n-Dune::SingleCodimSingleGeomTypeMapper::size_type\n-decltype(std::declval< typename GV::IndexSet >().size(0)) size_type\n-Number type used for the overall size (the return value of the 'size' method)\n-Definition: scsgmapper.hh:50\n-Dune::SingleCodimSingleGeomTypeMapper::index\n-Index index(const EntityType &e) const\n-Map entity to array index.\n-Definition: scsgmapper.hh:71\n-Dune::SingleCodimSingleGeomTypeMapper::subIndex\n-Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i,\n-unsigned int codim) const\n-Map subentity of codim 0 entity to array index.\n-Definition: scsgmapper.hh:84\n-Dune::SingleCodimSingleGeomTypeMapper::SingleCodimSingleGeomTypeMapper\n-SingleCodimSingleGeomTypeMapper(const GV &gridView)\n-Construct mapper from grid and one of its index sets.\n-Definition: scsgmapper.hh:56\n-Dune::SingleCodimSingleGeomTypeMapper::update\n-void update(GV &&gridView)\n-Recalculates indices after grid adaptation.\n-Definition: scsgmapper.hh:148\n-Dune::SingleCodimSingleGeomTypeMapper::size\n-size_type size() const\n-Return total number of entities in the entity set managed by the mapper.\n-Definition: scsgmapper.hh:100\n-Dune::SingleCodimSingleGeomTypeMapper::update\n-void update()\n-Recalculates indices after grid adaptation.\n-Definition: scsgmapper.hh:157\n-Dune::SingleCodimSingleGeomTypeMapper::update\n-void update(const GV &gridView)\n-Recalculates indices after grid adaptation.\n-Definition: scsgmapper.hh:137\n-Dune::LeafSingleCodimSingleGeomTypeMapper\n-Single codim and single geometry type mapper for leaf entities.\n-Definition: scsgmapper.hh:186\n-Dune::LeafSingleCodimSingleGeomTypeMapper::LeafSingleCodimSingleGeomTypeMapper\n-LeafSingleCodimSingleGeomTypeMapper(const G &grid)\n-The constructor.\n-Definition: scsgmapper.hh:192\n-Dune::LeafSingleCodimSingleGeomTypeMapper::update\n-void update()\n-Recalculates indices after grid adaptation.\n-Definition: scsgmapper.hh:202\n-Dune::LevelSingleCodimSingleGeomTypeMapper\n-Single codim and single geometry type mapper for entities of one level.\n-Definition: scsgmapper.hh:224\n-Dune::LevelSingleCodimSingleGeomTypeMapper::\n-LevelSingleCodimSingleGeomTypeMapper\n-LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level)\n-Definition: scsgmapper.hh:231\n-Dune::LevelSingleCodimSingleGeomTypeMapper::update\n-void update()\n-Recalculates indices after grid adaptation.\n-Definition: scsgmapper.hh:242\n-grid.hh\n-Different resources needed by all grid implementations.\n+Dune::AdaptDataHandle\n+Definition: adaptcallback.hh:92\n+Dune::AdaptDataHandle::Entity\n+Base::Entity Entity\n+Definition: adaptcallback.hh:97\n+Dune::AdaptDataHandle::AdaptDataHandle\n+AdaptDataHandle()\n+Definition: adaptcallback.hh:100\n+Dune::AdaptDataHandleInterface\n+Interface class for the Grid's adapt method where the parameter is a\n+AdaptDataHandleInterface.\n+Definition: adaptcallback.hh:33\n+Dune::AdaptDataHandleInterface::prolongLocal\n+void prolongLocal(const Entity &father, const Entity &son, bool initialize)\n+Definition: adaptcallback.hh:74\n+Dune::AdaptDataHandleInterface::postRefinement\n+void postRefinement(const Entity &father)\n+call back for activity to take place on newly created elements below the father\n+element.\n+Definition: adaptcallback.hh:64\n+Dune::AdaptDataHandleInterface::Entity\n+Grid::template Codim< 0 >::Entity Entity\n+Definition: adaptcallback.hh:39\n+Dune::AdaptDataHandleInterface::asImp\n+Impl & asImp()\n+Definition: adaptcallback.hh:81\n+Dune::AdaptDataHandleInterface::asImp\n+const Impl & asImp() const\n+Definition: adaptcallback.hh:80\n+Dune::AdaptDataHandleInterface::restrictLocal\n+void restrictLocal(const Entity &father, const Entity &son, bool initialize)\n+Definition: adaptcallback.hh:69\n+Dune::AdaptDataHandleInterface::preCoarsening\n+void preCoarsening(const Entity &father)\n+call back for activity to take place on father and all descendants before the\n+descendants are removed\n+Definition: adaptcallback.hh:54\n+Dune::CombinedAdaptProlongRestrict\n+class for combining 2 index sets together for adaptation process\n+Definition: adaptcallback.hh:118\n+Dune::CombinedAdaptProlongRestrict::CombinedAdaptProlongRestrict\n+CombinedAdaptProlongRestrict(A &a, B &b)\n+constructor storing the two references\n+Definition: adaptcallback.hh:124\n+Dune::CombinedAdaptProlongRestrict::restrictLocal\n+void restrictLocal(const Entity &father, const Entity &son, bool initialize)\n+restrict data to father\n+Definition: adaptcallback.hh:129\n+Dune::CombinedAdaptProlongRestrict::prolongLocal\n+void prolongLocal(const Entity &father, const Entity &son, bool initialize)\n+prolong data to children\n+Definition: adaptcallback.hh:137\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::Grid\n+Grid abstract base class.\n+Definition: common/grid.hh:375\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00335.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00335.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: mapper.hh File Reference\n+dune-grid: rangegenerators.hh File Reference\n \n \n \n \n \n \n \n@@ -63,42 +63,32 @@\n
    \n \n
    \n \n
    \n \n-
    mapper.hh File Reference
    \n+
    rangegenerators.hh File Reference
    \n
    \n
    \n-\n-

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

    \n-
    #include <utility>
    \n-#include <dune/common/bartonnackmanifcheck.hh>
    \n+
    #include <dune/common/iteratorrange.hh>
    \n+#include <dune/common/rangeutilities.hh>
    \n+#include <dune/geometry/dimension.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/partitionset.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::Mapper< G, MapperImp, IndexType >
     Mapper interface. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-

    Detailed Description

    \n-

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

    \n-
    Author
    Peter Bastian
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,29 +5,22 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n-Classes | Namespaces\n-mapper.hh File Reference\n-Provides classes with basic mappers which are used to attach data to a grid.\n-More...\n-#include \n-#include \n+Namespaces\n+rangegenerators.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::Mapper<_G,_MapperImp,_IndexType_>\n-\u00a0 Mapper interface. More...\n-\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Provides classes with basic mappers which are used to attach data to a grid.\n- Author\n- Peter Bastian\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00335_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: mapper.hh Source File\n+dune-grid: rangegenerators.hh Source File\n \n \n \n \n \n \n \n@@ -62,107 +62,302 @@\n \n
    \n \n
    \n \n
    \n-
    mapper.hh
    \n+
    rangegenerators.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_MAPPER_HH
    \n-
    6#define DUNE_GRID_COMMON_MAPPER_HH
    \n+
    5#ifndef DUNE_GRID_COMMON_RANGEGENERATORS_HH
    \n+
    6#define DUNE_GRID_COMMON_RANGEGENERATORS_HH
    \n
    7
    \n-
    8#include <utility>
    \n-
    9
    \n-
    10#include <dune/common/bartonnackmanifcheck.hh>
    \n-
    11
    \n-
    89namespace Dune
    \n-
    90{
    \n-
    108 template <typename G, typename MapperImp, typename IndexType=int>
    \n-
    109 class Mapper
    \n-
    110 {
    \n-
    111 public:
    \n-
    112
    \n-
    114 using Index = IndexType;
    \n-
    115
    \n-
    121 template<class EntityType>
    \n-
    122 Index index (const EntityType& e) const
    \n-
    123 {
    \n-
    124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e)));
    \n-
    125 return asImp().index(e);
    \n-
    126 }
    \n-
    127
    \n-
    128
    \n-
    136 Index subIndex (const typename G::Traits::template Codim<0>::Entity& e,
    \n-
    137 int i,
    \n-
    138 unsigned int codim) const
    \n-
    139 {
    \n-
    140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim)));
    \n-
    141 return asImp().subIndex(e,i,codim);
    \n-
    142 }
    \n-
    143
    \n-
    152 auto size () const
    \n-
    153 {
    \n-
    154 CHECK_INTERFACE_IMPLEMENTATION((asImp().size()));
    \n-
    155 return asImp().size();
    \n-
    156 }
    \n-
    157
    \n-
    158
    \n-
    166 template<class EntityType>
    \n-
    167 bool contains (const EntityType& e, IndexType& result) const
    \n-
    168 {
    \n-
    169 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,result )));
    \n-
    170 return asImp().contains(e,result );
    \n-
    171 }
    \n-
    172
    \n-
    173
    \n-
    183 bool contains (const typename G::Traits::template Codim<0>::Entity& e, int i, int cc, IndexType& result) const
    \n-
    184 {
    \n-
    185 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,i,cc,result)))
    \n-
    186 return asImp().contains(e,i,cc,result);
    \n-
    187 }
    \n-
    188
    \n-
    191 template <class GridView>
    \n-
    192 void update (GridView&& gridView)
    \n-
    193 {
    \n-
    194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update(std::forward<GridView>(gridView))));
    \n-
    195 }
    \n-
    196
    \n-
    199 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8. Mappers have to implement update(gridView).")]]
    \n-
    200 void update ()
    \n-
    201 {
    \n-
    202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update()));
    \n-
    203 }
    \n-
    204
    \n-
    205 private:
    \n-
    207 MapperImp& asImp () {return static_cast<MapperImp &> (*this);}
    \n-
    209 const MapperImp& asImp () const {return static_cast<const MapperImp &>(*this);}
    \n-
    210 };
    \n-
    211
    \n-
    214#undef CHECK_INTERFACE_IMPLEMENTATION
    \n-
    215#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
    \n-
    216
    \n-
    217}
    \n-
    218#endif
    \n+
    8#include <dune/common/iteratorrange.hh>
    \n+
    9#include <dune/common/rangeutilities.hh>
    \n+
    10#include <dune/geometry/dimension.hh>
    \n+\n+\n+
    13
    \n+
    14namespace Dune
    \n+
    15{
    \n+
    16
    \n+
    17#ifdef DOXYGEN
    \n+
    18
    \n+
    206 // *****************************************************************************************
    \n+
    207 // Doxygen documentation
    \n+
    208 // *****************************************************************************************
    \n+
    209 //
    \n+
    210 // In the following, the range generating functions are documented for Doxygen; the actual
    \n+
    211 // implementations are further down in this file and hidden from Doxygen.
    \n+
    212 // The main reason for this split are the return types of those functions, which either contain
    \n+
    213 // long type listings to obtain the iterator type or (in the case of the forwarded functions
    \n+
    214 // use the new-style function syntax and calculate the return type using decltype. In both cases,
    \n+
    215 // Doxygen generates function signatures that are very confusing to the average user.
    \n+
    216 //
    \n+
    217 // *****************************************************************************************
    \n+
    218
    \n+
    219
    \n+
    220
    \n+
    224
    \n+
    225
    \n+
    227
    \n+
    256 template<typename GV>
    \n+
    257 inline IteratorRange<...> elements(const GV& gv);
    \n+
    258
    \n+
    259
    \n+
    261
    \n+
    290 template<typename GV>
    \n+
    291 inline IteratorRange<...> facets(const GV& gv);
    \n+
    292
    \n+
    293
    \n+
    295
    \n+
    324 template<typename GV>
    \n+
    325 inline IteratorRange<...> edges(const GV& gv);
    \n+
    326
    \n+
    327
    \n+
    329
    \n+
    358 template<typename GV>
    \n+
    359 inline IteratorRange<...> vertices(const GV& gv);
    \n+
    360
    \n+
    361
    \n+
    363
    \n+
    364
    \n+
    365
    \n+
    369
    \n+
    371
    \n+
    394 template<typename GV, typename Entity>
    \n+
    395 inline IteratorRange<...> intersections(const GV& gv, const Entity& e);
    \n+
    396
    \n+
    397
    \n+
    399
    \n+
    400
    \n+
    401
    \n+
    405
    \n+
    406
    \n+
    408
    \n+
    434 template<typename Entity>
    \n+
    435 inline IteratorRange<...> descendantElements(const Entity& e, int maxLevel);
    \n+
    436 // Entity<int dim, class GridImp, template<int,int,class> class EntityImp>
    \n+
    437
    \n+
    439
    \n+
    440
    \n+
    441
    \n+
    445
    \n+
    446
    \n+
    448
    \n+
    486 template<typename GV, int codim>
    \n+
    487 inline IteratorRange<...> entities(const GV& gv, Codim<codim> cd);
    \n+
    488
    \n+
    489
    \n+
    491
    \n+
    531 template<typename GV, int dim>
    \n+
    532 inline IteratorRange<...> entities(const GV& gv, Dim<dim> d);
    \n+
    533
    \n+
    535
    \n+
    536
    \n+
    537
    \n+
    541
    \n+
    542
    \n+
    544
    \n+
    570 template<typename GV, unsigned int partitions>
    \n+
    571 inline IteratorRange<...> elements(const GV& gv, PartitionSet<partitions> ps);
    \n+
    572
    \n+
    573
    \n+
    575
    \n+
    604 template<typename GV, unsigned int partitions>
    \n+
    605 inline IteratorRange<...> facets(const GV& gv, PartitionSet<partitions> ps);
    \n+
    606
    \n+
    607
    \n+
    609
    \n+
    635 template<typename GV, unsigned int partitions>
    \n+
    636 inline IteratorRange<...> edges(const GV& gv, PartitionSet<partitions> ps);
    \n+
    637
    \n+
    638
    \n+
    640
    \n+
    666 template<typename GV, unsigned int partitions>
    \n+
    667 inline IteratorRange<...> vertices(const GV& gv, PartitionSet<partitions> ps);
    \n+
    668
    \n+
    670
    \n+
    671
    \n+
    672
    \n+
    676
    \n+
    677
    \n+
    679
    \n+
    715 template<typename GV, int codim, unsigned int partitions>
    \n+
    716 inline IteratorRange<...> entities(const GV& gv, Codim<codim> cd, PartitionSet<partitions> ps);
    \n+
    717
    \n+
    718
    \n+
    720
    \n+
    756 template<typename GV, int dim, unsigned int partitions>
    \n+
    757 inline IteratorRange<...> entities(const GV& gv, Dim<dim> d, PartitionSet<partitions> ps);
    \n+
    758
    \n+
    759
    \n+
    761
    \n+
    782 template<typename E, int codim>
    \n+
    783 inline IteratorRange<...> subEntities(const E& e, Codim<codim> c);
    \n+
    784
    \n+
    785
    \n+
    787
    \n+
    788
    \n+
    789#else // DOXYGEN
    \n+
    790
    \n+
    791 // ******************************************************************************************
    \n+
    792 // Implementations
    \n+
    793 // ******************************************************************************************
    \n+
    794
    \n+
    795
    \n+
    805 template<typename GV, int codim, unsigned int partitions>
    \n+
    806 inline auto entities(const GV& gv, Codim<codim>, PartitionSet<partitions>)
    \n+
    807 -> IteratorRange<decltype(gv.template begin<codim,derive_partition_iterator_type<partitions>::value>())>
    \n+
    808 {
    \n+
    809 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension for given GridView");
    \n+
    810 const PartitionIteratorType pit = derive_partition_iterator_type<partitions>::value;
    \n+
    811 typedef IteratorRange<decltype(gv.template begin<codim,pit>())> return_type;
    \n+
    812 return return_type(gv.template begin<codim,pit>(),gv.template end<codim,pit>());
    \n+
    813 }
    \n+
    814
    \n+
    822 template<typename GV, int codim>
    \n+
    823 inline auto entities(const GV& gv, Codim<codim>)
    \n+
    824 -> IteratorRange<decltype(gv.template begin<codim>())>
    \n+
    825 {
    \n+
    826 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension for given GridView");
    \n+
    827 typedef IteratorRange<decltype(gv.template begin<codim>())> return_type;
    \n+
    828 return return_type(gv.template begin<codim>(),gv.template end<codim>());
    \n+
    829 }
    \n+
    830
    \n+
    834 template<typename Entity>
    \n+
    835 inline IteratorRange<typename Entity::HierarchicIterator> descendantElements(const Entity& e, int maxLevel)
    \n+
    836 {
    \n+
    837 typedef IteratorRange<typename Entity::HierarchicIterator> return_type;
    \n+
    838 return return_type(e.hbegin(maxLevel),e.hend(maxLevel));
    \n+
    839 }
    \n+
    840
    \n+
    844 template<typename GV, typename Entity>
    \n+
    845 inline auto intersections(const GV& gv, const Entity& e)
    \n+
    846 -> IteratorRange<decltype(gv.ibegin(e))>
    \n+
    847 {
    \n+
    848 return IteratorRange<decltype(gv.ibegin(e))>(gv.ibegin(e),gv.iend(e));
    \n+
    849 }
    \n+
    850
    \n+
    851
    \n+
    857 template<typename GV, int dim, unsigned int partitions>
    \n+
    858 inline auto entities(const GV& gv, Dim<dim>, PartitionSet<partitions>)
    \n+
    859 -> decltype(entities(gv,Codim<GV::dimension - dim>(),PartitionSet<partitions>()))
    \n+
    860 {
    \n+
    861 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for given GridView");
    \n+
    862 return entities(gv,Codim<GV::dimension - dim>(),PartitionSet<partitions>());
    \n+
    863 }
    \n+
    864
    \n+
    865 template<typename GV, int dim>
    \n+
    866 inline auto entities(const GV& gv, Dim<dim>)
    \n+
    867 -> decltype(entities(gv,Codim<GV::dimension - dim>()))
    \n+
    868 {
    \n+
    869 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for given GridView");
    \n+
    870 return entities(gv,Codim<GV::dimension - dim>());
    \n+
    871 }
    \n+
    872
    \n+
    873 template<typename GV, unsigned int partitions>
    \n+
    874 inline auto elements(const GV& gv, PartitionSet<partitions>)
    \n+
    875 -> decltype(entities(gv,Codim<0>(),PartitionSet<partitions>()))
    \n+
    876 {
    \n+
    877 return entities(gv,Codim<0>(),PartitionSet<partitions>());
    \n+
    878 }
    \n+
    879
    \n+
    880 template<typename GV>
    \n+
    881 inline auto elements(const GV& gv)
    \n+
    882 -> decltype(entities(gv,Codim<0>()))
    \n+
    883 {
    \n+
    884 return entities(gv,Codim<0>());
    \n+
    885 }
    \n+
    886
    \n+
    887 template<typename GV, unsigned int partitions>
    \n+
    888 inline auto facets(const GV& gv, PartitionSet<partitions>)
    \n+
    889 -> decltype(entities(gv,Codim<1>(),PartitionSet<partitions>()))
    \n+
    890 {
    \n+
    891 return entities(gv,Codim<1>(),PartitionSet<partitions>());
    \n+
    892 }
    \n+
    893
    \n+
    894 template<typename GV>
    \n+
    895 inline auto facets(const GV& gv)
    \n+
    896 -> decltype(entities(gv,Codim<1>()))
    \n+
    897 {
    \n+
    898 return entities(gv,Codim<1>());
    \n+
    899 }
    \n+
    900
    \n+
    901 template<typename GV, unsigned int partitions>
    \n+
    902 inline auto edges(const GV& gv, PartitionSet<partitions>)
    \n+
    903 -> decltype(entities(gv,Dim<1>(),PartitionSet<partitions>()))
    \n+
    904 {
    \n+
    905 return entities(gv,Dim<1>(),PartitionSet<partitions>());
    \n+
    906 }
    \n+
    907
    \n+
    908 template<typename GV>
    \n+
    909 inline auto edges(const GV& gv)
    \n+
    910 -> decltype(entities(gv,Dim<1>()))
    \n+
    911 {
    \n+
    912 return entities(gv,Dim<1>());
    \n+
    913 }
    \n+
    914
    \n+
    915 template<typename GV, unsigned int partitions>
    \n+
    916 inline auto vertices(const GV& gv, PartitionSet<partitions>)
    \n+
    917 -> decltype(entities(gv,Dim<0>(),PartitionSet<partitions>()))
    \n+
    918 {
    \n+
    919 return entities(gv,Dim<0>(),PartitionSet<partitions>());
    \n+
    920 }
    \n+
    921
    \n+
    922 template<typename GV>
    \n+
    923 inline auto vertices(const GV& gv)
    \n+
    924 -> decltype(entities(gv,Dim<0>()))
    \n+
    925 {
    \n+
    926 return entities(gv,Dim<0>());
    \n+
    927 }
    \n+
    928
    \n+
    929 template<typename E, int codim>
    \n+
    930 inline auto subEntities(const E& e, Codim<codim> c)
    \n+
    931 {
    \n+
    932 static_assert(E::codimension <= codim,
    \n+
    933 "Can only iterate over sub-entities with equal or larger codimension");
    \n+
    934 return transformedRangeView(
    \n+
    935 range(static_cast<int>(e.subEntities(c))),
    \n+
    936 [&](const int i){ return e.template subEntity<codim>(i); }
    \n+
    937 );
    \n+
    938 }
    \n+
    939
    \n+
    940#endif // DOXYGEN
    \n+
    941
    \n+
    946} // namespace Dune
    \n+
    947
    \n+
    948#endif // DUNE_GRID_COMMON_RANGEGENERATORS_HH
    \n+\n+\n+
    PartitionIteratorType
    Parameter to be used for the parallel level- and leaf iterators.
    Definition: gridenums.hh:136
    \n+
    IteratorRange<... > intersections(const GV &gv, const Entity &e)
    Iterates over all Intersections of an Entity with respect to the given GridView.
    \n+
    IteratorRange<... > vertices(const GV &gv)
    Iterates over all vertices (entities with dimension 0) of a GridView.
    \n+
    IteratorRange<... > elements(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all elements / cells (entities with codimension 0) of a GridView that belong to the giv...
    \n+
    IteratorRange<... > entities(const GV &gv, Codim< codim > cd, PartitionSet< partitions > ps)
    Iterates over all entities of a GridView with the given codimension that belong to the given Partitio...
    \n+
    IteratorRange<... > edges(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all edges (entities with dimension 1) of a GridView that belong to the given PartitionS...
    \n+
    IteratorRange<... > entities(const GV &gv, Dim< dim > d, PartitionSet< partitions > ps)
    Iterates over all entities of a GridView with the given dimension that belong to the given PartitionS...
    \n+
    IteratorRange<... > entities(const GV &gv, Dim< dim > d)
    Iterates over all entities of a GridView with the given dimension.
    \n+
    IteratorRange<... > subEntities(const E &e, Codim< codim > c)
    Iterates over all sub-entities of an entity given the codimension of the sub-entities.
    \n+
    IteratorRange<... > vertices(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all vertices (entities with dimension 0) of a GridView that belong to the given Partiti...
    \n+
    IteratorRange<... > elements(const GV &gv)
    Iterates over all elements / cells (entities with codimension 0) of a GridView.
    \n+
    IteratorRange<... > entities(const GV &gv, Codim< codim > cd)
    Iterates over all entities of a GridView with the given codimension.
    \n+
    IteratorRange<... > facets(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all facets (entities with codimension 1) of a GridView that belong to the given Partiti...
    \n+
    IteratorRange<... > facets(const GV &gv)
    Iterates over all facets (entities with codimension 1) of a GridView.
    \n+
    IteratorRange<... > edges(const GV &gv)
    Iterates over all edges (entities with dimension 1) of a GridView.
    \n+
    IteratorRange<... > descendantElements(const Entity &e, int maxLevel)
    Iterates over all descendant elements of the given element up to a maximum level.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    Mapper interface.
    Definition: mapper.hh:110
    \n-
    auto size() const
    Return total number of entities in the entity set managed by the mapper.
    Definition: mapper.hh:152
    \n-
    void update(GridView &&gridView)
    Reinitialize mapper after grid has been modified.
    Definition: mapper.hh:192
    \n-
    void update()
    Reinitialize mapper after grid has been modified.
    Definition: mapper.hh:200
    \n-
    Index index(const EntityType &e) const
    Map entity to array index.
    Definition: mapper.hh:122
    \n-
    IndexType Index
    Number type used for indices.
    Definition: mapper.hh:114
    \n-
    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
    \n-
    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
    \n-
    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
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    A struct that collects all associated types of one implementation from the Traits class.
    Definition: common/gridview.hh:118
    \n+
    A set of PartitionType values.
    Definition: partitionset.hh:138
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,141 +5,383 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n-mapper.hh\n+rangegenerators.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_MAPPER_HH\n- 6#define DUNE_GRID_COMMON_MAPPER_HH\n+ 5#ifndef DUNE_GRID_COMMON_RANGEGENERATORS_HH\n+ 6#define DUNE_GRID_COMMON_RANGEGENERATORS_HH\n 7\n- 8#include \n- 9\n- 10#include \n- 11\n- 89namespace Dune\n- 90{\n- 108 template \n-109 class Mapper\n- 110 {\n- 111 public:\n- 112\n-114 using Index = IndexType;\n- 115\n- 121 template\n-122 Index index (const EntityType& e) const\n- 123 {\n- 124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e)));\n- 125 return asImp().index(e);\n- 126 }\n- 127\n- 128\n-136 Index subIndex (const typename G::Traits::template Codim<0>::Entity& e,\n- 137 int i,\n- 138 unsigned int codim) const\n- 139 {\n- 140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim)));\n- 141 return asImp().subIndex(e,i,codim);\n- 142 }\n- 143\n-152 auto size () const\n- 153 {\n- 154 CHECK_INTERFACE_IMPLEMENTATION((asImp().size()));\n- 155 return asImp().size();\n- 156 }\n- 157\n- 158\n- 166 template\n-167 bool contains (const EntityType& e, IndexType& result) const\n- 168 {\n- 169 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,result )));\n- 170 return asImp().contains(e,result );\n- 171 }\n- 172\n- 173\n-183 bool contains (const typename G::Traits::template Codim<0>::Entity& e, int\n-i, int cc, IndexType& result) const\n- 184 {\n- 185 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,i,cc,result)))\n- 186 return asImp().contains(e,i,cc,result);\n- 187 }\n- 188\n- 191 template \n-192 void update (GridView&& gridView)\n- 193 {\n- 194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update(std::\n-forward(gridView))));\n- 195 }\n- 196\n- 199 [[deprecated(\"Use update(gridView) instead! Will be removed after release\n-2.8. Mappers have to implement update(gridView).\")]]\n-200 void update ()\n- 201 {\n- 202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update()));\n- 203 }\n- 204\n- 205 private:\n- 207 MapperImp& asImp () {return static_cast (*this);}\n- 209 const MapperImp& asImp () const {return static_cast\n-(*this);}\n- 210 };\n- 211\n- 214#undef CHECK_INTERFACE_IMPLEMENTATION\n- 215#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION\n- 216\n- 217}\n- 218#endif\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14namespace Dune\n+ 15{\n+ 16\n+ 17#ifdef DOXYGEN\n+ 18\n+ 206 /\n+/\n+*****************************************************************************************\n+ 207 // Doxygen documentation\n+ 208 /\n+/\n+*****************************************************************************************\n+ 209 //\n+ 210 // In the following, the range generating functions are documented for\n+Doxygen; the actual\n+ 211 // implementations are further down in this file and hidden from Doxygen.\n+ 212 // The main reason for this split are the return types of those functions,\n+which either contain\n+ 213 // long type listings to obtain the iterator type or (in the case of the\n+forwarded functions\n+ 214 // use the new-style function syntax and calculate the return type using\n+decltype. In both cases,\n+ 215 // Doxygen generates function signatures that are very confusing to the\n+average user.\n+ 216 //\n+ 217 /\n+/\n+*****************************************************************************************\n+ 218\n+ 219\n+ 220\n+ 224\n+ 225\n+ 227\n+ 256 template\n+257 inline IteratorRange<...> elements(const GV& gv);\n+ 258\n+ 259\n+ 261\n+ 290 template\n+291 inline IteratorRange<...> facets(const GV& gv);\n+ 292\n+ 293\n+ 295\n+ 324 template\n+325 inline IteratorRange<...> edges(const GV& gv);\n+ 326\n+ 327\n+ 329\n+ 358 template\n+359 inline IteratorRange<...> vertices(const GV& gv);\n+ 360\n+ 361\n+ 363\n+ 364\n+ 365\n+ 369\n+ 371\n+ 394 template\n+395 inline IteratorRange<...> intersections(const GV& gv, const Entity& e);\n+ 396\n+ 397\n+ 399\n+ 400\n+ 401\n+ 405\n+ 406\n+ 408\n+ 434 template\n+435 inline IteratorRange<...> descendantElements(const Entity& e, int\n+maxLevel);\n+ 436 // Entity class EntityImp>\n+ 437\n+ 439\n+ 440\n+ 441\n+ 445\n+ 446\n+ 448\n+ 486 template\n+487 inline IteratorRange<...> entities(const GV& gv, Codim cd);\n+ 488\n+ 489\n+ 491\n+ 531 template\n+532 inline IteratorRange<...> entities(const GV& gv, Dim d);\n+ 533\n+ 535\n+ 536\n+ 537\n+ 541\n+ 542\n+ 544\n+ 570 template\n+571 inline IteratorRange<...> elements(const GV& gv, PartitionSet\n+ps);\n+ 572\n+ 573\n+ 575\n+ 604 template\n+605 inline IteratorRange<...> facets(const GV& gv, PartitionSet\n+ps);\n+ 606\n+ 607\n+ 609\n+ 635 template\n+636 inline IteratorRange<...> edges(const GV& gv, PartitionSet ps);\n+ 637\n+ 638\n+ 640\n+ 666 template\n+667 inline IteratorRange<...> vertices(const GV& gv, PartitionSet\n+ps);\n+ 668\n+ 670\n+ 671\n+ 672\n+ 676\n+ 677\n+ 679\n+ 715 template\n+716 inline IteratorRange<...> entities(const GV& gv, Codim cd,\n+PartitionSet ps);\n+ 717\n+ 718\n+ 720\n+ 756 template\n+757 inline IteratorRange<...> entities(const GV& gv, Dim d,\n+PartitionSet ps);\n+ 758\n+ 759\n+ 761\n+ 782 template\n+783 inline IteratorRange<...> subEntities(const E& e, Codim c);\n+ 784\n+ 785\n+ 787\n+ 788\n+ 789#else // DOXYGEN\n+ 790\n+ 791 /\n+/\n+******************************************************************************************\n+ 792 // Implementations\n+ 793 /\n+/\n+******************************************************************************************\n+ 794\n+ 795\n+ 805 template\n+ 806 inline auto entities(const GV& gv, Codim, PartitionSet)\n+ 807 -> IteratorRange::value>())>\n+ 808 {\n+ 809 static_assert(0 <= codim && codim <= GV::dimension, \"invalid codimension\n+for given GridView\");\n+ 810 const PartitionIteratorType pit =\n+derive_partition_iterator_type::value;\n+ 811 typedef IteratorRange())>\n+return_type;\n+ 812 return return_type(gv.template begin(),gv.template\n+end());\n+ 813 }\n+ 814\n+ 822 template\n+ 823 inline auto entities(const GV& gv, Codim)\n+ 824 -> IteratorRange())>\n+ 825 {\n+ 826 static_assert(0 <= codim && codim <= GV::dimension, \"invalid codimension\n+for given GridView\");\n+ 827 typedef IteratorRange())> return_type;\n+ 828 return return_type(gv.template begin(),gv.template end());\n+ 829 }\n+ 830\n+ 834 template\n+ 835 inline IteratorRange\n+descendantElements(const Entity& e, int maxLevel)\n+ 836 {\n+ 837 typedef IteratorRange return_type;\n+ 838 return return_type(e.hbegin(maxLevel),e.hend(maxLevel));\n+ 839 }\n+ 840\n+ 844 template\n+ 845 inline auto intersections(const GV& gv, const Entity& e)\n+ 846 -> IteratorRange\n+ 847 {\n+ 848 return IteratorRange(gv.ibegin(e),gv.iend(e));\n+ 849 }\n+ 850\n+ 851\n+ 857 template\n+ 858 inline auto entities(const GV& gv, Dim, PartitionSet)\n+ 859 -> decltype(entities(gv,Codim\n+(),PartitionSet()))\n+ 860 {\n+ 861 static_assert(0 <= dim && dim <= GV::dimension, \"invalid dimension for\n+given GridView\");\n+ 862 return entities(gv,Codim(),PartitionSet\n+());\n+ 863 }\n+ 864\n+ 865 template\n+ 866 inline auto entities(const GV& gv, Dim)\n+ 867 -> decltype(entities(gv,Codim()))\n+ 868 {\n+ 869 static_assert(0 <= dim && dim <= GV::dimension, \"invalid dimension for\n+given GridView\");\n+ 870 return entities(gv,Codim());\n+ 871 }\n+ 872\n+ 873 template\n+ 874 inline auto elements(const GV& gv, PartitionSet)\n+ 875 -> decltype(entities(gv,Codim<0>(),PartitionSet()))\n+ 876 {\n+ 877 return entities(gv,Codim<0>(),PartitionSet());\n+ 878 }\n+ 879\n+ 880 template\n+ 881 inline auto elements(const GV& gv)\n+ 882 -> decltype(entities(gv,Codim<0>()))\n+ 883 {\n+ 884 return entities(gv,Codim<0>());\n+ 885 }\n+ 886\n+ 887 template\n+ 888 inline auto facets(const GV& gv, PartitionSet)\n+ 889 -> decltype(entities(gv,Codim<1>(),PartitionSet()))\n+ 890 {\n+ 891 return entities(gv,Codim<1>(),PartitionSet());\n+ 892 }\n+ 893\n+ 894 template\n+ 895 inline auto facets(const GV& gv)\n+ 896 -> decltype(entities(gv,Codim<1>()))\n+ 897 {\n+ 898 return entities(gv,Codim<1>());\n+ 899 }\n+ 900\n+ 901 template\n+ 902 inline auto edges(const GV& gv, PartitionSet)\n+ 903 -> decltype(entities(gv,Dim<1>(),PartitionSet()))\n+ 904 {\n+ 905 return entities(gv,Dim<1>(),PartitionSet());\n+ 906 }\n+ 907\n+ 908 template\n+ 909 inline auto edges(const GV& gv)\n+ 910 -> decltype(entities(gv,Dim<1>()))\n+ 911 {\n+ 912 return entities(gv,Dim<1>());\n+ 913 }\n+ 914\n+ 915 template\n+ 916 inline auto vertices(const GV& gv, PartitionSet)\n+ 917 -> decltype(entities(gv,Dim<0>(),PartitionSet()))\n+ 918 {\n+ 919 return entities(gv,Dim<0>(),PartitionSet());\n+ 920 }\n+ 921\n+ 922 template\n+ 923 inline auto vertices(const GV& gv)\n+ 924 -> decltype(entities(gv,Dim<0>()))\n+ 925 {\n+ 926 return entities(gv,Dim<0>());\n+ 927 }\n+ 928\n+ 929 template\n+ 930 inline auto subEntities(const E& e, Codim c)\n+ 931 {\n+ 932 static_assert(E::codimension <= codim,\n+ 933 \"Can only iterate over sub-entities with equal or larger codimension\");\n+ 934 return transformedRangeView(\n+ 935 range(static_cast(e.subEntities(c))),\n+ 936 [&](const int i){ return e.template subEntity(i); }\n+ 937 );\n+ 938 }\n+ 939\n+ 940#endif // DOXYGEN\n+ 941\n+ 946} // namespace Dune\n+ 947\n+ 948#endif // DUNE_GRID_COMMON_RANGEGENERATORS_HH\n+gridenums.hh\n+partitionset.hh\n+Dune::PartitionIteratorType\n+PartitionIteratorType\n+Parameter to be used for the parallel level- and leaf iterators.\n+Definition: gridenums.hh:136\n+Dune::Entity::intersections\n+IteratorRange<... > intersections(const GV &gv, const Entity &e)\n+Iterates over all Intersections of an Entity with respect to the given\n+GridView.\n+Dune::GridView::vertices\n+IteratorRange<... > vertices(const GV &gv)\n+Iterates over all vertices (entities with dimension 0) of a GridView.\n+Dune::GridView::elements\n+IteratorRange<... > elements(const GV &gv, PartitionSet< partitions > ps)\n+Iterates over all elements / cells (entities with codimension 0) of a GridView\n+that belong to the giv...\n+Dune::GridView::entities\n+IteratorRange<... > entities(const GV &gv, Codim< codim > cd, PartitionSet<\n+partitions > ps)\n+Iterates over all entities of a GridView with the given codimension that belong\n+to the given Partitio...\n+Dune::GridView::edges\n+IteratorRange<... > edges(const GV &gv, PartitionSet< partitions > ps)\n+Iterates over all edges (entities with dimension 1) of a GridView that belong\n+to the given PartitionS...\n+Dune::GridView::entities\n+IteratorRange<... > entities(const GV &gv, Dim< dim > d, PartitionSet<\n+partitions > ps)\n+Iterates over all entities of a GridView with the given dimension that belong\n+to the given PartitionS...\n+Dune::GridView::entities\n+IteratorRange<... > entities(const GV &gv, Dim< dim > d)\n+Iterates over all entities of a GridView with the given dimension.\n+Dune::Entity::subEntities\n+IteratorRange<... > subEntities(const E &e, Codim< codim > c)\n+Iterates over all sub-entities of an entity given the codimension of the sub-\n+entities.\n+Dune::GridView::vertices\n+IteratorRange<... > vertices(const GV &gv, PartitionSet< partitions > ps)\n+Iterates over all vertices (entities with dimension 0) of a GridView that\n+belong to the given Partiti...\n+Dune::GridView::elements\n+IteratorRange<... > elements(const GV &gv)\n+Iterates over all elements / cells (entities with codimension 0) of a GridView.\n+Dune::GridView::entities\n+IteratorRange<... > entities(const GV &gv, Codim< codim > cd)\n+Iterates over all entities of a GridView with the given codimension.\n+Dune::GridView::facets\n+IteratorRange<... > facets(const GV &gv, PartitionSet< partitions > ps)\n+Iterates over all facets (entities with codimension 1) of a GridView that\n+belong to the given Partiti...\n+Dune::GridView::facets\n+IteratorRange<... > facets(const GV &gv)\n+Iterates over all facets (entities with codimension 1) of a GridView.\n+Dune::GridView::edges\n+IteratorRange<... > edges(const GV &gv)\n+Iterates over all edges (entities with dimension 1) of a GridView.\n+Dune::Entity::descendantElements\n+IteratorRange<... > descendantElements(const Entity &e, int maxLevel)\n+Iterates over all descendant elements of the given element up to a maximum\n+level.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::Mapper\n-Mapper interface.\n-Definition: mapper.hh:110\n-Dune::Mapper::size\n-auto size() const\n-Return total number of entities in the entity set managed by the mapper.\n-Definition: mapper.hh:152\n-Dune::Mapper::update\n-void update(GridView &&gridView)\n-Reinitialize mapper after grid has been modified.\n-Definition: mapper.hh:192\n-Dune::Mapper::update\n-void update()\n-Reinitialize mapper after grid has been modified.\n-Definition: mapper.hh:200\n-Dune::Mapper::index\n-Index index(const EntityType &e) const\n-Map entity to array index.\n-Definition: mapper.hh:122\n-Dune::Mapper::Index\n-IndexType Index\n-Number type used for indices.\n-Definition: mapper.hh:114\n-Dune::Mapper::subIndex\n-Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i,\n-unsigned int codim) const\n-Map subentity i of codim cc of a codim 0 entity to array index.\n-Definition: mapper.hh:136\n-Dune::Mapper::contains\n-bool contains(const typename G::Traits::template Codim< 0 >::Entity &e, int i,\n-int cc, IndexType &result) const\n-Returns true if the subentity is contained in the index set and at the same\n-time the array index is r...\n-Definition: mapper.hh:183\n-Dune::Mapper::contains\n-bool contains(const EntityType &e, IndexType &result) const\n-Returns true if the entity is contained in the index set and at the same time\n-the array index is retu...\n-Definition: mapper.hh:167\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::GridView::Codim\n+A struct that collects all associated types of one implementation from the\n+Traits class.\n+Definition: common/gridview.hh:118\n+Dune::PartitionSet\n+A set of PartitionType values.\n+Definition: partitionset.hh:138\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00347.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00347.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: sizecache.hh File Reference\n+dune-grid: gridenums.hh File Reference\n \n \n \n \n \n \n \n@@ -63,50 +63,88 @@\n
    \n \n
    \n \n
    \n \n-
    sizecache.hh File Reference
    \n+Namespaces |\n+Enumerations |\n+Functions
    \n+
    gridenums.hh File Reference
    \n \n
    \n-\n-

    Provides size cache classes to implement the grids size method efficiently. \n-More...

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

    Go to the source code of this file.

    \n \n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::SizeCache< GridImp >
     organizes the caching of sizes for one grid and one GeometryType More...
     
    \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+

    \n+Enumerations

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

    \n+Functions

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

    Detailed Description

    \n-

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

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

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

    Base class for grid boundary segments of arbitrary geometry. \n More...

    \n-\n+
    #include <map>
    \n+#include <sstream>
    \n+#include <dune/common/singleton.hh>
    \n+#include <dune/common/parameterizedobject.hh>
    \n+#include <dune/common/fvector.hh>
    \n+
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n+\n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::AdaptDataHandleInterface< Grid, Impl >
     Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface. More...
     
    class  Dune::AdaptDataHandle< Grid, Impl >
    class  Dune::BoundarySegmentBackupRestore< BndSeg >
     
    class  Dune::CombinedAdaptProlongRestrict< A, B >
     class for combining 2 index sets together for adaptation process More...
    struct  Dune::BoundarySegment< dim, dimworld, ctype >
     Base class for classes implementing geometries of boundary segments. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

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

    \n-
    Author
    Martin Nolte
    \n+

    Base class for grid boundary segments of arbitrary geometry.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,34 +6,31 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n Classes | Namespaces\n-adaptcallback.hh File Reference\n-interfaces and wrappers needed for the callback adaptation provided by\n-AlbertaGrid and dune-ALUGrid More...\n+boundarysegment.hh File Reference\n+Base class for grid boundary segments of arbitrary geometry. More...\n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::AdaptDataHandleInterface<_Grid,_Impl_>\n-\u00a0 Interface class for the Grid's adapt method where the parameter is a\n- AdaptDataHandleInterface. More...\n+ class \u00a0Dune::BoundarySegmentBackupRestore<_BndSeg_>\n \u00a0\n-class \u00a0Dune::AdaptDataHandle<_Grid,_Impl_>\n-\u00a0\n-class \u00a0Dune::CombinedAdaptProlongRestrict<_A,_B_>\n-\u00a0 class for combining 2 index sets together for adaptation process\n- More...\n+struct \u00a0Dune::BoundarySegment<_dim,_dimworld,_ctype_>\n+\u00a0 Base class for classes implementing geometries of boundary segments.\n+ More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-interfaces and wrappers needed for the callback adaptation provided by\n-AlbertaGrid and dune-ALUGrid\n- Author\n- Martin Nolte\n+Base class for grid boundary segments of arbitrary geometry.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00350_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00350_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: adaptcallback.hh Source File\n+dune-grid: boundarysegment.hh Source File\n \n \n \n \n \n \n \n@@ -62,157 +62,120 @@\n \n
    \n \n
    \n
    \n
    \n-
    adaptcallback.hh
    \n+
    boundarysegment.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_ADAPTCALLBACK_HH
    \n-
    6#define DUNE_GRID_COMMON_ADAPTCALLBACK_HH
    \n+
    5#ifndef DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
    \n+
    6#define DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
    \n
    7
    \n-
    14namespace Dune
    \n-
    15{
    \n-
    16
    \n-
    17 // Internal Forward Declarations
    \n-
    18 // -----------------------------
    \n-
    19
    \n-
    20 template< class Grid, class Impl >
    \n-
    21 class AdaptDataHandle;
    \n-
    22
    \n-
    23
    \n-
    24
    \n-
    25 // AdaptDataHandleInterface
    \n-
    26 // ------------------------
    \n-
    27
    \n-
    31 template< class Grid, class Impl >
    \n-\n-
    33 {
    \n-\n-
    35
    \n-
    36 friend class AdaptDataHandle< Grid, Impl >;
    \n-
    37
    \n-
    38 public:
    \n-
    39 typedef typename Grid::template Codim< 0 >::Entity Entity;
    \n-
    40
    \n-
    41 private:
    \n-\n-
    43 {}
    \n-
    44
    \n-
    45 AdaptDataHandleInterface ( const This & );
    \n-
    46 This &operator= ( const This & );
    \n-
    47
    \n-
    48 public:
    \n-
    54 void preCoarsening ( const Entity &father )
    \n-
    55 {
    \n-
    56 asImp().preCoarsening( father );
    \n-
    57 }
    \n-
    58
    \n-
    64 void postRefinement ( const Entity &father )
    \n-
    65 {
    \n-
    66 asImp().postRefinement( father );
    \n+
    8#include <map>
    \n+
    9#include <sstream>
    \n+
    10
    \n+
    11#include <dune/common/singleton.hh>
    \n+
    12#include <dune/common/parameterizedobject.hh>
    \n+
    13#include <dune/common/fvector.hh>
    \n+
    14
    \n+
    19namespace Dune {
    \n+
    20
    \n+
    36 template< int dim, int dimworld = dim, class ctype = double >
    \n+
    37 struct BoundarySegment;
    \n+
    38
    \n+
    39 template <class BndSeg>
    \n+\n+
    41 {
    \n+
    42 public:
    \n+
    43 // type of object stream used for storing boundary segment information
    \n+
    44 typedef std::stringstream ObjectStreamType ;
    \n+
    45
    \n+
    46 protected:
    \n+
    48 typedef BndSeg BoundarySegment;
    \n+
    49
    \n+
    51 typedef Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment > ( ObjectStreamType& ), int > FactoryType;
    \n+
    52
    \n+
    59 static std::unique_ptr< BoundarySegment > restore( ObjectStreamType& in )
    \n+
    60 {
    \n+
    61 int key = -1;
    \n+
    62 // read class key for restore
    \n+
    63 in.read( (char *) &key, sizeof( int ) );
    \n+
    64
    \n+
    65 // factory creates a unique_ptr which can be released later on
    \n+
    66 return factory().create( key, in );
    \n
    67 }
    \n
    68
    \n-
    69 void restrictLocal( const Entity &father, const Entity& son, bool initialize )
    \n-
    70 {
    \n-
    71 asImp().restrictLocal( father, son, initialize );
    \n-
    72 }
    \n-
    73
    \n-
    74 void prolongLocal( const Entity &father, const Entity& son, bool initialize )
    \n-
    75 {
    \n-
    76 asImp().prolongLocal( father, son, initialize );
    \n+
    69 template <class DerivedType>
    \n+
    70 static int registerFactory()
    \n+
    71 {
    \n+
    72 const int key = createKey();
    \n+
    73 // create factory method that produces unique_ptr
    \n+
    74 factory().template define< DerivedType >( key );
    \n+
    75 // return key for storage in derived class
    \n+
    76 return key;
    \n
    77 }
    \n
    78
    \n-
    79 protected:
    \n-
    80 const Impl &asImp () const { return static_cast< const Impl & >( *this ); }
    \n-
    81 Impl &asImp () { return static_cast< Impl & >( *this ); }
    \n-
    82 };
    \n-
    83
    \n-
    84
    \n+
    79 private:
    \n+
    80 static int createKey()
    \n+
    81 {
    \n+
    82 static int key = 0;
    \n+
    83 return key++;
    \n+
    84 }
    \n
    85
    \n-
    86 // AdaptDataHandle
    \n-
    87 // ---------------
    \n-
    88
    \n-
    89 template< class Grid, class Impl >
    \n-\n-
    91 : public AdaptDataHandleInterface< Grid, Impl >
    \n-
    92 {
    \n-\n-\n-
    95
    \n-
    96 public:
    \n-
    97 typedef typename Base::Entity Entity;
    \n-
    98
    \n-
    99 protected:
    \n-\n-
    101 {}
    \n+
    86 static FactoryType& factory()
    \n+
    87 {
    \n+
    88 return Dune::Singleton< FactoryType > :: instance();
    \n+
    89 }
    \n+
    90 };
    \n+
    91
    \n+
    92 template< int dim, int dimworld, class ctype >
    \n+
    93 struct BoundarySegment : public BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > >
    \n+
    94 {
    \n+\n+\n+
    97
    \n+\n+
    99
    \n+
    100 using BaseType :: restore;
    \n+\n
    102
    \n-
    103 private:
    \n-
    104 AdaptDataHandle ( const This & );
    \n-
    105 This &operator= ( const This & );
    \n-
    106
    \n-
    107 void preCoarsening ( const Entity &father );
    \n-
    108 void postRefinement ( const Entity &father );
    \n-
    109 };
    \n+
    104 virtual ~BoundarySegment() {}
    \n+
    105
    \n+
    108 virtual FieldVector< ctype, dimworld >
    \n+
    109 operator() ( const FieldVector< ctype, dim-1> &local ) const = 0;
    \n
    110
    \n-
    111
    \n-
    112 // CombinedAdaptProlongRestrict
    \n-
    113 // ----------------------------
    \n-
    114
    \n-
    116 template <class A, class B >
    \n-\n-
    118 {
    \n-
    120 A& _a;
    \n-
    121 B& _b;
    \n-
    122 public:
    \n-
    124 CombinedAdaptProlongRestrict ( A& a, B& b ) : _a ( a ) , _b ( b )
    \n-
    125 {}
    \n-
    126
    \n-
    128 template <class Entity>
    \n-
    129 void restrictLocal ( const Entity &father, const Entity &son, bool initialize )
    \n-
    130 {
    \n-
    131 _a.restrictLocal(father,son,initialize);
    \n-
    132 _b.restrictLocal(father,son,initialize);
    \n-
    133 }
    \n-
    134
    \n-
    136 template <class Entity>
    \n-
    137 void prolongLocal ( const Entity &father, const Entity &son, bool initialize )
    \n-
    138 {
    \n-
    139 _a.prolongLocal(father,son,initialize);
    \n-
    140 _b.prolongLocal(father,son,initialize);
    \n-
    141 }
    \n-
    142 };
    \n-
    143
    \n-
    144} // end namespace Dune
    \n-
    145
    \n-
    146#endif
    \n+
    114 virtual void backup( [[maybe_unused]] ObjectStreamType& buffer ) const
    \n+
    115 {
    \n+
    116 DUNE_THROW(NotImplemented,"BoundarySegment::backup needs to be overloaded!");
    \n+
    117 }
    \n+
    118 };
    \n+
    119
    \n+
    120
    \n+
    121} // end namespace Dune
    \n+
    122
    \n+
    123#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: adaptcallback.hh:92
    \n-
    Base::Entity Entity
    Definition: adaptcallback.hh:97
    \n-
    AdaptDataHandle()
    Definition: adaptcallback.hh:100
    \n-
    Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
    Definition: adaptcallback.hh:33
    \n-
    void prolongLocal(const Entity &father, const Entity &son, bool initialize)
    Definition: adaptcallback.hh:74
    \n-
    void postRefinement(const Entity &father)
    call back for activity to take place on newly created elements below the father element.
    Definition: adaptcallback.hh:64
    \n-
    Grid::template Codim< 0 >::Entity Entity
    Definition: adaptcallback.hh:39
    \n-
    Impl & asImp()
    Definition: adaptcallback.hh:81
    \n-
    const Impl & asImp() const
    Definition: adaptcallback.hh:80
    \n-
    void restrictLocal(const Entity &father, const Entity &son, bool initialize)
    Definition: adaptcallback.hh:69
    \n-
    void preCoarsening(const Entity &father)
    call back for activity to take place on father and all descendants before the descendants are removed
    Definition: adaptcallback.hh:54
    \n-
    class for combining 2 index sets together for adaptation process
    Definition: adaptcallback.hh:118
    \n-
    CombinedAdaptProlongRestrict(A &a, B &b)
    constructor storing the two references
    Definition: adaptcallback.hh:124
    \n-
    void restrictLocal(const Entity &father, const Entity &son, bool initialize)
    restrict data to father
    Definition: adaptcallback.hh:129
    \n-
    void prolongLocal(const Entity &father, const Entity &son, bool initialize)
    prolong data to children
    Definition: adaptcallback.hh:137
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n+
    BaseType::ObjectStreamType ObjectStreamType
    Definition: boundarysegment.hh:98
    \n+
    BoundarySegment< dim, dimworld, ctype > ThisType
    Definition: boundarysegment.hh:95
    \n+
    virtual void backup(ObjectStreamType &buffer) const
    write BoundarySegment's data to stream buffer
    Definition: boundarysegment.hh:114
    \n+
    BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > > BaseType
    Definition: boundarysegment.hh:96
    \n+
    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.
    \n+
    virtual ~BoundarySegment()
    Dummy virtual destructor.
    Definition: boundarysegment.hh:104
    \n+
    Definition: boundarysegment.hh:41
    \n+
    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
    \n+
    Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment >(ObjectStreamType &), int > FactoryType
    type of factory creating a unique_ptr from an ObjectStreamType
    Definition: boundarysegment.hh:51
    \n+
    BndSeg BoundarySegment
    type of BoundarySegment interface class
    Definition: boundarysegment.hh:48
    \n+
    std::stringstream ObjectStreamType
    Definition: boundarysegment.hh:44
    \n+
    static int registerFactory()
    Definition: boundarysegment.hh:70
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,200 +5,155 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n-adaptcallback.hh\n+boundarysegment.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_ADAPTCALLBACK_HH\n- 6#define DUNE_GRID_COMMON_ADAPTCALLBACK_HH\n+ 5#ifndef DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH\n+ 6#define DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH\n 7\n- 14namespace Dune\n- 15{\n- 16\n- 17 // Internal Forward Declarations\n- 18 // -----------------------------\n- 19\n- 20 template< class Grid, class Impl >\n- 21 class AdaptDataHandle;\n- 22\n- 23\n- 24\n- 25 // AdaptDataHandleInterface\n- 26 // ------------------------\n- 27\n- 31 template< class Grid, class Impl >\n-32 class AdaptDataHandleInterface\n- 33 {\n- 34 typedef AdaptDataHandleInterface<_Grid,_Impl_> This;\n- 35\n- 36 friend class AdaptDataHandle< Grid, Impl >;\n- 37\n- 38 public:\n-39 typedef typename Grid::template Codim< 0 >::Entity Entity;\n- 40\n- 41 private:\n- 42 AdaptDataHandleInterface ()\n- 43 {}\n- 44\n- 45 AdaptDataHandleInterface ( const This & );\n- 46 This &operator= ( const This & );\n- 47\n- 48 public:\n-54 void preCoarsening ( const Entity &father )\n- 55 {\n- 56 asImp().preCoarsening( father );\n- 57 }\n- 58\n-64 void postRefinement ( const Entity &father )\n- 65 {\n- 66 asImp().postRefinement( father );\n+ 8#include \n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13#include \n+ 14\n+ 19namespace Dune {\n+ 20\n+ 36 template< int dim, int dimworld = dim, class ctype = double >\n+ 37 struct BoundarySegment;\n+ 38\n+ 39 template \n+40 class BoundarySegmentBackupRestore\n+ 41 {\n+ 42 public:\n+ 43 // type of object stream used for storing boundary segment information\n+44 typedef std::stringstream ObjectStreamType ;\n+ 45\n+ 46 protected:\n+48 typedef BndSeg BoundarySegment;\n+ 49\n+51 typedef Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment >\n+( ObjectStreamType& ), int > FactoryType;\n+ 52\n+59 static std::unique_ptr< BoundarySegment > restore( ObjectStreamType& in )\n+ 60 {\n+ 61 int key = -1;\n+ 62 // read class key for restore\n+ 63 in.read( (char *) &key, sizeof( int ) );\n+ 64\n+ 65 // factory creates a unique_ptr which can be released later on\n+ 66 return factory().create( key, in );\n 67 }\n 68\n-69 void restrictLocal( const Entity &father, const Entity& son, bool initialize\n-)\n- 70 {\n- 71 asImp().restrictLocal( father, son, initialize );\n- 72 }\n- 73\n-74 void prolongLocal( const Entity &father, const Entity& son, bool initialize\n-)\n- 75 {\n- 76 asImp().prolongLocal( father, son, initialize );\n+ 69 template \n+70 static int registerFactory()\n+ 71 {\n+ 72 const int key = createKey();\n+ 73 // create factory method that produces unique_ptr\n+ 74 factory().template define< DerivedType >( key );\n+ 75 // return key for storage in derived class\n+ 76 return key;\n 77 }\n 78\n- 79 protected:\n-80 const Impl &asImp () const { return static_cast< const Impl & >( *this ); }\n-81 Impl &asImp () { return static_cast< Impl & >( *this ); }\n- 82 };\n- 83\n- 84\n+ 79 private:\n+ 80 static int createKey()\n+ 81 {\n+ 82 static int key = 0;\n+ 83 return key++;\n+ 84 }\n 85\n- 86 // AdaptDataHandle\n- 87 // ---------------\n- 88\n- 89 template< class Grid, class Impl >\n-90 class AdaptDataHandle\n- 91 : public AdaptDataHandleInterface< Grid, Impl >\n- 92 {\n- 93 typedef AdaptDataHandle<_Grid,_Impl_> This;\n- 94 typedef AdaptDataHandleInterface<_Grid,_Impl_> Base;\n- 95\n- 96 public:\n-97 typedef typename Base::Entity Entity;\n- 98\n- 99 protected:\n-100 AdaptDataHandle ()\n- 101 {}\n+ 86 static FactoryType& factory()\n+ 87 {\n+ 88 return Dune::Singleton< FactoryType > :: instance();\n+ 89 }\n+ 90 };\n+ 91\n+ 92 template< int dim, int dimworld, class ctype >\n+93 struct BoundarySegment : public BoundarySegmentBackupRestore<\n+BoundarySegment< dim, dimworld, ctype > >\n+ 94 {\n+95 typedef BoundarySegment<_dim,_dimworld,_ctype_> ThisType;\n+96 typedef BoundarySegmentBackupRestore<_BoundarySegment<_dim,_dimworld,_ctype\n+> > BaseType;\n+ 97\n+98 typedef typename BaseType_::_ObjectStreamType ObjectStreamType;\n+ 99\n+ 100 using BaseType ::_restore;\n+ 101 using BaseType ::_registerFactory;\n 102\n- 103 private:\n- 104 AdaptDataHandle ( const This & );\n- 105 This &operator= ( const This & );\n- 106\n- 107 void preCoarsening ( const Entity &father );\n- 108 void postRefinement ( const Entity &father );\n- 109 };\n+104 virtual ~BoundarySegment() {}\n+ 105\n+ 108 virtual FieldVector< ctype, dimworld >\n+109 operator()( const FieldVector< ctype, dim-1> &local ) const = 0;\n 110\n- 111\n- 112 // CombinedAdaptProlongRestrict\n- 113 // ----------------------------\n- 114\n- 116 template \n-117 class CombinedAdaptProlongRestrict\n- 118 {\n- 120 A& _a;\n- 121 B& _b;\n- 122 public:\n-124 CombinedAdaptProlongRestrict ( A& a, B& b ) : _a ( a ) , _b ( b )\n- 125 {}\n- 126\n- 128 template \n-129 void restrictLocal ( const Entity &father, const Entity &son, bool\n-initialize )\n- 130 {\n- 131 _a.restrictLocal(father,son,initialize);\n- 132 _b.restrictLocal(father,son,initialize);\n- 133 }\n- 134\n- 136 template \n-137 void prolongLocal ( const Entity &father, const Entity &son, bool\n-initialize )\n- 138 {\n- 139 _a.prolongLocal(father,son,initialize);\n- 140 _b.prolongLocal(father,son,initialize);\n- 141 }\n- 142 };\n- 143\n- 144} // end namespace Dune\n- 145\n- 146#endif\n+114 virtual void backup( [[maybe_unused]] ObjectStreamType& buffer ) const\n+ 115 {\n+ 116 DUNE_THROW(NotImplemented,\"BoundarySegment::backup needs to be\n+overloaded!\");\n+ 117 }\n+ 118 };\n+ 119\n+ 120\n+ 121} // end namespace Dune\n+ 122\n+ 123#endif\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::AdaptDataHandle\n-Definition: adaptcallback.hh:92\n-Dune::AdaptDataHandle::Entity\n-Base::Entity Entity\n-Definition: adaptcallback.hh:97\n-Dune::AdaptDataHandle::AdaptDataHandle\n-AdaptDataHandle()\n-Definition: adaptcallback.hh:100\n-Dune::AdaptDataHandleInterface\n-Interface class for the Grid's adapt method where the parameter is a\n-AdaptDataHandleInterface.\n-Definition: adaptcallback.hh:33\n-Dune::AdaptDataHandleInterface::prolongLocal\n-void prolongLocal(const Entity &father, const Entity &son, bool initialize)\n-Definition: adaptcallback.hh:74\n-Dune::AdaptDataHandleInterface::postRefinement\n-void postRefinement(const Entity &father)\n-call back for activity to take place on newly created elements below the father\n-element.\n-Definition: adaptcallback.hh:64\n-Dune::AdaptDataHandleInterface::Entity\n-Grid::template Codim< 0 >::Entity Entity\n-Definition: adaptcallback.hh:39\n-Dune::AdaptDataHandleInterface::asImp\n-Impl & asImp()\n-Definition: adaptcallback.hh:81\n-Dune::AdaptDataHandleInterface::asImp\n-const Impl & asImp() const\n-Definition: adaptcallback.hh:80\n-Dune::AdaptDataHandleInterface::restrictLocal\n-void restrictLocal(const Entity &father, const Entity &son, bool initialize)\n-Definition: adaptcallback.hh:69\n-Dune::AdaptDataHandleInterface::preCoarsening\n-void preCoarsening(const Entity &father)\n-call back for activity to take place on father and all descendants before the\n-descendants are removed\n-Definition: adaptcallback.hh:54\n-Dune::CombinedAdaptProlongRestrict\n-class for combining 2 index sets together for adaptation process\n-Definition: adaptcallback.hh:118\n-Dune::CombinedAdaptProlongRestrict::CombinedAdaptProlongRestrict\n-CombinedAdaptProlongRestrict(A &a, B &b)\n-constructor storing the two references\n-Definition: adaptcallback.hh:124\n-Dune::CombinedAdaptProlongRestrict::restrictLocal\n-void restrictLocal(const Entity &father, const Entity &son, bool initialize)\n-restrict data to father\n-Definition: adaptcallback.hh:129\n-Dune::CombinedAdaptProlongRestrict::prolongLocal\n-void prolongLocal(const Entity &father, const Entity &son, bool initialize)\n-prolong data to children\n-Definition: adaptcallback.hh:137\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::Grid\n-Grid abstract base class.\n-Definition: common/grid.hh:375\n+Dune::BoundarySegment::ObjectStreamType\n+BaseType::ObjectStreamType ObjectStreamType\n+Definition: boundarysegment.hh:98\n+Dune::BoundarySegment::ThisType\n+BoundarySegment< dim, dimworld, ctype > ThisType\n+Definition: boundarysegment.hh:95\n+Dune::BoundarySegment::backup\n+virtual void backup(ObjectStreamType &buffer) const\n+write BoundarySegment's data to stream buffer\n+Definition: boundarysegment.hh:114\n+Dune::BoundarySegment::BaseType\n+BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > >\n+BaseType\n+Definition: boundarysegment.hh:96\n+Dune::BoundarySegment::operator()\n+virtual FieldVector< ctype, dimworld > operator()(const FieldVector< ctype,\n+dim-1 > &local) const =0\n+A function mapping local coordinates on a boundary segment to world\n+coordinates.\n+Dune::BoundarySegment::~BoundarySegment\n+virtual ~BoundarySegment()\n+Dummy virtual destructor.\n+Definition: boundarysegment.hh:104\n+Dune::BoundarySegmentBackupRestore\n+Definition: boundarysegment.hh:41\n+Dune::BoundarySegmentBackupRestore::restore\n+static std::unique_ptr< BoundarySegment > restore(ObjectStreamType &in)\n+create an object of BoundarySegment type from a previously registered factory\n+linked to key.\n+Definition: boundarysegment.hh:59\n+Dune::BoundarySegmentBackupRestore::FactoryType\n+Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment >\n+(ObjectStreamType &), int > FactoryType\n+type of factory creating a unique_ptr from an ObjectStreamType\n+Definition: boundarysegment.hh:51\n+Dune::BoundarySegmentBackupRestore::BoundarySegment\n+BndSeg BoundarySegment\n+type of BoundarySegment interface class\n+Definition: boundarysegment.hh:48\n+Dune::BoundarySegmentBackupRestore::ObjectStreamType\n+std::stringstream ObjectStreamType\n+Definition: boundarysegment.hh:44\n+Dune::BoundarySegmentBackupRestore::registerFactory\n+static int registerFactory()\n+Definition: boundarysegment.hh:70\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00581.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00581.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: coordfunctioncaller.hh File Reference\n+dune-grid: declaration.hh File Reference\n \n \n \n \n \n \n \n@@ -64,30 +64,25 @@\n \n \n \n
    \n \n-
    coordfunctioncaller.hh File Reference
    \n+
    declaration.hh File Reference
    \n
    \n
    \n-\n+\n

    Go to the source code of this file.

    \n \n \n \n \n \n-\n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::GeoGrid
     namespace containing the implementations of GeometryGrid
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,21 +6,16 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * geometrygrid\n Namespaces\n-coordfunctioncaller.hh File Reference\n-#include \n-#include \n+declaration.hh File Reference\n Go_to_the_source_code_of_this_file.\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::GeoGrid\n-\u00a0 namespace containing the implementations of GeometryGrid\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00581_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: coordfunctioncaller.hh Source File\n+dune-grid: declaration.hh Source File\n \n \n \n \n \n \n \n@@ -62,123 +62,34 @@\n \n \n \n
    \n-
    coordfunctioncaller.hh
    \n+
    declaration.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
    \n-
    6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
    \n+
    5#ifndef DUNE_GEOGRID_DECLARATION_HH
    \n+
    6#define DUNE_GEOGRID_DECLARATION_HH
    \n
    7
    \n-\n-\n+
    8namespace Dune
    \n+
    9{
    \n
    10
    \n-
    11namespace Dune
    \n-
    12{
    \n+
    11 template< class HostGrid, class CoordFunction, class Allocator >
    \n+
    12 class GeometryGrid;
    \n
    13
    \n-
    14 namespace GeoGrid
    \n-
    15 {
    \n-
    16
    \n-
    17 // CoordFunctionCaller
    \n-
    18 // -------------------
    \n-
    19
    \n-
    20 template< class HostEntity, class CoordFunctionInterface >
    \n-\n-
    22
    \n-
    23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR, class Impl >
    \n-
    24 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
    \n-
    25 {
    \n-\n-\n-
    28
    \n-
    29 static const int codimension = HostEntity::codimension;
    \n-
    30
    \n-
    31 public:
    \n-
    32 typedef typename CoordFunctionInterface::RangeVector RangeVector;
    \n-
    33
    \n-
    34 CoordFunctionCaller ( const HostEntity &hostEntity,
    \n-
    35 const CoordFunctionInterface &coordFunction )
    \n-
    36 : hostCorners_( hostEntity ),
    \n-
    37 coordFunction_( coordFunction )
    \n-
    38 {}
    \n-
    39
    \n-
    40 void evaluate ( unsigned int i, RangeVector &y ) const
    \n-
    41 {
    \n-
    42 coordFunction_.evaluate( hostCorners_[ i ], y );
    \n-
    43 }
    \n-
    44
    \n-
    45 GeometryType type () const
    \n-
    46 {
    \n-
    47 return hostCorners_.type();
    \n-
    48 }
    \n-
    49
    \n-
    50 std::size_t size () const
    \n-
    51 {
    \n-
    52 return hostCorners_.size();
    \n-
    53 }
    \n-
    54
    \n-
    55 private:
    \n-
    56 const HostCorners< HostEntity > hostCorners_;
    \n-
    57 const CoordFunctionInterface &coordFunction_;
    \n-
    58 };
    \n-
    59
    \n-
    60 template< class HostEntity, class ct, unsigned int dimR, class Impl >
    \n-
    61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, dimR, Impl > >
    \n-
    62 {
    \n-
    63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
    \n-
    64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
    \n-
    65
    \n-
    66 typedef typename CoordFunctionInterface::RangeVector RangeVector;
    \n-
    67
    \n-
    68 public:
    \n-
    69 CoordFunctionCaller ( const HostEntity &hostEntity,
    \n-
    70 const CoordFunctionInterface &coordFunction )
    \n-
    71 : hostEntity_( hostEntity ),
    \n-
    72 coordFunction_( coordFunction )
    \n-
    73 {}
    \n-
    74
    \n-
    75 void evaluate ( unsigned int i, RangeVector &y ) const
    \n-
    76 {
    \n-
    77 coordFunction_.evaluate( hostEntity_, i, y );
    \n-
    78 }
    \n-
    79
    \n-
    80 GeometryType type () const
    \n-
    81 {
    \n-
    82 return hostEntity_.type();
    \n-
    83 }
    \n-
    84
    \n-
    85 std::size_t size () const
    \n-
    86 {
    \n-
    87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() );
    \n-
    88 return refElement.size( HostEntity::mydimension );
    \n-
    89 }
    \n-
    90
    \n-
    91 private:
    \n-
    92 const HostEntity &hostEntity_;
    \n-
    93 const CoordFunctionInterface &coordFunction_;
    \n-
    94 };
    \n-
    95
    \n-
    96 } // namespace GeoGrid
    \n-
    97
    \n-
    98} // namespace Dune
    \n-
    99
    \n-
    100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
    \n-\n-\n+
    14} // namespace Dune
    \n+
    15
    \n+
    16#endif // #ifndef DUNE_GEOGRID_DECLARATION_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
    Definition: coordfunction.hh:44
    \n-
    Definition: coordfunctioncaller.hh:21
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,134 +5,32 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * geometrygrid\n-coordfunctioncaller.hh\n+declaration.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH\n- 6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH\n+ 5#ifndef DUNE_GEOGRID_DECLARATION_HH\n+ 6#define DUNE_GEOGRID_DECLARATION_HH\n 7\n- 8#include \n- 9#include \n+ 8namespace Dune\n+ 9{\n 10\n- 11namespace Dune\n- 12{\n+ 11 template< class HostGrid, class CoordFunction, class Allocator >\n+ 12 class GeometryGrid;\n 13\n- 14 namespace GeoGrid\n- 15 {\n- 16\n- 17 // CoordFunctionCaller\n- 18 // -------------------\n- 19\n- 20 template< class HostEntity, class CoordFunctionInterface >\n-21 class CoordFunctionCaller;\n- 22\n- 23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR,\n-class Impl >\n- 24 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface<\n-ct, dimD, dimR, Impl > >\n- 25 {\n- 26 typedef AnalyticalCoordFunctionInterface<_ct,_dimD,_dimR,_Impl_>\n-CoordFunctionInterface;\n- 27 typedef CoordFunctionCaller<_HostEntity,_CoordFunctionInterface_> This;\n- 28\n- 29 static const int codimension = HostEntity::codimension;\n- 30\n- 31 public:\n- 32 typedef typename CoordFunctionInterface::RangeVector RangeVector;\n- 33\n- 34 CoordFunctionCaller ( const HostEntity &hostEntity,\n- 35 const CoordFunctionInterface &coordFunction )\n- 36 : hostCorners_( hostEntity ),\n- 37 coordFunction_( coordFunction )\n- 38 {}\n- 39\n- 40 void evaluate ( unsigned int i, RangeVector &y ) const\n- 41 {\n- 42 coordFunction_.evaluate( hostCorners_[ i ], y );\n- 43 }\n- 44\n- 45 GeometryType type () const\n- 46 {\n- 47 return hostCorners_.type();\n- 48 }\n- 49\n- 50 std::size_t size () const\n- 51 {\n- 52 return hostCorners_.size();\n- 53 }\n- 54\n- 55 private:\n- 56 const HostCorners< HostEntity > hostCorners_;\n- 57 const CoordFunctionInterface &coordFunction_;\n- 58 };\n- 59\n- 60 template< class HostEntity, class ct, unsigned int dimR, class Impl >\n- 61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct,\n-dimR, Impl > >\n- 62 {\n- 63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl >\n-CoordFunctionInterface;\n- 64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;\n- 65\n- 66 typedef typename CoordFunctionInterface::RangeVector RangeVector;\n- 67\n- 68 public:\n- 69 CoordFunctionCaller ( const HostEntity &hostEntity,\n- 70 const CoordFunctionInterface &coordFunction )\n- 71 : hostEntity_( hostEntity ),\n- 72 coordFunction_( coordFunction )\n- 73 {}\n- 74\n- 75 void evaluate ( unsigned int i, RangeVector &y ) const\n- 76 {\n- 77 coordFunction_.evaluate( hostEntity_, i, y );\n- 78 }\n- 79\n- 80 GeometryType type () const\n- 81 {\n- 82 return hostEntity_.type();\n- 83 }\n- 84\n- 85 std::size_t size () const\n- 86 {\n- 87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type()\n-);\n- 88 return refElement.size( HostEntity::mydimension );\n- 89 }\n- 90\n- 91 private:\n- 92 const HostEntity &hostEntity_;\n- 93 const CoordFunctionInterface &coordFunction_;\n- 94 };\n- 95\n- 96 } // namespace GeoGrid\n- 97\n- 98} // namespace Dune\n- 99\n- 100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH\n-coordfunction.hh\n-hostcorners.hh\n+ 14} // namespace Dune\n+ 15\n+ 16#endif // #ifndef DUNE_GEOGRID_DECLARATION_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::AnalyticalCoordFunctionInterface\n-Interface class for using an analytical function to define the geometry of a\n-Dune::GeometryGrid....\n-Definition: coordfunction.hh:44\n-Dune::GeoGrid::CoordFunctionCaller\n-Definition: coordfunctioncaller.hh:21\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00596.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00596.html", "unified_diff": "@@ -71,17 +71,17 @@\n Namespaces \n
    cachedcoordfunction.hh File Reference
    \n \n
    \n
    #include <cassert>
    \n #include <memory>
    \n #include <dune/common/typetraits.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n #include <dune/grid/geometrygrid/capabilities.hh>
    \n-#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
    \n+#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
    \n #include <dune/grid/utility/persistentcontainer.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00596_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00596_source.html", "unified_diff": "@@ -77,18 +77,18 @@\n
    6#define DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH
    \n
    7
    \n
    8#include <cassert>
    \n
    9#include <memory>
    \n
    10
    \n
    11#include <dune/common/typetraits.hh>
    \n
    12
    \n-\n+\n
    14
    \n \n-\n+\n \n
    18
    \n
    19namespace Dune
    \n
    20{
    \n
    21
    \n
    22 // Internal Forward Declarations
    \n
    23 // -----------------------------
    \n@@ -267,16 +267,16 @@\n
    196 for( unsigned int i = 0; i < numCorners; ++i )
    \n
    197 coordFunctionCaller.evaluate( i, cache_( hostEntity, i ) );
    \n
    198 }
    \n
    199
    \n
    200} // namespace Dune
    \n
    201
    \n
    202#endif // #ifndef DUNE_GEOGRID_CACHEDCOORDFUNCTION_HH
    \n-\n-\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    ALBERTA EL Element
    Definition: misc.hh:54
    \n
    @ vertex
    Definition: common.hh:133
    \n
    Definition: cachedcoordfunction.hh:99
    \n
    void adapt()
    Definition: cachedcoordfunction.hh:122
    \n
    CachedCoordFunction(const HostGrid &hostGrid, const CoordFunction &coordFunction=CoordFunction())
    Definition: cachedcoordfunction.hh:113
    \n
    void evaluate(const HostEntity &hostEntity, unsigned int corner, RangeVector &y) const
    Definition: cachedcoordfunction.hh:134
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00605.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00605.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identity.hh File Reference\n+dune-grid: iterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,31 +65,56 @@\n
  • dune
  • grid
  • geometrygrid
  • \n \n \n
    \n \n-
    identity.hh File Reference
    \n+
    iterator.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid/geometrygrid/coordfunction.hh>
    \n+
    #include <cassert>
    \n+#include <type_traits>
    \n+#include <utility>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid/geometrygrid/capabilities.hh>
    \n+#include <dune/grid/geometrygrid/declaration.hh>
    \n+#include <dune/grid/geometrygrid/entity.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GeoGrid::CoordCache< HostGrid, Coordinate >
    \n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::IdenticalCoordFunction< ctype, dim >
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid >
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid >
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid >
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid >
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid >
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid >
     
    class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, false >
     
    class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, true >
     
    class  Dune::GeoGrid::HierarchicIterator< G >
     
    \n \n \n \n \n+\n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::GeoGrid
     namespace containing the implementations of GeometryGrid
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,20 +6,49 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * geometrygrid\n Classes | Namespaces\n-identity.hh File Reference\n-#include \n+iterator.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdenticalCoordFunction<_ctype,_dim_>\n+struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_Interior_Partition,\n+ Grid_>\n+\u00a0\n+struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,\n+ InteriorBorder_Partition,_Grid_>\n+\u00a0\n+struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_Overlap_Partition,_Grid\n+ >\n+\u00a0\n+struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_OverlapFront_Partition,\n+ Grid_>\n+\u00a0\n+struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_All_Partition,_Grid_>\n+\u00a0\n+struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_Ghost_Partition,_Grid_>\n+\u00a0\n+ class \u00a0Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>\n+\u00a0\n+ class \u00a0Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>\n+\u00a0\n+ class \u00a0Dune::GeoGrid::HierarchicIterator<_G_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::GeoGrid\n+\u00a0 namespace containing the implementations of GeometryGrid\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00605_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identity.hh Source File\n+dune-grid: iterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,65 +62,524 @@\n \n \n \n
    \n-
    identity.hh
    \n+
    iterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GEOGRID_IDENTITY_HH
    \n-
    6#define DUNE_GEOGRID_IDENTITY_HH
    \n+
    5#ifndef DUNE_GEOGRID_ITERATOR_HH
    \n+
    6#define DUNE_GEOGRID_ITERATOR_HH
    \n
    7
    \n-\n+
    8#include <cassert>
    \n
    9
    \n-
    10namespace Dune
    \n-
    11{
    \n+
    10#include <type_traits>
    \n+
    11#include <utility>
    \n
    12
    \n-
    13 template< class ctype, unsigned int dim >
    \n-\n-\n-
    16 < ctype, dim, dim, IdenticalCoordFunction< ctype, dim > >
    \n-
    17 {
    \n-\n-\n-
    20
    \n-
    21 public:
    \n-\n-\n+
    13#include <dune/geometry/referenceelements.hh>
    \n+
    14
    \n+\n+\n+\n+
    18
    \n+
    19namespace Dune
    \n+
    20{
    \n+
    21
    \n+
    22 namespace GeoGrid
    \n+
    23 {
    \n
    24
    \n-
    25 template< typename... Args >
    \n-\n-
    27 {}
    \n-
    28
    \n-\n-
    30 {
    \n-
    31 return x;
    \n-
    32 }
    \n-
    33
    \n-
    34 };
    \n+
    25 // Internal Forward Declarations
    \n+
    26 // -----------------------------
    \n+
    27
    \n+
    28 template< class HostGridView, int codim, PartitionIteratorType pitype, class Grid,
    \n+
    29 bool fake = !Capabilities::hasHostEntity< Grid, codim >::v >
    \n+
    30 class Iterator;
    \n+
    31
    \n+
    32 template< class Grid >
    \n+\n+
    34
    \n
    35
    \n-
    36}
    \n-
    37
    \n-
    38#endif
    \n-\n+
    36
    \n+
    37 // PartitionIteratorFilter
    \n+
    38 // -----------------------
    \n+
    39
    \n+
    40 template< int codim, PartitionIteratorType pitype, class Grid >
    \n+\n+
    42
    \n+
    43 template< int codim, class Grid >
    \n+\n+
    45 {
    \n+
    46 static const int dimension = std::remove_const< Grid >::type::dimension;
    \n+
    47 static const int codimension = codim;
    \n+
    48
    \n+
    49 static const PartitionIteratorType Element_Partition = Interior_Partition;
    \n+
    50
    \n+
    51 typedef typename std::remove_const< Grid >::type::ctype ctype;
    \n+
    52 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
    \n+
    53 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
    \n+
    54
    \n+
    55 static bool apply ( const RefElement &refElement,
    \n+
    56 const Element &element, int subEntity )
    \n+
    57 {
    \n+
    58 const int size = refElement.size( subEntity, codim, dimension );
    \n+
    59 for( int i = 0; i < size; ++i )
    \n+
    60 {
    \n+
    61 const int j = refElement.subEntity( subEntity, codim, i, dimension );
    \n+
    62 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
    \n+
    63 if( type == InteriorEntity )
    \n+
    64 return true;
    \n+
    65 }
    \n+
    66 return false;
    \n+
    67 }
    \n+
    68 };
    \n+
    69
    \n+
    70 template< int codim, class Grid >
    \n+\n+
    72 {
    \n+
    73 static const int dimension = std::remove_const< Grid >::type::dimension;
    \n+
    74 static const int codimension = codim;
    \n+
    75
    \n+
    76 static const PartitionIteratorType Element_Partition = Interior_Partition;
    \n+
    77
    \n+
    78 typedef typename std::remove_const< Grid >::type::ctype ctype;
    \n+
    79 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
    \n+
    80 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
    \n+
    81
    \n+
    82 static bool apply ( const RefElement &refElement,
    \n+
    83 const Element &element, int subEntity )
    \n+
    84 {
    \n+
    85 return true;
    \n+
    86 }
    \n+
    87 };
    \n+
    88
    \n+
    89 template< int codim, class Grid >
    \n+\n+
    91 {
    \n+
    92 static const int dimension = std::remove_const< Grid >::type::dimension;
    \n+
    93 static const int codimension = codim;
    \n+
    94
    \n+
    95 static const PartitionIteratorType Element_Partition = Overlap_Partition;
    \n+
    96
    \n+
    97 typedef typename std::remove_const< Grid >::type::ctype ctype;
    \n+
    98 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
    \n+
    99 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
    \n+
    100
    \n+
    101 static bool apply ( const RefElement &refElement,
    \n+
    102 const Element &element, int subEntity )
    \n+
    103 {
    \n+
    104 if( element.partitionType() == InteriorEntity )
    \n+
    105 return true;
    \n+
    106
    \n+
    107 const int size = refElement.size( subEntity, codim, dimension );
    \n+
    108 for( int i = 0; i < size; ++i )
    \n+
    109 {
    \n+
    110 const int j = refElement.subEntity( subEntity, codim, i, dimension );
    \n+
    111 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
    \n+
    112 if( (type == OverlapEntity) || (type == BorderEntity) )
    \n+
    113 return true;
    \n+
    114 }
    \n+
    115 return false;
    \n+
    116 }
    \n+
    117 };
    \n+
    118
    \n+
    119 template< int codim, class Grid >
    \n+\n+
    121 {
    \n+
    122 static const int dimension = std::remove_const< Grid >::type::dimension;
    \n+
    123 static const int codimension = codim;
    \n+
    124
    \n+
    125 static const PartitionIteratorType Element_Partition = Overlap_Partition;
    \n+
    126
    \n+
    127 typedef typename std::remove_const< Grid >::type::ctype ctype;
    \n+
    128 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
    \n+
    129 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
    \n+
    130
    \n+
    131 static bool apply ( const RefElement &refElement,
    \n+
    132 const Element &element, int subEntity )
    \n+
    133 {
    \n+
    134 return true;
    \n+
    135 }
    \n+
    136 };
    \n+
    137
    \n+
    138 template< int codim, class Grid >
    \n+\n+
    140 {
    \n+
    141 static const int dimension = std::remove_const< Grid >::type::dimension;
    \n+
    142 static const int codimension = codim;
    \n+
    143
    \n+
    144 static const PartitionIteratorType Element_Partition = All_Partition;
    \n+
    145
    \n+
    146 typedef typename std::remove_const< Grid >::type::ctype ctype;
    \n+
    147 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
    \n+
    148 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
    \n+
    149
    \n+
    150 static bool apply ( const RefElement &refElement,
    \n+
    151 const Element &element, int subEntity )
    \n+
    152 {
    \n+
    153 return true;
    \n+
    154 }
    \n+
    155 };
    \n+
    156
    \n+
    157 template< int codim, class Grid >
    \n+\n+
    159 {
    \n+
    160 static const int dimension = std::remove_const< Grid >::type::dimension;
    \n+
    161 static const int codimension = codim;
    \n+
    162
    \n+
    163 static const PartitionIteratorType Element_Partition = Ghost_Partition;
    \n+
    164
    \n+
    165 typedef typename std::remove_const< Grid >::type::ctype ctype;
    \n+
    166 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element;
    \n+
    167 typedef Transitional::ReferenceElement< ctype, Dim<dimension> > RefElement;
    \n+
    168
    \n+
    169 static bool apply ( const RefElement &refElement,
    \n+
    170 const Element &element, int subEntity )
    \n+
    171 {
    \n+
    172 const int size = refElement.size( subEntity, codim, dimension );
    \n+
    173 for( int i = 0; i < size; ++i )
    \n+
    174 {
    \n+
    175 const int j = refElement.subEntity( subEntity, codim, i, dimension );
    \n+
    176 PartitionType type = element.template subEntity< dimension >( j ).partitionType();
    \n+
    177 if( type == GhostEntity )
    \n+
    178 return true;
    \n+
    179 }
    \n+
    180 return false;
    \n+
    181 }
    \n+
    182 };
    \n+
    183
    \n+
    184
    \n+
    185
    \n+
    186 // Iterator (real)
    \n+
    187 // ---------------
    \n+
    188
    \n+
    189 template< class HostGridView, int codim, PartitionIteratorType pitype, class G >
    \n+
    190 class Iterator< HostGridView, codim, pitype, G, false >
    \n+
    191 {
    \n+
    192 typedef typename std::remove_const< G >::type::Traits Traits;
    \n+
    193
    \n+
    194 public:
    \n+
    195 typedef typename Traits::Grid Grid;
    \n+
    196
    \n+
    197 static const int codimension = codim;
    \n+
    198
    \n+
    199 typedef typename Traits::template Codim< codimension >::Entity Entity;
    \n+
    200
    \n+
    201 static const bool fake = false;
    \n+
    202
    \n+
    203 private:
    \n+\n+
    205
    \n+
    206 typedef typename HostGridView::template Codim< codim >::template Partition< pitype >::Iterator HostEntityIterator;
    \n+
    207
    \n+
    208 public:
    \n+
    209 Iterator () : grid_( nullptr ) {}
    \n+
    210
    \n+
    211 Iterator ( const Grid &grid, HostEntityIterator hostEntityIterator )
    \n+
    212 : grid_( &grid ),
    \n+
    213 hostEntityIterator_( std::move( hostEntityIterator ) )
    \n+
    214 {}
    \n+
    215
    \n+
    216 void increment ()
    \n+
    217 {
    \n+
    218 ++hostEntityIterator_;
    \n+
    219 }
    \n+
    220
    \n+
    221 bool equals ( const Iterator &rhs ) const
    \n+
    222 {
    \n+
    223 return hostEntityIterator_ == rhs.hostEntityIterator_;
    \n+
    224 }
    \n+
    225
    \n+\n+
    227 {
    \n+
    228 return EntityImpl( grid(), *hostEntityIterator_ );
    \n+
    229 }
    \n+
    230
    \n+
    231 int level () const { return hostEntityIterator_.level(); }
    \n+
    232
    \n+
    233 const Grid &grid () const
    \n+
    234 {
    \n+
    235 assert( grid_ );
    \n+
    236 return *grid_;
    \n+
    237 }
    \n+
    238
    \n+
    239 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView )
    \n+
    240 {
    \n+
    241 HostEntityIterator hostEntityIterator = hostGridView.template begin< codimension, pitype >();
    \n+
    242 return Iterator( grid, std::move( hostEntityIterator ) );
    \n+
    243 }
    \n+
    244
    \n+
    245 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )
    \n+
    246 {
    \n+
    247 HostEntityIterator hostEntityIterator = hostGridView.template end< codimension, pitype >();
    \n+
    248 return Iterator( grid, std::move( hostEntityIterator ) );
    \n+
    249 }
    \n+
    250
    \n+
    251 private:
    \n+
    252 const Grid *grid_;
    \n+
    253 HostEntityIterator hostEntityIterator_;
    \n+
    254 };
    \n+
    255
    \n+
    256
    \n+
    257
    \n+
    258 // Iterator (fake)
    \n+
    259 // ---------------
    \n+
    260
    \n+
    261 template< class HostGridView, int codim, PartitionIteratorType pitype, class G >
    \n+
    262 class Iterator< HostGridView, codim, pitype, G, true >
    \n+
    263 {
    \n+
    264 typedef typename std::remove_const< G >::type::Traits Traits;
    \n+
    265
    \n+
    266 public:
    \n+
    267 typedef typename Traits::Grid Grid;
    \n+
    268
    \n+
    269 static const int codimension = codim;
    \n+
    270
    \n+
    271 typedef typename Traits::template Codim< codimension >::Entity Entity;
    \n+
    272
    \n+
    273 private:
    \n+\n+
    275
    \n+\n+
    277
    \n+
    278 typedef typename HostGridView::template Codim<0>::template Partition< Filter::Element_Partition >::Iterator HostElementIterator;
    \n+
    279 typedef typename HostElementIterator::Entity HostElement;
    \n+
    280 typedef typename HostGridView::IndexSet HostIndexSet;
    \n+
    281
    \n+
    282 public:
    \n+
    283 Iterator () : grid_( nullptr ), subEntity_( -1 ), hostIndexSet_( nullptr ) {}
    \n+
    284
    \n+
    285 Iterator ( const Grid &grid, HostElementIterator hostElementIterator, HostElementIterator hostEnd, const HostIndexSet &hostIndexSet )
    \n+
    286 : grid_( &grid ),
    \n+
    287 hostElementIterator_( hostElementIterator ),
    \n+
    288 hostEnd_( hostEnd ),
    \n+
    289 subEntity_( -1 ),
    \n+
    290 hostIndexSet_( &hostIndexSet )
    \n+
    291 {
    \n+
    292 if( hostElementIterator_ != hostEnd_ )
    \n+
    293 {
    \n+
    294 visited_.resize( hostIndexSet_->size( codimension ), false );
    \n+
    295 increment();
    \n+
    296 }
    \n+
    297 }
    \n+
    298
    \n+
    299 void increment ()
    \n+
    300 {
    \n+
    301 typedef typename Traits::ctype ctype;
    \n+
    302
    \n+
    303 while( hostElementIterator_ != hostEnd_ )
    \n+
    304 {
    \n+
    305 const HostElement &hostElement = *hostElementIterator_;
    \n+
    306
    \n+
    307 auto refElement = referenceElement< ctype, Traits::dimension >( hostElement.type() );
    \n+
    308
    \n+
    309 ++subEntity_;
    \n+
    310 const int count = refElement.size( codimension );
    \n+
    311 for( ; subEntity_ < count; ++subEntity_ )
    \n+
    312 {
    \n+
    313 if( !Filter::apply( refElement, hostElement, subEntity_ ) )
    \n+
    314 continue;
    \n+
    315
    \n+
    316 const size_t index = hostIndexSet_->subIndex( hostElement, subEntity_, codimension );
    \n+
    317 if( !visited_[ index ] )
    \n+
    318 {
    \n+
    319 visited_[ index ] = true;
    \n+
    320 return;
    \n+
    321 }
    \n+
    322 }
    \n+
    323 ++hostElementIterator_;
    \n+
    324 subEntity_ = -1;
    \n+
    325 }
    \n+
    326 }
    \n+
    327
    \n+
    328 bool equals ( const Iterator &rhs ) const
    \n+
    329 {
    \n+
    330 return hostElementIterator_ == rhs.hostElementIterator_ && ( hostElementIterator_ == hostEnd_ || subEntity_ == rhs.subEntity_ );
    \n+
    331 }
    \n+
    332
    \n+\n+
    334 {
    \n+
    335 return EntityImpl( grid(), *hostElementIterator_, subEntity_ );
    \n+
    336 }
    \n+
    337
    \n+
    338 int level () const { return hostElementIterator_.level(); }
    \n+
    339
    \n+
    340 const Grid &grid () const
    \n+
    341 {
    \n+
    342 assert( grid_ );
    \n+
    343 return *grid_;
    \n+
    344 }
    \n+
    345
    \n+
    346 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView )
    \n+
    347 {
    \n+
    348 HostElementIterator first = hostGridView.template begin< 0, Filter::Element_Partition >();
    \n+
    349 HostElementIterator last = hostGridView.template end< 0, Filter::Element_Partition >();
    \n+
    350 return Iterator( grid, std::move( first ), std::move( last ), hostGridView.indexSet() );
    \n+
    351 }
    \n+
    352
    \n+
    353 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )
    \n+
    354 {
    \n+
    355 HostElementIterator last = hostGridView.template end< 0, Filter::Element_Partition >();
    \n+
    356 return Iterator( grid, last, last, hostGridView.indexSet() );
    \n+
    357 }
    \n+
    358
    \n+
    359 private:
    \n+
    360 const Grid *grid_;
    \n+
    361 HostElementIterator hostElementIterator_, hostEnd_;
    \n+
    362 int subEntity_;
    \n+
    363 const HostIndexSet *hostIndexSet_;
    \n+
    364 std::vector< bool > visited_;
    \n+
    365 };
    \n+
    366
    \n+
    367
    \n+
    368
    \n+
    369 // HierarchicIterator
    \n+
    370 // ------------------
    \n+
    371
    \n+
    372 template< class G >
    \n+\n+
    374 {
    \n+
    375 typedef typename std::remove_const< G >::type::Traits Traits;
    \n+
    376
    \n+
    377 public:
    \n+
    378 typedef typename Traits::Grid Grid;
    \n+
    379
    \n+
    380 static const int codimension = 0;
    \n+
    381
    \n+
    382 typedef typename Traits::template Codim< codimension >::Entity Entity;
    \n+
    383
    \n+
    384 private:
    \n+\n+
    386
    \n+
    387 typedef typename Grid::HostGrid::HierarchicIterator HostEntityIterator;
    \n+
    388
    \n+
    389 public:
    \n+
    390 HierarchicIterator () : grid_( nullptr ) {}
    \n+
    391
    \n+
    392 HierarchicIterator ( const Grid &grid, HostEntityIterator hostEntityIterator )
    \n+
    393 : grid_( &grid ),
    \n+
    394 hostEntityIterator_( std::move( hostEntityIterator ) )
    \n+
    395 {}
    \n+
    396
    \n+
    397 void increment ()
    \n+
    398 {
    \n+
    399 ++hostEntityIterator_;
    \n+
    400 }
    \n+
    401
    \n+
    402 bool equals ( const HierarchicIterator &rhs ) const
    \n+
    403 {
    \n+
    404 return hostEntityIterator_ == rhs.hostEntityIterator_;
    \n+
    405 }
    \n+
    406
    \n+\n+
    408 {
    \n+
    409 return EntityImpl( grid(), *hostEntityIterator_ );
    \n+
    410 }
    \n+
    411
    \n+
    412 int level () const { return hostEntityIterator_.level(); }
    \n+
    413
    \n+
    414 const Grid &grid () const
    \n+
    415 {
    \n+
    416 assert( grid_ );
    \n+
    417 return *grid_;
    \n+
    418 }
    \n+
    419
    \n+
    420 private:
    \n+
    421 const Grid *grid_;
    \n+
    422 HostEntityIterator hostEntityIterator_;
    \n+
    423 };
    \n+
    424
    \n+
    425 } // namespace GeoGrid
    \n+
    426
    \n+
    427} // namespace Dune
    \n+
    428
    \n+
    429#endif // #ifndef DUNE_GEOGRID_ITERATOR_HH
    \n+\n+
    PartitionIteratorType
    Parameter to be used for the parallel level- and leaf iterators.
    Definition: gridenums.hh:136
    \n+
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n+
    @ All_Partition
    all entities
    Definition: gridenums.hh:141
    \n+
    @ OverlapFront_Partition
    interior, border, overlap and front entities
    Definition: gridenums.hh:140
    \n+
    @ Interior_Partition
    only interior entities
    Definition: gridenums.hh:137
    \n+
    @ InteriorBorder_Partition
    interior and border entities
    Definition: gridenums.hh:138
    \n+
    @ Overlap_Partition
    interior, border, and overlap entities
    Definition: gridenums.hh:139
    \n+
    @ Ghost_Partition
    only ghost entities
    Definition: gridenums.hh:142
    \n+
    @ InteriorEntity
    all interior entities
    Definition: gridenums.hh:31
    \n+
    @ GhostEntity
    ghost entities
    Definition: gridenums.hh:35
    \n+
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n+
    @ OverlapEntity
    all entities lying in the overlap zone
    Definition: gridenums.hh:33
    \n+
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Derive an implementation of an analytical coordinate function from this class.
    Definition: coordfunction.hh:134
    \n-
    Base::DomainVector DomainVector
    Definition: coordfunction.hh:139
    \n-
    Base::RangeVector RangeVector
    Definition: coordfunction.hh:140
    \n-
    Definition: identity.hh:17
    \n-
    IdenticalCoordFunction(Args &...)
    Definition: identity.hh:26
    \n-
    Base::RangeVector RangeVector
    Definition: identity.hh:23
    \n-
    RangeVector operator()(const DomainVector &x) const
    Definition: identity.hh:29
    \n-
    Base::DomainVector DomainVector
    Definition: identity.hh:22
    \n+
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n+
    DUNE-conform implementation of the entity.
    Definition: geometrygrid/entity.hh:694
    \n+
    Definition: iterator.hh:374
    \n+
    static const int codimension
    Definition: iterator.hh:380
    \n+
    int level() const
    Definition: iterator.hh:412
    \n+
    void increment()
    Definition: iterator.hh:397
    \n+
    bool equals(const HierarchicIterator &rhs) const
    Definition: iterator.hh:402
    \n+
    Entity dereference() const
    Definition: iterator.hh:407
    \n+
    HierarchicIterator()
    Definition: iterator.hh:390
    \n+
    HierarchicIterator(const Grid &grid, HostEntityIterator hostEntityIterator)
    Definition: iterator.hh:392
    \n+
    Traits::Grid Grid
    Definition: iterator.hh:378
    \n+
    const Grid & grid() const
    Definition: iterator.hh:414
    \n+
    Traits::template Codim< codimension >::Entity Entity
    Definition: iterator.hh:382
    \n+
    Definition: iterator.hh:30
    \n+
    Definition: iterator.hh:41
    \n+
    std::remove_const< Grid >::type::ctype ctype
    Definition: iterator.hh:51
    \n+
    std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
    Definition: iterator.hh:52
    \n+
    static bool apply(const RefElement &refElement, const Element &element, int subEntity)
    Definition: iterator.hh:55
    \n+
    Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
    Definition: iterator.hh:53
    \n+
    Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
    Definition: iterator.hh:80
    \n+
    static bool apply(const RefElement &refElement, const Element &element, int subEntity)
    Definition: iterator.hh:82
    \n+
    std::remove_const< Grid >::type::ctype ctype
    Definition: iterator.hh:78
    \n+
    std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
    Definition: iterator.hh:79
    \n+
    Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
    Definition: iterator.hh:99
    \n+
    std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
    Definition: iterator.hh:98
    \n+
    static bool apply(const RefElement &refElement, const Element &element, int subEntity)
    Definition: iterator.hh:101
    \n+
    std::remove_const< Grid >::type::ctype ctype
    Definition: iterator.hh:97
    \n+
    std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
    Definition: iterator.hh:128
    \n+
    std::remove_const< Grid >::type::ctype ctype
    Definition: iterator.hh:127
    \n+
    Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
    Definition: iterator.hh:129
    \n+
    static bool apply(const RefElement &refElement, const Element &element, int subEntity)
    Definition: iterator.hh:131
    \n+
    static bool apply(const RefElement &refElement, const Element &element, int subEntity)
    Definition: iterator.hh:150
    \n+
    std::remove_const< Grid >::type::ctype ctype
    Definition: iterator.hh:146
    \n+
    Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
    Definition: iterator.hh:148
    \n+
    std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
    Definition: iterator.hh:147
    \n+
    Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement
    Definition: iterator.hh:167
    \n+
    std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
    Definition: iterator.hh:166
    \n+
    std::remove_const< Grid >::type::ctype ctype
    Definition: iterator.hh:165
    \n+
    static bool apply(const RefElement &refElement, const Element &element, int subEntity)
    Definition: iterator.hh:169
    \n+\n+\n+
    Entity dereference() const
    Definition: iterator.hh:226
    \n+\n+\n+
    bool equals(const Iterator &rhs) const
    Definition: iterator.hh:221
    \n+
    static Iterator begin(const Grid &grid, const HostGridView &hostGridView)
    Definition: iterator.hh:239
    \n+
    Traits::template Codim< codimension >::Entity Entity
    Definition: iterator.hh:199
    \n+
    const Grid & grid() const
    Definition: iterator.hh:233
    \n+
    static Iterator end(const Grid &grid, const HostGridView &hostGridView)
    Definition: iterator.hh:245
    \n+
    Iterator(const Grid &grid, HostEntityIterator hostEntityIterator)
    Definition: iterator.hh:211
    \n+\n+\n+\n+
    const Grid & grid() const
    Definition: iterator.hh:340
    \n+
    static Iterator end(const Grid &grid, const HostGridView &hostGridView)
    Definition: iterator.hh:353
    \n+
    static Iterator begin(const Grid &grid, const HostGridView &hostGridView)
    Definition: iterator.hh:346
    \n+
    bool equals(const Iterator &rhs) const
    Definition: iterator.hh:328
    \n+
    Entity dereference() const
    Definition: iterator.hh:333
    \n+
    Iterator(const Grid &grid, HostElementIterator hostElementIterator, HostElementIterator hostEnd, const HostIndexSet &hostIndexSet)
    Definition: iterator.hh:285
    \n+
    Traits::template Codim< codimension >::Entity Entity
    Definition: iterator.hh:271
    \n+\n+\n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,78 +5,730 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * geometrygrid\n-identity.hh\n+iterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GEOGRID_IDENTITY_HH\n- 6#define DUNE_GEOGRID_IDENTITY_HH\n+ 5#ifndef DUNE_GEOGRID_ITERATOR_HH\n+ 6#define DUNE_GEOGRID_ITERATOR_HH\n 7\n- 8#include \n+ 8#include \n 9\n- 10namespace Dune\n- 11{\n+ 10#include \n+ 11#include \n 12\n- 13 template< class ctype, unsigned int dim >\n-14 class IdenticalCoordFunction\n- 15 : public AnalyticalCoordFunction\n- 16 < ctype, dim, dim, IdenticalCoordFunction< ctype, dim > >\n- 17 {\n- 18 typedef IdenticalCoordFunction<_ctype,_dim_> This;\n- 19 typedef AnalyticalCoordFunction<_ctype,_dim,_dim,_This_> Base;\n- 20\n- 21 public:\n-22 typedef typename Base_::_DomainVector DomainVector;\n-23 typedef typename Base_::_RangeVector RangeVector;\n+ 13#include \n+ 14\n+ 15#include \n+ 16#include \n+ 17#include \n+ 18\n+ 19namespace Dune\n+ 20{\n+ 21\n+ 22 namespace GeoGrid\n+ 23 {\n 24\n- 25 template< typename... Args >\n-26 IdenticalCoordFunction( Args&... )\n- 27 {}\n- 28\n-29 RangeVector operator()(const DomainVector& x) const\n- 30 {\n- 31 return x;\n- 32 }\n- 33\n- 34 };\n+ 25 // Internal Forward Declarations\n+ 26 // -----------------------------\n+ 27\n+ 28 template< class HostGridView, int codim, PartitionIteratorType pitype,\n+class Grid,\n+ 29 bool fake = !Capabilities::hasHostEntity< Grid, codim >::v >\n+30 class Iterator;\n+ 31\n+ 32 template< class Grid >\n+ 33 class HierarchicIterator;\n+ 34\n 35\n- 36}\n- 37\n- 38#endif\n-coordfunction.hh\n+ 36\n+ 37 // PartitionIteratorFilter\n+ 38 // -----------------------\n+ 39\n+ 40 template< int codim, PartitionIteratorType pitype, class Grid >\n+41 struct PartitionIteratorFilter;\n+ 42\n+ 43 template< int codim, class Grid >\n+44 struct PartitionIteratorFilter< codim, Interior_Partition, Grid >\n+ 45 {\n+46 static const int dimension = std::remove_const< Grid >::type::dimension;\n+47 static const int codimension = codim;\n+ 48\n+49 static const PartitionIteratorType Element_Partition = Interior_Partition;\n+ 50\n+51 typedef typename std::remove_const< Grid >::type::ctype ctype;\n+52 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0\n+>::Entity Element;\n+53 typedef Transitional::ReferenceElement< ctype, Dim > RefElement;\n+ 54\n+55 static bool apply ( const RefElement &refElement,\n+ 56 const Element &element, int subEntity )\n+ 57 {\n+ 58 const int size = refElement.size( subEntity, codim, dimension );\n+ 59 for( int i = 0; i < size; ++i )\n+ 60 {\n+ 61 const int j = refElement.subEntity( subEntity, codim, i, dimension );\n+ 62 PartitionType type = element.template subEntity< dimension >( j\n+).partitionType();\n+ 63 if( type == InteriorEntity )\n+ 64 return true;\n+ 65 }\n+ 66 return false;\n+ 67 }\n+ 68 };\n+ 69\n+ 70 template< int codim, class Grid >\n+71 struct PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid >\n+ 72 {\n+73 static const int dimension = std::remove_const< Grid >::type::dimension;\n+74 static const int codimension = codim;\n+ 75\n+76 static const PartitionIteratorType Element_Partition = Interior_Partition;\n+ 77\n+78 typedef typename std::remove_const< Grid >::type::ctype ctype;\n+79 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0\n+>::Entity Element;\n+80 typedef Transitional::ReferenceElement< ctype, Dim > RefElement;\n+ 81\n+82 static bool apply ( const RefElement &refElement,\n+ 83 const Element &element, int subEntity )\n+ 84 {\n+ 85 return true;\n+ 86 }\n+ 87 };\n+ 88\n+ 89 template< int codim, class Grid >\n+90 struct PartitionIteratorFilter< codim, Overlap_Partition, Grid >\n+ 91 {\n+92 static const int dimension = std::remove_const< Grid >::type::dimension;\n+93 static const int codimension = codim;\n+ 94\n+95 static const PartitionIteratorType Element_Partition = Overlap_Partition;\n+ 96\n+97 typedef typename std::remove_const< Grid >::type::ctype ctype;\n+98 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0\n+>::Entity Element;\n+99 typedef Transitional::ReferenceElement< ctype, Dim > RefElement;\n+ 100\n+101 static bool apply ( const RefElement &refElement,\n+ 102 const Element &element, int subEntity )\n+ 103 {\n+ 104 if( element.partitionType() == InteriorEntity )\n+ 105 return true;\n+ 106\n+ 107 const int size = refElement.size( subEntity, codim, dimension );\n+ 108 for( int i = 0; i < size; ++i )\n+ 109 {\n+ 110 const int j = refElement.subEntity( subEntity, codim, i, dimension );\n+ 111 PartitionType type = element.template subEntity< dimension >( j\n+).partitionType();\n+ 112 if( (type == OverlapEntity) || (type == BorderEntity) )\n+ 113 return true;\n+ 114 }\n+ 115 return false;\n+ 116 }\n+ 117 };\n+ 118\n+ 119 template< int codim, class Grid >\n+120 struct PartitionIteratorFilter< codim, OverlapFront_Partition, Grid >\n+ 121 {\n+122 static const int dimension = std::remove_const< Grid >::type::dimension;\n+123 static const int codimension = codim;\n+ 124\n+125 static const PartitionIteratorType Element_Partition = Overlap_Partition;\n+ 126\n+127 typedef typename std::remove_const< Grid >::type::ctype ctype;\n+128 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0\n+>::Entity Element;\n+129 typedef Transitional::ReferenceElement< ctype, Dim > RefElement;\n+ 130\n+131 static bool apply ( const RefElement &refElement,\n+ 132 const Element &element, int subEntity )\n+ 133 {\n+ 134 return true;\n+ 135 }\n+ 136 };\n+ 137\n+ 138 template< int codim, class Grid >\n+139 struct PartitionIteratorFilter< codim, All_Partition, Grid >\n+ 140 {\n+141 static const int dimension = std::remove_const< Grid >::type::dimension;\n+142 static const int codimension = codim;\n+ 143\n+144 static const PartitionIteratorType Element_Partition = All_Partition;\n+ 145\n+146 typedef typename std::remove_const< Grid >::type::ctype ctype;\n+147 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0\n+>::Entity Element;\n+148 typedef Transitional::ReferenceElement< ctype, Dim > RefElement;\n+ 149\n+150 static bool apply ( const RefElement &refElement,\n+ 151 const Element &element, int subEntity )\n+ 152 {\n+ 153 return true;\n+ 154 }\n+ 155 };\n+ 156\n+ 157 template< int codim, class Grid >\n+158 struct PartitionIteratorFilter< codim, Ghost_Partition, Grid >\n+ 159 {\n+160 static const int dimension = std::remove_const< Grid >::type::dimension;\n+161 static const int codimension = codim;\n+ 162\n+163 static const PartitionIteratorType Element_Partition = Ghost_Partition;\n+ 164\n+165 typedef typename std::remove_const< Grid >::type::ctype ctype;\n+166 typedef typename std::remove_const< Grid >::type::Traits::template Codim< 0\n+>::Entity Element;\n+167 typedef Transitional::ReferenceElement< ctype, Dim > RefElement;\n+ 168\n+169 static bool apply ( const RefElement &refElement,\n+ 170 const Element &element, int subEntity )\n+ 171 {\n+ 172 const int size = refElement.size( subEntity, codim, dimension );\n+ 173 for( int i = 0; i < size; ++i )\n+ 174 {\n+ 175 const int j = refElement.subEntity( subEntity, codim, i, dimension );\n+ 176 PartitionType type = element.template subEntity< dimension >( j\n+).partitionType();\n+ 177 if( type == GhostEntity )\n+ 178 return true;\n+ 179 }\n+ 180 return false;\n+ 181 }\n+ 182 };\n+ 183\n+ 184\n+ 185\n+ 186 // Iterator (real)\n+ 187 // ---------------\n+ 188\n+ 189 template< class HostGridView, int codim, PartitionIteratorType pitype,\n+class G >\n+190 class Iterator< HostGridView, codim, pitype, G, false >\n+ 191 {\n+ 192 typedef typename std::remove_const< G >::type::Traits Traits;\n+ 193\n+ 194 public:\n+195 typedef typename Traits::Grid Grid;\n+ 196\n+197 static const int codimension = codim;\n+ 198\n+199 typedef typename Traits::template Codim< codimension >::Entity Entity;\n+ 200\n+201 static const bool fake = false;\n+ 202\n+ 203 private:\n+ 204 typedef GeoGrid::Entity<_codimension,_Traits::dimension,_G_> EntityImpl;\n+ 205\n+ 206 typedef typename HostGridView::template Codim< codim >::template\n+Partition< pitype >::Iterator HostEntityIterator;\n+ 207\n+ 208 public:\n+209 Iterator () : grid_( nullptr ) {}\n+ 210\n+211 Iterator ( const Grid &grid, HostEntityIterator hostEntityIterator )\n+ 212 : grid_( &grid ),\n+ 213 hostEntityIterator_( std::move( hostEntityIterator ) )\n+ 214 {}\n+ 215\n+216 void increment ()\n+ 217 {\n+ 218 ++hostEntityIterator_;\n+ 219 }\n+ 220\n+221 bool equals ( const Iterator &rhs ) const\n+ 222 {\n+ 223 return hostEntityIterator_ == rhs.hostEntityIterator_;\n+ 224 }\n+ 225\n+226 Entity dereference () const\n+ 227 {\n+ 228 return EntityImpl( grid(), *hostEntityIterator_ );\n+ 229 }\n+ 230\n+231 int level () const { return hostEntityIterator_.level(); }\n+ 232\n+233 const Grid &grid () const\n+ 234 {\n+ 235 assert( grid_ );\n+ 236 return *grid_;\n+ 237 }\n+ 238\n+239 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView\n+)\n+ 240 {\n+ 241 HostEntityIterator hostEntityIterator = hostGridView.template begin<\n+codimension, pitype >();\n+ 242 return Iterator( grid, std::move( hostEntityIterator ) );\n+ 243 }\n+ 244\n+245 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )\n+ 246 {\n+ 247 HostEntityIterator hostEntityIterator = hostGridView.template end<\n+codimension, pitype >();\n+ 248 return Iterator( grid, std::move( hostEntityIterator ) );\n+ 249 }\n+ 250\n+ 251 private:\n+ 252 const Grid *grid_;\n+ 253 HostEntityIterator hostEntityIterator_;\n+ 254 };\n+ 255\n+ 256\n+ 257\n+ 258 // Iterator (fake)\n+ 259 // ---------------\n+ 260\n+ 261 template< class HostGridView, int codim, PartitionIteratorType pitype,\n+class G >\n+262 class Iterator< HostGridView, codim, pitype, G, true >\n+ 263 {\n+ 264 typedef typename std::remove_const< G >::type::Traits Traits;\n+ 265\n+ 266 public:\n+267 typedef typename Traits::Grid Grid;\n+ 268\n+269 static const int codimension = codim;\n+ 270\n+271 typedef typename Traits::template Codim< codimension >::Entity Entity;\n+ 272\n+ 273 private:\n+ 274 typedef GeoGrid::Entity<_codimension,_Traits::dimension,_G_> EntityImpl;\n+ 275\n+ 276 typedef PartitionIteratorFilter<_codim,_pitype,_typename_HostGridView::\n+Grid_> Filter;\n+ 277\n+ 278 typedef typename HostGridView::template Codim<0>::template Partition<\n+Filter::Element_Partition >::Iterator HostElementIterator;\n+ 279 typedef typename HostElementIterator::Entity HostElement;\n+ 280 typedef typename HostGridView::IndexSet HostIndexSet;\n+ 281\n+ 282 public:\n+283 Iterator () : grid_( nullptr ), subEntity_( -1 ), hostIndexSet_( nullptr )\n+{}\n+ 284\n+285 Iterator ( const Grid &grid, HostElementIterator hostElementIterator,\n+HostElementIterator hostEnd, const HostIndexSet &hostIndexSet )\n+ 286 : grid_( &grid ),\n+ 287 hostElementIterator_( hostElementIterator ),\n+ 288 hostEnd_( hostEnd ),\n+ 289 subEntity_( -1 ),\n+ 290 hostIndexSet_( &hostIndexSet )\n+ 291 {\n+ 292 if( hostElementIterator_ != hostEnd_ )\n+ 293 {\n+ 294 visited_.resize( hostIndexSet_->size( codimension ), false );\n+ 295 increment();\n+ 296 }\n+ 297 }\n+ 298\n+299 void increment ()\n+ 300 {\n+ 301 typedef typename Traits::ctype ctype;\n+ 302\n+ 303 while( hostElementIterator_ != hostEnd_ )\n+ 304 {\n+ 305 const HostElement &hostElement = *hostElementIterator_;\n+ 306\n+ 307 auto refElement = referenceElement< ctype, Traits::dimension >\n+( hostElement.type() );\n+ 308\n+ 309 ++subEntity_;\n+ 310 const int count = refElement.size( codimension );\n+ 311 for( ; subEntity_ < count; ++subEntity_ )\n+ 312 {\n+ 313 if( !Filter::apply( refElement, hostElement, subEntity_ ) )\n+ 314 continue;\n+ 315\n+ 316 const size_t index = hostIndexSet_->subIndex( hostElement, subEntity_,\n+codimension );\n+ 317 if( !visited_[ index ] )\n+ 318 {\n+ 319 visited_[ index ] = true;\n+ 320 return;\n+ 321 }\n+ 322 }\n+ 323 ++hostElementIterator_;\n+ 324 subEntity_ = -1;\n+ 325 }\n+ 326 }\n+ 327\n+328 bool equals ( const Iterator &rhs ) const\n+ 329 {\n+ 330 return hostElementIterator_ == rhs.hostElementIterator_ &&\n+( hostElementIterator_ == hostEnd_ || subEntity_ == rhs.subEntity_ );\n+ 331 }\n+ 332\n+333 Entity dereference () const\n+ 334 {\n+ 335 return EntityImpl( grid(), *hostElementIterator_, subEntity_ );\n+ 336 }\n+ 337\n+338 int level () const { return hostElementIterator_.level(); }\n+ 339\n+340 const Grid &grid () const\n+ 341 {\n+ 342 assert( grid_ );\n+ 343 return *grid_;\n+ 344 }\n+ 345\n+346 static Iterator begin ( const Grid &grid, const HostGridView &hostGridView\n+)\n+ 347 {\n+ 348 HostElementIterator first = hostGridView.template begin< 0, Filter::\n+Element_Partition >();\n+ 349 HostElementIterator last = hostGridView.template end< 0, Filter::\n+Element_Partition >();\n+ 350 return Iterator( grid, std::move( first ), std::move( last ),\n+hostGridView.indexSet() );\n+ 351 }\n+ 352\n+353 static Iterator end ( const Grid &grid, const HostGridView &hostGridView )\n+ 354 {\n+ 355 HostElementIterator last = hostGridView.template end< 0, Filter::\n+Element_Partition >();\n+ 356 return Iterator( grid, last, last, hostGridView.indexSet() );\n+ 357 }\n+ 358\n+ 359 private:\n+ 360 const Grid *grid_;\n+ 361 HostElementIterator hostElementIterator_, hostEnd_;\n+ 362 int subEntity_;\n+ 363 const HostIndexSet *hostIndexSet_;\n+ 364 std::vector< bool > visited_;\n+ 365 };\n+ 366\n+ 367\n+ 368\n+ 369 // HierarchicIterator\n+ 370 // ------------------\n+ 371\n+ 372 template< class G >\n+373 class HierarchicIterator\n+ 374 {\n+ 375 typedef typename std::remove_const< G >::type::Traits Traits;\n+ 376\n+ 377 public:\n+378 typedef typename Traits::Grid Grid;\n+ 379\n+380 static const int codimension = 0;\n+ 381\n+382 typedef typename Traits::template Codim< codimension >::Entity Entity;\n+ 383\n+ 384 private:\n+ 385 typedef GeoGrid::Entity<_codimension,_Traits::dimension,_G_> EntityImpl;\n+ 386\n+ 387 typedef typename Grid::HostGrid::HierarchicIterator HostEntityIterator;\n+ 388\n+ 389 public:\n+390 HierarchicIterator () : grid_( nullptr ) {}\n+ 391\n+392 HierarchicIterator ( const Grid &grid, HostEntityIterator\n+hostEntityIterator )\n+ 393 : grid_( &grid ),\n+ 394 hostEntityIterator_( std::move( hostEntityIterator ) )\n+ 395 {}\n+ 396\n+397 void increment ()\n+ 398 {\n+ 399 ++hostEntityIterator_;\n+ 400 }\n+ 401\n+402 bool equals ( const HierarchicIterator &rhs ) const\n+ 403 {\n+ 404 return hostEntityIterator_ == rhs.hostEntityIterator_;\n+ 405 }\n+ 406\n+407 Entity dereference () const\n+ 408 {\n+ 409 return EntityImpl( grid(), *hostEntityIterator_ );\n+ 410 }\n+ 411\n+412 int level () const { return hostEntityIterator_.level(); }\n+ 413\n+414 const Grid &grid () const\n+ 415 {\n+ 416 assert( grid_ );\n+ 417 return *grid_;\n+ 418 }\n+ 419\n+ 420 private:\n+ 421 const Grid *grid_;\n+ 422 HostEntityIterator hostEntityIterator_;\n+ 423 };\n+ 424\n+ 425 } // namespace GeoGrid\n+ 426\n+ 427} // namespace Dune\n+ 428\n+ 429#endif // #ifndef DUNE_GEOGRID_ITERATOR_HH\n+declaration.hh\n+Dune::PartitionIteratorType\n+PartitionIteratorType\n+Parameter to be used for the parallel level- and leaf iterators.\n+Definition: gridenums.hh:136\n+Dune::PartitionType\n+PartitionType\n+Attributes used in the generic overlap model.\n+Definition: gridenums.hh:30\n+Dune::All_Partition\n+@ All_Partition\n+all entities\n+Definition: gridenums.hh:141\n+Dune::OverlapFront_Partition\n+@ OverlapFront_Partition\n+interior, border, overlap and front entities\n+Definition: gridenums.hh:140\n+Dune::Interior_Partition\n+@ Interior_Partition\n+only interior entities\n+Definition: gridenums.hh:137\n+Dune::InteriorBorder_Partition\n+@ InteriorBorder_Partition\n+interior and border entities\n+Definition: gridenums.hh:138\n+Dune::Overlap_Partition\n+@ Overlap_Partition\n+interior, border, and overlap entities\n+Definition: gridenums.hh:139\n+Dune::Ghost_Partition\n+@ Ghost_Partition\n+only ghost entities\n+Definition: gridenums.hh:142\n+Dune::InteriorEntity\n+@ InteriorEntity\n+all interior entities\n+Definition: gridenums.hh:31\n+Dune::GhostEntity\n+@ GhostEntity\n+ghost entities\n+Definition: gridenums.hh:35\n+Dune::BorderEntity\n+@ BorderEntity\n+on boundary between interior and overlap\n+Definition: gridenums.hh:32\n+Dune::OverlapEntity\n+@ OverlapEntity\n+all entities lying in the overlap zone\n+Definition: gridenums.hh:33\n+std\n+STL namespace.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::AnalyticalCoordFunction\n-Derive an implementation of an analytical coordinate function from this class.\n-Definition: coordfunction.hh:134\n-Dune::AnalyticalCoordFunction::DomainVector\n-Base::DomainVector DomainVector\n-Definition: coordfunction.hh:139\n-Dune::AnalyticalCoordFunction::RangeVector\n-Base::RangeVector RangeVector\n-Definition: coordfunction.hh:140\n-Dune::IdenticalCoordFunction\n-Definition: identity.hh:17\n-Dune::IdenticalCoordFunction::IdenticalCoordFunction\n-IdenticalCoordFunction(Args &...)\n-Definition: identity.hh:26\n-Dune::IdenticalCoordFunction::RangeVector\n-Base::RangeVector RangeVector\n-Definition: identity.hh:23\n-Dune::IdenticalCoordFunction::operator()\n-RangeVector operator()(const DomainVector &x) const\n-Definition: identity.hh:29\n-Dune::IdenticalCoordFunction::DomainVector\n-Base::DomainVector DomainVector\n-Definition: identity.hh:22\n+Dune::Grid\n+Grid abstract base class.\n+Definition: common/grid.hh:375\n+Dune::GeoGrid::Entity\n+DUNE-conform implementation of the entity.\n+Definition: geometrygrid/entity.hh:694\n+Dune::GeoGrid::HierarchicIterator\n+Definition: iterator.hh:374\n+Dune::GeoGrid::HierarchicIterator::codimension\n+static const int codimension\n+Definition: iterator.hh:380\n+Dune::GeoGrid::HierarchicIterator::level\n+int level() const\n+Definition: iterator.hh:412\n+Dune::GeoGrid::HierarchicIterator::increment\n+void increment()\n+Definition: iterator.hh:397\n+Dune::GeoGrid::HierarchicIterator::equals\n+bool equals(const HierarchicIterator &rhs) const\n+Definition: iterator.hh:402\n+Dune::GeoGrid::HierarchicIterator::dereference\n+Entity dereference() const\n+Definition: iterator.hh:407\n+Dune::GeoGrid::HierarchicIterator::HierarchicIterator\n+HierarchicIterator()\n+Definition: iterator.hh:390\n+Dune::GeoGrid::HierarchicIterator::HierarchicIterator\n+HierarchicIterator(const Grid &grid, HostEntityIterator hostEntityIterator)\n+Definition: iterator.hh:392\n+Dune::GeoGrid::HierarchicIterator::Grid\n+Traits::Grid Grid\n+Definition: iterator.hh:378\n+Dune::GeoGrid::HierarchicIterator::grid\n+const Grid & grid() const\n+Definition: iterator.hh:414\n+Dune::GeoGrid::HierarchicIterator::Entity\n+Traits::template Codim< codimension >::Entity Entity\n+Definition: iterator.hh:382\n+Dune::GeoGrid::Iterator\n+Definition: iterator.hh:30\n+Dune::GeoGrid::PartitionIteratorFilter\n+Definition: iterator.hh:41\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Interior_Partition,_Grid_>::\n+ctype\n+std::remove_const< Grid >::type::ctype ctype\n+Definition: iterator.hh:51\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Interior_Partition,_Grid_>::\n+Element\n+std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element\n+Definition: iterator.hh:52\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Interior_Partition,_Grid_>::\n+apply\n+static bool apply(const RefElement &refElement, const Element &element, int\n+subEntity)\n+Definition: iterator.hh:55\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Interior_Partition,_Grid_>::\n+RefElement\n+Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement\n+Definition: iterator.hh:53\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_InteriorBorder_Partition,_Grid\n+>::RefElement\n+Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement\n+Definition: iterator.hh:80\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_InteriorBorder_Partition,_Grid\n+>::apply\n+static bool apply(const RefElement &refElement, const Element &element, int\n+subEntity)\n+Definition: iterator.hh:82\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_InteriorBorder_Partition,_Grid\n+>::ctype\n+std::remove_const< Grid >::type::ctype ctype\n+Definition: iterator.hh:78\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_InteriorBorder_Partition,_Grid\n+>::Element\n+std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element\n+Definition: iterator.hh:79\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Overlap_Partition,_Grid_>::\n+RefElement\n+Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement\n+Definition: iterator.hh:99\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Overlap_Partition,_Grid_>::\n+Element\n+std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element\n+Definition: iterator.hh:98\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Overlap_Partition,_Grid_>::apply\n+static bool apply(const RefElement &refElement, const Element &element, int\n+subEntity)\n+Definition: iterator.hh:101\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Overlap_Partition,_Grid_>::ctype\n+std::remove_const< Grid >::type::ctype ctype\n+Definition: iterator.hh:97\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_OverlapFront_Partition,_Grid_>::\n+Element\n+std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element\n+Definition: iterator.hh:128\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_OverlapFront_Partition,_Grid_>::\n+ctype\n+std::remove_const< Grid >::type::ctype ctype\n+Definition: iterator.hh:127\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_OverlapFront_Partition,_Grid_>::\n+RefElement\n+Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement\n+Definition: iterator.hh:129\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_OverlapFront_Partition,_Grid_>::\n+apply\n+static bool apply(const RefElement &refElement, const Element &element, int\n+subEntity)\n+Definition: iterator.hh:131\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_All_Partition,_Grid_>::apply\n+static bool apply(const RefElement &refElement, const Element &element, int\n+subEntity)\n+Definition: iterator.hh:150\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_All_Partition,_Grid_>::ctype\n+std::remove_const< Grid >::type::ctype ctype\n+Definition: iterator.hh:146\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_All_Partition,_Grid_>::\n+RefElement\n+Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement\n+Definition: iterator.hh:148\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_All_Partition,_Grid_>::Element\n+std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element\n+Definition: iterator.hh:147\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Ghost_Partition,_Grid_>::\n+RefElement\n+Transitional::ReferenceElement< ctype, Dim< dimension > > RefElement\n+Definition: iterator.hh:167\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Ghost_Partition,_Grid_>::Element\n+std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element\n+Definition: iterator.hh:166\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Ghost_Partition,_Grid_>::ctype\n+std::remove_const< Grid >::type::ctype ctype\n+Definition: iterator.hh:165\n+Dune::GeoGrid::PartitionIteratorFilter<_codim,_Ghost_Partition,_Grid_>::apply\n+static bool apply(const RefElement &refElement, const Element &element, int\n+subEntity)\n+Definition: iterator.hh:169\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::Iterator\n+Iterator()\n+Definition: iterator.hh:209\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::Grid\n+Traits::Grid Grid\n+Definition: iterator.hh:195\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::dereference\n+Entity dereference() const\n+Definition: iterator.hh:226\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::level\n+int level() const\n+Definition: iterator.hh:231\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::increment\n+void increment()\n+Definition: iterator.hh:216\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::equals\n+bool equals(const Iterator &rhs) const\n+Definition: iterator.hh:221\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::begin\n+static Iterator begin(const Grid &grid, const HostGridView &hostGridView)\n+Definition: iterator.hh:239\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::Entity\n+Traits::template Codim< codimension >::Entity Entity\n+Definition: iterator.hh:199\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::grid\n+const Grid & grid() const\n+Definition: iterator.hh:233\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::end\n+static Iterator end(const Grid &grid, const HostGridView &hostGridView)\n+Definition: iterator.hh:245\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>::Iterator\n+Iterator(const Grid &grid, HostEntityIterator hostEntityIterator)\n+Definition: iterator.hh:211\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::Grid\n+Traits::Grid Grid\n+Definition: iterator.hh:267\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::level\n+int level() const\n+Definition: iterator.hh:338\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::increment\n+void increment()\n+Definition: iterator.hh:299\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::grid\n+const Grid & grid() const\n+Definition: iterator.hh:340\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::end\n+static Iterator end(const Grid &grid, const HostGridView &hostGridView)\n+Definition: iterator.hh:353\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::begin\n+static Iterator begin(const Grid &grid, const HostGridView &hostGridView)\n+Definition: iterator.hh:346\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::equals\n+bool equals(const Iterator &rhs) const\n+Definition: iterator.hh:328\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::dereference\n+Entity dereference() const\n+Definition: iterator.hh:333\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::Iterator\n+Iterator(const Grid &grid, HostElementIterator hostElementIterator,\n+HostElementIterator hostEnd, const HostIndexSet &hostIndexSet)\n+Definition: iterator.hh:285\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::Entity\n+Traits::template Codim< codimension >::Entity Entity\n+Definition: iterator.hh:271\n+Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>::Iterator\n+Iterator()\n+Definition: iterator.hh:283\n+capabilities.hh\n+entity.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00614.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00614.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entity.cc File Reference\n+dune-grid: dofadmin.hh File Reference\n \n \n \n \n \n \n \n@@ -63,46 +63,41 @@\n \n \n
    \n \n-
    entity.cc File Reference
    \n+Classes |\n+Namespaces
    \n+
    dofadmin.hh File Reference
    \n \n
    \n+
    #include <utility>
    \n+#include <dune/common/hybridutilities.hh>
    \n+#include <dune/grid/albertagrid/misc.hh>
    \n+#include <dune/grid/albertagrid/elementinfo.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n \n+\n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::Alberta::DofAccess< dim, codim >
     
    class  Dune::Alberta::HierarchyDofNumbering< dim >
     
    \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n+\n+\n

    \n-Macros

    #define DUNE_ALBERTA_ENTITY_CC
     
    namespace  Dune::Alberta
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DUNE_ALBERTA_ENTITY_CC

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define DUNE_ALBERTA_ENTITY_CC
    \n-
    \n-\n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,22 +5,28 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Namespaces | Macros\n-entity.cc File Reference\n+Classes | Namespaces\n+dofadmin.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::Alberta::DofAccess<_dim,_codim_>\n+\u00a0\n+class \u00a0Dune::Alberta::HierarchyDofNumbering<_dim_>\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n- Macros\n-#define\u00a0DUNE_ALBERTA_ENTITY_CC\n+namespace \u00a0Dune::Alberta\n \u00a0\n-***** Macro Definition Documentation *****\n-***** \u25c6\u00a0DUNE_ALBERTA_ENTITY_CC *****\n-#define DUNE_ALBERTA_ENTITY_CC\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00620.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00620.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: albertagrid.cc File Reference\n+dune-grid: hierarchiciterator.hh File Reference\n \n \n \n \n \n \n \n@@ -64,64 +64,34 @@\n \n \n \n
    \n \n-
    albertagrid.cc File Reference
    \n+Namespaces
    \n+
    hierarchiciterator.hh File Reference
    \n \n
    \n-
    #include "geometry.cc"
    \n-#include "entity.cc"
    \n-#include "intersection.cc"
    \n-
    \n+\n+

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+

    \n+Classes

    class  Dune::AlbertaGridHierarchicIterator< GridImp >
     
    \n \n \n \n \n-\n-\n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n-\n-\n-\n-

    \n-Macros

    #define DUNE_ALBERTAGRID_CC
     
    \n-\n-\n-\n-\n-

    \n-Functions

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

    \n-Variables

    static void * Dune::Alberta::adaptationDataHandler_
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DUNE_ALBERTAGRID_CC

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define DUNE_ALBERTAGRID_CC
    \n-
    \n-\n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,34 +5,22 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces | Macros | Functions | Variables\n-albertagrid.cc File Reference\n-#include \"geometry.cc\"\n-#include \"entity.cc\"\n-#include \"intersection.cc\"\n+Classes | Namespaces\n+hierarchiciterator.hh File Reference\n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::AlbertaGridHierarchicIterator<_GridImp_>\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::Alberta\n-\u00a0\n- Macros\n-#define\u00a0DUNE_ALBERTAGRID_CC\n-\u00a0\n- Functions\n-template\n-static void\u00a0Dune::checkAlbertaDimensions ()\n-\u00a0\n- Variables\n-static void *\u00a0Dune::Alberta::adaptationDataHandler_\n-\u00a0\n-***** Macro Definition Documentation *****\n-***** \u25c6\u00a0DUNE_ALBERTAGRID_CC *****\n-#define DUNE_ALBERTAGRID_CC\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00626.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00626.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: elementinfo.cc File Reference\n+dune-grid: geometryreference.hh File Reference\n \n \n \n \n \n \n \n@@ -63,36 +63,43 @@\n \n \n
    \n \n-
    elementinfo.cc File Reference
    \n+
    geometryreference.hh File Reference
    \n
    \n
    \n \n-

    provides a wrapper for ALBERTA's el_info structure \n+

    Wrapper and interface classes for element geometries. \n More...

    \n-
    #include <config.h>
    \n-#include <dune/grid/albertagrid/elementinfo.hh>
    \n-#include <dune/grid/albertagrid/meshpointer.hh>
    \n-
    \n+
    #include <dune/common/typetraits.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/grid/common/geometry.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+\n+\n+

    \n+Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n

    Detailed Description

    \n-

    provides a wrapper for ALBERTA's el_info structure

    \n-
    Author
    Martin Nolte
    \n+

    Wrapper and interface classes for element geometries.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,26 +5,28 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Namespaces\n-elementinfo.cc File Reference\n-provides a wrapper for ALBERTA's el_info structure More...\n-#include \n-#include \n-#include \n+Classes | Namespaces\n+geometryreference.hh File Reference\n+Wrapper and interface classes for element geometries. More...\n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::GeometryReference<_Implementation_>\n+\u00a0\n+class \u00a0Dune::LocalGeometryReference<_mydim,_cdim,_Grid_>\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::Alberta\n-\u00a0\n ***** Detailed Description *****\n-provides a wrapper for ALBERTA's el_info structure\n- Author\n- Martin Nolte\n+Wrapper and interface classes for element geometries.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00629.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00629.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: level.hh File Reference\n+dune-grid: agrid.hh File Reference\n \n \n \n \n \n \n \n@@ -64,43 +64,95 @@\n \n
    \n \n
    \n \n-
    level.hh File Reference
    \n+Namespaces |\n+Macros
    \n+
    agrid.hh File Reference
    \n \n
    \n+\n+

    provides the AlbertaGrid class \n+More...

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

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::AlbertaGridLevelProvider< dim >
     
    class  Dune::AlbertaGridLevelProvider< dim >::SetLocal
     
    class  Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel
     
    struct  Dune::AlbertaGridLevelProvider< dim >::Interpolation
    class  Dune::AlbertaGrid< dim, dimworld >
     [ provides Dune::Grid ] More...
     
    \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n

    \n+Macros

    #define _ALBERTA_H_
     
    \n+

    Detailed Description

    \n+

    provides the AlbertaGrid class

    \n+
    Author
    Robert Kloefkorn and Martin Nolte
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ _ALBERTA_H_

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define _ALBERTA_H_
    \n+
    \n+\n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,31 +5,67 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-level.hh File Reference\n+Classes | Namespaces | Macros\n+agrid.hh File Reference\n+provides the AlbertaGrid class More...\n #include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \"albertaheader.hh\"\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \"indexsets.hh\"\n+#include \"geometry.hh\"\n+#include \"entity.hh\"\n+#include \"hierarchiciterator.hh\"\n+#include \"treeiterator.hh\"\n+#include \"leveliterator.hh\"\n+#include \"leafiterator.hh\"\n+#include \"albertagrid.cc\"\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::AlbertaGridLevelProvider<_dim_>\n-\u00a0\n- class \u00a0Dune::AlbertaGridLevelProvider<_dim_>::SetLocal\n-\u00a0\n- class \u00a0Dune::AlbertaGridLevelProvider<_dim_>::CalcMaxLevel\n-\u00a0\n-struct \u00a0Dune::AlbertaGridLevelProvider<_dim_>::Interpolation\n+class \u00a0Dune::AlbertaGrid<_dim,_dimworld_>\n+\u00a0 [provides Dune::Grid] More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+ Macros\n+#define\u00a0_ALBERTA_H_\n+\u00a0\n+***** Detailed Description *****\n+provides the AlbertaGrid class\n+ Author\n+ Robert Kloefkorn and Martin Nolte\n+***** Macro Definition Documentation *****\n+***** \u25c6\u00a0_ALBERTA_H_ *****\n+#define _ALBERTA_H_\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00629_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: level.hh Source File\n+dune-grid: agrid.hh Source File\n \n \n \n \n \n \n \n@@ -62,288 +62,811 @@\n \n \n \n
    \n-
    level.hh
    \n+
    agrid.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_LEVEL_HH
    \n-
    6#define DUNE_ALBERTA_LEVEL_HH
    \n+
    5#ifndef DUNE_ALBERTAGRID_IMP_HH
    \n+
    6#define DUNE_ALBERTAGRID_IMP_HH
    \n
    7
    \n-
    8#include <cassert>
    \n-
    9#include <cstdlib>
    \n-
    10
    \n-\n-\n-\n+
    13#if HAVE_ALBERTA || DOXYGEN
    \n
    14
    \n-
    15#if HAVE_ALBERTA
    \n-
    16
    \n-
    17namespace Dune
    \n-
    18{
    \n-
    19
    \n-
    20 // AlbertaGridLevelProvider
    \n-
    21 // ------------------------
    \n-
    22
    \n-
    23 template< int dim >
    \n-\n-
    25 {
    \n-\n-
    27
    \n-
    28 typedef unsigned char Level;
    \n+
    15#include <cassert>
    \n+
    16#include <cstddef>
    \n+
    17
    \n+
    18#include <algorithm>
    \n+
    19#include <iostream>
    \n+
    20#include <fstream>
    \n+
    21#include <memory>
    \n+
    22#include <vector>
    \n+
    23
    \n+
    24// Dune includes
    \n+
    25#include <dune/common/fvector.hh>
    \n+
    26#include <dune/common/fmatrix.hh>
    \n+
    27#include <dune/common/stdstreams.hh>
    \n+
    28#include <dune/common/parallel/communication.hh>
    \n
    29
    \n-\n-\n-
    32
    \n-\n+\n+\n+\n+\n
    34
    \n-
    35 static const Level isNewFlag = (1 << 7);
    \n-
    36 static const Level levelMask = (1 << 7) - 1;
    \n-
    37
    \n-
    38 class SetLocal;
    \n-
    39 class CalcMaxLevel;
    \n-
    40
    \n-
    41 template< Level flags >
    \n-
    42 struct ClearFlags;
    \n-
    43
    \n-
    44 struct Interpolation;
    \n-
    45
    \n-
    46 public:
    \n-\n-\n-\n+
    35//- Local includes
    \n+
    36// some cpp defines and include of alberta.h
    \n+
    37#include "albertaheader.hh"
    \n+
    38
    \n+\n+\n+\n+
    42
    \n+\n+\n+\n+\n+\n+\n+\n
    50
    \n-
    51 Level operator() ( const Alberta::Element *element ) const
    \n-
    52 {
    \n-
    53 const Level *array = (Level *)level_;
    \n-
    54 return array[ dofAccess_( element, 0 ) ] & levelMask;
    \n-
    55 }
    \n-
    56
    \n-
    57 Level operator() ( const ElementInfo &elementInfo ) const
    \n-
    58 {
    \n-
    59 return (*this)( elementInfo.el() );
    \n-
    60 }
    \n+
    51#include "indexsets.hh"
    \n+
    52#include "geometry.hh"
    \n+
    53#include "entity.hh"
    \n+
    54#include "hierarchiciterator.hh"
    \n+
    55#include "treeiterator.hh"
    \n+
    56#include "leveliterator.hh"
    \n+
    57#include "leafiterator.hh"
    \n+
    58
    \n+
    59namespace Dune
    \n+
    60{
    \n
    61
    \n-
    62 bool isNew ( const Alberta::Element *element ) const
    \n-
    63 {
    \n-
    64 const Level *array = (Level *)level_;
    \n-
    65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0);
    \n-
    66 }
    \n+
    62 // External Forward Declarations
    \n+
    63 // -----------------------------
    \n+
    64
    \n+
    65 template< class Grid >
    \n+
    66 struct DGFGridFactory;
    \n
    67
    \n-
    68 bool isNew ( const ElementInfo &elementInfo ) const
    \n-
    69 {
    \n-
    70 return isNew( elementInfo.el() );
    \n-
    71 }
    \n+
    68
    \n+
    69
    \n+
    70 // AlbertaGrid
    \n+
    71 // -----------
    \n
    72
    \n-
    73 Level maxLevel () const
    \n-
    74 {
    \n-
    75 CalcMaxLevel calcFromCache;
    \n-
    76 level_.forEach( calcFromCache );
    \n-
    77#ifndef NDEBUG
    \n-
    78 CalcMaxLevel calcFromGrid;
    \n-
    79 mesh().leafTraverse( calcFromGrid, FillFlags::nothing );
    \n-
    80 assert( calcFromCache.maxLevel() == calcFromGrid.maxLevel() );
    \n-
    81#endif
    \n-
    82 return calcFromCache.maxLevel();;
    \n-
    83 }
    \n-
    84
    \n-\n-
    86 {
    \n-
    87 return MeshPointer( level_.dofSpace()->mesh );
    \n-
    88 }
    \n-
    89
    \n-
    90 void markAllOld ()
    \n-
    91 {
    \n-
    92 ClearFlags< isNewFlag > clearIsNew;
    \n-
    93 level_.forEach( clearIsNew );
    \n-
    94 }
    \n-
    95
    \n-
    96 void create ( const DofNumbering &dofNumbering )
    \n-
    97 {
    \n-
    98 const Alberta::DofSpace *const dofSpace = dofNumbering.dofSpace( 0 );
    \n-
    99 dofAccess_ = DofAccess( dofSpace );
    \n-
    100
    \n-
    101 level_.create( dofSpace, "Element level" );
    \n-
    102 assert( level_ );
    \n-
    103 level_.template setupInterpolation< Interpolation >();
    \n-
    104
    \n-
    105 SetLocal setLocal( level_ );
    \n-\n-
    107 }
    \n-
    108
    \n-
    109 void release ()
    \n-
    110 {
    \n-
    111 level_.release();
    \n-
    112 dofAccess_ = DofAccess();
    \n-
    113 }
    \n+
    105 template< int dim, int dimworld = Alberta::dimWorld >
    \n+\n+\n+
    108 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
    \n+
    109 {
    \n+\n+\n+\n+
    113 Base;
    \n
    114
    \n-
    115 private:
    \n-
    116 DofVectorPointer level_;
    \n-
    117 DofAccess dofAccess_;
    \n-
    118 };
    \n-
    119
    \n+
    115 template< int, int, class > friend class AlbertaGridEntity;
    \n+
    116 template< class > friend class AlbertaLevelGridView;
    \n+
    117 template< class > friend class AlbertaLeafGridView;
    \n+
    118 template< int, class, bool > friend class AlbertaGridTreeIterator;
    \n+
    119 template< class > friend class AlbertaGridHierarchicIterator;
    \n
    120
    \n-
    121
    \n-
    122 // AlbertaGridLevelProvider::SetLocal
    \n-
    123 // ----------------------------------
    \n-
    124
    \n-
    125 template< int dim >
    \n-\n-
    127 {
    \n-
    128 DofVectorPointer level_;
    \n-
    129 DofAccess dofAccess_;
    \n-
    130
    \n-
    131 public:
    \n-
    132 explicit SetLocal ( const DofVectorPointer &level )
    \n-
    133 : level_( level ),
    \n-
    134 dofAccess_( level.dofSpace() )
    \n-
    135 {}
    \n-
    136
    \n-
    137 void operator() ( const Alberta::ElementInfo< dim > &elementInfo ) const
    \n-
    138 {
    \n-
    139 Level *const array = (Level *)level_;
    \n-
    140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo.level();
    \n-
    141 }
    \n-
    142 };
    \n-
    143
    \n+
    121 friend class GridFactory< This >;
    \n+
    122 friend struct DGFGridFactory< This >;
    \n+
    123
    \n+
    124 friend class AlbertaGridIntersectionBase< const This >;
    \n+
    125 friend class AlbertaGridLeafIntersection< const This >;
    \n+
    126
    \n+
    127 friend class AlbertaMarkerVector< dim, dimworld >;
    \n+
    128#if (__GNUC__ < 4) && !(defined __ICC)
    \n+
    129 // add additional friend decls for gcc 3.4
    \n+
    130 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<true>;
    \n+
    131 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<false>;
    \n+
    132#endif
    \n+
    133 friend class AlbertaGridIndexSet< dim, dimworld >;
    \n+
    134 friend class AlbertaGridHierarchicIndexSet< dim, dimworld >;
    \n+
    135
    \n+
    136 template< class, class >
    \n+\n+
    138
    \n+
    139 public:
    \n+
    141 typedef AlbertaGridFamily< dim, dimworld > GridFamily;
    \n+
    142
    \n+
    143 typedef typename GridFamily::ctype ctype;
    \n
    144
    \n-
    145
    \n-
    146 // AlbertaGridLevelProvider::CalcMaxLevel
    \n-
    147 // --------------------------------------
    \n-
    148
    \n-
    149 template< int dim >
    \n-\n-
    151 {
    \n-
    152 Level maxLevel_;
    \n-
    153
    \n-
    154 public:
    \n-\n-
    156 : maxLevel_( 0 )
    \n-
    157 {}
    \n+\n+\n+
    147
    \n+
    148 // the Traits
    \n+
    149 typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;
    \n+
    150
    \n+\n+\n+
    155
    \n+\n
    158
    \n-
    159 void operator() ( const Level &dof )
    \n-
    160 {
    \n-
    161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) );
    \n-
    162 }
    \n+\n+\n
    163
    \n-
    164 void operator() ( const Alberta::ElementInfo< dim > &elementInfo )
    \n-
    165 {
    \n-
    166 maxLevel_ = std::max( maxLevel_, Level( elementInfo.level() ) );
    \n-
    167 }
    \n-
    168
    \n-
    169 Level maxLevel () const
    \n-
    170 {
    \n-
    171 return maxLevel_;
    \n-
    172 }
    \n-
    173 };
    \n-
    174
    \n-
    175
    \n+\n+
    166
    \n+
    170 [[deprecated("Use Communication instead!")]]
    \n+\n+
    172
    \n+
    173 private:
    \n+
    175 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
    \n
    176
    \n-
    177 // AlbertaGridLevelProvider::ClearFlags
    \n-
    178 // ------------------------------------
    \n+
    178 typedef AlbertaGridIdSet<dim,dimworld> IdSetImp;
    \n
    179
    \n-
    180 template< int dim >
    \n-
    181 template< typename AlbertaGridLevelProvider< dim >::Level flags >
    \n-
    182 struct AlbertaGridLevelProvider< dim >::ClearFlags
    \n-
    183 {
    \n-
    184 void operator() ( Level &dof ) const
    \n-
    185 {
    \n-
    186 dof &= ~flags;
    \n-
    187 }
    \n-
    188 };
    \n+
    181 struct AdaptationState
    \n+
    182 {
    \n+
    183 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
    \n+
    184
    \n+
    185 private:
    \n+
    186 Phase phase_;
    \n+
    187 int coarsenMarked_;
    \n+
    188 int refineMarked_;
    \n
    189
    \n-
    190
    \n-
    191
    \n-
    192 // AlbertaGridLevelProvider::Interpolation
    \n-
    193 // ---------------------------------------
    \n-
    194
    \n-
    195 template< int dim >
    \n-\n-
    197 {
    \n-
    198 static const int dimension = dim;
    \n-
    199
    \n-\n-
    201
    \n-
    202 static void interpolateVector ( const DofVectorPointer &dofVector,
    \n-
    203 const Patch &patch )
    \n-
    204 {
    \n-
    205 const DofAccess dofAccess( dofVector.dofSpace() );
    \n-
    206 Level *array = (Level *)dofVector;
    \n-
    207
    \n-
    208 for( int i = 0; i < patch.count(); ++i )
    \n-
    209 {
    \n-
    210 const Alberta::Element *const father = patch[ i ];
    \n-
    211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );
    \n-
    212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag;
    \n-
    213 for( int i = 0; i < 2; ++i )
    \n-
    214 {
    \n-
    215 const Alberta::Element *child = father->child[ i ];
    \n-
    216 array[ dofAccess( child, 0 ) ] = childLevel;
    \n-
    217 }
    \n-
    218 }
    \n-
    219 }
    \n-
    220 };
    \n-
    221
    \n-
    222}
    \n-
    223
    \n-
    224#endif // #if HAVE_ALBERTA
    \n-
    225
    \n-
    226#endif
    \n-\n-\n-
    provides a wrapper for ALBERTA's mesh structure
    \n+
    190 public:
    \n+
    191 AdaptationState ()
    \n+
    192 : phase_( ComputationPhase ),
    \n+
    193 coarsenMarked_( 0 ),
    \n+
    194 refineMarked_( 0 )
    \n+
    195 {}
    \n+
    196
    \n+
    197 void mark ( int count )
    \n+
    198 {
    \n+
    199 if( count < 0 )
    \n+
    200 ++coarsenMarked_;
    \n+
    201 if( count > 0 )
    \n+
    202 refineMarked_ += (2 << count);
    \n+
    203 }
    \n+
    204
    \n+
    205 void unmark ( int count )
    \n+
    206 {
    \n+
    207 if( count < 0 )
    \n+
    208 --coarsenMarked_;
    \n+
    209 if( count > 0 )
    \n+
    210 refineMarked_ -= (2 << count);
    \n+
    211 }
    \n+
    212
    \n+
    213 bool coarsen () const
    \n+
    214 {
    \n+
    215 return (coarsenMarked_ > 0);
    \n+
    216 }
    \n+
    217
    \n+
    218 int refineMarked () const
    \n+
    219 {
    \n+
    220 return refineMarked_;
    \n+
    221 }
    \n+
    222
    \n+
    223 void preAdapt ()
    \n+
    224 {
    \n+
    225 if( phase_ != ComputationPhase )
    \n+
    226 error( "preAdapt may only be called in computation phase." );
    \n+
    227 phase_ = PreAdaptationPhase;
    \n+
    228 }
    \n+
    229
    \n+
    230 void adapt ()
    \n+
    231 {
    \n+
    232 if( phase_ != PreAdaptationPhase )
    \n+
    233 error( "adapt may only be called in preadapdation phase." );
    \n+
    234 phase_ = PostAdaptationPhase;
    \n+
    235 }
    \n+
    236
    \n+
    237 void postAdapt ()
    \n+
    238 {
    \n+
    239 if( phase_ != PostAdaptationPhase )
    \n+
    240 error( "postAdapt may only be called in postadaptation phase." );
    \n+
    241 phase_ = ComputationPhase;
    \n+
    242
    \n+
    243 coarsenMarked_ = 0;
    \n+
    244 refineMarked_ = 0;
    \n+
    245 }
    \n+
    246
    \n+
    247 private:
    \n+
    248 void error ( const std::string &message )
    \n+
    249 {
    \n+
    250 DUNE_THROW( InvalidStateException, message );
    \n+
    251 }
    \n+
    252 };
    \n+
    253
    \n+
    254 template< class DataHandler >
    \n+
    255 struct AdaptationCallback;
    \n+
    256
    \n+
    257 // max number of allowed levels is 64
    \n+
    258 static const int MAXL = 64;
    \n+
    259
    \n+
    260 typedef Alberta::ElementInfo< dimension > ElementInfo;
    \n+
    261 typedef Alberta::MeshPointer< dimension > MeshPointer;
    \n+\n+
    263 typedef AlbertaGridLevelProvider< dimension > LevelProvider;
    \n+
    264
    \n+
    265 public:
    \n+
    266 AlbertaGrid ( const This & ) = delete;
    \n+
    267 This &operator= ( const This & ) = delete;
    \n+
    268
    \n+
    270 AlbertaGrid ();
    \n+
    271
    \n+\n+
    278 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
    \n+
    279 = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
    \n+
    280
    \n+
    281 template< class Proj, class Impl >
    \n+\n+
    283 const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
    \n+
    284
    \n+
    289 AlbertaGrid ( const std::string &macroGridFileName );
    \n+
    290
    \n+
    292 ~AlbertaGrid ();
    \n+
    293
    \n+
    296 int maxLevel () const;
    \n+
    297
    \n+
    299 template<int cd, PartitionIteratorType pitype>
    \n+
    300 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
    \n+
    301 lbegin (int level) const;
    \n+
    302
    \n+
    304 template<int cd, PartitionIteratorType pitype>
    \n+
    305 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
    \n+
    306 lend (int level) const;
    \n+
    307
    \n+
    309 template< int codim >
    \n+
    310 typename Traits::template Codim< codim >::LevelIterator
    \n+
    311 lbegin ( int level ) const;
    \n+
    312
    \n+
    314 template< int codim >
    \n+
    315 typename Traits::template Codim< codim >::LevelIterator
    \n+
    316 lend ( int level ) const;
    \n+
    317
    \n+
    319 template< int codim, PartitionIteratorType pitype >
    \n+
    320 typename Traits
    \n+
    321 ::template Codim< codim >::template Partition< pitype >::LeafIterator
    \n+
    322 leafbegin () const;
    \n+
    323
    \n+
    325 template< int codim, PartitionIteratorType pitype >
    \n+
    326 typename Traits
    \n+
    327 ::template Codim< codim >::template Partition< pitype >::LeafIterator
    \n+
    328 leafend () const;
    \n+
    329
    \n+
    331 template< int codim >
    \n+
    332 typename Traits::template Codim< codim >::LeafIterator
    \n+
    333 leafbegin () const;
    \n+
    334
    \n+
    336 template< int codim >
    \n+
    337 typename Traits::template Codim< codim >::LeafIterator
    \n+
    338 leafend () const;
    \n+
    339
    \n+
    344 int size (int level, int codim) const;
    \n+
    345
    \n+
    347 int size (int level, GeometryType type) const;
    \n+
    348
    \n+
    350 int size (int codim) const;
    \n+
    351
    \n+
    353 int size (GeometryType type) const;
    \n+
    354
    \n+
    356 std::size_t numBoundarySegments () const
    \n+
    357 {
    \n+
    358 return numBoundarySegments_;
    \n+
    359 }
    \n+
    360
    \n+
    362 typename Traits::LevelGridView levelGridView ( int level ) const
    \n+
    363 {
    \n+
    364 typedef typename Traits::LevelGridView View;
    \n+
    365 typedef typename View::GridViewImp ViewImp;
    \n+
    366 return View( ViewImp( *this, level ) );
    \n+
    367 }
    \n+
    368
    \n+\n+
    371 {
    \n+
    372 typedef typename Traits::LeafGridView View;
    \n+
    373 typedef typename View::GridViewImp ViewImp;
    \n+
    374 return View( ViewImp( *this ) );
    \n+
    375 }
    \n+
    376
    \n+
    377 public:
    \n+
    378 //***************************************************************
    \n+
    379 // Interface for Adaptation
    \n+
    380 //***************************************************************
    \n+
    381 using Base::getMark;
    \n+
    382 using Base::mark;
    \n+
    383
    \n+
    385 int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const;
    \n+
    386
    \n+
    388 bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
    \n+
    389
    \n+
    391 void globalRefine ( int refCount );
    \n+
    392
    \n+
    393 template< class DataHandle >
    \n+
    394 void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
    \n+
    395
    \n+
    397 bool adapt ();
    \n+
    398
    \n+
    400 template< class DataHandle >
    \n+\n+
    402
    \n+
    404 bool preAdapt ();
    \n+
    405
    \n+
    407 void postAdapt();
    \n+
    408
    \n+
    411 const Communication &comm () const
    \n+
    412 {
    \n+
    413 return comm_;
    \n+
    414 }
    \n+
    415
    \n+
    416 static std::string typeName ()
    \n+
    417 {
    \n+
    418 std::ostringstream s;
    \n+
    419 s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
    \n+
    420 return s.str();
    \n+
    421 }
    \n+
    422
    \n+
    424 template< class EntitySeed >
    \n+
    425 typename Traits::template Codim< EntitySeed::codimension >::Entity
    \n+
    426 entity ( const EntitySeed &seed ) const
    \n+
    427 {
    \n+
    428 typedef typename Traits::template Codim< EntitySeed::codimension >::EntityImpl EntityImpl;
    \n+
    429 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ), seed.impl().subEntity() );
    \n+
    430 }
    \n+
    431
    \n+
    432 //**********************************************************
    \n+
    433 // End of Interface Methods
    \n+
    434 //**********************************************************
    \n+
    436 bool writeGrid( const std::string &filename, ctype time ) const;
    \n+
    437
    \n+
    439 bool readGrid( const std::string &filename, ctype &time );
    \n+
    440
    \n+
    441 // return hierarchic index set
    \n+
    442 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
    \n+
    443
    \n+
    445 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
    \n+
    446
    \n+
    448 const typename Traits :: LeafIndexSet & leafIndexSet () const;
    \n+
    449
    \n+
    451 const GlobalIdSet &globalIdSet () const
    \n+
    452 {
    \n+
    453 return idSet_;
    \n+
    454 }
    \n+
    455
    \n+
    457 const LocalIdSet &localIdSet () const
    \n+
    458 {
    \n+
    459 return idSet_;
    \n+
    460 }
    \n+
    461
    \n+
    462 // access to mesh pointer, needed by some methods
    \n+
    463 ALBERTA MESH* getMesh () const
    \n+
    464 {
    \n+
    465 return mesh_;
    \n+
    466 };
    \n+
    467
    \n+
    468 const MeshPointer &meshPointer () const
    \n+
    469 {
    \n+
    470 return mesh_;
    \n+
    471 }
    \n+
    472
    \n+\n+
    474 {
    \n+
    475 return dofNumbering_;
    \n+
    476 }
    \n+
    477
    \n+\n+
    479 {
    \n+
    480 return levelProvider_;
    \n+
    481 }
    \n+
    482
    \n+
    483 int dune2alberta ( int codim, int i ) const
    \n+
    484 {
    \n+
    485 return numberingMap_.dune2alberta( codim, i );
    \n+
    486 }
    \n+
    487
    \n+
    488 int alberta2dune ( int codim, int i ) const
    \n+
    489 {
    \n+
    490 return numberingMap_.alberta2dune( codim, i );
    \n+
    491 }
    \n+
    492
    \n+
    493 int generic2alberta ( int codim, int i ) const
    \n+
    494 {
    \n+
    495 return genericNumberingMap_.dune2alberta( codim, i );
    \n+
    496 }
    \n+
    497
    \n+
    498 int alberta2generic ( int codim, int i ) const
    \n+
    499 {
    \n+
    500 return genericNumberingMap_.alberta2dune( codim, i );
    \n+
    501 }
    \n+
    502
    \n+
    503 private:
    \n+
    504 typedef std::vector<int> ArrayType;
    \n+
    505
    \n+
    506 void setup ();
    \n+
    507
    \n+
    508 // make the calculation of indexOnLevel and so on.
    \n+
    509 // extra method because of Reihenfolge
    \n+
    510 void calcExtras();
    \n+
    511
    \n+
    512 private:
    \n+
    513 // delete mesh and all vectors
    \n+
    514 void removeMesh();
    \n+
    515
    \n+
    516 //***********************************************************************
    \n+
    517 // MemoryManagement for Entitys and Geometrys
    \n+
    518 //**********************************************************************
    \n+\n+\n+
    521
    \n+
    522 public:
    \n+
    523 friend class AlbertaGridLeafIntersectionIterator< const This >;
    \n+
    524
    \n+
    525 template< int codim >
    \n+
    526 static int
    \n+
    527 getTwist ( const typename Traits::template Codim< codim >::Entity &entity )
    \n+
    528 {
    \n+
    529 return entity.impl().twist();
    \n+
    530 }
    \n+
    531
    \n+
    532 template< int codim >
    \n+
    533 static int
    \n+
    534 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
    \n+
    535 {
    \n+
    536 return entity.impl().template twist< codim >( subEntity );
    \n+
    537 }
    \n+
    538
    \n+
    539 static int
    \n+
    540 getTwistInInside ( const typename Traits::LeafIntersection &intersection )
    \n+
    541 {
    \n+
    542 return intersection.impl().twistInInside();
    \n+
    543 }
    \n+
    544
    \n+
    545 static int
    \n+
    546 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
    \n+
    547 {
    \n+
    548 return intersection.impl().twistInOutside();
    \n+
    549 }
    \n+
    550
    \n+
    551 public:
    \n+
    552 // read global element number from elNumbers_
    \n+\n+
    554 getCoord ( const ElementInfo &elementInfo, int vertex ) const;
    \n+
    555
    \n+
    556 private:
    \n+
    557 // pointer to an Albert Mesh, which contains the data
    \n+
    558 MeshPointer mesh_;
    \n+
    559
    \n+
    560 // communication
    \n+
    561 Communication comm_;
    \n+
    562
    \n+
    563 // maximum level of the mesh
    \n+
    564 int maxlevel_;
    \n+
    565
    \n+
    566 // number of boundary segments within the macro grid
    \n+
    567 size_t numBoundarySegments_;
    \n+
    568
    \n+
    569 // map between ALBERTA and DUNE numbering
    \n+\n+\n+
    572
    \n+
    573 DofNumbering dofNumbering_;
    \n+
    574
    \n+
    575 LevelProvider levelProvider_;
    \n+
    576
    \n+
    577 // hierarchical numbering of AlbertaGrid, unique per codim
    \n+
    578 HierarchicIndexSet hIndexSet_;
    \n+
    579
    \n+
    580 // the id set of this grid
    \n+
    581 IdSetImp idSet_;
    \n+
    582
    \n+
    583 // the level index set, is generated from the HierarchicIndexSet
    \n+
    584 // is generated, when accessed
    \n+
    585 mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
    \n+
    586
    \n+
    587 // the leaf index set, is generated from the HierarchicIndexSet
    \n+
    588 // is generated, when accessed
    \n+
    589 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
    \n+
    590
    \n+
    591 SizeCache< This > sizeCache_;
    \n+
    592
    \n+
    593 typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
    \n+
    594
    \n+
    595 // needed for VertexIterator, mark on which element a vertex is treated
    \n+
    596 mutable MarkerVector leafMarkerVector_;
    \n+
    597
    \n+
    598 // needed for VertexIterator, mark on which element a vertex is treated
    \n+
    599 mutable std::vector< MarkerVector > levelMarkerVector_;
    \n+
    600
    \n+
    601#if DUNE_ALBERTA_CACHE_COORDINATES
    \n+\n+
    603#endif
    \n+
    604
    \n+
    605 // current state of adaptation
    \n+
    606 AdaptationState adaptationState_;
    \n+
    607 };
    \n+
    608
    \n+
    609} // namespace Dune
    \n+
    610
    \n+
    611#include "albertagrid.cc"
    \n+
    612
    \n+
    613// undef all dangerous defines
    \n+
    614#undef DIM
    \n+
    615#undef DIM_OF_WORLD
    \n+
    616
    \n+
    617#ifdef _ABS_NOT_DEFINED_
    \n+
    618#undef ABS
    \n+
    619#endif
    \n+
    620
    \n+
    621#ifdef _MIN_NOT_DEFINED_
    \n+
    622#undef MIN
    \n+
    623#endif
    \n+
    624
    \n+
    625#ifdef _MAX_NOT_DEFINED_
    \n+
    626#undef MAX
    \n+
    627#endif
    \n+
    628
    \n+
    629#ifdef obstack_chunk_alloc
    \n+
    630#undef obstack_chunk_alloc
    \n+
    631#endif
    \n+
    632#ifdef obstack_chunk_free
    \n+
    633#undef obstack_chunk_free
    \n+
    634#endif
    \n+\n+
    636
    \n+
    637// We use MEM_ALLOC, so undefine it here.
    \n+
    638#undef MEM_ALLOC
    \n+
    639
    \n+
    640// We use MEM_REALLOC, so undefine it here.
    \n+
    641#undef MEM_REALLOC
    \n+
    642
    \n+
    643// We use MEM_CALLOC, so undefine it here.
    \n+
    644#undef MEM_CALLOC
    \n+
    645
    \n+
    646// We use MEM_FREE, so undefine it here.
    \n+
    647#undef MEM_FREE
    \n+
    648
    \n+
    649// Macro ERROR may be defined by alberta_util.h. If so, undefine it.
    \n+
    650#ifdef ERROR
    \n+
    651#undef ERROR
    \n+
    652#endif // #ifdef ERROR
    \n+
    653
    \n+
    654// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
    \n+
    655#ifdef ERROR_EXIT
    \n+
    656#undef ERROR_EXIT
    \n+
    657#endif // #ifdef ERROR_EXIT
    \n+
    658
    \n+
    659// Macro WARNING may be defined by alberta_util.h. If so, undefine it.
    \n+
    660#ifdef WARNING
    \n+
    661#undef WARNING
    \n+
    662#endif // #ifdef WARNING
    \n+
    663
    \n+
    664// Macro TEST may be defined by alberta_util.h. If so, undefine it.
    \n+
    665#ifdef TEST
    \n+
    666#undef TEST
    \n+
    667#endif // #ifdef TEST
    \n+
    668
    \n+
    669// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
    \n+
    670#ifdef TEST_EXIT
    \n+
    671#undef TEST_EXIT
    \n+
    672#endif // #ifdef TEST_EXIT
    \n+
    673
    \n+
    674// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
    \n+
    675#ifdef DEBUG_TEST
    \n+
    676#undef DEBUG_TEST
    \n+
    677#endif // #ifdef DEBUG_TEST
    \n+
    678
    \n+
    679// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
    \n+
    680#ifdef DEBUG_TEST_EXIT
    \n+
    681#undef DEBUG_TEST_EXIT
    \n+
    682#endif // #ifdef DEBUG_TEST_EXIT
    \n+
    683
    \n+
    684// Macro INFO may be defined by alberta_util.h. If so, undefine it.
    \n+
    685#ifdef INFO
    \n+
    686#undef INFO
    \n+
    687#endif // #ifdef INFO
    \n+
    688
    \n+
    689// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
    \n+
    690#ifdef PRINT_INFO
    \n+
    691#undef PRINT_INFO
    \n+
    692#endif // #ifdef PRINT_INFO
    \n+
    693
    \n+
    694// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
    \n+
    695#ifdef PRINT_INT_VEC
    \n+
    696#undef PRINT_INT_VEC
    \n+
    697#endif // #ifdef PRINT_INT_VEC
    \n+
    698
    \n+
    699// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
    \n+
    700#ifdef PRINT_REAL_VEC
    \n+
    701#undef PRINT_REAL_VEC
    \n+
    702#endif // #ifdef PRINT_REAL_VEC
    \n+
    703
    \n+
    704// Macro WAIT may be defined by alberta_util.h. If so, undefine it.
    \n+
    705#ifdef WAIT
    \n+
    706#undef WAIT
    \n+
    707#endif // #ifdef WAIT
    \n+
    708
    \n+
    709// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
    \n+
    710#ifdef WAIT_REALLY
    \n+
    711#undef WAIT_REALLY
    \n+
    712#endif // #ifdef WAIT_REALLY
    \n+
    713
    \n+
    714// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
    \n+
    715#ifdef GET_WORKSPACE
    \n+
    716#undef GET_WORKSPACE
    \n+
    717#endif // #ifdef GET_WORKSPACE
    \n+
    718
    \n+
    719// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
    \n+
    720#ifdef FREE_WORKSPACE
    \n+
    721#undef FREE_WORKSPACE
    \n+
    722#endif // #ifdef FREE_WORKSPACE
    \n+
    723
    \n+
    724// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
    \n+
    725#ifdef MAT_ALLOC
    \n+
    726#undef MAT_ALLOC
    \n+
    727#endif // #ifdef MAT_ALLOC
    \n+
    728
    \n+
    729// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
    \n+
    730#ifdef MAT_FREE
    \n+
    731#undef MAT_FREE
    \n+
    732#endif // #ifdef MAT_FREE
    \n+
    733
    \n+
    734// Macro NAME may be defined by alberta_util.h. If so, undefine it.
    \n+
    735#ifdef NAME
    \n+
    736#undef NAME
    \n+
    737#endif // #ifdef NAME
    \n+
    738
    \n+
    739// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
    \n+
    740#ifdef GET_STRUCT
    \n+
    741#undef GET_STRUCT
    \n+
    742#endif // #ifdef GET_STRUCT
    \n+
    743
    \n+
    744// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
    \n+
    745#ifdef ADD_PARAMETER
    \n+
    746#undef ADD_PARAMETER
    \n+
    747#endif // #ifdef ADD_PARAMETER
    \n+
    748
    \n+
    749// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
    \n+
    750#ifdef GET_PARAMETER
    \n+
    751#undef GET_PARAMETER
    \n+
    752#endif // #ifdef GET_PARAMETER
    \n+
    753
    \n+
    754#define _ALBERTA_H_
    \n+
    755
    \n+
    756#endif // HAVE_ALBERTA || DOXYGEN
    \n+
    757
    \n+
    758#endif
    \n+
    Provides size cache classes to implement the grids size method efficiently.
    \n+
    interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
    \n+\n+\n+\n+
    Contains #undefs for all preprocessor macros defined by alberta.
    \n+\n+\n+\n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    ALBERTA EL Element
    Definition: misc.hh:54
    \n-
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n-
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n-
    Definition: meshpointer.hh:40
    \n-
    void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:385
    \n-
    void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:370
    \n-\n-
    Definition: dofadmin.hh:93
    \n-
    const DofSpace * dofSpace(int codim) const
    Definition: dofadmin.hh:145
    \n-\n-
    void create(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:236
    \n-
    void release()
    Definition: dofvector.hh:254
    \n-
    const DofSpace * dofSpace() const
    Definition: dofvector.hh:223
    \n-
    void forEach(Functor &functor) const
    Definition: dofvector.hh:264
    \n-
    Definition: elementinfo.hh:43
    \n-
    int level() const
    Definition: elementinfo.hh:533
    \n-
    Element * el() const
    Definition: elementinfo.hh:737
    \n-
    Definition: level.hh:25
    \n-
    bool isNew(const Alberta::Element *element) const
    Definition: level.hh:62
    \n-
    bool isNew(const ElementInfo &elementInfo) const
    Definition: level.hh:68
    \n-
    Alberta::MeshPointer< dim > MeshPointer
    Definition: level.hh:48
    \n-
    MeshPointer mesh() const
    Definition: level.hh:85
    \n-
    void create(const DofNumbering &dofNumbering)
    Definition: level.hh:96
    \n-
    Level maxLevel() const
    Definition: level.hh:73
    \n-
    Alberta::HierarchyDofNumbering< dim > DofNumbering
    Definition: level.hh:49
    \n-
    void release()
    Definition: level.hh:109
    \n-
    Level operator()(const Alberta::Element *element) const
    Definition: level.hh:51
    \n-
    void markAllOld()
    Definition: level.hh:90
    \n-
    Alberta::ElementInfo< dim > ElementInfo
    Definition: level.hh:47
    \n-\n-
    SetLocal(const DofVectorPointer &level)
    Definition: level.hh:132
    \n-\n-\n-
    Level maxLevel() const
    Definition: level.hh:169
    \n-\n-
    Alberta::Patch< dimension > Patch
    Definition: level.hh:200
    \n-
    static void interpolateVector(const DofVectorPointer &dofVector, const Patch &patch)
    Definition: level.hh:202
    \n-
    Definition: misc.hh:231
    \n-
    static const Flags nothing
    Definition: misc.hh:234
    \n-
    Definition: refinement.hh:40
    \n-
    int count() const
    Definition: refinement.hh:67
    \n+
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n+
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    @ vertex
    Definition: common.hh:133
    \n+
    Definition: dgfgridfactory.hh:38
    \n+
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n+
    bool readGrid(const std::string &filename, ctype &time)
    read Grid from file filename and store time of mesh in time
    Definition: albertagrid.cc:585
    \n+
    const DofNumbering & dofNumbering() const
    Definition: agrid.hh:473
    \n+
    int generic2alberta(int codim, int i) const
    Definition: agrid.hh:493
    \n+
    static std::string typeName()
    Definition: agrid.hh:416
    \n+
    Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafbegin() const
    return LeafIterator which points to first leaf entity
    \n+
    const HierarchicIndexSet & hierarchicIndexSet() const
    Definition: agrid.hh:442
    \n+
    Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
    one past the end on this level
    \n+
    static const int dimension
    Definition: agrid.hh:145
    \n+
    int dune2alberta(int codim, int i) const
    Definition: agrid.hh:483
    \n+
    Traits::Communication Communication
    type of communication
    Definition: agrid.hh:165
    \n+
    int maxLevel() const
    Definition: albertagrid.cc:483
    \n+
    AlbertaGrid()
    create an empty grid
    Definition: albertagrid.cc:42
    \n+
    Traits::template Codim< codim >::LevelIterator lbegin(int level) const
    Iterator to first entity of given codim on level.
    \n+
    const LevelProvider & levelProvider() const
    Definition: agrid.hh:478
    \n+
    static int getTwistInOutside(const typename Traits::LeafIntersection &intersection)
    Definition: agrid.hh:546
    \n+
    const Alberta::GlobalVector & getCoord(const ElementInfo &elementInfo, int vertex) const
    Definition: albertagrid.cc:471
    \n+
    Traits::template Codim< codim >::LevelIterator lend(int level) const
    one past the end on this level
    \n+
    Traits::LeafGridView leafGridView() const
    View for the leaf grid for All_Partition.
    Definition: agrid.hh:370
    \n+
    bool adapt()
    Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
    Definition: albertagrid.cc:415
    \n+
    static const int dimensionworld
    Definition: agrid.hh:146
    \n+
    static int getTwistInInside(const typename Traits::LeafIntersection &intersection)
    Definition: agrid.hh:540
    \n+
    void postAdapt()
    clean up some markers
    Definition: albertagrid.cc:356
    \n+
    Traits::template Codim< codim >::LeafIterator leafbegin() const
    return LeafIterator which points to first leaf entity
    \n+
    const LocalIdSet & localIdSet() const
    return local IdSet
    Definition: agrid.hh:457
    \n+
    std::size_t numBoundarySegments() const
    number of boundary segments within the macro grid
    Definition: agrid.hh:356
    \n+
    GridFamily::ctype ctype
    Definition: agrid.hh:143
    \n+
    AlbertaGrid(const This &)=delete
    \n+
    Communication CollectiveCommunication
    Definition: agrid.hh:171
    \n+
    Traits::template Codim< codim >::LeafIterator leafend() const
    return LeafIterator which points behind last leaf entity
    \n+
    const Traits::LevelIndexSet & levelIndexSet(int level) const
    return level index set for given level
    Definition: albertagrid.cc:520
    \n+
    int alberta2generic(int codim, int i) const
    Definition: agrid.hh:498
    \n+
    static int getTwist(const typename Traits::template Codim< codim >::Entity &entity)
    Definition: agrid.hh:527
    \n+
    const Communication & comm() const
    return reference to communication, if MPI found this is specialisation for MPI
    Definition: agrid.hh:411
    \n+
    ALBERTA MESH * getMesh() const
    Definition: agrid.hh:463
    \n+
    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
    \n+
    Traits::HierarchicIndexSet HierarchicIndexSet
    type of hierarchic index set
    Definition: agrid.hh:157
    \n+
    const Traits::LeafIndexSet & leafIndexSet() const
    return leaf index set
    Definition: albertagrid.cc:535
    \n+
    Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafend() const
    return LeafIterator which points behind last leaf entity
    \n+
    bool writeGrid(const std::string &filename, ctype time) const
    write Grid to file in Xdr
    Definition: albertagrid.cc:575
    \n+
    Traits::LevelGridView levelGridView(int level) const
    View for a grid level for All_Partition.
    Definition: agrid.hh:362
    \n+
    int alberta2dune(int codim, int i) const
    Definition: agrid.hh:488
    \n+
    This & operator=(const This &)=delete
    \n+
    AlbertaGridFamily< dim, dimworld >::Traits Traits
    Definition: agrid.hh:149
    \n+
    static int getTwist(const typename Traits::template Codim< 0 >::Entity &entity, int subEntity)
    Definition: agrid.hh:534
    \n+
    Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lbegin(int level) const
    Iterator to first entity of given codim on level.
    \n+
    const GlobalIdSet & globalIdSet() const
    return global IdSet
    Definition: agrid.hh:451
    \n+
    void globalRefine(int refCount)
    uses the interface, mark on entity and refineLocal
    Definition: albertagrid.cc:304
    \n+
    int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
    returns adaptation mark for given entity
    Definition: albertagrid.cc:408
    \n+
    Traits::template Codim< EntitySeed::codimension >::Entity entity(const EntitySeed &seed) const
    obtain Entity from EntitySeed.
    Definition: agrid.hh:426
    \n+
    ~AlbertaGrid()
    desctructor
    Definition: albertagrid.cc:196
    \n+
    bool preAdapt()
    returns true, if a least one element is marked for coarsening
    Definition: albertagrid.cc:348
    \n+
    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
    \n+
    const MeshPointer & meshPointer() const
    Definition: agrid.hh:468
    \n+
    Definition: coordcache.hh:25
    \n+
    Definition: albertagrid/datahandle.hh:27
    \n+
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n+
    Implementation & impl()
    access to the underlying implementation
    Definition: common/intersection.hh:178
    \n+\n+\n+\n+
    Definition: treeiterator.hh:189
    \n+
    Definition: hierarchiciterator.hh:29
    \n+
    Definition: albertagrid/intersection.hh:105
    \n+
    Definition: albertagrid/intersectioniterator.hh:27
    \n+
    Definition: albertagrid/entity.hh:46
    \n+
    Definition: albertagrid/indexsets.hh:42
    \n+
    hierarchic index set of AlbertaGrid
    Definition: albertagrid/indexsets.hh:534
    \n+
    Definition: albertagrid/indexsets.hh:335
    \n+
    Definition: albertagrid/gridfamily.hh:83
    \n+
    static const int dimension
    Definition: albertagrid/gridfamily.hh:88
    \n+
    static const int dimensionworld
    Definition: albertagrid/gridfamily.hh:89
    \n+
    AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp
    Definition: albertagrid/gridfamily.hh:92
    \n+
    Alberta::Real ctype
    Definition: albertagrid/gridfamily.hh:86
    \n+
    Definition: albertagrid/gridfamily.hh:98
    \n+
    IndexSet< GridImp, LeafIndexSetImp, int, std::array< GeometryType, 1 > > LeafIndexSet
    Definition: albertagrid/gridfamily.hh:143
    \n+
    IndexSet< GridImp, LevelIndexSetImp, int, std::array< GeometryType, 1 > > LevelIndexSet
    Definition: albertagrid/gridfamily.hh:142
    \n+
    Dune::Communication< No_Comm > Communication
    Definition: albertagrid/gridfamily.hh:148
    \n+
    Definition: albertagrid/gridview.hh:80
    \n+
    Definition: albertagrid/gridview.hh:299
    \n+
    Definition: albertagrid/intersection.hh:32
    \n+\n+\n+\n+
    int alberta2dune(int codim, int i) const
    Definition: misc.hh:397
    \n+
    int dune2alberta(int codim, int i) const
    Definition: misc.hh:390
    \n+
    Definition: albertagrid/projection.hh:80
    \n+
    marker assigning subentities to one element containing them
    Definition: treeiterator.hh:35
    \n+
    Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
    Definition: adaptcallback.hh:33
    \n+
    Interface class for vertex projection at the boundary.
    Definition: boundaryprojection.hh:33
    \n+
    Implementation & impl()
    access to the underlying implementation
    Definition: common/entity.hh:80
    \n+
    Store a reference to an entity with a minimal memory footprint.
    Definition: common/entityseed.hh:26
    \n+
    Implementation & impl()
    access to the underlying implementation
    Definition: common/entityseed.hh:59
    \n+
    Definition: common/grid.hh:862
    \n+
    bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
    Marks an entity to be refined/coarsened in a subsequent adapt.
    Definition: common/grid.hh:915
    \n+
    int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
    returns adaptation mark for given entity, i.e. here the default implementation returns 0.
    Definition: common/grid.hh:927
    \n+
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n+
    Id Set Interface.
    Definition: indexidset.hh:452
    \n+
    Definition: common/grid.hh:1107
    \n+
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:314
    \n+
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n+
    organizes the caching of sizes for one grid and one GeometryType
    Definition: sizecache.hh:33
    \n+\n+\n+\n+\n+\n+\n+
    Provide a generic factory class for unstructured grids.
    \n+
    provides the GridFamily for AlbertaGrid
    \n+\n+\n+
    Implementation of the IntersectionIterator for AlbertaGrid.
    \n+
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,360 +5,1071 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-level.hh\n+agrid.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_LEVEL_HH\n- 6#define DUNE_ALBERTA_LEVEL_HH\n+ 5#ifndef DUNE_ALBERTAGRID_IMP_HH\n+ 6#define DUNE_ALBERTAGRID_IMP_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13#include \n+ 13#if HAVE_ALBERTA || DOXYGEN\n 14\n- 15#if HAVE_ALBERTA\n- 16\n- 17namespace Dune\n- 18{\n- 19\n- 20 // AlbertaGridLevelProvider\n- 21 // ------------------------\n- 22\n- 23 template< int dim >\n-24 class AlbertaGridLevelProvider\n- 25 {\n- 26 typedef AlbertaGridLevelProvider<_dim_> This;\n- 27\n- 28 typedef unsigned char Level;\n+ 15#include \n+ 16#include \n+ 17\n+ 18#include \n+ 19#include \n+ 20#include \n+ 21#include \n+ 22#include \n+ 23\n+ 24// Dune includes\n+ 25#include \n+ 26#include \n+ 27#include \n+ 28#include \n 29\n- 30 typedef Alberta::DofVectorPointer<_Level_> DofVectorPointer;\n- 31 typedef Alberta::DofAccess<_dim,_0_> DofAccess;\n- 32\n- 33 typedef Alberta::FillFlags<_dim_> FillFlags;\n+ 30#include \n+ 31#include \n+ 32#include \n+ 33#include \n 34\n- 35 static const Level isNewFlag = (1 << 7);\n- 36 static const Level levelMask = (1 << 7) - 1;\n- 37\n- 38 class SetLocal;\n- 39 class CalcMaxLevel;\n- 40\n- 41 template< Level flags >\n- 42 struct ClearFlags;\n- 43\n- 44 struct Interpolation;\n- 45\n- 46 public:\n-47 typedef Alberta::ElementInfo<_dim_> ElementInfo;\n-48 typedef Alberta::MeshPointer<_dim_> MeshPointer;\n-49 typedef Alberta::HierarchyDofNumbering<_dim_> DofNumbering;\n+ 35//- Local includes\n+ 36// some cpp defines and include of alberta.h\n+ 37#include \"albertaheader.hh\"\n+ 38\n+ 39#include \n+ 40#include \n+ 41#include \n+ 42\n+ 43#include \n+ 44#include \n+ 45#include \n+ 46#include \n+ 47#include \n+ 48#include \n+ 49#include \n 50\n-51 Level operator()( const Alberta::Element *element ) const\n- 52 {\n- 53 const Level *array = (Level *)level_;\n- 54 return array[ dofAccess_( element, 0 ) ] & levelMask;\n- 55 }\n- 56\n-57 Level operator()( const ElementInfo &elementInfo ) const\n- 58 {\n- 59 return (*this)( elementInfo.el() );\n- 60 }\n+ 51#include \"indexsets.hh\"\n+ 52#include \"geometry.hh\"\n+ 53#include \"entity.hh\"\n+ 54#include \"hierarchiciterator.hh\"\n+ 55#include \"treeiterator.hh\"\n+ 56#include \"leveliterator.hh\"\n+ 57#include \"leafiterator.hh\"\n+ 58\n+59namespace Dune\n+ 60{\n 61\n-62 bool isNew ( const Alberta::Element *element ) const\n- 63 {\n- 64 const Level *array = (Level *)level_;\n- 65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0);\n- 66 }\n+ 62 // External Forward Declarations\n+ 63 // -----------------------------\n+ 64\n+ 65 template< class Grid >\n+ 66 struct DGFGridFactory;\n 67\n-68 bool isNew ( const ElementInfo &elementInfo ) const\n- 69 {\n- 70 return isNew( elementInfo.el() );\n- 71 }\n+ 68\n+ 69\n+ 70 // AlbertaGrid\n+ 71 // -----------\n 72\n-73 Level maxLevel () const\n- 74 {\n- 75 CalcMaxLevel calcFromCache;\n- 76 level_.forEach( calcFromCache );\n- 77#ifndef NDEBUG\n- 78 CalcMaxLevel calcFromGrid;\n- 79 mesh().leafTraverse( calcFromGrid, FillFlags::nothing );\n- 80 assert( calcFromCache.maxLevel() == calcFromGrid.maxLevel() );\n- 81#endif\n- 82 return calcFromCache.maxLevel();;\n- 83 }\n- 84\n-85 MeshPointer mesh () const\n- 86 {\n- 87 return MeshPointer( level_.dofSpace()->mesh );\n- 88 }\n- 89\n-90 void markAllOld ()\n- 91 {\n- 92 ClearFlags< isNewFlag > clearIsNew;\n- 93 level_.forEach( clearIsNew );\n- 94 }\n- 95\n-96 void create ( const DofNumbering &dofNumbering )\n- 97 {\n- 98 const Alberta::DofSpace *const dofSpace = dofNumbering.dofSpace( 0 );\n- 99 dofAccess_ = DofAccess( dofSpace );\n- 100\n- 101 level_.create( dofSpace, \"Element level\" );\n- 102 assert( level_ );\n- 103 level_.template setupInterpolation< Interpolation >();\n- 104\n- 105 SetLocal setLocal( level_ );\n- 106 mesh().hierarchicTraverse( setLocal, FillFlags::nothing );\n- 107 }\n- 108\n-109 void release ()\n- 110 {\n- 111 level_.release();\n- 112 dofAccess_ = DofAccess();\n- 113 }\n+ 105 template< int dim, int dimworld = Alberta::dimWorld >\n+106 class AlbertaGrid\n+ 107 : public GridDefaultImplementation\n+ 108 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >\n+ 109 {\n+ 110 typedef AlbertaGrid<_dim,_dimworld_> This;\n+ 111 typedef GridDefaultImplementation\n+ 112 < dim, dimworld, Alberta::Real, AlbertaGridFamily<_dim,_dimworld_> >\n+ 113 Base;\n 114\n- 115 private:\n- 116 DofVectorPointer level_;\n- 117 DofAccess dofAccess_;\n- 118 };\n- 119\n+115 template< int, int, class > friend class AlbertaGridEntity;\n+116 template< class > friend class AlbertaLevelGridView;\n+117 template< class > friend class AlbertaLeafGridView;\n+118 template< int, class, bool > friend class AlbertaGridTreeIterator;\n+119 template< class > friend class AlbertaGridHierarchicIterator;\n 120\n- 121\n- 122 // AlbertaGridLevelProvider::SetLocal\n- 123 // ----------------------------------\n- 124\n- 125 template< int dim >\n-126 class AlbertaGridLevelProvider< dim >::SetLocal\n- 127 {\n- 128 DofVectorPointer level_;\n- 129 DofAccess dofAccess_;\n- 130\n- 131 public:\n-132 explicit SetLocal ( const DofVectorPointer &level )\n- 133 : level_( level ),\n- 134 dofAccess_( level.dofSpace() )\n- 135 {}\n- 136\n-137 void operator()( const Alberta::ElementInfo<_dim_> &elementInfo ) const\n- 138 {\n- 139 Level *const array = (Level *)level_;\n- 140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo.level();\n- 141 }\n- 142 };\n- 143\n+ 121 friend class GridFactory< This >;\n+ 122 friend struct DGFGridFactory< This >;\n+ 123\n+ 124 friend class AlbertaGridIntersectionBase< const This >;\n+ 125 friend class AlbertaGridLeafIntersection< const This >;\n+ 126\n+ 127 friend class AlbertaMarkerVector< dim, dimworld >;\n+ 128#if (__GNUC__ < 4) && !(defined __ICC)\n+ 129 // add additional friend decls for gcc 3.4\n+ 130 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities;\n+ 131 friend struct AlbertaMarkerVector< dim, dimworld >::\n+MarkSubEntities;\n+ 132#endif\n+ 133 friend class AlbertaGridIndexSet< dim, dimworld >;\n+ 134 friend class AlbertaGridHierarchicIndexSet< dim, dimworld >;\n+ 135\n+ 136 template< class, class >\n+137 friend class Alberta::AdaptRestrictProlongHandler;\n+ 138\n+ 139 public:\n+141 typedef AlbertaGridFamily< dim, dimworld > GridFamily;\n+ 142\n+143 typedef typename GridFamily::ctype ctype;\n 144\n- 145\n- 146 // AlbertaGridLevelProvider::CalcMaxLevel\n- 147 // --------------------------------------\n- 148\n- 149 template< int dim >\n-150 class AlbertaGridLevelProvider< dim >::CalcMaxLevel\n- 151 {\n- 152 Level maxLevel_;\n- 153\n- 154 public:\n-155 CalcMaxLevel ()\n- 156 : maxLevel_( 0 )\n- 157 {}\n+145 static const int dimension = GridFamily::dimension;\n+146 static const int dimensionworld = GridFamily::dimensionworld;\n+ 147\n+ 148 // the Traits\n+149 typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;\n+ 150\n+152 typedef typename Traits::LeafIndexSet LeafIndexSet;\n+154 typedef typename Traits::LevelIndexSet LevelIndexSet;\n+ 155\n+157 typedef typename Traits::HierarchicIndexSet HierarchicIndexSet;\n 158\n-159 void operator()( const Level &dof )\n- 160 {\n- 161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) );\n- 162 }\n+160 typedef typename Traits::GlobalIdSet GlobalIdSet;\n+162 typedef typename Traits::LocalIdSet LocalIdSet;\n 163\n-164 void operator()( const Alberta::ElementInfo<_dim_> &elementInfo )\n- 165 {\n- 166 maxLevel_ = std::max( maxLevel_, Level( elementInfo.level() ) );\n- 167 }\n- 168\n-169 Level maxLevel () const\n- 170 {\n- 171 return maxLevel_;\n- 172 }\n- 173 };\n- 174\n- 175\n+165 typedef typename Traits::Communication Communication;\n+ 166\n+ 170 [[deprecated(\"Use Communication instead!\")]]\n+171 typedef Communication CollectiveCommunication;\n+ 172\n+ 173 private:\n+ 175 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;\n 176\n- 177 // AlbertaGridLevelProvider::ClearFlags\n- 178 // ------------------------------------\n+ 178 typedef AlbertaGridIdSet IdSetImp;\n 179\n- 180 template< int dim >\n- 181 template< typename AlbertaGridLevelProvider< dim >::Level flags >\n- 182 struct AlbertaGridLevelProvider< dim >::ClearFlags\n- 183 {\n- 184 void operator()( Level &dof ) const\n- 185 {\n- 186 dof &= ~flags;\n- 187 }\n- 188 };\n+ 181 struct AdaptationState\n+ 182 {\n+ 183 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };\n+ 184\n+ 185 private:\n+ 186 Phase phase_;\n+ 187 int coarsenMarked_;\n+ 188 int refineMarked_;\n 189\n- 190\n- 191\n- 192 // AlbertaGridLevelProvider::Interpolation\n- 193 // ---------------------------------------\n- 194\n- 195 template< int dim >\n-196 struct AlbertaGridLevelProvider< dim >::Interpolation\n- 197 {\n-198 static const int dimension = dim;\n- 199\n-200 typedef Alberta::Patch<_dimension_> Patch;\n- 201\n-202 static void interpolateVector ( const DofVectorPointer &dofVector,\n- 203 const Patch &patch )\n- 204 {\n- 205 const DofAccess dofAccess( dofVector.dofSpace() );\n- 206 Level *array = (Level *)dofVector;\n- 207\n- 208 for( int i = 0; i < patch.count(); ++i )\n- 209 {\n- 210 const Alberta::Element *const father = patch[ i ];\n- 211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );\n- 212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) |\n-isNewFlag;\n- 213 for( int i = 0; i < 2; ++i )\n+ 190 public:\n+ 191 AdaptationState ()\n+ 192 : phase_( ComputationPhase ),\n+ 193 coarsenMarked_( 0 ),\n+ 194 refineMarked_( 0 )\n+ 195 {}\n+ 196\n+ 197 void mark ( int count )\n+ 198 {\n+ 199 if( count < 0 )\n+ 200 ++coarsenMarked_;\n+ 201 if( count > 0 )\n+ 202 refineMarked_ += (2 << count);\n+ 203 }\n+ 204\n+ 205 void unmark ( int count )\n+ 206 {\n+ 207 if( count < 0 )\n+ 208 --coarsenMarked_;\n+ 209 if( count > 0 )\n+ 210 refineMarked_ -= (2 << count);\n+ 211 }\n+ 212\n+ 213 bool coarsen () const\n 214 {\n- 215 const Alberta::Element *child = father->child[ i ];\n- 216 array[ dofAccess( child, 0 ) ] = childLevel;\n- 217 }\n- 218 }\n- 219 }\n- 220 };\n- 221\n- 222}\n- 223\n- 224#endif // #if HAVE_ALBERTA\n- 225\n- 226#endif\n-dofadmin.hh\n-dofvector.hh\n-meshpointer.hh\n-provides a wrapper for ALBERTA's mesh structure\n+ 215 return (coarsenMarked_ > 0);\n+ 216 }\n+ 217\n+ 218 int refineMarked () const\n+ 219 {\n+ 220 return refineMarked_;\n+ 221 }\n+ 222\n+ 223 void preAdapt ()\n+ 224 {\n+ 225 if( phase_ != ComputationPhase )\n+ 226 error( \"preAdapt may only be called in computation phase.\" );\n+ 227 phase_ = PreAdaptationPhase;\n+ 228 }\n+ 229\n+ 230 void adapt ()\n+ 231 {\n+ 232 if( phase_ != PreAdaptationPhase )\n+ 233 error( \"adapt may only be called in preadapdation phase.\" );\n+ 234 phase_ = PostAdaptationPhase;\n+ 235 }\n+ 236\n+ 237 void postAdapt ()\n+ 238 {\n+ 239 if( phase_ != PostAdaptationPhase )\n+ 240 error( \"postAdapt may only be called in postadaptation phase.\" );\n+ 241 phase_ = ComputationPhase;\n+ 242\n+ 243 coarsenMarked_ = 0;\n+ 244 refineMarked_ = 0;\n+ 245 }\n+ 246\n+ 247 private:\n+ 248 void error ( const std::string &message )\n+ 249 {\n+ 250 DUNE_THROW( InvalidStateException, message );\n+ 251 }\n+ 252 };\n+ 253\n+ 254 template< class DataHandler >\n+ 255 struct AdaptationCallback;\n+ 256\n+ 257 // max number of allowed levels is 64\n+ 258 static const int MAXL = 64;\n+ 259\n+ 260 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n+ 261 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n+ 262 typedef Alberta::HierarchyDofNumbering<_dimension_> DofNumbering;\n+ 263 typedef AlbertaGridLevelProvider<_dimension_> LevelProvider;\n+ 264\n+ 265 public:\n+266 AlbertaGrid ( const This & ) = delete;\n+267 This &operator=( const This & ) = delete;\n+ 268\n+ 270 AlbertaGrid ();\n+ 271\n+ 277 AlbertaGrid ( const Alberta::MacroData<_dimension_> ¯oData,\n+ 278 const std::shared_ptr< DuneBoundaryProjection<_dimensionworld_> >\n+&projection\n+ 279 = std::shared_ptr< DuneBoundaryProjection<_dimensionworld_> >() );\n+ 280\n+ 281 template< class Proj, class Impl >\n+ 282 AlbertaGrid ( const Alberta::MacroData<_dimension_> ¯oData,\n+ 283 const Alberta::ProjectionFactoryInterface<_Proj,_Impl_> &projectionFactory\n+);\n+ 284\n+ 289 AlbertaGrid ( const std::string ¯oGridFileName );\n+ 290\n+ 292 ~AlbertaGrid ();\n+ 293\n+ 296 int maxLevel () const;\n+ 297\n+ 299 template\n+ 300 typename Traits::template Codim::template Partition::\n+LevelIterator\n+301 lbegin (int level) const;\n+ 302\n+ 304 template\n+ 305 typename Traits::template Codim::template Partition::\n+LevelIterator\n+306 lend (int level) const;\n+ 307\n+ 309 template< int codim >\n+ 310 typename Traits::template Codim< codim >::LevelIterator\n+311 lbegin ( int level ) const;\n+ 312\n+ 314 template< int codim >\n+ 315 typename Traits::template Codim< codim >::LevelIterator\n+316 lend ( int level ) const;\n+ 317\n+ 319 template< int codim, PartitionIteratorType pitype >\n+ 320 typename Traits\n+ 321 ::template Codim< codim >::template Partition< pitype >::LeafIterator\n+322 leafbegin () const;\n+ 323\n+ 325 template< int codim, PartitionIteratorType pitype >\n+ 326 typename Traits\n+ 327 ::template Codim< codim >::template Partition< pitype >::LeafIterator\n+328 leafend () const;\n+ 329\n+ 331 template< int codim >\n+ 332 typename Traits::template Codim< codim >::LeafIterator\n+333 leafbegin () const;\n+ 334\n+ 336 template< int codim >\n+ 337 typename Traits::template Codim< codim >::LeafIterator\n+338 leafend () const;\n+ 339\n+ 344 int size (int level, int codim) const;\n+ 345\n+ 347 int size (int level, GeometryType type) const;\n+ 348\n+ 350 int size (int codim) const;\n+ 351\n+ 353 int size (GeometryType type) const;\n+ 354\n+356 std::size_t numBoundarySegments () const\n+ 357 {\n+ 358 return numBoundarySegments_;\n+ 359 }\n+ 360\n+362 typename Traits::LevelGridView levelGridView ( int level ) const\n+ 363 {\n+ 364 typedef typename Traits::LevelGridView View;\n+ 365 typedef typename View::GridViewImp ViewImp;\n+ 366 return View( ViewImp( *this, level ) );\n+ 367 }\n+ 368\n+370 typename Traits::LeafGridView leafGridView () const\n+ 371 {\n+ 372 typedef typename Traits::LeafGridView View;\n+ 373 typedef typename View::GridViewImp ViewImp;\n+ 374 return View( ViewImp( *this ) );\n+ 375 }\n+ 376\n+ 377 public:\n+ 378 //***************************************************************\n+ 379 // Interface for Adaptation\n+ 380 //***************************************************************\n+ 381 using Base::getMark;\n+ 382 using Base::mark;\n+ 383\n+ 385 int getMark ( const typename Traits::template Codim< 0 >::Entity &e )\n+const;\n+ 386\n+ 388 bool mark ( int refCount, const typename Traits::template Codim< 0 >::\n+Entity &e );\n+ 389\n+ 391 void globalRefine ( int refCount );\n+ 392\n+ 393 template< class DataHandle >\n+ 394 void globalRefine ( int refCount, AdaptDataHandleInterface<_This,\n+DataHandle_> &handle );\n+ 395\n+ 397 bool adapt ();\n+ 398\n+ 400 template< class DataHandle >\n+ 401 bool adapt ( AdaptDataHandleInterface<_This,_DataHandle_> &handle );\n+ 402\n+ 404 bool preAdapt ();\n+ 405\n+ 407 void postAdapt();\n+ 408\n+411 const Communication &comm () const\n+ 412 {\n+ 413 return comm_;\n+ 414 }\n+ 415\n+416 static std::string typeName ()\n+ 417 {\n+ 418 std::ostringstream s;\n+ 419 s << \"AlbertaGrid< \" << dim << \", \" << dimworld << \" >\";\n+ 420 return s.str();\n+ 421 }\n+ 422\n+ 424 template< class EntitySeed >\n+ 425 typename Traits::template Codim< EntitySeed::codimension >::Entity\n+426 entity ( const EntitySeed &seed ) const\n+ 427 {\n+ 428 typedef typename Traits::template Codim< EntitySeed::codimension >::\n+EntityImpl EntityImpl;\n+ 429 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ),\n+seed.impl().subEntity() );\n+ 430 }\n+ 431\n+ 432 //**********************************************************\n+ 433 // End of Interface Methods\n+ 434 //**********************************************************\n+ 436 bool writeGrid( const std::string &filename, ctype time ) const;\n+ 437\n+ 439 bool readGrid( const std::string &filename, ctype &time );\n+ 440\n+ 441 // return hierarchic index set\n+442 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_;\n+}\n+ 443\n+ 445 const typename Traits_::_LevelIndexSet & levelIndexSet (int level) const;\n+ 446\n+ 448 const typename Traits_::_LeafIndexSet & leafIndexSet () const;\n+ 449\n+451 const GlobalIdSet &globalIdSet () const\n+ 452 {\n+ 453 return idSet_;\n+ 454 }\n+ 455\n+457 const LocalIdSet &localIdSet () const\n+ 458 {\n+ 459 return idSet_;\n+ 460 }\n+ 461\n+ 462 // access to mesh pointer, needed by some methods\n+463 ALBERTA MESH* getMesh () const\n+ 464 {\n+ 465 return mesh_;\n+ 466 };\n+ 467\n+468 const MeshPointer &meshPointer () const\n+ 469 {\n+ 470 return mesh_;\n+ 471 }\n+ 472\n+473 const DofNumbering &dofNumbering () const\n+ 474 {\n+ 475 return dofNumbering_;\n+ 476 }\n+ 477\n+478 const LevelProvider &levelProvider () const\n+ 479 {\n+ 480 return levelProvider_;\n+ 481 }\n+ 482\n+483 int dune2alberta ( int codim, int i ) const\n+ 484 {\n+ 485 return numberingMap_.dune2alberta( codim, i );\n+ 486 }\n+ 487\n+488 int alberta2dune ( int codim, int i ) const\n+ 489 {\n+ 490 return numberingMap_.alberta2dune( codim, i );\n+ 491 }\n+ 492\n+493 int generic2alberta ( int codim, int i ) const\n+ 494 {\n+ 495 return genericNumberingMap_.dune2alberta( codim, i );\n+ 496 }\n+ 497\n+498 int alberta2generic ( int codim, int i ) const\n+ 499 {\n+ 500 return genericNumberingMap_.alberta2dune( codim, i );\n+ 501 }\n+ 502\n+ 503 private:\n+ 504 typedef std::vector ArrayType;\n+ 505\n+ 506 void setup ();\n+ 507\n+ 508 // make the calculation of indexOnLevel and so on.\n+ 509 // extra method because of Reihenfolge\n+ 510 void calcExtras();\n+ 511\n+ 512 private:\n+ 513 // delete mesh and all vectors\n+ 514 void removeMesh();\n+ 515\n+ 516 //***********************************************************************\n+ 517 // MemoryManagement for Entitys and Geometrys\n+ 518 //**********************************************************************\n+ 519 typedef MakeableInterfaceObject<_typename_Traits::template_Codim<_0_>::\n+Entity >\n+520 EntityObject;\n+ 521\n+ 522 public:\n+ 523 friend class AlbertaGridLeafIntersectionIterator< const This >;\n+ 524\n+ 525 template< int codim >\n+ 526 static int\n+527 getTwist ( const typename Traits::template Codim< codim >::Entity &entity )\n+ 528 {\n+ 529 return entity.impl().twist();\n+ 530 }\n+ 531\n+ 532 template< int codim >\n+ 533 static int\n+534 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int\n+subEntity )\n+ 535 {\n+ 536 return entity.impl().template twist< codim >( subEntity );\n+ 537 }\n+ 538\n+ 539 static int\n+540 getTwistInInside ( const typename Traits::LeafIntersection &intersection )\n+ 541 {\n+ 542 return intersection.impl().twistInInside();\n+ 543 }\n+ 544\n+ 545 static int\n+546 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )\n+ 547 {\n+ 548 return intersection.impl().twistInOutside();\n+ 549 }\n+ 550\n+ 551 public:\n+ 552 // read global element number from elNumbers_\n+ 553 const Alberta::GlobalVector &\n+ 554 getCoord ( const ElementInfo &elementInfo, int vertex ) const;\n+ 555\n+ 556 private:\n+ 557 // pointer to an Albert Mesh, which contains the data\n+ 558 MeshPointer mesh_;\n+ 559\n+ 560 // communication\n+ 561 Communication comm_;\n+ 562\n+ 563 // maximum level of the mesh\n+ 564 int maxlevel_;\n+ 565\n+ 566 // number of boundary segments within the macro grid\n+ 567 size_t numBoundarySegments_;\n+ 568\n+ 569 // map between ALBERTA and DUNE numbering\n+ 570 Alberta::NumberingMap<_dimension,_Alberta::Dune2AlbertaNumbering_>\n+numberingMap_;\n+ 571 Alberta::NumberingMap<_dimension,_Alberta::Generic2AlbertaNumbering_>\n+genericNumberingMap_;\n+ 572\n+ 573 DofNumbering dofNumbering_;\n+ 574\n+ 575 LevelProvider levelProvider_;\n+ 576\n+ 577 // hierarchical numbering of AlbertaGrid, unique per codim\n+ 578 HierarchicIndexSet hIndexSet_;\n+ 579\n+ 580 // the id set of this grid\n+ 581 IdSetImp idSet_;\n+ 582\n+ 583 // the level index set, is generated from the HierarchicIndexSet\n+ 584 // is generated, when accessed\n+ 585 mutable std::vector< typename GridFamily::LevelIndexSetImp * >\n+levelIndexVec_;\n+ 586\n+ 587 // the leaf index set, is generated from the HierarchicIndexSet\n+ 588 // is generated, when accessed\n+ 589 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;\n+ 590\n+ 591 SizeCache<_This_> sizeCache_;\n+ 592\n+ 593 typedef AlbertaMarkerVector<_dim,_dimworld_> MarkerVector;\n+ 594\n+ 595 // needed for VertexIterator, mark on which element a vertex is treated\n+ 596 mutable MarkerVector leafMarkerVector_;\n+ 597\n+ 598 // needed for VertexIterator, mark on which element a vertex is treated\n+ 599 mutable std::vector< MarkerVector > levelMarkerVector_;\n+ 600\n+ 601#if DUNE_ALBERTA_CACHE_COORDINATES\n+ 602 Alberta::CoordCache<_dimension_> coordCache_;\n+ 603#endif\n+ 604\n+ 605 // current state of adaptation\n+ 606 AdaptationState adaptationState_;\n+ 607 };\n+ 608\n+ 609} // namespace Dune\n+ 610\n+ 611#include \"albertagrid.cc\"\n+ 612\n+ 613// undef all dangerous defines\n+ 614#undef DIM\n+ 615#undef DIM_OF_WORLD\n+ 616\n+ 617#ifdef _ABS_NOT_DEFINED_\n+ 618#undef ABS\n+ 619#endif\n+ 620\n+ 621#ifdef _MIN_NOT_DEFINED_\n+ 622#undef MIN\n+ 623#endif\n+ 624\n+ 625#ifdef _MAX_NOT_DEFINED_\n+ 626#undef MAX\n+ 627#endif\n+ 628\n+ 629#ifdef obstack_chunk_alloc\n+ 630#undef obstack_chunk_alloc\n+ 631#endif\n+ 632#ifdef obstack_chunk_free\n+ 633#undef obstack_chunk_free\n+ 634#endif\n+ 635#include \n+ 636\n+ 637// We use MEM_ALLOC, so undefine it here.\n+ 638#undef MEM_ALLOC\n+ 639\n+ 640// We use MEM_REALLOC, so undefine it here.\n+ 641#undef MEM_REALLOC\n+ 642\n+ 643// We use MEM_CALLOC, so undefine it here.\n+ 644#undef MEM_CALLOC\n+ 645\n+ 646// We use MEM_FREE, so undefine it here.\n+ 647#undef MEM_FREE\n+ 648\n+ 649// Macro ERROR may be defined by alberta_util.h. If so, undefine it.\n+ 650#ifdef ERROR\n+ 651#undef ERROR\n+ 652#endif // #ifdef ERROR\n+ 653\n+ 654// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.\n+ 655#ifdef ERROR_EXIT\n+ 656#undef ERROR_EXIT\n+ 657#endif // #ifdef ERROR_EXIT\n+ 658\n+ 659// Macro WARNING may be defined by alberta_util.h. If so, undefine it.\n+ 660#ifdef WARNING\n+ 661#undef WARNING\n+ 662#endif // #ifdef WARNING\n+ 663\n+ 664// Macro TEST may be defined by alberta_util.h. If so, undefine it.\n+ 665#ifdef TEST\n+ 666#undef TEST\n+ 667#endif // #ifdef TEST\n+ 668\n+ 669// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.\n+ 670#ifdef TEST_EXIT\n+ 671#undef TEST_EXIT\n+ 672#endif // #ifdef TEST_EXIT\n+ 673\n+ 674// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.\n+ 675#ifdef DEBUG_TEST\n+ 676#undef DEBUG_TEST\n+ 677#endif // #ifdef DEBUG_TEST\n+ 678\n+ 679// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine\n+it.\n+ 680#ifdef DEBUG_TEST_EXIT\n+ 681#undef DEBUG_TEST_EXIT\n+ 682#endif // #ifdef DEBUG_TEST_EXIT\n+ 683\n+ 684// Macro INFO may be defined by alberta_util.h. If so, undefine it.\n+ 685#ifdef INFO\n+ 686#undef INFO\n+ 687#endif // #ifdef INFO\n+ 688\n+ 689// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.\n+ 690#ifdef PRINT_INFO\n+ 691#undef PRINT_INFO\n+ 692#endif // #ifdef PRINT_INFO\n+ 693\n+ 694// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine\n+it.\n+ 695#ifdef PRINT_INT_VEC\n+ 696#undef PRINT_INT_VEC\n+ 697#endif // #ifdef PRINT_INT_VEC\n+ 698\n+ 699// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine\n+it.\n+ 700#ifdef PRINT_REAL_VEC\n+ 701#undef PRINT_REAL_VEC\n+ 702#endif // #ifdef PRINT_REAL_VEC\n+ 703\n+ 704// Macro WAIT may be defined by alberta_util.h. If so, undefine it.\n+ 705#ifdef WAIT\n+ 706#undef WAIT\n+ 707#endif // #ifdef WAIT\n+ 708\n+ 709// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.\n+ 710#ifdef WAIT_REALLY\n+ 711#undef WAIT_REALLY\n+ 712#endif // #ifdef WAIT_REALLY\n+ 713\n+ 714// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine\n+it.\n+ 715#ifdef GET_WORKSPACE\n+ 716#undef GET_WORKSPACE\n+ 717#endif // #ifdef GET_WORKSPACE\n+ 718\n+ 719// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine\n+it.\n+ 720#ifdef FREE_WORKSPACE\n+ 721#undef FREE_WORKSPACE\n+ 722#endif // #ifdef FREE_WORKSPACE\n+ 723\n+ 724// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.\n+ 725#ifdef MAT_ALLOC\n+ 726#undef MAT_ALLOC\n+ 727#endif // #ifdef MAT_ALLOC\n+ 728\n+ 729// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.\n+ 730#ifdef MAT_FREE\n+ 731#undef MAT_FREE\n+ 732#endif // #ifdef MAT_FREE\n+ 733\n+ 734// Macro NAME may be defined by alberta_util.h. If so, undefine it.\n+ 735#ifdef NAME\n+ 736#undef NAME\n+ 737#endif // #ifdef NAME\n+ 738\n+ 739// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.\n+ 740#ifdef GET_STRUCT\n+ 741#undef GET_STRUCT\n+ 742#endif // #ifdef GET_STRUCT\n+ 743\n+ 744// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine\n+it.\n+ 745#ifdef ADD_PARAMETER\n+ 746#undef ADD_PARAMETER\n+ 747#endif // #ifdef ADD_PARAMETER\n+ 748\n+ 749// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine\n+it.\n+ 750#ifdef GET_PARAMETER\n+ 751#undef GET_PARAMETER\n+ 752#endif // #ifdef GET_PARAMETER\n+ 753\n+754#define _ALBERTA_H_\n+ 755\n+ 756#endif // HAVE_ALBERTA || DOXYGEN\n+ 757\n+ 758#endif\n+sizecache.hh\n+Provides size cache classes to implement the grids size method efficiently.\n+adaptcallback.hh\n+interfaces and wrappers needed for the callback adaptation provided by\n+AlbertaGrid and dune-ALUGrid\n+hierarchiciterator.hh\n+leveliterator.hh\n+level.hh\n+undefine-3.0.hh\n+Contains #undefs for all preprocessor macros defined by alberta.\n+albertagrid.cc\n+misc.hh\n+coordcache.hh\n+albertaheader.hh\n+ALBERTA\n+#define ALBERTA\n+Definition: albertaheader.hh:29\n+treeiterator.hh\n+leafiterator.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::Element\n-ALBERTA EL Element\n-Definition: misc.hh:54\n-Dune::Alberta::DofSpace\n-ALBERTA FE_SPACE DofSpace\n-Definition: misc.hh:65\n-Dune::Alberta::max\n-int max(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:337\n-Dune::Alberta::MeshPointer\n-Definition: meshpointer.hh:40\n-Dune::Alberta::MeshPointer::leafTraverse\n-void leafTraverse(Functor &functor, typename FillFlags::Flags\n-fillFlags=FillFlags::standard) const\n-Definition: meshpointer.hh:385\n-Dune::Alberta::MeshPointer::hierarchicTraverse\n-void hierarchicTraverse(Functor &functor, typename FillFlags::Flags\n-fillFlags=FillFlags::standard) const\n-Definition: meshpointer.hh:370\n-Dune::Alberta::DofAccess<_dim,_0_>\n-Dune::Alberta::HierarchyDofNumbering\n-Definition: dofadmin.hh:93\n-Dune::Alberta::HierarchyDofNumbering::dofSpace\n-const DofSpace * dofSpace(int codim) const\n-Definition: dofadmin.hh:145\n-Dune::Alberta::DofVectorPointer<_Level_>\n-Dune::Alberta::DofVectorPointer::create\n-void create(const DofSpace *dofSpace, const std::string &name=\"\")\n-Definition: dofvector.hh:236\n-Dune::Alberta::DofVectorPointer::release\n-void release()\n-Definition: dofvector.hh:254\n-Dune::Alberta::DofVectorPointer::dofSpace\n-const DofSpace * dofSpace() const\n-Definition: dofvector.hh:223\n-Dune::Alberta::DofVectorPointer::forEach\n-void forEach(Functor &functor) const\n-Definition: dofvector.hh:264\n-Dune::Alberta::ElementInfo\n-Definition: elementinfo.hh:43\n-Dune::Alberta::ElementInfo::level\n-int level() const\n-Definition: elementinfo.hh:533\n-Dune::Alberta::ElementInfo::el\n-Element * el() const\n-Definition: elementinfo.hh:737\n-Dune::AlbertaGridLevelProvider\n-Definition: level.hh:25\n-Dune::AlbertaGridLevelProvider::isNew\n-bool isNew(const Alberta::Element *element) const\n-Definition: level.hh:62\n-Dune::AlbertaGridLevelProvider::isNew\n-bool isNew(const ElementInfo &elementInfo) const\n-Definition: level.hh:68\n-Dune::AlbertaGridLevelProvider::MeshPointer\n-Alberta::MeshPointer< dim > MeshPointer\n-Definition: level.hh:48\n-Dune::AlbertaGridLevelProvider::mesh\n-MeshPointer mesh() const\n-Definition: level.hh:85\n-Dune::AlbertaGridLevelProvider::create\n-void create(const DofNumbering &dofNumbering)\n-Definition: level.hh:96\n-Dune::AlbertaGridLevelProvider::maxLevel\n-Level maxLevel() const\n-Definition: level.hh:73\n-Dune::AlbertaGridLevelProvider::DofNumbering\n-Alberta::HierarchyDofNumbering< dim > DofNumbering\n-Definition: level.hh:49\n-Dune::AlbertaGridLevelProvider::release\n-void release()\n-Definition: level.hh:109\n-Dune::AlbertaGridLevelProvider::operator()\n-Level operator()(const Alberta::Element *element) const\n-Definition: level.hh:51\n-Dune::AlbertaGridLevelProvider::markAllOld\n-void markAllOld()\n-Definition: level.hh:90\n-Dune::AlbertaGridLevelProvider::ElementInfo\n-Alberta::ElementInfo< dim > ElementInfo\n-Definition: level.hh:47\n-Dune::AlbertaGridLevelProvider::SetLocal\n-Definition: level.hh:127\n-Dune::AlbertaGridLevelProvider::SetLocal::SetLocal\n-SetLocal(const DofVectorPointer &level)\n-Definition: level.hh:132\n-Dune::AlbertaGridLevelProvider::CalcMaxLevel\n-Definition: level.hh:151\n-Dune::AlbertaGridLevelProvider::CalcMaxLevel::CalcMaxLevel\n-CalcMaxLevel()\n-Definition: level.hh:155\n-Dune::AlbertaGridLevelProvider::CalcMaxLevel::maxLevel\n-Level maxLevel() const\n-Definition: level.hh:169\n-Dune::AlbertaGridLevelProvider::Interpolation\n-Definition: level.hh:197\n-Dune::AlbertaGridLevelProvider::Interpolation::Patch\n-Alberta::Patch< dimension > Patch\n-Definition: level.hh:200\n-Dune::AlbertaGridLevelProvider::Interpolation::interpolateVector\n-static void interpolateVector(const DofVectorPointer &dofVector, const Patch\n-&patch)\n-Definition: level.hh:202\n-Dune::Alberta::FillFlags\n-Definition: misc.hh:231\n-Dune::Alberta::FillFlags::nothing\n-static const Flags nothing\n-Definition: misc.hh:234\n-Dune::Alberta::Patch\n-Definition: refinement.hh:40\n-Dune::Alberta::Patch::count\n-int count() const\n-Definition: refinement.hh:67\n+Dune::Alberta::Real\n+ALBERTA REAL Real\n+Definition: misc.hh:48\n+Dune::Alberta::GlobalVector\n+ALBERTA REAL_D GlobalVector\n+Definition: misc.hh:50\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n+Dune::DGFGridFactory\n+Definition: dgfgridfactory.hh:38\n+Dune::AlbertaGrid\n+[ provides Dune::Grid ]\n+Definition: agrid.hh:109\n+Dune::AlbertaGrid::readGrid\n+bool readGrid(const std::string &filename, ctype &time)\n+read Grid from file filename and store time of mesh in time\n+Definition: albertagrid.cc:585\n+Dune::AlbertaGrid::dofNumbering\n+const DofNumbering & dofNumbering() const\n+Definition: agrid.hh:473\n+Dune::AlbertaGrid::generic2alberta\n+int generic2alberta(int codim, int i) const\n+Definition: agrid.hh:493\n+Dune::AlbertaGrid::typeName\n+static std::string typeName()\n+Definition: agrid.hh:416\n+Dune::AlbertaGrid::leafbegin\n+Traits::template Codim< codim >::template Partition< pitype >::LeafIterator\n+leafbegin() const\n+return LeafIterator which points to first leaf entity\n+Dune::AlbertaGrid::hierarchicIndexSet\n+const HierarchicIndexSet & hierarchicIndexSet() const\n+Definition: agrid.hh:442\n+Dune::AlbertaGrid::lend\n+Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend\n+(int level) const\n+one past the end on this level\n+Dune::AlbertaGrid::dimension\n+static const int dimension\n+Definition: agrid.hh:145\n+Dune::AlbertaGrid::dune2alberta\n+int dune2alberta(int codim, int i) const\n+Definition: agrid.hh:483\n+Dune::AlbertaGrid::Communication\n+Traits::Communication Communication\n+type of communication\n+Definition: agrid.hh:165\n+Dune::AlbertaGrid::maxLevel\n+int maxLevel() const\n+Definition: albertagrid.cc:483\n+Dune::AlbertaGrid::AlbertaGrid\n+AlbertaGrid()\n+create an empty grid\n+Definition: albertagrid.cc:42\n+Dune::AlbertaGrid::lbegin\n+Traits::template Codim< codim >::LevelIterator lbegin(int level) const\n+Iterator to first entity of given codim on level.\n+Dune::AlbertaGrid::levelProvider\n+const LevelProvider & levelProvider() const\n+Definition: agrid.hh:478\n+Dune::AlbertaGrid::getTwistInOutside\n+static int getTwistInOutside(const typename Traits::LeafIntersection\n+&intersection)\n+Definition: agrid.hh:546\n+Dune::AlbertaGrid::getCoord\n+const Alberta::GlobalVector & getCoord(const ElementInfo &elementInfo, int\n+vertex) const\n+Definition: albertagrid.cc:471\n+Dune::AlbertaGrid::lend\n+Traits::template Codim< codim >::LevelIterator lend(int level) const\n+one past the end on this level\n+Dune::AlbertaGrid::leafGridView\n+Traits::LeafGridView leafGridView() const\n+View for the leaf grid for All_Partition.\n+Definition: agrid.hh:370\n+Dune::AlbertaGrid::adapt\n+bool adapt()\n+Refine all positive marked leaf entities, coarsen all negative marked entities\n+if possible.\n+Definition: albertagrid.cc:415\n+Dune::AlbertaGrid::dimensionworld\n+static const int dimensionworld\n+Definition: agrid.hh:146\n+Dune::AlbertaGrid::getTwistInInside\n+static int getTwistInInside(const typename Traits::LeafIntersection\n+&intersection)\n+Definition: agrid.hh:540\n+Dune::AlbertaGrid::postAdapt\n+void postAdapt()\n+clean up some markers\n+Definition: albertagrid.cc:356\n+Dune::AlbertaGrid::leafbegin\n+Traits::template Codim< codim >::LeafIterator leafbegin() const\n+return LeafIterator which points to first leaf entity\n+Dune::AlbertaGrid::localIdSet\n+const LocalIdSet & localIdSet() const\n+return local IdSet\n+Definition: agrid.hh:457\n+Dune::AlbertaGrid::numBoundarySegments\n+std::size_t numBoundarySegments() const\n+number of boundary segments within the macro grid\n+Definition: agrid.hh:356\n+Dune::AlbertaGrid::ctype\n+GridFamily::ctype ctype\n+Definition: agrid.hh:143\n+Dune::AlbertaGrid::AlbertaGrid\n+AlbertaGrid(const This &)=delete\n+Dune::AlbertaGrid::CollectiveCommunication\n+Communication CollectiveCommunication\n+Definition: agrid.hh:171\n+Dune::AlbertaGrid::leafend\n+Traits::template Codim< codim >::LeafIterator leafend() const\n+return LeafIterator which points behind last leaf entity\n+Dune::AlbertaGrid::levelIndexSet\n+const Traits::LevelIndexSet & levelIndexSet(int level) const\n+return level index set for given level\n+Definition: albertagrid.cc:520\n+Dune::AlbertaGrid::alberta2generic\n+int alberta2generic(int codim, int i) const\n+Definition: agrid.hh:498\n+Dune::AlbertaGrid::getTwist\n+static int getTwist(const typename Traits::template Codim< codim >::Entity\n+&entity)\n+Definition: agrid.hh:527\n+Dune::AlbertaGrid::comm\n+const Communication & comm() const\n+return reference to communication, if MPI found this is specialisation for MPI\n+Definition: agrid.hh:411\n+Dune::AlbertaGrid::getMesh\n+ALBERTA MESH * getMesh() const\n+Definition: agrid.hh:463\n+Dune::AlbertaGrid::size\n+int size(int level, int codim) const\n+Number of grid entities per level and codim because lbegin and lend are none\n+const,...\n+Definition: albertagrid.cc:490\n+Dune::AlbertaGrid::HierarchicIndexSet\n+Traits::HierarchicIndexSet HierarchicIndexSet\n+type of hierarchic index set\n+Definition: agrid.hh:157\n+Dune::AlbertaGrid::leafIndexSet\n+const Traits::LeafIndexSet & leafIndexSet() const\n+return leaf index set\n+Definition: albertagrid.cc:535\n+Dune::AlbertaGrid::leafend\n+Traits::template Codim< codim >::template Partition< pitype >::LeafIterator\n+leafend() const\n+return LeafIterator which points behind last leaf entity\n+Dune::AlbertaGrid::writeGrid\n+bool writeGrid(const std::string &filename, ctype time) const\n+write Grid to file in Xdr\n+Definition: albertagrid.cc:575\n+Dune::AlbertaGrid::levelGridView\n+Traits::LevelGridView levelGridView(int level) const\n+View for a grid level for All_Partition.\n+Definition: agrid.hh:362\n+Dune::AlbertaGrid::alberta2dune\n+int alberta2dune(int codim, int i) const\n+Definition: agrid.hh:488\n+Dune::AlbertaGrid::operator=\n+This & operator=(const This &)=delete\n+Dune::AlbertaGrid::Traits\n+AlbertaGridFamily< dim, dimworld >::Traits Traits\n+Definition: agrid.hh:149\n+Dune::AlbertaGrid::getTwist\n+static int getTwist(const typename Traits::template Codim< 0 >::Entity &entity,\n+int subEntity)\n+Definition: agrid.hh:534\n+Dune::AlbertaGrid::lbegin\n+Traits::template Codim< cd >::template Partition< pitype >::LevelIterator\n+lbegin(int level) const\n+Iterator to first entity of given codim on level.\n+Dune::AlbertaGrid::globalIdSet\n+const GlobalIdSet & globalIdSet() const\n+return global IdSet\n+Definition: agrid.hh:451\n+Dune::AlbertaGrid::globalRefine\n+void globalRefine(int refCount)\n+uses the interface, mark on entity and refineLocal\n+Definition: albertagrid.cc:304\n+Dune::AlbertaGrid::getMark\n+int getMark(const typename Traits::template Codim< 0 >::Entity &e) const\n+returns adaptation mark for given entity\n+Definition: albertagrid.cc:408\n+Dune::AlbertaGrid::entity\n+Traits::template Codim< EntitySeed::codimension >::Entity entity(const\n+EntitySeed &seed) const\n+obtain Entity from EntitySeed.\n+Definition: agrid.hh:426\n+Dune::AlbertaGrid::~AlbertaGrid\n+~AlbertaGrid()\n+desctructor\n+Definition: albertagrid.cc:196\n+Dune::AlbertaGrid::preAdapt\n+bool preAdapt()\n+returns true, if a least one element is marked for coarsening\n+Definition: albertagrid.cc:348\n+Dune::AlbertaGrid::mark\n+bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)\n+Marks an entity to be refined/coarsened in a subsequent adapt.\n+Definition: albertagrid.cc:385\n+Dune::AlbertaGrid::meshPointer\n+const MeshPointer & meshPointer() const\n+Definition: agrid.hh:468\n+Dune::Alberta::CoordCache\n+Definition: coordcache.hh:25\n+Dune::Alberta::AdaptRestrictProlongHandler\n+Definition: albertagrid/datahandle.hh:27\n+Dune::Intersection\n+Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n+element or with the d...\n+Definition: common/intersection.hh:164\n+Dune::Intersection::impl\n+Implementation & impl()\n+access to the underlying implementation\n+Definition: common/intersection.hh:178\n+Dune::Alberta::MeshPointer<_dimension_>\n+Dune::Alberta::HierarchyDofNumbering<_dimension_>\n+Dune::Alberta::ElementInfo<_dimension_>\n+Dune::AlbertaGridTreeIterator\n+Definition: treeiterator.hh:189\n+Dune::AlbertaGridHierarchicIterator\n+Definition: hierarchiciterator.hh:29\n+Dune::AlbertaGridLeafIntersection\n+Definition: albertagrid/intersection.hh:105\n+Dune::AlbertaGridLeafIntersectionIterator\n+Definition: albertagrid/intersectioniterator.hh:27\n+Dune::AlbertaGridEntity\n+Definition: albertagrid/entity.hh:46\n+Dune::AlbertaGridHierarchicIndexSet\n+Definition: albertagrid/indexsets.hh:42\n+Dune::AlbertaGridIdSet\n+hierarchic index set of AlbertaGrid\n+Definition: albertagrid/indexsets.hh:534\n+Dune::AlbertaGridIndexSet\n+Definition: albertagrid/indexsets.hh:335\n+Dune::AlbertaGridFamily\n+Definition: albertagrid/gridfamily.hh:83\n+Dune::AlbertaGridFamily::dimension\n+static const int dimension\n+Definition: albertagrid/gridfamily.hh:88\n+Dune::AlbertaGridFamily::dimensionworld\n+static const int dimensionworld\n+Definition: albertagrid/gridfamily.hh:89\n+Dune::AlbertaGridFamily::LeafIndexSetImp\n+AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp\n+Definition: albertagrid/gridfamily.hh:92\n+Dune::AlbertaGridFamily::ctype\n+Alberta::Real ctype\n+Definition: albertagrid/gridfamily.hh:86\n+Dune::AlbertaGridFamily::Traits\n+Definition: albertagrid/gridfamily.hh:98\n+Dune::AlbertaGridFamily::Traits::LeafIndexSet\n+IndexSet< GridImp, LeafIndexSetImp, int, std::array< GeometryType, 1 > >\n+LeafIndexSet\n+Definition: albertagrid/gridfamily.hh:143\n+Dune::AlbertaGridFamily::Traits::LevelIndexSet\n+IndexSet< GridImp, LevelIndexSetImp, int, std::array< GeometryType, 1 > >\n+LevelIndexSet\n+Definition: albertagrid/gridfamily.hh:142\n+Dune::AlbertaGridFamily::Traits::Communication\n+Dune::Communication< No_Comm > Communication\n+Definition: albertagrid/gridfamily.hh:148\n+Dune::AlbertaLevelGridView\n+Definition: albertagrid/gridview.hh:80\n+Dune::AlbertaLeafGridView\n+Definition: albertagrid/gridview.hh:299\n+Dune::AlbertaGridIntersectionBase\n+Definition: albertagrid/intersection.hh:32\n+Dune::AlbertaGridLevelProvider<_dimension_>\n+Dune::Alberta::MacroData<_dimension_>\n+Dune::Alberta::NumberingMap<_dimension,_Alberta::Dune2AlbertaNumbering_>\n+Dune::Alberta::NumberingMap::alberta2dune\n+int alberta2dune(int codim, int i) const\n+Definition: misc.hh:397\n+Dune::Alberta::NumberingMap::dune2alberta\n+int dune2alberta(int codim, int i) const\n+Definition: misc.hh:390\n+Dune::Alberta::ProjectionFactoryInterface\n+Definition: albertagrid/projection.hh:80\n+Dune::AlbertaMarkerVector\n+marker assigning subentities to one element containing them\n+Definition: treeiterator.hh:35\n+Dune::AdaptDataHandleInterface\n+Interface class for the Grid's adapt method where the parameter is a\n+AdaptDataHandleInterface.\n+Definition: adaptcallback.hh:33\n+Dune::DuneBoundaryProjection\n+Interface class for vertex projection at the boundary.\n+Definition: boundaryprojection.hh:33\n+Dune::Entity::impl\n+Implementation & impl()\n+access to the underlying implementation\n+Definition: common/entity.hh:80\n+Dune::EntitySeed\n+Store a reference to an entity with a minimal memory footprint.\n+Definition: common/entityseed.hh:26\n+Dune::EntitySeed::impl\n+Implementation & impl()\n+access to the underlying implementation\n+Definition: common/entityseed.hh:59\n+Dune::GridDefaultImplementation\n+Definition: common/grid.hh:862\n+Dune::GridDefaultImplementation<_dim,_dimworld,_Alberta::Real,\n+AlbertaGridFamily<_dim,_dimworld_>_>::mark\n+bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)\n+Marks an entity to be refined/coarsened in a subsequent adapt.\n+Definition: common/grid.hh:915\n+Dune::GridDefaultImplementation<_dim,_dimworld,_Alberta::Real,\n+AlbertaGridFamily<_dim,_dimworld_>_>::getMark\n+int getMark(const typename Traits::template Codim< 0 >::Entity &e) const\n+returns adaptation mark for given entity, i.e. here the default implementation\n+returns 0.\n+Definition: common/grid.hh:927\n+Dune::IndexSet\n+Index Set Interface base class.\n+Definition: indexidset.hh:78\n+Dune::IdSet\n+Id Set Interface.\n+Definition: indexidset.hh:452\n+Dune::MakeableInterfaceObject\n+Definition: common/grid.hh:1107\n+Dune::GridFactory\n+Provide a generic factory class for unstructured grids.\n+Definition: common/gridfactory.hh:314\n+Dune::GridView\n+Grid view abstract base class.\n+Definition: common/gridview.hh:66\n+Dune::SizeCache\n+organizes the caching of sizes for one grid and one GeometryType\n+Definition: sizecache.hh:33\n+backuprestore.hh\n+capabilities.hh\n+datahandle.hh\n+entity.hh\n+entityseed.hh\n+geometry.hh\n+gridfactory.hh\n+Provide a generic factory class for unstructured grids.\n+gridfamily.hh\n+provides the GridFamily for AlbertaGrid\n+indexsets.hh\n+intersection.hh\n+intersectioniterator.hh\n+Implementation of the IntersectionIterator for AlbertaGrid.\n+grid.hh\n+Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00635.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00635.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dofadmin.hh File Reference\n+dune-grid: transformation.hh File Reference\n \n \n \n \n \n \n \n@@ -65,38 +65,32 @@\n
  • dune
  • grid
  • albertagrid
  • \n \n \n
    \n \n-
    dofadmin.hh File Reference
    \n+
    transformation.hh File Reference
    \n
    \n
    \n-
    #include <utility>
    \n-#include <dune/common/hybridutilities.hh>
    \n-#include <dune/grid/albertagrid/misc.hh>
    \n-#include <dune/grid/albertagrid/elementinfo.hh>
    \n+
    #include <dune/common/fvector.hh>
    \n+#include <dune/grid/albertagrid/misc.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::Alberta::DofAccess< dim, codim >
     
    class  Dune::Alberta::HierarchyDofNumbering< dim >
    class  Dune::AlbertaTransformation
     
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,27 +6,21 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n Classes | Namespaces\n-dofadmin.hh File Reference\n-#include \n-#include \n+transformation.hh File Reference\n+#include \n #include \n-#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::Alberta::DofAccess<_dim,_codim_>\n-\u00a0\n-class \u00a0Dune::Alberta::HierarchyDofNumbering<_dim_>\n+class \u00a0Dune::AlbertaTransformation\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::Alberta\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00635_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dofadmin.hh Source File\n+dune-grid: transformation.hh Source File\n \n \n \n \n \n \n \n@@ -62,347 +62,109 @@\n \n \n
    \n
    \n-
    dofadmin.hh
    \n+
    transformation.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_DOFADMIN_HH
    \n-
    6#define DUNE_ALBERTA_DOFADMIN_HH
    \n+
    5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH
    \n+
    6#define DUNE_ALBERTA_TRANSFORMATION_HH
    \n
    7
    \n-
    8#include <utility>
    \n+
    8#include <dune/common/fvector.hh>
    \n
    9
    \n-
    10#include <dune/common/hybridutilities.hh>
    \n+\n
    11
    \n-\n-\n-
    14
    \n-
    15#if HAVE_ALBERTA
    \n+
    12#if HAVE_ALBERTA
    \n+
    13
    \n+
    14namespace Dune
    \n+
    15{
    \n
    16
    \n-
    17namespace Dune
    \n-
    18{
    \n-
    19
    \n-
    20 namespace Alberta
    \n-
    21 {
    \n-
    22
    \n-
    23 // External Forward Declarations
    \n-
    24 // -----------------------------
    \n+\n+
    18 {
    \n+\n+
    20
    \n+
    21 public:
    \n+\n+
    23
    \n+
    24 static const int dimension = Alberta::dimWorld;
    \n
    25
    \n-
    26 template< int dim >
    \n-
    27 class MeshPointer;
    \n-
    28
    \n-
    29
    \n-
    30
    \n-
    31 // DofAccess
    \n-
    32 // ---------
    \n+
    26 typedef FieldVector< ctype, dimension > WorldVector;
    \n+
    27
    \n+
    28 explicit
    \n+\n+
    30 : matrix_( (trafo != NULL ? trafo->M : GlobalSpace::identityMatrix()) ),
    \n+
    31 shift_( (trafo != NULL ? trafo->t : GlobalSpace::nullVector()) )
    \n+
    32 {}
    \n
    33
    \n-
    34 template< int dim, int codim >
    \n-\n-
    36 {
    \n-
    37 static const int codimtype = CodimType< dim, codim >::value;
    \n-
    38
    \n-
    39 public:
    \n-\n-
    41
    \n-
    42 static const int dimension = dim;
    \n-
    43 static const int codimension = codim;
    \n-
    44
    \n-\n-
    46
    \n-\n-
    48 : node_( -1 )
    \n-
    49 {}
    \n-
    50
    \n-
    51 explicit DofAccess ( const DofSpace *dofSpace )
    \n-
    52 {
    \n-
    53 assert( dofSpace );
    \n-
    54 node_ = dofSpace->admin->mesh->node[ codimtype ];
    \n-
    55 index_ = dofSpace->admin->n0_dof[ codimtype ];
    \n-
    56 }
    \n-
    57
    \n-
    58 int operator() ( const Element *element, int subEntity, int i ) const
    \n-
    59 {
    \n-
    60 assert( element );
    \n-
    61 assert( node_ != -1 );
    \n-
    62 assert( subEntity < numSubEntities );
    \n-
    63 return element->dof[ node_ + subEntity ][ index_ + i ];
    \n-
    64 }
    \n-
    65
    \n-
    66 int operator() ( const Element *element, int subEntity ) const
    \n-
    67 {
    \n-
    68 return (*this)( element, subEntity, 0 );
    \n-
    69 }
    \n-
    70
    \n-
    71 int operator() ( const ElementInfo &elementInfo, int subEntity, int i ) const
    \n-
    72 {
    \n-
    73 return (*this)( elementInfo.el(), subEntity, i );
    \n-
    74 }
    \n+\n+
    35 const GlobalSpace::Vector &shift )
    \n+
    36 : matrix_( matrix ),
    \n+
    37 shift_( shift )
    \n+
    38 {}
    \n+
    39
    \n+
    40 WorldVector evaluate ( const WorldVector &x ) const
    \n+
    41 {
    \n+\n+
    43 for( int i = 0; i < dimension; ++i )
    \n+
    44 {
    \n+
    45 const GlobalSpace::Vector &row = matrix_[ i ];
    \n+
    46 y[ i ] = shift_[ i ];
    \n+
    47 for( int j = 0; j < dimension; ++j )
    \n+
    48 y[ i ] += row[ j ] * x[ j ];
    \n+
    49 }
    \n+
    50 return y;
    \n+
    51 }
    \n+
    52
    \n+\n+
    54 {
    \n+
    55 // Note: ALBERTA requires the matrix to be orthogonal
    \n+
    56 WorldVector x( ctype( 0 ) );
    \n+
    57 for( int i = 0; i < dimension; ++i )
    \n+
    58 {
    \n+
    59 const GlobalSpace::Vector &row = matrix_[ i ];
    \n+
    60 const ctype v = y[ i ] - shift_[ i ];
    \n+
    61 for( int j = 0; j < dimension; ++j )
    \n+
    62 x[ j ] += row[ j ] * v;
    \n+
    63 }
    \n+
    64 return x;
    \n+
    65 }
    \n+
    66
    \n+
    67 private:
    \n+
    68 const GlobalSpace::Matrix &matrix_;
    \n+
    69 const GlobalSpace::Vector &shift_;
    \n+
    70 };
    \n+
    71
    \n+
    72}
    \n+
    73
    \n+
    74#endif // #if HAVE_ALBERTA
    \n
    75
    \n-
    76 int operator() ( const ElementInfo &elementInfo, int subEntity ) const
    \n-
    77 {
    \n-
    78 return (*this)( elementInfo.el(), subEntity );
    \n-
    79 }
    \n-
    80
    \n-
    81 private:
    \n-
    82 int node_;
    \n-
    83 int index_;
    \n-
    84 };
    \n-
    85
    \n-
    86
    \n-
    87
    \n-
    88 // HierarchyDofNumbering
    \n-
    89 // ---------------------
    \n-
    90
    \n-
    91 template< int dim >
    \n-\n-
    93 {
    \n-\n-
    95
    \n-
    96 public:
    \n-
    97 static const int dimension = dim;
    \n-
    98
    \n-\n-\n-
    101
    \n-
    102 private:
    \n-
    103 static const int nNodeTypes = N_NODE_TYPES;
    \n-
    104
    \n-
    105 template< int codim >
    \n-
    106 struct CreateDofSpace;
    \n-
    107
    \n-
    108 template< int codim >
    \n-
    109 struct CacheDofSpace;
    \n-
    110
    \n-
    111 typedef std::pair< int, int > Cache;
    \n-
    112
    \n-
    113 public:
    \n-\n-
    115 {}
    \n-
    116
    \n-
    117 private:
    \n-
    118 HierarchyDofNumbering ( const This & );
    \n-
    119 This &operator= ( const This & );
    \n-
    120
    \n-
    121 public:
    \n-\n-
    123 {
    \n-
    124 release();
    \n-
    125 }
    \n-
    126
    \n-
    127 int operator() ( const Element *element, int codim, unsigned int subEntity ) const
    \n-
    128 {
    \n-
    129 assert( !(*this) == false );
    \n-
    130 assert( (codim >= 0) && (codim <= dimension) );
    \n-
    131 const Cache &cache = cache_[ codim ];
    \n-
    132 return element->dof[ cache.first + subEntity ][ cache.second ];
    \n-
    133 }
    \n-
    134
    \n-
    135 int operator() ( const ElementInfo &element, int codim, unsigned int subEntity ) const
    \n-
    136 {
    \n-
    137 return (*this)( element.el(), codim, subEntity );
    \n-
    138 }
    \n-
    139
    \n-
    140 explicit operator bool () const
    \n-
    141 {
    \n-
    142 return (bool)mesh_;
    \n-
    143 }
    \n-
    144
    \n-
    145 const DofSpace *dofSpace ( int codim ) const
    \n-
    146 {
    \n-
    147 assert( *this );
    \n-
    148 assert( (codim >= 0) && (codim <= dimension) );
    \n-
    149 return dofSpace_[ codim ];
    \n-
    150 }
    \n-
    151
    \n-
    152 const DofSpace *emptyDofSpace () const
    \n-
    153 {
    \n-
    154 assert( *this );
    \n-
    155 return emptySpace_;
    \n-
    156 }
    \n-
    157
    \n-
    158 const MeshPointer &mesh () const
    \n-
    159 {
    \n-
    160 return mesh_;
    \n-
    161 }
    \n-
    162
    \n-
    163 int size ( int codim ) const
    \n-
    164 {
    \n-
    165 return dofSpace( codim )->admin->size;
    \n-
    166 }
    \n-
    167
    \n-
    168 void create ( const MeshPointer &mesh );
    \n-
    169
    \n-
    170 void release ()
    \n-
    171 {
    \n-
    172 if( *this )
    \n-
    173 {
    \n-
    174 for( int codim = 0; codim <= dimension; ++codim )
    \n-
    175 freeDofSpace( dofSpace_[ codim ] );
    \n-
    176 freeDofSpace( emptySpace_ );
    \n-
    177 mesh_ = MeshPointer();
    \n-
    178 }
    \n-
    179 }
    \n-
    180
    \n-
    181 private:
    \n-
    182 static const DofSpace *createEmptyDofSpace ( const MeshPointer &mesh );
    \n-
    183 static const DofSpace *createDofSpace ( const MeshPointer &mesh,
    \n-
    184 const std::string &name,
    \n-
    185 const int (&ndof)[ nNodeTypes ],
    \n-
    186 const bool periodic = false );
    \n-
    187 static void freeDofSpace ( const DofSpace *dofSpace );
    \n-
    188
    \n-
    189 MeshPointer mesh_;
    \n-
    190 const DofSpace *emptySpace_;
    \n-
    191 const DofSpace *dofSpace_[ dimension+1 ];
    \n-
    192 Cache cache_[ dimension+1 ];
    \n-
    193 };
    \n-
    194
    \n-
    195
    \n-
    196
    \n-
    197 template< int dim >
    \n-
    198 inline void
    \n-\n-
    200 {
    \n-
    201 release();
    \n-
    202
    \n-
    203 if( !mesh )
    \n-
    204 return;
    \n-
    205
    \n-
    206 mesh_ = mesh;
    \n-
    207
    \n-
    208 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ){ CreateDofSpace< i >::apply( mesh_, dofSpace_ ); } );
    \n-
    209 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i ){ CacheDofSpace< i >::apply( dofSpace_, cache_ ); } );
    \n-
    210
    \n-
    211 emptySpace_ = createEmptyDofSpace( mesh_ );
    \n-
    212 for( int i = 0; i < nNodeTypes; ++i )
    \n-
    213 assert( emptySpace_->admin->n_dof[ i ] == 0 );
    \n-
    214 }
    \n-
    215
    \n-
    216
    \n-
    217
    \n-
    218 template< int dim >
    \n-
    219 inline const DofSpace *
    \n-\n-
    221 {
    \n-
    222 int ndof[ nNodeTypes ];
    \n-
    223 for( int i = 0; i < nNodeTypes; ++i )
    \n-
    224 ndof[ i ] = 0;
    \n-
    225 std::string name = "Empty";
    \n-
    226 return createDofSpace( mesh, name, ndof );
    \n-
    227 }
    \n-
    228
    \n-
    229
    \n-
    230 template< int dim >
    \n-
    231 inline const DofSpace *
    \n-
    232 HierarchyDofNumbering< dim >::createDofSpace ( const MeshPointer &mesh,
    \n-
    233 const std::string &name,
    \n-
    234 const int (&ndof)[ nNodeTypes ],
    \n-
    235 const bool periodic )
    \n-
    236 {
    \n-
    237 const ALBERTA FLAGS flags
    \n-
    238 = ADM_PRESERVE_COARSE_DOFS | (periodic ? ADM_PERIODIC : 0);
    \n-
    239 return ALBERTA get_dof_space ( mesh, name.c_str(), ndof, flags );
    \n-
    240 }
    \n-
    241
    \n-
    242
    \n-
    243 template< int dim >
    \n-
    244 inline void
    \n-
    245 HierarchyDofNumbering< dim >::freeDofSpace ( const DofSpace *dofSpace )
    \n-
    246 {
    \n-
    247 ALBERTA free_fe_space( dofSpace );
    \n-
    248 }
    \n-
    249
    \n-
    250
    \n-
    251
    \n-
    252 // HierarchyDofNumbering::CreateDofSpace
    \n-
    253 // -------------------------------------
    \n-
    254
    \n-
    255 template< int dim >
    \n-
    256 template< int codim >
    \n-
    257 struct HierarchyDofNumbering< dim >::CreateDofSpace
    \n-
    258 {
    \n-
    259 static void apply ( const MeshPointer &mesh, const DofSpace *(&dofSpace)[ dim+1 ] )
    \n-
    260 {
    \n-
    261 int ndof[ nNodeTypes ];
    \n-
    262 for( int i = 0; i < nNodeTypes; ++i )
    \n-
    263 ndof[ i ] = 0;
    \n-
    264 ndof[ CodimType< dim, codim >::value ] = 1;
    \n-
    265
    \n-
    266 std::string name = "Codimension ";
    \n-
    267 name += (char)(codim + '0');
    \n-
    268
    \n-
    269 dofSpace[ codim ] = createDofSpace( mesh, name, ndof );
    \n-
    270 assert( dofSpace[ codim ] );
    \n-
    271 }
    \n-
    272 };
    \n-
    273
    \n-
    274
    \n-
    275
    \n-
    276 // HierarchyDofNumbering::CacheDofSpace
    \n-
    277 // ------------------------------------
    \n-
    278
    \n-
    279 template< int dim >
    \n-
    280 template< int codim >
    \n-
    281 struct HierarchyDofNumbering< dim >::CacheDofSpace
    \n-
    282 {
    \n-
    283 static void apply ( const DofSpace *(&dofSpace)[ dim+1 ], Cache (&cache)[ dim+1 ] )
    \n-
    284 {
    \n-
    285 assert( dofSpace[ codim ] );
    \n-
    286 const int codimtype = CodimType< dim, codim >::value;
    \n-
    287 cache[ codim ].first = dofSpace[ codim ]->mesh->node[ codimtype ];
    \n-
    288 cache[ codim ].second = dofSpace[ codim ]->admin->n0_dof[ codimtype ];
    \n-
    289 }
    \n-
    290 };
    \n-
    291
    \n-
    292 } // namespace Alberta
    \n-
    293
    \n-
    294} // namespace Dune
    \n-
    295
    \n-
    296#endif // #if HAVE_ALBERTA
    \n-
    297
    \n-
    298#endif // #ifndef DUNE_ALBERTA_DOFADMIN_HH
    \n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    ALBERTA EL Element
    Definition: misc.hh:54
    \n-
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n-\n-
    Definition: dofadmin.hh:36
    \n-
    static const int dimension
    Definition: dofadmin.hh:42
    \n-
    DofAccess()
    Definition: dofadmin.hh:47
    \n-
    static const int codimension
    Definition: dofadmin.hh:43
    \n-
    static const int numSubEntities
    Definition: dofadmin.hh:40
    \n-
    DofAccess(const DofSpace *dofSpace)
    Definition: dofadmin.hh:51
    \n-
    int operator()(const Element *element, int subEntity, int i) const
    Definition: dofadmin.hh:58
    \n-
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: dofadmin.hh:45
    \n-
    Definition: dofadmin.hh:93
    \n-
    HierarchyDofNumbering()
    Definition: dofadmin.hh:114
    \n-
    int operator()(const Element *element, int codim, unsigned int subEntity) const
    Definition: dofadmin.hh:127
    \n-
    const MeshPointer & mesh() const
    Definition: dofadmin.hh:158
    \n-
    void create(const MeshPointer &mesh)
    Definition: dofadmin.hh:199
    \n-
    ~HierarchyDofNumbering()
    Definition: dofadmin.hh:122
    \n-
    Alberta::MeshPointer< dimension > MeshPointer
    Definition: dofadmin.hh:99
    \n-
    int size(int codim) const
    Definition: dofadmin.hh:163
    \n-
    const DofSpace * dofSpace(int codim) const
    Definition: dofadmin.hh:145
    \n-
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: dofadmin.hh:100
    \n-
    static const int dimension
    Definition: dofadmin.hh:97
    \n-
    const DofSpace * emptyDofSpace() const
    Definition: dofadmin.hh:152
    \n-
    void release()
    Definition: dofadmin.hh:170
    \n-\n-
    Element * el() const
    Definition: elementinfo.hh:737
    \n-
    Definition: misc.hh:148
    \n-
    Definition: misc.hh:192
    \n+
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n+
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n+
    static const int dimWorld
    Definition: misc.hh:46
    \n+
    Definition: misc.hh:102
    \n+
    GlobalMatrix Matrix
    Definition: misc.hh:106
    \n+
    GlobalVector Vector
    Definition: misc.hh:107
    \n+
    Definition: transformation.hh:18
    \n+
    AlbertaTransformation(const Alberta::AffineTransformation *trafo=NULL)
    Definition: transformation.hh:29
    \n+
    static const int dimension
    Definition: transformation.hh:24
    \n+
    FieldVector< ctype, dimension > WorldVector
    Definition: transformation.hh:26
    \n+
    AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace::Vector &shift)
    Definition: transformation.hh:34
    \n+
    Alberta::Real ctype
    Definition: transformation.hh:22
    \n+
    WorldVector evaluateInverse(const WorldVector &y) const
    Definition: transformation.hh:53
    \n+
    WorldVector evaluate(const WorldVector &x) const
    Definition: transformation.hh:40
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,403 +5,134 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-dofadmin.hh\n+transformation.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_DOFADMIN_HH\n- 6#define DUNE_ALBERTA_DOFADMIN_HH\n+ 5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH\n+ 6#define DUNE_ALBERTA_TRANSFORMATION_HH\n 7\n- 8#include \n+ 8#include \n 9\n- 10#include \n+ 10#include \n 11\n- 12#include \n- 13#include \n- 14\n- 15#if HAVE_ALBERTA\n+ 12#if HAVE_ALBERTA\n+ 13\n+ 14namespace Dune\n+ 15{\n 16\n- 17namespace Dune\n- 18{\n- 19\n- 20 namespace Alberta\n- 21 {\n- 22\n- 23 // External Forward Declarations\n- 24 // -----------------------------\n+17 class AlbertaTransformation\n+ 18 {\n+ 19 typedef Alberta::GlobalSpace GlobalSpace;\n+ 20\n+ 21 public:\n+22 typedef Alberta::Real ctype;\n+ 23\n+24 static const int dimension = Alberta::dimWorld;\n 25\n- 26 template< int dim >\n- 27 class MeshPointer;\n- 28\n- 29\n- 30\n- 31 // DofAccess\n- 32 // ---------\n+26 typedef FieldVector< ctype, dimension > WorldVector;\n+ 27\n+ 28 explicit\n+29 AlbertaTransformation ( const Alberta::AffineTransformation *trafo = NULL )\n+ 30 : matrix_( (trafo != NULL ? trafo->M : GlobalSpace::identityMatrix()) ),\n+ 31 shift_( (trafo != NULL ? trafo->t : GlobalSpace::nullVector()) )\n+ 32 {}\n 33\n- 34 template< int dim, int codim >\n-35 class DofAccess\n- 36 {\n- 37 static const int codimtype = CodimType<_dim,_codim_>::value;\n- 38\n- 39 public:\n-40 static const int numSubEntities = NumSubEntities<_dim,_codim_>::value;\n- 41\n-42 static const int dimension = dim;\n-43 static const int codimension = codim;\n- 44\n-45 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n- 46\n-47 DofAccess ()\n- 48 : node_( -1 )\n- 49 {}\n- 50\n-51 explicit DofAccess ( const DofSpace *dofSpace )\n- 52 {\n- 53 assert( dofSpace );\n- 54 node_ = dofSpace->admin->mesh->node[ codimtype ];\n- 55 index_ = dofSpace->admin->n0_dof[ codimtype ];\n- 56 }\n- 57\n-58 int operator()( const Element *element, int subEntity, int i ) const\n- 59 {\n- 60 assert( element );\n- 61 assert( node_ != -1 );\n- 62 assert( subEntity < numSubEntities );\n- 63 return element->dof[ node_ + subEntity ][ index_ + i ];\n- 64 }\n- 65\n-66 int operator()( const Element *element, int subEntity ) const\n- 67 {\n- 68 return (*this)( element, subEntity, 0 );\n- 69 }\n- 70\n-71 int operator()( const ElementInfo &elementInfo, int subEntity, int i ) const\n- 72 {\n- 73 return (*this)( elementInfo.el(), subEntity, i );\n- 74 }\n+34 AlbertaTransformation ( const GlobalSpace::Matrix &matrix,\n+ 35 const GlobalSpace::Vector &shift )\n+ 36 : matrix_( matrix ),\n+ 37 shift_( shift )\n+ 38 {}\n+ 39\n+40 WorldVector evaluate ( const WorldVector &x ) const\n+ 41 {\n+ 42 WorldVector y;\n+ 43 for( int i = 0; i < dimension; ++i )\n+ 44 {\n+ 45 const GlobalSpace::Vector &row = matrix_[ i ];\n+ 46 y[ i ] = shift_[ i ];\n+ 47 for( int j = 0; j < dimension; ++j )\n+ 48 y[ i ] += row[ j ] * x[ j ];\n+ 49 }\n+ 50 return y;\n+ 51 }\n+ 52\n+53 WorldVector evaluateInverse ( const WorldVector &y ) const\n+ 54 {\n+ 55 // Note: ALBERTA requires the matrix to be orthogonal\n+ 56 WorldVector x( ctype( 0 ) );\n+ 57 for( int i = 0; i < dimension; ++i )\n+ 58 {\n+ 59 const GlobalSpace::Vector &row = matrix_[ i ];\n+ 60 const ctype v = y[ i ] - shift_[ i ];\n+ 61 for( int j = 0; j < dimension; ++j )\n+ 62 x[ j ] += row[ j ] * v;\n+ 63 }\n+ 64 return x;\n+ 65 }\n+ 66\n+ 67 private:\n+ 68 const GlobalSpace::Matrix &matrix_;\n+ 69 const GlobalSpace::Vector &shift_;\n+ 70 };\n+ 71\n+ 72}\n+ 73\n+ 74#endif // #if HAVE_ALBERTA\n 75\n-76 int operator()( const ElementInfo &elementInfo, int subEntity ) const\n- 77 {\n- 78 return (*this)( elementInfo.el(), subEntity );\n- 79 }\n- 80\n- 81 private:\n- 82 int node_;\n- 83 int index_;\n- 84 };\n- 85\n- 86\n- 87\n- 88 // HierarchyDofNumbering\n- 89 // ---------------------\n- 90\n- 91 template< int dim >\n-92 class HierarchyDofNumbering\n- 93 {\n- 94 typedef HierarchyDofNumbering<_dim_> This;\n- 95\n- 96 public:\n-97 static const int dimension = dim;\n- 98\n-99 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n-100 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n- 101\n- 102 private:\n- 103 static const int nNodeTypes = N_NODE_TYPES;\n- 104\n- 105 template< int codim >\n- 106 struct CreateDofSpace;\n- 107\n- 108 template< int codim >\n- 109 struct CacheDofSpace;\n- 110\n- 111 typedef std::pair< int, int > Cache;\n- 112\n- 113 public:\n-114 HierarchyDofNumbering ()\n- 115 {}\n- 116\n- 117 private:\n- 118 HierarchyDofNumbering ( const This & );\n- 119 This &operator= ( const This & );\n- 120\n- 121 public:\n-122 ~HierarchyDofNumbering ()\n- 123 {\n- 124 release();\n- 125 }\n- 126\n-127 int operator()( const Element *element, int codim, unsigned int subEntity )\n-const\n- 128 {\n- 129 assert( !(*this) == false );\n- 130 assert( (codim >= 0) && (codim <= dimension) );\n- 131 const Cache &cache = cache_[ codim ];\n- 132 return element->dof[ cache.first + subEntity ][ cache.second ];\n- 133 }\n- 134\n-135 int operator()( const ElementInfo &element, int codim, unsigned int\n-subEntity ) const\n- 136 {\n- 137 return (*this)( element.el(), codim, subEntity );\n- 138 }\n- 139\n-140 explicit operator bool () const\n- 141 {\n- 142 return (bool)mesh_;\n- 143 }\n- 144\n-145 const DofSpace *dofSpace ( int codim ) const\n- 146 {\n- 147 assert( *this );\n- 148 assert( (codim >= 0) && (codim <= dimension) );\n- 149 return dofSpace_[ codim ];\n- 150 }\n- 151\n-152 const DofSpace *emptyDofSpace () const\n- 153 {\n- 154 assert( *this );\n- 155 return emptySpace_;\n- 156 }\n- 157\n-158 const MeshPointer &mesh () const\n- 159 {\n- 160 return mesh_;\n- 161 }\n- 162\n-163 int size ( int codim ) const\n- 164 {\n- 165 return dofSpace( codim )->admin->size;\n- 166 }\n- 167\n-168 void create ( const MeshPointer &mesh );\n- 169\n-170 void release ()\n- 171 {\n- 172 if( *this )\n- 173 {\n- 174 for( int codim = 0; codim <= dimension; ++codim )\n- 175 freeDofSpace( dofSpace_[ codim ] );\n- 176 freeDofSpace( emptySpace_ );\n- 177 mesh_ = MeshPointer();\n- 178 }\n- 179 }\n- 180\n- 181 private:\n- 182 static const DofSpace *createEmptyDofSpace ( const MeshPointer &mesh );\n- 183 static const DofSpace *createDofSpace ( const MeshPointer &mesh,\n- 184 const std::string &name,\n- 185 const int (&ndof)[ nNodeTypes ],\n- 186 const bool periodic = false );\n- 187 static void freeDofSpace ( const DofSpace *dofSpace );\n- 188\n- 189 MeshPointer mesh_;\n- 190 const DofSpace *emptySpace_;\n- 191 const DofSpace *dofSpace_[ dimension+1 ];\n- 192 Cache cache_[ dimension+1 ];\n- 193 };\n- 194\n- 195\n- 196\n- 197 template< int dim >\n- 198 inline void\n-199 HierarchyDofNumbering<_dim_>::create ( const MeshPointer &mesh )\n- 200 {\n- 201 release();\n- 202\n- 203 if( !mesh )\n- 204 return;\n- 205\n- 206 mesh_ = mesh;\n- 207\n- 208 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i\n-){ CreateDofSpace< i >::apply( mesh_, dofSpace_ ); } );\n- 209 Hybrid::forEach( std::make_index_sequence< dimension+1 >{}, [ & ]( auto i\n-){ CacheDofSpace< i >::apply( dofSpace_, cache_ ); } );\n- 210\n- 211 emptySpace_ = createEmptyDofSpace( mesh_ );\n- 212 for( int i = 0; i < nNodeTypes; ++i )\n- 213 assert( emptySpace_->admin->n_dof[ i ] == 0 );\n- 214 }\n- 215\n- 216\n- 217\n- 218 template< int dim >\n- 219 inline const DofSpace *\n- 220 HierarchyDofNumbering<_dim_>::createEmptyDofSpace ( const MeshPointer\n-&mesh )\n- 221 {\n- 222 int ndof[ nNodeTypes ];\n- 223 for( int i = 0; i < nNodeTypes; ++i )\n- 224 ndof[ i ] = 0;\n- 225 std::string name = \"Empty\";\n- 226 return createDofSpace( mesh, name, ndof );\n- 227 }\n- 228\n- 229\n- 230 template< int dim >\n- 231 inline const DofSpace *\n- 232 HierarchyDofNumbering< dim >::createDofSpace ( const MeshPointer &mesh,\n- 233 const std::string &name,\n- 234 const int (&ndof)[ nNodeTypes ],\n- 235 const bool periodic )\n- 236 {\n- 237 const ALBERTA FLAGS flags\n- 238 = ADM_PRESERVE_COARSE_DOFS | (periodic ? ADM_PERIODIC : 0);\n- 239 return ALBERTA get_dof_space ( mesh, name.c_str(), ndof, flags );\n- 240 }\n- 241\n- 242\n- 243 template< int dim >\n- 244 inline void\n- 245 HierarchyDofNumbering< dim >::freeDofSpace ( const DofSpace *dofSpace )\n- 246 {\n- 247 ALBERTA free_fe_space( dofSpace );\n- 248 }\n- 249\n- 250\n- 251\n- 252 // HierarchyDofNumbering::CreateDofSpace\n- 253 // -------------------------------------\n- 254\n- 255 template< int dim >\n- 256 template< int codim >\n- 257 struct HierarchyDofNumbering< dim >::CreateDofSpace\n- 258 {\n- 259 static void apply ( const MeshPointer &mesh, const DofSpace *(&dofSpace)\n-[ dim+1 ] )\n- 260 {\n- 261 int ndof[ nNodeTypes ];\n- 262 for( int i = 0; i < nNodeTypes; ++i )\n- 263 ndof[ i ] = 0;\n- 264 ndof[ CodimType< dim, codim >::value ] = 1;\n- 265\n- 266 std::string name = \"Codimension \";\n- 267 name += (char)(codim + '0');\n- 268\n- 269 dofSpace[ codim ] = createDofSpace( mesh, name, ndof );\n- 270 assert( dofSpace[ codim ] );\n- 271 }\n- 272 };\n- 273\n- 274\n- 275\n- 276 // HierarchyDofNumbering::CacheDofSpace\n- 277 // ------------------------------------\n- 278\n- 279 template< int dim >\n- 280 template< int codim >\n- 281 struct HierarchyDofNumbering< dim >::CacheDofSpace\n- 282 {\n- 283 static void apply ( const DofSpace *(&dofSpace)[ dim+1 ], Cache (&cache)\n-[ dim+1 ] )\n- 284 {\n- 285 assert( dofSpace[ codim ] );\n- 286 const int codimtype = CodimType< dim, codim >::value;\n- 287 cache[ codim ].first = dofSpace[ codim ]->mesh->node[ codimtype ];\n- 288 cache[ codim ].second = dofSpace[ codim ]->admin->n0_dof[ codimtype ];\n- 289 }\n- 290 };\n- 291\n- 292 } // namespace Alberta\n- 293\n- 294} // namespace Dune\n- 295\n- 296#endif // #if HAVE_ALBERTA\n- 297\n- 298#endif // #ifndef DUNE_ALBERTA_DOFADMIN_HH\n+ 76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH\n misc.hh\n-ALBERTA\n-#define ALBERTA\n-Definition: albertaheader.hh:29\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::Element\n-ALBERTA EL Element\n-Definition: misc.hh:54\n-Dune::Alberta::DofSpace\n-ALBERTA FE_SPACE DofSpace\n-Definition: misc.hh:65\n-Dune::Alberta::MeshPointer<_dimension_>\n-Dune::Alberta::DofAccess\n-Definition: dofadmin.hh:36\n-Dune::Alberta::DofAccess::dimension\n+Dune::Alberta::AffineTransformation\n+ALBERTA AFF_TRAFO AffineTransformation\n+Definition: misc.hh:52\n+Dune::Alberta::Real\n+ALBERTA REAL Real\n+Definition: misc.hh:48\n+Dune::Alberta::dimWorld\n+static const int dimWorld\n+Definition: misc.hh:46\n+Dune::Alberta::GlobalSpace\n+Definition: misc.hh:102\n+Dune::Alberta::GlobalSpace::Matrix\n+GlobalMatrix Matrix\n+Definition: misc.hh:106\n+Dune::Alberta::GlobalSpace::Vector\n+GlobalVector Vector\n+Definition: misc.hh:107\n+Dune::AlbertaTransformation\n+Definition: transformation.hh:18\n+Dune::AlbertaTransformation::AlbertaTransformation\n+AlbertaTransformation(const Alberta::AffineTransformation *trafo=NULL)\n+Definition: transformation.hh:29\n+Dune::AlbertaTransformation::dimension\n static const int dimension\n-Definition: dofadmin.hh:42\n-Dune::Alberta::DofAccess::DofAccess\n-DofAccess()\n-Definition: dofadmin.hh:47\n-Dune::Alberta::DofAccess::codimension\n-static const int codimension\n-Definition: dofadmin.hh:43\n-Dune::Alberta::DofAccess::numSubEntities\n-static const int numSubEntities\n-Definition: dofadmin.hh:40\n-Dune::Alberta::DofAccess::DofAccess\n-DofAccess(const DofSpace *dofSpace)\n-Definition: dofadmin.hh:51\n-Dune::Alberta::DofAccess::operator()\n-int operator()(const Element *element, int subEntity, int i) const\n-Definition: dofadmin.hh:58\n-Dune::Alberta::DofAccess::ElementInfo\n-Alberta::ElementInfo< dimension > ElementInfo\n-Definition: dofadmin.hh:45\n-Dune::Alberta::HierarchyDofNumbering\n-Definition: dofadmin.hh:93\n-Dune::Alberta::HierarchyDofNumbering::HierarchyDofNumbering\n-HierarchyDofNumbering()\n-Definition: dofadmin.hh:114\n-Dune::Alberta::HierarchyDofNumbering::operator()\n-int operator()(const Element *element, int codim, unsigned int subEntity) const\n-Definition: dofadmin.hh:127\n-Dune::Alberta::HierarchyDofNumbering::mesh\n-const MeshPointer & mesh() const\n-Definition: dofadmin.hh:158\n-Dune::Alberta::HierarchyDofNumbering::create\n-void create(const MeshPointer &mesh)\n-Definition: dofadmin.hh:199\n-Dune::Alberta::HierarchyDofNumbering::~HierarchyDofNumbering\n-~HierarchyDofNumbering()\n-Definition: dofadmin.hh:122\n-Dune::Alberta::HierarchyDofNumbering::MeshPointer\n-Alberta::MeshPointer< dimension > MeshPointer\n-Definition: dofadmin.hh:99\n-Dune::Alberta::HierarchyDofNumbering::size\n-int size(int codim) const\n-Definition: dofadmin.hh:163\n-Dune::Alberta::HierarchyDofNumbering::dofSpace\n-const DofSpace * dofSpace(int codim) const\n-Definition: dofadmin.hh:145\n-Dune::Alberta::HierarchyDofNumbering::ElementInfo\n-Alberta::ElementInfo< dimension > ElementInfo\n-Definition: dofadmin.hh:100\n-Dune::Alberta::HierarchyDofNumbering::dimension\n-static const int dimension\n-Definition: dofadmin.hh:97\n-Dune::Alberta::HierarchyDofNumbering::emptyDofSpace\n-const DofSpace * emptyDofSpace() const\n-Definition: dofadmin.hh:152\n-Dune::Alberta::HierarchyDofNumbering::release\n-void release()\n-Definition: dofadmin.hh:170\n-Dune::Alberta::ElementInfo<_dimension_>\n-Dune::Alberta::ElementInfo::el\n-Element * el() const\n-Definition: elementinfo.hh:737\n-Dune::Alberta::NumSubEntities\n-Definition: misc.hh:148\n-Dune::Alberta::CodimType\n-Definition: misc.hh:192\n+Definition: transformation.hh:24\n+Dune::AlbertaTransformation::WorldVector\n+FieldVector< ctype, dimension > WorldVector\n+Definition: transformation.hh:26\n+Dune::AlbertaTransformation::AlbertaTransformation\n+AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace::\n+Vector &shift)\n+Definition: transformation.hh:34\n+Dune::AlbertaTransformation::ctype\n+Alberta::Real ctype\n+Definition: transformation.hh:22\n+Dune::AlbertaTransformation::evaluateInverse\n+WorldVector evaluateInverse(const WorldVector &y) const\n+Definition: transformation.hh:53\n+Dune::AlbertaTransformation::evaluate\n+WorldVector evaluate(const WorldVector &x) const\n+Definition: transformation.hh:40\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00638.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00638.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: misc.hh File Reference\n+dune-grid: elementinfo.hh File Reference\n \n \n \n \n \n \n \n@@ -64,187 +64,51 @@\n \n \n \n
    \n \n-
    misc.hh File Reference
    \n+Namespaces
    \n+
    elementinfo.hh File Reference
    \n \n
    \n+\n+

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

    \n
    #include <cassert>
    \n+#include <vector>
    \n #include <utility>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/hybridutilities.hh>
    \n-#include <dune/common/typetraits.hh>
    \n-#include <dune/grid/albertagrid/albertaheader.hh>
    \n+#include <dune/grid/albertagrid/geometrycache.hh>
    \n+#include <dune/grid/albertagrid/macroelement.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n \n-\n+\n \n-\n+\n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::AlbertaError
     
    class  Dune::AlbertaIOError
     
    class  Dune::Alberta::GlobalSpace
     
    struct  Dune::Alberta::NumSubEntities< dim, 0 >
     
    struct  Dune::Alberta::NumSubEntities< dim, dim >
     
    struct  Dune::Alberta::NumSubEntities< 0, 0 >
     
    struct  Dune::Alberta::NumSubEntities< 2, 1 >
     
    struct  Dune::Alberta::NumSubEntities< 3, 1 >
     
    struct  Dune::Alberta::NumSubEntities< 3, 2 >
     
    struct  Dune::Alberta::CodimType< dim, 0 >
     
    struct  Dune::Alberta::CodimType< dim, dim >
     
    struct  Dune::Alberta::CodimType< 2, 1 >
     
    struct  Dune::Alberta::CodimType< 3, 1 >
     
    struct  Dune::Alberta::CodimType< 3, 2 >
     
    struct  Dune::Alberta::FillFlags< dim >
     
    struct  Dune::Alberta::RefinementEdge< dim >
     
    struct  Dune::Alberta::RefinementEdge< 2 >
     
    struct  Dune::Alberta::Dune2AlbertaNumbering< dim, codim >
     
    struct  Dune::Alberta::Dune2AlbertaNumbering< 3, 2 >
     
    struct  Dune::Alberta::Generic2AlbertaNumbering< dim, codim >
    class  Dune::Alberta::ElementInfo< dim >
     
    struct  Dune::Alberta::Generic2AlbertaNumbering< dim, 1 >
    struct  Dune::Alberta::ElementInfo< dim >::Instance
     
    struct  Dune::Alberta::Generic2AlbertaNumbering< 1, 1 >
    class  Dune::Alberta::ElementInfo< dim >::Stack
     
    struct  Dune::Alberta::Generic2AlbertaNumbering< 3, 2 >
     
    class  Dune::Alberta::NumberingMap< dim, Numbering >
     
    struct  Dune::Alberta::MapVertices< dim, 0 >
     
    struct  Dune::Alberta::MapVertices< 2, 1 >
     
    struct  Dune::Alberta::MapVertices< 3, 1 >
     
    struct  Dune::Alberta::MapVertices< 3, 2 >
     
    struct  Dune::Alberta::MapVertices< dim, dim >
     
    struct  Dune::Alberta::Twist< dim, subdim >
     
    struct  Dune::Alberta::Twist< dim, 1 >
     
    struct  Dune::Alberta::Twist< 1, 1 >
     
    struct  Dune::Alberta::Twist< dim, 2 >
     
    struct  Dune::Alberta::Twist< 2, 2 >
    struct  Dune::Alberta::ElementInfo< dim >::Seed
     
    \n \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n-\n-\n-\n-

    \n-Macros

    #define DUNE_ALBERTA_CACHE_COORDINATES   1
     
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-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
     
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-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)
     
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n

    \n-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
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DUNE_ALBERTA_CACHE_COORDINATES

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define DUNE_ALBERTA_CACHE_COORDINATES   1
    \n-
    \n-\n-
    \n-
    \n-
    \n+

    Detailed Description

    \n+

    provides a wrapper for ALBERTA's el_info structure

    \n+
    Author
    Martin Nolte
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,151 +5,38 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces | Macros | Typedefs | Functions | Variables\n-misc.hh File Reference\n+Classes | Namespaces\n+elementinfo.hh File Reference\n+provides a wrapper for ALBERTA's el_info structure More...\n #include \n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::AlbertaError\n+ class \u00a0Dune::Alberta::ElementInfo<_dim_>\n \u00a0\n- class \u00a0Dune::AlbertaIOError\n+struct \u00a0Dune::Alberta::ElementInfo<_dim_>::Instance\n \u00a0\n- class \u00a0Dune::Alberta::GlobalSpace\n+ class \u00a0Dune::Alberta::ElementInfo<_dim_>::Stack\n \u00a0\n-struct \u00a0Dune::Alberta::NumSubEntities<_dim,_0_>\n-\u00a0\n-struct \u00a0Dune::Alberta::NumSubEntities<_dim,_dim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::NumSubEntities<_0,_0_>\n-\u00a0\n-struct \u00a0Dune::Alberta::NumSubEntities<_2,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::NumSubEntities<_3,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::NumSubEntities<_3,_2_>\n-\u00a0\n-struct \u00a0Dune::Alberta::CodimType<_dim,_0_>\n-\u00a0\n-struct \u00a0Dune::Alberta::CodimType<_dim,_dim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::CodimType<_2,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::CodimType<_3,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::CodimType<_3,_2_>\n-\u00a0\n-struct \u00a0Dune::Alberta::FillFlags<_dim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::RefinementEdge<_dim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::RefinementEdge<_2_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Dune2AlbertaNumbering<_dim,_codim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Dune2AlbertaNumbering<_3,_2_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_dim,_codim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_dim,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_1,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_3,_2_>\n-\u00a0\n- class \u00a0Dune::Alberta::NumberingMap<_dim,_Numbering_>\n-\u00a0\n-struct \u00a0Dune::Alberta::MapVertices<_dim,_0_>\n-\u00a0\n-struct \u00a0Dune::Alberta::MapVertices<_2,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::MapVertices<_3,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::MapVertices<_3,_2_>\n-\u00a0\n-struct \u00a0Dune::Alberta::MapVertices<_dim,_dim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Twist<_dim,_subdim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Twist<_dim,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Twist<_1,_1_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Twist<_dim,_2_>\n-\u00a0\n-struct \u00a0Dune::Alberta::Twist<_2,_2_>\n+struct \u00a0Dune::Alberta::ElementInfo<_dim_>::Seed\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n- Macros\n-#define\u00a0DUNE_ALBERTA_CACHE_COORDINATES\u00a0\u00a0\u00a01\n-\u00a0\n- Typedefs\n- typedef ALBERTA REAL\u00a0Dune::Alberta::Real\n-\u00a0\n- typedef ALBERTA REAL_B\u00a0Dune::Alberta::LocalVector\n-\u00a0\n- typedef ALBERTA REAL_D\u00a0Dune::Alberta::GlobalVector\n-\u00a0\n- typedef ALBERTA REAL_DD\u00a0Dune::Alberta::GlobalMatrix\n-\u00a0\n- typedef ALBERTA AFF_TRAFO\u00a0Dune::Alberta::AffineTransformation\n-\u00a0\n- typedef ALBERTA MESH\u00a0Dune::Alberta::Mesh\n-\u00a0\n- typedef ALBERTA EL\u00a0Dune::Alberta::Element\n-\u00a0\n-typedef ALBERTA BNDRY_TYPE\u00a0Dune::Alberta::BoundaryId\n-\u00a0\n- typedef U_CHAR\u00a0Dune::Alberta::ElementType\n-\u00a0\n- typedef ALBERTA FE_SPACE\u00a0Dune::Alberta::DofSpace\n-\u00a0\n- Functions\n-template\n-Data *\u00a0Dune::Alberta::memAlloc (size_t size)\n-\u00a0\n-template\n-Data *\u00a0Dune::Alberta::memCAlloc (size_t size)\n-\u00a0\n-template\n-Data *\u00a0Dune::Alberta::memReAlloc (Data *ptr, size_t oldSize, size_t newSize)\n-\u00a0\n-template\n- void\u00a0Dune::Alberta::memFree (Data *ptr, size_t size)\n-\u00a0\n-template\n- int\u00a0Dune::Alberta::applyTwist (int twist, int i)\n-\u00a0\n-template\n- int\u00a0Dune::Alberta::applyInverseTwist (int twist, int i)\n-\u00a0\n- Variables\n-static const int\u00a0Dune::Alberta::dimWorld = DIM_OF_WORLD\n-\u00a0\n-static const int\u00a0Dune::Alberta::meshRefined = MESH_REFINED\n-\u00a0\n-static const int\u00a0Dune::Alberta::meshCoarsened = MESH_COARSENED\n-\u00a0\n-static const int\u00a0Dune::Alberta::InteriorBoundary = INTERIOR\n-\u00a0\n-static const int\u00a0Dune::Alberta::DirichletBoundary = DIRICHLET\n-\u00a0\n-***** Macro Definition Documentation *****\n-***** \u25c6\u00a0DUNE_ALBERTA_CACHE_COORDINATES *****\n-#define DUNE_ALBERTA_CACHE_COORDINATES\u00a0\u00a0\u00a01\n+***** Detailed Description *****\n+provides a wrapper for ALBERTA's el_info structure\n+ Author\n+ Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00638_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: misc.hh Source File\n+dune-grid: elementinfo.hh Source File\n \n \n \n \n \n \n \n@@ -62,745 +62,1023 @@\n \n \n \n
    \n-
    misc.hh
    \n+
    elementinfo.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_MISC_HH
    \n-
    6#define DUNE_ALBERTA_MISC_HH
    \n+
    5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH
    \n+
    6#define DUNE_ALBERTA_ELEMENTINFO_HH
    \n
    7
    \n-
    8#include <cassert>
    \n-
    9#include <utility>
    \n-
    10
    \n-
    11#include <dune/common/exceptions.hh>
    \n-
    12#include <dune/common/hybridutilities.hh>
    \n-
    13#include <dune/common/typetraits.hh>
    \n-
    14
    \n-\n+
    13#include <cassert>
    \n+
    14#include <vector>
    \n+
    15#include <utility>
    \n
    16
    \n-
    17#if HAVE_ALBERTA
    \n-
    18
    \n-
    19// should the coordinates be cached in a vector (required for ALBERTA 2.0)?
    \n-
    20#ifndef DUNE_ALBERTA_CACHE_COORDINATES
    \n-
    21#define DUNE_ALBERTA_CACHE_COORDINATES 1
    \n-
    22#endif
    \n-
    23
    \n-
    24namespace Dune
    \n-
    25{
    \n-
    26
    \n-
    27 // Exceptions
    \n-
    28 // ----------
    \n-
    29
    \n-\n-
    31 : public Exception
    \n-
    32 {};
    \n+\n+\n+
    19
    \n+
    20#if HAVE_ALBERTA
    \n+
    21
    \n+
    22namespace Dune
    \n+
    23{
    \n+
    24
    \n+
    25 namespace Alberta
    \n+
    26 {
    \n+
    27
    \n+
    28 // External Forward Declarations
    \n+
    29 // -----------------------------
    \n+
    30
    \n+
    31 template< int dim >
    \n+
    32 class MeshPointer;
    \n
    33
    \n-\n-
    35 : public IOError
    \n-
    36 {};
    \n+
    34 struct BasicNodeProjection;
    \n+
    35
    \n+
    36
    \n
    37
    \n-
    38
    \n-
    39
    \n-
    40 namespace Alberta
    \n-
    41 {
    \n-
    42
    \n-
    43 // Import Types
    \n-
    44 // ------------
    \n-
    45
    \n-
    46 static const int dimWorld = DIM_OF_WORLD;
    \n-
    47
    \n-
    48 typedef ALBERTA REAL Real;
    \n-
    49 typedef ALBERTA REAL_B LocalVector; // in barycentric coordinates
    \n-
    50 typedef ALBERTA REAL_D GlobalVector;
    \n-
    51 typedef ALBERTA REAL_DD GlobalMatrix;
    \n-
    52 typedef ALBERTA AFF_TRAFO AffineTransformation;
    \n-
    53 typedef ALBERTA MESH Mesh;
    \n-
    54 typedef ALBERTA EL Element;
    \n-
    55
    \n-
    56 static const int meshRefined = MESH_REFINED;
    \n-
    57 static const int meshCoarsened = MESH_COARSENED;
    \n-
    58
    \n-
    59 static const int InteriorBoundary = INTERIOR;
    \n-
    60 static const int DirichletBoundary = DIRICHLET;
    \n-
    61 typedef ALBERTA BNDRY_TYPE BoundaryId;
    \n-
    62
    \n-
    63 typedef U_CHAR ElementType;
    \n-
    64
    \n-
    65 typedef ALBERTA FE_SPACE DofSpace;
    \n-
    66
    \n-
    67
    \n-
    68
    \n-
    69 // Memory Manipulation Functions
    \n-
    70 // -----------------------------
    \n+
    38 // ElementInfo
    \n+
    39 // -----------
    \n+
    40
    \n+
    41 template< int dim >
    \n+\n+
    43 {
    \n+
    44 struct Instance;
    \n+
    45 class Stack;
    \n+
    46
    \n+
    47 template< int >
    \n+
    48 struct Library;
    \n+
    49
    \n+
    50 typedef Instance *InstancePtr;
    \n+
    51
    \n+
    52 public:
    \n+
    53 static const int dimension = dim;
    \n+
    54
    \n+\n+\n+
    57
    \n+\n+\n+\n+
    61
    \n+
    62 static const int maxNeighbors = N_NEIGH_MAX;
    \n+
    63
    \n+
    64 static const int maxLevelNeighbors = Library< dimWorld >::maxLevelNeighbors;
    \n+
    65
    \n+
    66#if !DUNE_ALBERTA_CACHE_COORDINATES
    \n+\n+
    68#endif
    \n+
    69
    \n+
    70 struct Seed;
    \n
    71
    \n-
    72 template< class Data >
    \n-
    73 inline Data *memAlloc ( size_t size )
    \n-
    74 {
    \n-
    75 return MEM_ALLOC( size, Data );
    \n-
    76 }
    \n-
    77
    \n-
    78 template< class Data >
    \n-
    79 inline Data *memCAlloc ( size_t size )
    \n-
    80 {
    \n-
    81 return MEM_CALLOC( size, Data );
    \n-
    82 }
    \n+
    72 private:
    \n+
    73 explicit ElementInfo ( const InstancePtr &instance );
    \n+
    74
    \n+
    75 public:
    \n+\n+\n+
    78 typename FillFlags::Flags fillFlags = FillFlags::standard );
    \n+
    79 ElementInfo ( const MeshPointer &mesh, const Seed &seed,
    \n+
    80 typename FillFlags::Flags fillFlags = FillFlags::standard );
    \n+
    81 ElementInfo ( const ElementInfo &other );
    \n+\n
    83
    \n-
    84 template< class Data >
    \n-
    85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )
    \n-
    86 {
    \n-
    87 return MEM_REALLOC( ptr, oldSize, newSize, Data );
    \n-
    88 }
    \n-
    89
    \n-
    90 template< class Data >
    \n-
    91 inline void memFree ( Data *ptr, size_t size )
    \n-
    92 {
    \n-
    93 return MEM_FREE( ptr, size, Data );
    \n-
    94 }
    \n-
    95
    \n-
    96
    \n-
    97
    \n-
    98 // GlobalSpace
    \n-
    99 // -----------
    \n-
    100
    \n-\n-
    102 {
    \n-
    103 typedef GlobalSpace This;
    \n-
    104
    \n-
    105 public:
    \n-\n-\n-
    108
    \n-
    109 private:
    \n-
    110 Matrix identityMatrix_;
    \n-
    111 Vector nullVector_;
    \n-
    112
    \n-
    113 GlobalSpace ()
    \n-
    114 {
    \n-
    115 for( int i = 0; i < dimWorld; ++i )
    \n-
    116 {
    \n-
    117 for( int j = 0; j < dimWorld; ++j )
    \n-
    118 identityMatrix_[ i ][ j ] = Real( 0 );
    \n-
    119 identityMatrix_[ i ][ i ] = Real( 1 );
    \n-
    120 nullVector_[ i ] = Real( 0 );
    \n-
    121 }
    \n-
    122 }
    \n-
    123
    \n-
    124 static This &instance ()
    \n-
    125 {
    \n-
    126 static This theInstance;
    \n-
    127 return theInstance;
    \n-
    128 }
    \n-
    129
    \n-
    130 public:
    \n-
    131 static const Matrix &identityMatrix ()
    \n-
    132 {
    \n-
    133 return instance().identityMatrix_;
    \n-
    134 }
    \n-
    135
    \n-
    136 static const Vector &nullVector ()
    \n-
    137 {
    \n-
    138 return instance().nullVector_;
    \n-
    139 }
    \n-
    140 };
    \n-
    141
    \n-
    142
    \n-
    143
    \n-
    144 // NumSubEntities
    \n-
    145 // --------------
    \n-
    146
    \n-
    147 template< int dim, int codim >
    \n-\n-
    149
    \n-
    150 template< int dim >
    \n-
    151 struct NumSubEntities< dim, 0 >
    \n-
    152 {
    \n-
    153 static const int value = 1;
    \n-
    154 };
    \n-
    155
    \n-
    156 template< int dim >
    \n-
    157 struct NumSubEntities< dim, dim >
    \n-
    158 {
    \n-
    159 static const int value = dim+1;
    \n-
    160 };
    \n+\n+
    85
    \n+\n+\n+
    88
    \n+
    89 explicit operator bool () const { return (instance_ != null()); }
    \n+
    90
    \n+
    91 bool operator== ( const ElementInfo &other ) const;
    \n+
    92 bool operator!= ( const ElementInfo &other ) const;
    \n+
    93
    \n+
    94 const MacroElement &macroElement () const;
    \n+\n+
    96 int indexInFather () const;
    \n+
    97 ElementInfo child ( int i ) const;
    \n+
    98 bool isLeaf () const;
    \n+
    99
    \n+
    100 Seed seed () const;
    \n+
    101
    \n+\n+
    103
    \n+
    104 bool mightVanish () const;
    \n+
    105
    \n+
    106 int level () const;
    \n+
    107 // see ALBERTA documentation for definition of element type
    \n+
    108 // values are 0, 1, 2
    \n+
    109 int type () const;
    \n+
    110
    \n+
    111 int getMark () const;
    \n+
    112 void setMark ( int refCount ) const;
    \n+
    113
    \n+
    114 bool hasLeafNeighbor ( const int face ) const;
    \n+
    115 ElementInfo leafNeighbor ( const int face ) const;
    \n+
    116
    \n+
    117 /* obtain all level neighbors of a face
    \n+
    118 *
    \n+
    119 * param[in] face face for which the neighbors are desired
    \n+
    120 * param[out] neighbor array storing the neighbors
    \n+
    121 * param[out] faceInNeighbor array storing the faces in neighbor
    \n+
    122 * (-1, if this neighbor does not exist)
    \n+
    123 *
    \n+
    124 * returns (potential) number of neighbors (i.e., the number of valid
    \n+
    125 * entries in the output arrays
    \n+
    126 */
    \n+
    127 int levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const;
    \n+
    128
    \n+
    129 template< int codim >
    \n+
    130 int twist ( int subEntity ) const;
    \n+
    131 int twistInNeighbor ( int face ) const;
    \n+
    132 bool isBoundary ( int face ) const;
    \n+
    133 int boundaryId ( int face ) const;
    \n+\n+\n+
    136
    \n+
    137 bool hasCoordinates () const;
    \n+
    138 const GlobalVector &coordinate ( int vertex ) const;
    \n+
    139#if !DUNE_ALBERTA_CACHE_COORDINATES
    \n+\n+
    141 {
    \n+
    142 return GeometryCache( instance_->geometryCache, instance_->elInfo );
    \n+
    143 }
    \n+
    144#endif
    \n+
    145
    \n+
    146 template< class Functor >
    \n+
    147 void hierarchicTraverse ( Functor &functor ) const;
    \n+
    148
    \n+
    149 template< class Functor >
    \n+
    150 void leafTraverse ( Functor &functor ) const;
    \n+
    151
    \n+
    152 const Element *element () const;
    \n+
    153 const Element *neighbor ( int face ) const;
    \n+
    154 Element *el () const;
    \n+
    155 ALBERTA EL_INFO &elInfo () const;
    \n+
    156
    \n+
    157 static ElementInfo
    \n+\n+
    159 const Element *element, int level, int type = 0 );
    \n+
    160 static ElementInfo createFake ( const ALBERTA EL_INFO &elInfo );
    \n
    161
    \n-
    162 template<>
    \n-
    163 struct NumSubEntities< 0, 0 >
    \n-
    164 {
    \n-
    165 static const int value = 1;
    \n-
    166 };
    \n-
    167
    \n-
    168 template<>
    \n-
    169 struct NumSubEntities< 2, 1 >
    \n-
    170 {
    \n-
    171 static const int value = 3;
    \n-
    172 };
    \n-
    173
    \n-
    174 template<>
    \n-
    175 struct NumSubEntities< 3, 1 >
    \n-
    176 {
    \n-
    177 static const int value = 4;
    \n-
    178 };
    \n+
    162 private:
    \n+
    163 static bool isLeaf ( Element *element );
    \n+
    164 static bool mightVanish ( Element *element, int depth );
    \n+
    165
    \n+
    166 static void fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo );
    \n+
    167 static void fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo );
    \n+
    168
    \n+
    169 void addReference () const;
    \n+
    170 void removeReference () const;
    \n+
    171
    \n+
    172 static InstancePtr null ();
    \n+
    173 static Stack &stack ();
    \n+
    174
    \n+
    175 InstancePtr instance_;
    \n+
    176 };
    \n+
    177
    \n+
    178
    \n
    179
    \n-
    180 template<>
    \n-
    181 struct NumSubEntities< 3, 2 >
    \n-
    182 {
    \n-
    183 static const int value = 6;
    \n-
    184 };
    \n-
    185
    \n-
    186
    \n-
    187
    \n-
    188 // CodimType
    \n-
    189 // ---------
    \n-
    190
    \n-
    191 template< int dim, int codim >
    \n-
    192 struct CodimType;
    \n+
    180 // ElementInfo::Instance
    \n+
    181 // ---------------------
    \n+
    182
    \n+
    183 template< int dim >
    \n+
    184 struct ElementInfo< dim >::Instance
    \n+
    185 {
    \n+\n+
    187 unsigned int refCount;
    \n+
    188
    \n+\n+
    190 {
    \n+
    191 return parent_;
    \n+
    192 }
    \n
    193
    \n-
    194 template< int dim >
    \n-
    195 struct CodimType< dim, 0 >
    \n-
    196 {
    \n-
    197 static const int value = CENTER;
    \n-
    198 };
    \n-
    199
    \n-
    200 template< int dim >
    \n-
    201 struct CodimType< dim, dim >
    \n-
    202 {
    \n-
    203 static const int value = VERTEX;
    \n-
    204 };
    \n-
    205
    \n-
    206 template<>
    \n-
    207 struct CodimType< 2, 1 >
    \n-
    208 {
    \n-
    209 static const int value = EDGE;
    \n-
    210 };
    \n-
    211
    \n-
    212 template<>
    \n-
    213 struct CodimType< 3, 1 >
    \n-
    214 {
    \n-
    215 static const int value = FACE;
    \n-
    216 };
    \n+
    194 private:
    \n+
    195 InstancePtr parent_;
    \n+
    196
    \n+
    197#if !DUNE_ALBERTA_CACHE_COORDINATES
    \n+
    198 public:
    \n+\n+
    200#endif
    \n+
    201 };
    \n+
    202
    \n+
    203
    \n+
    204
    \n+
    205 // ElementInfo::Stack
    \n+
    206 // ------------------
    \n+
    207
    \n+
    208 template< int dim >
    \n+
    209 class ElementInfo< dim >::Stack
    \n+
    210 {
    \n+
    211 InstancePtr top_;
    \n+
    212 Instance null_;
    \n+
    213
    \n+
    214 public:
    \n+
    215 Stack ();
    \n+
    216 ~Stack ();
    \n
    217
    \n-
    218 template<>
    \n-
    219 struct CodimType< 3, 2 >
    \n-
    220 {
    \n-
    221 static const int value = EDGE;
    \n-
    222 };
    \n+
    218 InstancePtr allocate ();
    \n+
    219 void release ( InstancePtr &p );
    \n+
    220 InstancePtr null ();
    \n+
    221 };
    \n+
    222
    \n
    223
    \n
    224
    \n-
    225
    \n-
    226 // FillFlags
    \n-
    227 // ---------
    \n-
    228
    \n-
    229 template< int dim >
    \n-\n+
    225 // ElementInfo::Library
    \n+
    226 // --------------------
    \n+
    227
    \n+
    228 template< int dim >
    \n+
    229 template< int >
    \n+
    230 struct ElementInfo< dim >::Library
    \n
    231 {
    \n-
    232 typedef ALBERTA FLAGS Flags;
    \n+\n
    233
    \n-
    234 static const Flags nothing = FILL_NOTHING;
    \n+
    234 static const int maxLevelNeighbors = (1 << (dim-1));
    \n
    235
    \n-
    236 static const Flags coords = FILL_COORDS;
    \n-
    237
    \n-
    238 static const Flags neighbor = FILL_NEIGH;
    \n-
    239
    \n-
    240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION : FILL_NOTHING);
    \n-
    241
    \n-
    242 static const Flags projection = FILL_PROJECTION;
    \n-
    243
    \n-
    244 static const Flags elementType = FILL_NOTHING;
    \n-
    245
    \n-
    246 static const Flags boundaryId = FILL_MACRO_WALLS;
    \n+
    236 static int
    \n+
    237 leafNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
    \n+
    238
    \n+
    239 static int
    \n+
    240 levelNeighbors ( const ElementInfo &element, const int face,
    \n+
    241 ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] );
    \n+
    242
    \n+
    243 private:
    \n+
    244 static int
    \n+
    245 macroNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
    \n+
    246 };
    \n
    247
    \n-
    248 static const Flags nonPeriodic = FILL_NON_PERIODIC;
    \n+
    248
    \n
    249
    \n-\n-\n+
    250 // ElementInfo::Seed
    \n+
    251 // -----------------
    \n
    252
    \n-
    253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;
    \n-
    254
    \n-
    255#if DUNE_ALBERTA_CACHE_COORDINATES
    \n-
    256 static const Flags standard = standardWithCoords & ~coords;
    \n-
    257#else
    \n-
    258 static const Flags standard = standardWithCoords;
    \n-
    259#endif
    \n-
    260 };
    \n-
    261
    \n-
    262
    \n+
    253 template< int dim >
    \n+
    254 struct ElementInfo< dim >::Seed
    \n+
    255 {
    \n+\n+
    257 : macroIndex_( -1 ), level_( 0 ), path_( 0 )
    \n+
    258 {}
    \n+
    259
    \n+
    260 Seed ( const int macroIndex, const int level, const unsigned long path )
    \n+
    261 : macroIndex_( macroIndex ), level_( level ), path_( path )
    \n+
    262 {}
    \n
    263
    \n-
    264 // RefinementEdge
    \n-
    265 // --------------
    \n-
    266
    \n-
    267 template< int dim >
    \n-\n-
    269 {
    \n-
    270 static const int value = 0;
    \n-
    271 };
    \n-
    272
    \n-
    273 template<>
    \n-
    274 struct RefinementEdge< 2 >
    \n-
    275 {
    \n-
    276 static const int value = 2;
    \n-
    277 };
    \n+
    264 bool operator== ( const Seed &other ) const
    \n+
    265 {
    \n+
    266 return (macroIndex() == other.macroIndex()) && (level() == other.level()) && (path() == other.path());
    \n+
    267 }
    \n+
    268
    \n+
    269 bool operator< ( const Seed &other ) const
    \n+
    270 {
    \n+
    271 const bool ml = (macroIndex() < other.macroIndex());
    \n+
    272 const bool me = (macroIndex() == other.macroIndex());
    \n+
    273 const bool ll = (level() < other.level());
    \n+
    274 const bool le = (level() == other.level());
    \n+
    275 const bool pl = (path() < other.path());
    \n+
    276 return ml | (me & (ll | (le & pl)));
    \n+
    277 }
    \n
    278
    \n-
    279
    \n-
    280
    \n-
    281 // Dune2AlbertaNumbering
    \n-
    282 // ---------------------
    \n+
    279 bool operator!= ( const Seed &other ) const { return !(*this == other); }
    \n+
    280 bool operator<= ( const Seed &other ) const { return !(other < *this); }
    \n+
    281 bool operator> ( const Seed &other ) const { return (other < *this); }
    \n+
    282 bool operator>= ( const Seed &other ) const { return !(*this < other); }
    \n
    283
    \n-
    284 template< int dim, int codim >
    \n-\n-
    286 {
    \n-
    287 static int apply ( const int i )
    \n-
    288 {
    \n-
    289 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
    \n-
    290 return i;
    \n-
    291 }
    \n-
    292 };
    \n-
    293
    \n-
    294 template<>
    \n-\n-
    296 {
    \n-
    297 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
    \n-
    298
    \n-
    299 static int apply ( const int i )
    \n-
    300 {
    \n-
    301 assert( (i >= 0) && (i < numSubEntities) );
    \n-
    302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 };
    \n-
    303 return dune2alberta[ i ];
    \n-
    304 }
    \n-
    305 };
    \n-
    306
    \n+
    284 bool isValid ( ) const { return macroIndex_ != -1; }
    \n+
    285
    \n+
    286 int macroIndex () const { return macroIndex_; }
    \n+
    287 int level () const { return level_; }
    \n+
    288 unsigned long path () const { return path_; }
    \n+
    289
    \n+
    290 private:
    \n+
    291 int macroIndex_;
    \n+
    292 int level_;
    \n+
    293 unsigned long path_;
    \n+
    294 };
    \n+
    295
    \n+
    296
    \n+
    297
    \n+
    298 // Implementation of ElementInfo
    \n+
    299 // -----------------------------
    \n+
    300
    \n+
    301 template< int dim >
    \n+
    302 inline ElementInfo< dim >::ElementInfo ( const InstancePtr &instance )
    \n+
    303 : instance_( instance )
    \n+
    304 {
    \n+
    305 addReference();
    \n+
    306 }
    \n
    307
    \n
    308
    \n-
    309 // Generic2AlbertaNumbering
    \n-
    310 // ------------------------
    \n-
    311
    \n-
    312 template< int dim, int codim >
    \n-\n-
    314 {
    \n-
    315 static int apply ( const int i )
    \n-
    316 {
    \n-
    317 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
    \n-
    318 return i;
    \n-
    319 }
    \n-
    320 };
    \n-
    321
    \n-
    322 template< int dim >
    \n-\n-
    324 {
    \n-
    325 static int apply ( const int i )
    \n-
    326 {
    \n-
    327 assert( (i >= 0) && (i < NumSubEntities< dim, 1 >::value) );
    \n-
    328 return dim - i;
    \n-
    329 }
    \n-
    330 };
    \n-
    331
    \n-
    332 template<>
    \n-\n-
    334 {
    \n-
    335 static int apply ( const int i )
    \n-
    336 {
    \n-
    337 assert( (i >= 0) && (i < NumSubEntities< 1, 1 >::value) );
    \n-
    338 return i;
    \n-
    339 }
    \n-
    340 };
    \n-
    341
    \n-
    342 template<>
    \n-\n-
    344 {
    \n-
    345 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
    \n+
    309 template< int dim >
    \n+\n+
    311 : instance_( null() )
    \n+
    312 {
    \n+
    313 addReference();
    \n+
    314 }
    \n+
    315
    \n+
    316
    \n+
    317 template< int dim >
    \n+
    318 inline ElementInfo< dim >
    \n+
    319 ::ElementInfo ( const MeshPointer &mesh, const MacroElement &macroElement,
    \n+
    320 typename FillFlags::Flags fillFlags )
    \n+
    321 {
    \n+
    322 instance_ = stack().allocate();
    \n+
    323 instance_->parent() = null();
    \n+
    324 ++(instance_->parent()->refCount);
    \n+
    325
    \n+
    326 addReference();
    \n+
    327
    \n+
    328 elInfo().fill_flag = fillFlags;
    \n+
    329
    \n+
    330 // Alberta fills opp_vertex only if there is a neighbor
    \n+
    331 for( int k = 0; k < maxNeighbors; ++k )
    \n+
    332 elInfo().opp_vertex[ k ] = -1;
    \n+
    333
    \n+
    334 fill( mesh, &macroElement, elInfo() );
    \n+
    335 }
    \n+
    336
    \n+
    337
    \n+
    338 template< int dim >
    \n+
    339 inline ElementInfo< dim >
    \n+
    340 ::ElementInfo ( const MeshPointer &mesh, const Seed &seed,
    \n+
    341 typename FillFlags::Flags fillFlags )
    \n+
    342 {
    \n+
    343 instance_ = stack().allocate();
    \n+
    344 instance_->parent() = null();
    \n+
    345 ++(instance_->parent()->refCount);
    \n
    346
    \n-
    347 static int apply ( const int i )
    \n-
    348 {
    \n-
    349 assert( (i >= 0) && (i < numSubEntities) );
    \n-
    350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };
    \n-
    351 return generic2alberta[ i ];
    \n-
    352 }
    \n-
    353 };
    \n-
    354
    \n+
    347 addReference();
    \n+
    348
    \n+
    349 // fill in macro element info
    \n+
    350 elInfo().fill_flag = fillFlags;
    \n+
    351
    \n+
    352 // Alberta fills opp_vertex only if there is a neighbor
    \n+
    353 for( int k = 0; k < maxNeighbors; ++k )
    \n+
    354 elInfo().opp_vertex[ k ] = -1;
    \n
    355
    \n-
    356
    \n-
    357 // NumberingMap
    \n-
    358 // ------------
    \n-
    359
    \n-
    360 template< int dim, template< int, int > class Numbering = Generic2AlbertaNumbering >
    \n-\n-
    362 {
    \n-\n+
    356 fill( mesh, ((Mesh *)mesh)->macro_els + seed.macroIndex(), elInfo() );
    \n+
    357
    \n+
    358 // traverse the seed's path
    \n+
    359 unsigned long path = seed.path();
    \n+
    360 for( int i = 0; i < seed.level(); ++i )
    \n+
    361 {
    \n+
    362 InstancePtr child = stack().allocate();
    \n+
    363 child->parent() = instance_;
    \n
    364
    \n-
    365 template< int codim >
    \n-
    366 struct Initialize;
    \n-
    367
    \n-
    368 int *dune2alberta_[ dim+1 ];
    \n-
    369 int *alberta2dune_[ dim+1 ];
    \n-
    370 int numSubEntities_[ dim+1 ];
    \n-
    371
    \n-
    372 NumberingMap ( const This & );
    \n-
    373 This &operator= ( const This & );
    \n-
    374
    \n-
    375 public:
    \n-\n-
    377 {
    \n-
    378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ Initialize< i >::apply( *this ); } );
    \n-
    379 }
    \n+
    365 // Alberta fills opp_vertex only if there is a neighbor
    \n+
    366 for( int k = 0; k < maxNeighbors; ++k )
    \n+
    367 child->elInfo.opp_vertex[ k ] = -2;
    \n+
    368
    \n+
    369 fill( path & 1, elInfo(), child->elInfo );
    \n+
    370
    \n+
    371 instance_ = child;
    \n+
    372 addReference();
    \n+
    373
    \n+
    374 path = path >> 1;
    \n+
    375 }
    \n+
    376
    \n+
    377 assert( this->seed() == seed );
    \n+
    378 }
    \n+
    379
    \n
    380
    \n-\n-
    382 {
    \n-
    383 for( int codim = 0; codim <= dim; ++codim )
    \n-
    384 {
    \n-
    385 delete[]( dune2alberta_[ codim ] );
    \n-
    386 delete[]( alberta2dune_[ codim ] );
    \n-
    387 }
    \n-
    388 }
    \n-
    389
    \n-
    390 int dune2alberta ( int codim, int i ) const
    \n-
    391 {
    \n-
    392 assert( (codim >= 0) && (codim <= dim) );
    \n-
    393 assert( (i >= 0) && (i < numSubEntities( codim )) );
    \n-
    394 return dune2alberta_[ codim ][ i ];
    \n-
    395 }
    \n-
    396
    \n-
    397 int alberta2dune ( int codim, int i ) const
    \n-
    398 {
    \n-
    399 assert( (codim >= 0) && (codim <= dim) );
    \n-
    400 assert( (i >= 0) && (i < numSubEntities( codim )) );
    \n-
    401 return alberta2dune_[ codim ][ i ];
    \n-
    402 }
    \n-
    403
    \n-
    404 int numSubEntities ( int codim ) const
    \n-
    405 {
    \n-
    406 assert( (codim >= 0) && (codim <= dim) );
    \n-
    407 return numSubEntities_[ codim ];
    \n-
    408 }
    \n-
    409 };
    \n-
    410
    \n-
    411
    \n+
    381 template< int dim >
    \n+\n+
    383 : instance_( other.instance_ )
    \n+
    384 {
    \n+
    385 addReference();
    \n+
    386 }
    \n+
    387
    \n+
    388 template< int dim >
    \n+\n+
    390 : instance_( NULL )
    \n+
    391 {
    \n+
    392 using std::swap;
    \n+
    393 swap( instance_, other.instance_ );
    \n+
    394 }
    \n+
    395
    \n+
    396 template< int dim >
    \n+\n+
    398 {
    \n+
    399 removeReference();
    \n+
    400 }
    \n+
    401
    \n+
    402
    \n+
    403 template< int dim >
    \n+
    404 inline ElementInfo< dim > &
    \n+\n+
    406 {
    \n+
    407 other.addReference();
    \n+
    408 removeReference();
    \n+
    409 instance_ = other.instance_;
    \n+
    410 return *this;
    \n+
    411 }
    \n
    412
    \n-
    413 // NumberingMap::Initialize
    \n-
    414 // ------------------------
    \n-
    415
    \n-
    416 template< int dim, template< int, int > class Numbering >
    \n-
    417 template< int codim >
    \n-
    418 struct NumberingMap< dim, Numbering >::Initialize
    \n-
    419 {
    \n-
    420 static const int numSubEntities = NumSubEntities< dim, codim >::value;
    \n+
    413 template< int dim >
    \n+
    414 inline ElementInfo< dim > &
    \n+\n+
    416 {
    \n+
    417 using std::swap;
    \n+
    418 swap( instance_, other.instance_ );
    \n+
    419 return *this;
    \n+
    420 }
    \n
    421
    \n-
    422 static void apply ( NumberingMap< dim, Numbering > &map )
    \n-
    423 {
    \n-
    424 map.numSubEntities_[ codim ] = numSubEntities;
    \n-
    425 map.dune2alberta_[ codim ] = new int[ numSubEntities ];
    \n-
    426 map.alberta2dune_[ codim ] = new int[ numSubEntities ];
    \n-
    427
    \n-
    428 for( int i = 0; i < numSubEntities; ++i )
    \n-
    429 {
    \n-
    430 const int j = Numbering< dim, codim >::apply( i );
    \n-
    431 map.dune2alberta_[ codim ][ i ] = j;
    \n-
    432 map.alberta2dune_[ codim ][ j ] = i;
    \n-
    433 }
    \n-
    434 }
    \n-
    435 };
    \n+
    422 template< int dim >
    \n+
    423 inline bool
    \n+\n+
    425 {
    \n+
    426 return (instance_->elInfo.el == other.instance_->elInfo.el);
    \n+
    427 }
    \n+
    428
    \n+
    429
    \n+
    430 template< int dim >
    \n+
    431 inline bool
    \n+\n+
    433 {
    \n+
    434 return (instance_->elInfo.el != other.instance_->elInfo.el);
    \n+
    435 }
    \n
    436
    \n
    437
    \n-
    438
    \n-
    439 // MapVertices
    \n-
    440 // -----------
    \n-
    441
    \n-
    442 template< int dim, int codim >
    \n-\n-
    444
    \n-
    445 template< int dim >
    \n-
    446 struct MapVertices< dim, 0 >
    \n-
    447 {
    \n-
    448 static int apply ( int subEntity, int vertex )
    \n-
    449 {
    \n-
    450 assert( subEntity == 0 );
    \n-
    451 assert( (vertex >= 0) && (vertex <= NumSubEntities< dim, dim >::value) );
    \n-
    452 return vertex;
    \n-
    453 }
    \n-
    454 };
    \n+
    438 template< int dim >
    \n+
    439 inline const typename ElementInfo< dim >::MacroElement &
    \n+\n+
    441 {
    \n+
    442 assert( !!(*this) );
    \n+
    443 assert( elInfo().macro_el != NULL );
    \n+
    444 return static_cast< const MacroElement & >( *(elInfo().macro_el) );
    \n+
    445 }
    \n+
    446
    \n+
    447
    \n+
    448 template< int dim >
    \n+\n+
    450 {
    \n+
    451 assert( !!(*this) );
    \n+
    452 return ElementInfo< dim >( instance_->parent() );
    \n+
    453 }
    \n+
    454
    \n
    455
    \n-
    456 template<>
    \n-
    457 struct MapVertices< 2, 1 >
    \n-
    458 {
    \n-
    459 static int apply ( int subEntity, int vertex )
    \n-
    460 {
    \n-
    461 assert( (subEntity >= 0) && (subEntity < 3) );
    \n-
    462 assert( (vertex >= 0) && (vertex < 2) );
    \n-
    463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} };
    \n-
    464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} };
    \n-
    465 return map[ subEntity ][ vertex ];
    \n-
    466 }
    \n-
    467 };
    \n+
    456 template< int dim >
    \n+\n+
    458 {
    \n+
    459 const Element *element = elInfo().el;
    \n+
    460 const Element *father = elInfo().parent->el;
    \n+
    461 assert( father != NULL );
    \n+
    462
    \n+
    463 const int index = (father->child[ 0 ] == element ? 0 : 1);
    \n+
    464 assert( father->child[ index ] == element );
    \n+
    465 return index;
    \n+
    466 }
    \n+
    467
    \n
    468
    \n-
    469 template<>
    \n-
    470 struct MapVertices< 3, 1 >
    \n-
    471 {
    \n-
    472 static int apply ( int subEntity, int vertex )
    \n-
    473 {
    \n-
    474 assert( (subEntity >= 0) && (subEntity < 4) );
    \n-
    475 assert( (vertex >= 0) && (vertex < 3) );
    \n-
    476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} };
    \n-
    477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} };
    \n-
    478 return map[ subEntity ][ vertex ];
    \n-
    479 }
    \n-
    480 };
    \n+
    469 template< int dim >
    \n+\n+
    471 {
    \n+
    472 assert( !isLeaf() );
    \n+
    473
    \n+
    474 InstancePtr child = stack().allocate();
    \n+
    475 child->parent() = instance_;
    \n+
    476 addReference();
    \n+
    477
    \n+
    478 // Alberta fills opp_vertex only if there is a neighbor
    \n+
    479 for( int k = 0; k < maxNeighbors; ++k )
    \n+
    480 child->elInfo.opp_vertex[ k ] = -2;
    \n
    481
    \n-
    482 template<>
    \n-
    483 struct MapVertices< 3, 2 >
    \n-
    484 {
    \n-
    485 static int apply ( int subEntity, int vertex )
    \n-
    486 {
    \n-
    487 assert( (subEntity >= 0) && (subEntity < 6) );
    \n-
    488 assert( (vertex >= 0) && (vertex < 2) );
    \n-
    489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} };
    \n-
    490 return map[ subEntity ][ vertex ];
    \n-
    491 }
    \n-
    492 };
    \n+
    482 fill( i, elInfo(), child->elInfo );
    \n+
    483 return ElementInfo< dim >( child );
    \n+
    484 }
    \n+
    485
    \n+
    486
    \n+
    487 template< int dim >
    \n+
    488 inline bool ElementInfo< dim >::isLeaf () const
    \n+
    489 {
    \n+
    490 assert( !(*this) == false );
    \n+
    491 return isLeaf( el() );
    \n+
    492 }
    \n
    493
    \n-
    494 template< int dim >
    \n-
    495 struct MapVertices< dim, dim >
    \n-
    496 {
    \n-
    497 static int apply ( int subEntity, int vertex )
    \n-
    498 {
    \n-
    499 assert( (subEntity >= 0) && (subEntity < NumSubEntities< dim, 1 >::value) );
    \n-
    500 assert( vertex == 0 );
    \n-
    501 return subEntity;
    \n-
    502 }
    \n-
    503 };
    \n-
    504
    \n-
    505
    \n-
    506
    \n-
    507 // Twist
    \n-
    508 // -----
    \n-
    509
    \n-
    510 // ******************************************************************
    \n-
    511 // Meaning of the twist (same as in ALU)
    \n-
    512 // -------------------------------------
    \n-
    513 //
    \n-
    514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face
    \n-
    515 // (here, we assume their indices to be increasing). Denote by k the
    \n-
    516 // local number of a vertex v within the element and by t the twist.
    \n-
    517 // Then, v = v_j, where j is computed by the following formula:
    \n-
    518 //
    \n-
    519 // / (2n + 1 - k + t) % n, if t < 0
    \n-
    520 // j = <
    \n-
    521 // \\ (k + t) % n, if t >= 0
    \n-
    522 //
    \n-
    523 // Note: We use the order of the 0-th vertex dof to assign the twist.
    \n-
    524 // This is ok for two reasons:
    \n-
    525 // - ALBERTA preserves the relative order of the dofs during
    \n-
    526 // dof compression.
    \n-
    527 // - ALBERTA enforces the first vertex dof admin to be periodic.
    \n-
    528 // ******************************************************************
    \n-
    529
    \n-
    530 template< int dim, int subdim >
    \n-
    531 struct Twist
    \n-
    532 {
    \n-
    533 static const int numSubEntities = NumSubEntities< dim, dim-subdim >::value;
    \n-
    534
    \n-
    535 static const int minTwist = 0;
    \n-
    536 static const int maxTwist = 0;
    \n+
    494
    \n+
    495 template< int dim >
    \n+\n+
    497 {
    \n+
    498 assert( !!(*this) );
    \n+
    499
    \n+
    500 int level = 0;
    \n+
    501 unsigned long path = 0;
    \n+
    502 for( InstancePtr p = instance_; p->parent() != null(); p = p->parent() )
    \n+
    503 {
    \n+
    504 const Element *element = p->elInfo.el;
    \n+
    505 const Element *father = p->parent()->elInfo.el;
    \n+
    506 const unsigned long child = static_cast< unsigned long >( father->child[ 1 ] == element );
    \n+
    507 path = (path << 1) | child;
    \n+
    508 ++level;
    \n+
    509 }
    \n+
    510
    \n+
    511 if( level != elInfo().level )
    \n+
    512 DUNE_THROW( NotImplemented, "Seed for fake elements not implemented." );
    \n+
    513
    \n+
    514 return Seed( macroElement().index, level, path );
    \n+
    515 }
    \n+
    516
    \n+
    517
    \n+
    518 template< int dim >
    \n+\n+
    520 {
    \n+
    521 return MeshPointer( elInfo().mesh );
    \n+
    522 }
    \n+
    523
    \n+
    524
    \n+
    525 template< int dim >
    \n+\n+
    527 {
    \n+
    528 return mightVanish( el(), 0 );
    \n+
    529 }
    \n+
    530
    \n+
    531
    \n+
    532 template< int dim >
    \n+
    533 inline int ElementInfo< dim >::level () const
    \n+
    534 {
    \n+
    535 return elInfo().level;
    \n+
    536 }
    \n
    537
    \n-
    538 static int twist ( [[maybe_unused]] const Element *element,
    \n-
    539 [[maybe_unused]] int subEntity )
    \n-
    540 {
    \n-
    541 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
    \n-
    542 return 0;
    \n-
    543 }
    \n-
    544 };
    \n+
    538
    \n+
    539 template< int dim >
    \n+
    540 inline int ElementInfo< dim >::type () const
    \n+
    541 {
    \n+
    542 return 0;
    \n+
    543 }
    \n+
    544
    \n
    545
    \n-
    546 template< int dim >
    \n-
    547 struct Twist< dim, 1 >
    \n-
    548 {
    \n-
    549 static const int numSubEntities = NumSubEntities< dim, dim-1 >::value;
    \n-
    550
    \n-
    551 static const int minTwist = 0;
    \n-
    552 static const int maxTwist = 1;
    \n-
    553
    \n-
    554 static int twist ( const Element *element, int subEntity )
    \n-
    555 {
    \n-
    556 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
    \n-
    557 const int numVertices = NumSubEntities< 1, 1 >::value;
    \n-
    558 int dof[ numVertices ];
    \n-
    559 for( int i = 0; i < numVertices; ++i )
    \n-
    560 {
    \n-
    561 const int j = MapVertices< dim, dim-1 >::apply( subEntity, i );
    \n-
    562 dof[ i ] = element->dof[ j ][ 0 ];
    \n-
    563 }
    \n-
    564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1);
    \n-
    565 }
    \n-
    566 };
    \n+
    546 template<>
    \n+
    547 inline int ElementInfo< 3 >::type () const
    \n+
    548 {
    \n+
    549 return instance_->elInfo.el_type;
    \n+
    550 }
    \n+
    551
    \n+
    552
    \n+
    553 template< int dim >
    \n+
    554 inline int ElementInfo< dim >::getMark () const
    \n+
    555 {
    \n+
    556 return el()->mark;
    \n+
    557 }
    \n+
    558
    \n+
    559
    \n+
    560 template< int dim >
    \n+
    561 inline void ElementInfo< dim >::setMark ( int refCount ) const
    \n+
    562 {
    \n+
    563 assert( isLeaf() );
    \n+
    564 assert( (refCount >= -128) && (refCount < 127) );
    \n+
    565 el()->mark = refCount;
    \n+
    566 }
    \n
    567
    \n
    568
    \n-
    569 template<>
    \n-
    570 struct Twist< 1, 1 >
    \n-
    571 {
    \n-
    572 static const int minTwist = 0;
    \n-
    573 static const int maxTwist = 0;
    \n+
    569 template< int dim >
    \n+
    570 inline bool ElementInfo< dim >::hasLeafNeighbor ( const int face ) const
    \n+
    571 {
    \n+
    572 assert( !!(*this) );
    \n+
    573 assert( (face >= 0) && (face < maxNeighbors) );
    \n
    574
    \n-
    575 static int twist ( [[maybe_unused]] const Element *element,
    \n-
    576 [[maybe_unused]] int subEntity )
    \n-
    577 {
    \n-
    578 assert( subEntity == 0 );
    \n-
    579 return 0;
    \n-
    580 }
    \n-
    581 };
    \n+
    575 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n+
    576 const int macroFace = elInfo().macro_wall[ face ];
    \n+
    577 if( macroFace >= 0 )
    \n+
    578 return (macroElement().neighbor( macroFace ) != NULL);
    \n+
    579 else
    \n+
    580 return true;
    \n+
    581 }
    \n
    582
    \n
    583
    \n
    584 template< int dim >
    \n-
    585 struct Twist< dim, 2 >
    \n-
    586 {
    \n-
    587 static const int numSubEntities = NumSubEntities< dim, dim-2 >::value;
    \n-
    588
    \n-
    589 static const int minTwist = -3;
    \n-
    590 static const int maxTwist = 2;
    \n-
    591
    \n-
    592 static int twist ( const Element *element, int subEntity )
    \n-
    593 {
    \n-
    594 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
    \n-
    595 const int numVertices = NumSubEntities< 2, 2 >::value;
    \n-
    596 int dof[ numVertices ];
    \n-
    597 for( int i = 0; i < numVertices; ++i )
    \n-
    598 {
    \n-
    599 const int j = MapVertices< dim, dim-2 >::apply( subEntity, i );
    \n-
    600 dof[ i ] = element->dof[ j ][ 0 ];
    \n-
    601 }
    \n+\n+
    586 {
    \n+
    587 assert( (face >= 0) && (face < numFaces) );
    \n+
    588 ElementInfo neighbor;
    \n+
    589 Library< dimWorld >::leafNeighbor( *this, face, neighbor );
    \n+
    590 return neighbor;
    \n+
    591 }
    \n+
    592
    \n+
    593
    \n+
    594 template< int dim >
    \n+
    595 inline int ElementInfo< dim >
    \n+
    596 ::levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const
    \n+
    597 {
    \n+
    598 assert( (face >= 0) && (face < numFaces) );
    \n+
    599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor, faceInNeighbor );
    \n+
    600 }
    \n+
    601
    \n
    602
    \n-
    603 const int twist[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 };
    \n-
    604 const int k = int( dof[ 0 ] < dof[ 1 ] )
    \n-
    605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1)
    \n-
    606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2);
    \n-
    607 assert( twist[ k ] != 666 );
    \n-
    608 return twist[ k ];
    \n-
    609 }
    \n-
    610 };
    \n-
    611
    \n-
    612
    \n-
    613 template<>
    \n-
    614 struct Twist< 2, 2 >
    \n-
    615 {
    \n-
    616 static const int minTwist = 0;
    \n-
    617 static const int maxTwist = 0;
    \n+
    603 template< int dim >
    \n+
    604 template< int codim >
    \n+
    605 inline int ElementInfo< dim >::twist ( int subEntity ) const
    \n+
    606 {
    \n+
    607 return Twist< dim, dim-codim >::twist( element(), subEntity );
    \n+
    608 }
    \n+
    609
    \n+
    610
    \n+
    611 template< int dim >
    \n+
    612 inline int ElementInfo< dim >::twistInNeighbor ( const int face ) const
    \n+
    613 {
    \n+
    614 assert( neighbor( face ) != NULL );
    \n+
    615 return Twist< dim, dim-1 >::twist( neighbor( face ), elInfo().opp_vertex[ face ] );
    \n+
    616 }
    \n+
    617
    \n
    618
    \n-
    619 static int twist ( [[maybe_unused]] const Element *element,
    \n-
    620 [[maybe_unused]] int subEntity )
    \n-
    621 {
    \n-
    622 assert( subEntity == 0 );
    \n-
    623 return 0;
    \n-
    624 }
    \n-
    625 };
    \n-
    626
    \n-
    627
    \n-
    628
    \n-
    629 template< int dim >
    \n-
    630 inline int applyTwist ( int twist, int i )
    \n-
    631 {
    \n-
    632 const int numCorners = NumSubEntities< dim, dim >::value;
    \n-
    633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % numCorners;
    \n-
    634 }
    \n-
    635
    \n-
    636 template< int dim >
    \n-
    637 inline int applyInverseTwist ( int twist, int i )
    \n-
    638 {
    \n-
    639 const int numCorners = NumSubEntities< dim, dim >::value;
    \n-
    640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - twist) % numCorners;
    \n-
    641 }
    \n-
    642
    \n-
    643 }
    \n-
    644
    \n-
    645}
    \n-
    646
    \n-
    647#endif // #if HAVE_ALBERTA
    \n+
    619 template< int dim >
    \n+
    620 inline bool ElementInfo< dim >::isBoundary ( int face ) const
    \n+
    621 {
    \n+
    622 assert( !!(*this) );
    \n+
    623 assert( (face >= 0) && (face < maxNeighbors) );
    \n+
    624
    \n+
    625 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n+
    626 const int macroFace = elInfo().macro_wall[ face ];
    \n+
    627 if( macroFace >= 0 )
    \n+
    628 return macroElement().isBoundary( macroFace );
    \n+
    629 else
    \n+
    630 return false;
    \n+
    631 }
    \n+
    632
    \n+
    633
    \n+
    634 template< int dim >
    \n+
    635 inline int ElementInfo< dim >::boundaryId ( int face ) const
    \n+
    636 {
    \n+
    637 assert( !!(*this) );
    \n+
    638 assert( (face >= 0) && (face < N_WALLS_MAX) );
    \n+
    639
    \n+
    640 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n+
    641 const int macroFace = elInfo().macro_wall[ face ];
    \n+
    642 const int id = macroElement().boundaryId( macroFace );
    \n+
    643 // this assertion is only allowed, if FILL_BOUND is set
    \n+
    644 // assert( id == elInfo().wall_bound[ face ] );
    \n+
    645 return id;
    \n+
    646 }
    \n+
    647
    \n
    648
    \n-
    649#endif // #ifndef DUNE_ALBERTA_MISC_HH
    \n-\n-
    #define DIM_OF_WORLD
    Definition: albertaheader.hh:23
    \n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n+
    649 template< int dim >
    \n+
    650 inline AffineTransformation *
    \n+\n+
    652 {
    \n+
    653 assert( !!(*this) );
    \n+
    654 assert( (face >= 0) && (face < N_WALLS_MAX) );
    \n+
    655
    \n+
    656 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n+
    657 const int macroFace = elInfo().macro_wall[ face ];
    \n+
    658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]);
    \n+
    659 }
    \n+
    660
    \n+
    661
    \n+
    662 template< int dim >
    \n+
    663 inline BasicNodeProjection *
    \n+\n+
    665 {
    \n+
    666 assert( !!(*this) );
    \n+
    667 assert( (face >= 0) && (face < N_WALLS_MAX) );
    \n+
    668
    \n+
    669 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n+
    670 const int macroFace = elInfo().macro_wall[ face ];
    \n+
    671 if( macroFace >= 0 )
    \n+
    672 return static_cast< BasicNodeProjection * >( macroElement().projection[ macroFace+1 ] );
    \n+
    673 else
    \n+
    674 return 0;
    \n+
    675 }
    \n+
    676
    \n+
    677
    \n+
    678 template< int dim >
    \n+\n+
    680 {
    \n+
    681 return ((elInfo().fill_flag & FillFlags::coords) != 0);
    \n+
    682 }
    \n+
    683
    \n+
    684 template< int dim >
    \n+\n+
    686 {
    \n+
    687 assert( hasCoordinates() );
    \n+
    688 assert( (vertex >= 0) && (vertex < numVertices) );
    \n+
    689 return elInfo().coord[ vertex ];
    \n+
    690 }
    \n+
    691
    \n+
    692
    \n+
    693 template< int dim >
    \n+
    694 template< class Functor >
    \n+
    695 inline void ElementInfo< dim >::hierarchicTraverse ( Functor &functor ) const
    \n+
    696 {
    \n+
    697 functor( *this );
    \n+
    698 if( !isLeaf() )
    \n+
    699 {
    \n+
    700 child( 0 ).hierarchicTraverse( functor );
    \n+
    701 child( 1 ).hierarchicTraverse( functor );
    \n+
    702 }
    \n+
    703 }
    \n+
    704
    \n+
    705
    \n+
    706 template< int dim >
    \n+
    707 template< class Functor >
    \n+
    708 inline void ElementInfo< dim >::leafTraverse ( Functor &functor ) const
    \n+
    709 {
    \n+
    710 if( !isLeaf() )
    \n+
    711 {
    \n+
    712 child( 0 ).leafTraverse( functor );
    \n+
    713 child( 1 ).leafTraverse( functor );
    \n+
    714 }
    \n+
    715 else
    \n+
    716 functor( *this );
    \n+
    717 }
    \n+
    718
    \n+
    719
    \n+
    720 template< int dim >
    \n+\n+
    722 {
    \n+
    723 return elInfo().el;
    \n+
    724 }
    \n+
    725
    \n+
    726
    \n+
    727 template< int dim >
    \n+
    728 inline const Element *ElementInfo< dim >::neighbor ( int face ) const
    \n+
    729 {
    \n+
    730 assert( (face >= 0) && (face < numFaces) );
    \n+
    731 assert( (elInfo().fill_flag & FillFlags::neighbor) != 0 );
    \n+
    732 return elInfo().neigh[ face ];
    \n+
    733 }
    \n+
    734
    \n+
    735
    \n+
    736 template< int dim >
    \n+\n+
    738 {
    \n+
    739 return elInfo().el;
    \n+
    740 }
    \n+
    741
    \n+
    742
    \n+
    743 template< int dim >
    \n+
    744 inline ALBERTA EL_INFO &ElementInfo< dim >::elInfo () const
    \n+
    745 {
    \n+
    746 return (instance_->elInfo);
    \n+
    747 }
    \n+
    748
    \n+
    749
    \n+
    750 template< int dim >
    \n+
    751 inline ElementInfo< dim >
    \n+\n+
    753 const Element *element, int level, int type )
    \n+
    754 {
    \n+
    755 InstancePtr instance = stack().allocate();
    \n+
    756 instance->parent() = null();
    \n+
    757 ++(instance->parent()->refCount);
    \n+
    758
    \n+
    759 instance->elInfo.mesh = mesh;
    \n+
    760 instance->elInfo.macro_el = NULL;
    \n+
    761 instance->elInfo.el = const_cast< Element * >( element );
    \n+
    762 instance->elInfo.parent = NULL;
    \n+
    763 instance->elInfo.fill_flag = FillFlags::nothing;
    \n+
    764 instance->elInfo.level = level;
    \n+
    765 instance->elInfo.el_type = type;
    \n+
    766
    \n+
    767 return ElementInfo< dim >( instance );
    \n+
    768 }
    \n+
    769
    \n+
    770
    \n+
    771 template< int dim >
    \n+
    772 inline ElementInfo< dim >
    \n+
    773 ElementInfo< dim >::createFake ( const ALBERTA EL_INFO &elInfo )
    \n+
    774 {
    \n+
    775 InstancePtr instance = stack().allocate();
    \n+
    776 instance->parent() = null();
    \n+
    777 ++(instance->parent()->refCount);
    \n+
    778
    \n+
    779 instance->elInfo = elInfo;
    \n+
    780 return ElementInfo< dim >( instance );
    \n+
    781 }
    \n+
    782
    \n+
    783
    \n+
    784 template< int dim >
    \n+
    785 inline bool ElementInfo< dim >::isLeaf ( Element *element )
    \n+
    786 {
    \n+
    787 return IS_LEAF_EL( element );
    \n+
    788 }
    \n+
    789
    \n+
    790
    \n+
    791 template< int dim >
    \n+
    792 inline bool ElementInfo< dim >::mightVanish ( Alberta::Element *element, int depth )
    \n+
    793 {
    \n+
    794 if( isLeaf( element ) )
    \n+
    795 return (element->mark < depth);
    \n+
    796 else
    \n+
    797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish( element->child[ 1 ], depth-1 ));
    \n+
    798 }
    \n+
    799
    \n+
    800
    \n+
    801 template< int dim >
    \n+
    802 inline void ElementInfo< dim >
    \n+
    803 ::fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo )
    \n+
    804 {
    \n+
    805 ALBERTA fill_macro_info( mesh, mel, &elInfo );
    \n+
    806 }
    \n+
    807
    \n+
    808 template< int dim >
    \n+
    809 inline void ElementInfo< dim >
    \n+
    810 ::fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo )
    \n+
    811 {
    \n+
    812 ALBERTA fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo );
    \n+
    813 }
    \n+
    814
    \n+
    815
    \n+
    816 template< int dim >
    \n+
    817 inline void ElementInfo< dim >::addReference () const
    \n+
    818 {
    \n+
    819 ++(instance_->refCount);
    \n+
    820 }
    \n+
    821
    \n+
    822
    \n+
    823 template< int dim >
    \n+
    824 inline void ElementInfo< dim >::removeReference () const
    \n+
    825 {
    \n+
    826 // short-circuit for rvalues that have been drained as argument to a move operation
    \n+
    827 if ( !instance_ )
    \n+
    828 return;
    \n+
    829 // this loop breaks when instance becomes null()
    \n+
    830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; )
    \n+
    831 {
    \n+
    832 const InstancePtr parent = instance->parent();
    \n+
    833 stack().release( instance );
    \n+
    834 instance = parent;
    \n+
    835 }
    \n+
    836 }
    \n+
    837
    \n+
    838
    \n+
    839 template< int dim >
    \n+
    840 inline typename ElementInfo< dim >::InstancePtr
    \n+
    841 ElementInfo< dim >::null ()
    \n+
    842 {
    \n+
    843 return stack().null();
    \n+
    844 }
    \n+
    845
    \n+
    846
    \n+
    847 template< int dim >
    \n+
    848 inline typename ElementInfo< dim >::Stack &
    \n+
    849 ElementInfo< dim >::stack ()
    \n+
    850 {
    \n+
    851 static Stack s;
    \n+
    852 return s;
    \n+
    853 }
    \n+
    854
    \n+
    855
    \n+
    856
    \n+
    857 // Implementation of ElementInfo::Stack
    \n+
    858 // ------------------------------------
    \n+
    859
    \n+
    860 template< int dim >
    \n+\n+
    862 : top_( 0 )
    \n+
    863 {
    \n+
    864 null_.elInfo.el = NULL;
    \n+
    865 null_.refCount = 1;
    \n+
    866 null_.parent() = 0;
    \n+
    867 }
    \n+
    868
    \n+
    869
    \n+
    870 template< int dim >
    \n+\n+
    872 {
    \n+
    873 while( top_ != 0 )
    \n+
    874 {
    \n+
    875 InstancePtr p = top_;
    \n+
    876 top_ = p->parent();
    \n+
    877 delete p;
    \n+
    878 }
    \n+
    879 }
    \n+
    880
    \n+
    881
    \n+
    882 template< int dim >
    \n+
    883 inline typename ElementInfo< dim >::InstancePtr
    \n+\n+
    885 {
    \n+
    886 InstancePtr p = top_;
    \n+
    887 if( p != 0 )
    \n+
    888 top_ = p->parent();
    \n+
    889 else
    \n+
    890 p = new Instance;
    \n+
    891 p->refCount = 0;
    \n+
    892 return p;
    \n+
    893 }
    \n+
    894
    \n+
    895
    \n+
    896 template< int dim >
    \n+\n+
    898 {
    \n+
    899 assert( (p != null()) && (p->refCount == 0) );
    \n+
    900 p->parent() = top_;
    \n+
    901 top_ = p;
    \n+
    902 }
    \n+
    903
    \n+
    904
    \n+
    905 template< int dim >
    \n+
    906 inline typename ElementInfo< dim >::InstancePtr
    \n+\n+
    908 {
    \n+
    909 return &null_;
    \n+
    910 }
    \n+
    911
    \n+
    912 } // namespace Alberta
    \n+
    913
    \n+
    914} // namespace Dune
    \n+
    915
    \n+
    916#endif // #if HAVE_ALBERTA
    \n+
    917
    \n+
    918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH
    \n+\n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n+
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    int applyInverseTwist(int twist, int i)
    Definition: misc.hh:637
    \n
    ALBERTA MESH Mesh
    Definition: misc.hh:53
    \n-
    int applyTwist(int twist, int i)
    Definition: misc.hh:630
    \n-
    void memFree(Data *ptr, size_t size)
    Definition: misc.hh:91
    \n-
    ALBERTA REAL_DD GlobalMatrix
    Definition: misc.hh:51
    \n
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n-
    ALBERTA REAL_B LocalVector
    Definition: misc.hh:49
    \n
    ALBERTA EL Element
    Definition: misc.hh:54
    \n-
    ALBERTA BNDRY_TYPE BoundaryId
    Definition: misc.hh:61
    \n-
    static const int InteriorBoundary
    Definition: misc.hh:59
    \n-
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n-
    static const int meshRefined
    Definition: misc.hh:56
    \n-
    Data * memAlloc(size_t size)
    Definition: misc.hh:73
    \n-
    Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
    Definition: misc.hh:85
    \n-
    static const int DirichletBoundary
    Definition: misc.hh:60
    \n-
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n-
    Data * memCAlloc(size_t size)
    Definition: misc.hh:79
    \n-
    static const int dimWorld
    Definition: misc.hh:46
    \n-
    U_CHAR ElementType
    Definition: misc.hh:63
    \n-
    static const int meshCoarsened
    Definition: misc.hh:57
    \n
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n
    @ vertex
    Definition: common.hh:133
    \n-
    Definition: misc.hh:32
    \n-
    Definition: misc.hh:36
    \n-
    Definition: misc.hh:102
    \n-
    static const Matrix & identityMatrix()
    Definition: misc.hh:131
    \n-
    static const Vector & nullVector()
    Definition: misc.hh:136
    \n-
    GlobalMatrix Matrix
    Definition: misc.hh:106
    \n-
    GlobalVector Vector
    Definition: misc.hh:107
    \n+\n+
    Definition: elementinfo.hh:43
    \n+
    ElementInfo leafNeighbor(const int face) const
    Definition: elementinfo.hh:585
    \n+
    bool isLeaf() const
    Definition: elementinfo.hh:488
    \n+
    static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
    Definition: elementinfo.hh:752
    \n+
    ElementInfo child(int i) const
    Definition: elementinfo.hh:470
    \n+
    int level() const
    Definition: elementinfo.hh:533
    \n+
    bool mightVanish() const
    Definition: elementinfo.hh:526
    \n+
    static const int numFaces
    Definition: elementinfo.hh:56
    \n+
    int twist(int subEntity) const
    Definition: elementinfo.hh:605
    \n+
    int twistInNeighbor(int face) const
    Definition: elementinfo.hh:612
    \n+
    Alberta::MacroElement< dimension > MacroElement
    Definition: elementinfo.hh:58
    \n+
    BasicNodeProjection * boundaryProjection(int face) const
    Definition: elementinfo.hh:664
    \n+
    const MacroElement & macroElement() const
    Definition: elementinfo.hh:440
    \n+
    static const int maxLevelNeighbors
    Definition: elementinfo.hh:64
    \n+
    ElementInfo father() const
    Definition: elementinfo.hh:449
    \n+
    ElementInfo(const ElementInfo &other)
    Definition: elementinfo.hh:382
    \n+
    GeometryCacheProxy< dim > GeometryCache
    Definition: elementinfo.hh:67
    \n+
    ElementInfo & operator=(const ElementInfo &other)
    Definition: elementinfo.hh:405
    \n+
    bool hasLeafNeighbor(const int face) const
    Definition: elementinfo.hh:570
    \n+
    bool operator==(const ElementInfo &other) const
    Definition: elementinfo.hh:424
    \n+
    static const int dimension
    Definition: elementinfo.hh:53
    \n+
    void hierarchicTraverse(Functor &functor) const
    Definition: elementinfo.hh:695
    \n+
    int type() const
    Definition: elementinfo.hh:540
    \n+
    static const int maxNeighbors
    Definition: elementinfo.hh:62
    \n+
    void setMark(int refCount) const
    Definition: elementinfo.hh:561
    \n+
    ~ElementInfo()
    Definition: elementinfo.hh:397
    \n+
    const GlobalVector & coordinate(int vertex) const
    Definition: elementinfo.hh:685
    \n+
    static const int numVertices
    Definition: elementinfo.hh:55
    \n+
    int getMark() const
    Definition: elementinfo.hh:554
    \n+
    void leafTraverse(Functor &functor) const
    Definition: elementinfo.hh:708
    \n+
    Alberta::MeshPointer< dimension > MeshPointer
    Definition: elementinfo.hh:59
    \n+
    const Element * neighbor(int face) const
    Definition: elementinfo.hh:728
    \n+
    static ElementInfo createFake(const ALBERTA EL_INFO &elInfo)
    Definition: elementinfo.hh:773
    \n+
    ElementInfo()
    Definition: elementinfo.hh:310
    \n+
    int boundaryId(int face) const
    Definition: elementinfo.hh:635
    \n+
    bool operator!=(const ElementInfo &other) const
    Definition: elementinfo.hh:432
    \n+
    Alberta::FillFlags< dimension > FillFlags
    Definition: elementinfo.hh:60
    \n+
    ElementInfo(const MeshPointer &mesh, const MacroElement &macroElement, typename FillFlags::Flags fillFlags=FillFlags::standard)
    Definition: elementinfo.hh:319
    \n+
    AffineTransformation * transformation(int face) const
    Definition: elementinfo.hh:651
    \n+
    bool isBoundary(int face) const
    Definition: elementinfo.hh:620
    \n+
    int indexInFather() const
    Definition: elementinfo.hh:457
    \n+
    Seed seed() const
    Definition: elementinfo.hh:496
    \n+
    Element * el() const
    Definition: elementinfo.hh:737
    \n+
    const Element * element() const
    Definition: elementinfo.hh:721
    \n+
    ALBERTA EL_INFO & elInfo() const
    Definition: elementinfo.hh:744
    \n+
    MeshPointer mesh() const
    Definition: elementinfo.hh:519
    \n+
    GeometryCache geometryCache() const
    Definition: elementinfo.hh:140
    \n+
    bool hasCoordinates() const
    Definition: elementinfo.hh:679
    \n+
    int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], int(&faceInNeighbor)[maxLevelNeighbors]) const
    Definition: elementinfo.hh:596
    \n+
    ElementInfo(ElementInfo &&other)
    Definition: elementinfo.hh:389
    \n+
    ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags::Flags fillFlags=FillFlags::standard)
    Definition: elementinfo.hh:340
    \n+
    Definition: elementinfo.hh:185
    \n+
    InstancePtr & parent()
    Definition: elementinfo.hh:189
    \n+
    Alberta::GeometryCache< dim > geometryCache
    Definition: elementinfo.hh:199
    \n+
    ALBERTA EL_INFO elInfo
    Definition: elementinfo.hh:186
    \n+
    unsigned int refCount
    Definition: elementinfo.hh:187
    \n+
    Definition: elementinfo.hh:210
    \n+
    InstancePtr null()
    Definition: elementinfo.hh:907
    \n+
    ~Stack()
    Definition: elementinfo.hh:871
    \n+
    void release(InstancePtr &p)
    Definition: elementinfo.hh:897
    \n+
    Stack()
    Definition: elementinfo.hh:861
    \n+
    InstancePtr allocate()
    Definition: elementinfo.hh:884
    \n+
    Definition: elementinfo.hh:255
    \n+
    Seed(const int macroIndex, const int level, const unsigned long path)
    Definition: elementinfo.hh:260
    \n+
    Seed()
    Definition: elementinfo.hh:256
    \n+
    int level() const
    Definition: elementinfo.hh:287
    \n+
    bool isValid() const
    Definition: elementinfo.hh:284
    \n+
    unsigned long path() const
    Definition: elementinfo.hh:288
    \n+
    int macroIndex() const
    Definition: elementinfo.hh:286
    \n+
    Definition: geometrycache.hh:24
    \n+
    Definition: geometrycache.hh:91
    \n+
    Definition: macroelement.hh:24
    \n
    Definition: misc.hh:148
    \n-
    Definition: misc.hh:192
    \n
    Definition: misc.hh:231
    \n
    static const Flags nothing
    Definition: misc.hh:234
    \n-
    static const Flags nonPeriodic
    Definition: misc.hh:248
    \n
    static const Flags boundaryId
    Definition: misc.hh:246
    \n-
    static const Flags elementType
    Definition: misc.hh:244
    \n
    ALBERTA FLAGS Flags
    Definition: misc.hh:232
    \n-
    static const Flags projection
    Definition: misc.hh:242
    \n
    static const Flags coords
    Definition: misc.hh:236
    \n-
    static const Flags orientation
    Definition: misc.hh:240
    \n
    static const Flags standard
    Definition: misc.hh:256
    \n
    static const Flags neighbor
    Definition: misc.hh:238
    \n-
    static const Flags all
    Definition: misc.hh:250
    \n-
    static const Flags standardWithCoords
    Definition: misc.hh:253
    \n-
    Definition: misc.hh:269
    \n-
    static const int value
    Definition: misc.hh:270
    \n-\n-
    static int apply(const int i)
    Definition: misc.hh:287
    \n-
    static int apply(const int i)
    Definition: misc.hh:299
    \n-\n-
    static int apply(const int i)
    Definition: misc.hh:315
    \n-
    static int apply(const int i)
    Definition: misc.hh:325
    \n-
    static int apply(const int i)
    Definition: misc.hh:335
    \n-
    static int apply(const int i)
    Definition: misc.hh:347
    \n-
    Definition: misc.hh:362
    \n-
    int alberta2dune(int codim, int i) const
    Definition: misc.hh:397
    \n-
    int numSubEntities(int codim) const
    Definition: misc.hh:404
    \n-
    int dune2alberta(int codim, int i) const
    Definition: misc.hh:390
    \n-
    ~NumberingMap()
    Definition: misc.hh:381
    \n-
    NumberingMap()
    Definition: misc.hh:376
    \n-
    Definition: misc.hh:443
    \n-
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:448
    \n-
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:459
    \n-
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:472
    \n-
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:485
    \n-
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:497
    \n-
    Definition: misc.hh:532
    \n-
    static const int maxTwist
    Definition: misc.hh:536
    \n-
    static const int minTwist
    Definition: misc.hh:535
    \n
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:538
    \n-
    static const int numSubEntities
    Definition: misc.hh:533
    \n-
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:554
    \n-
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:575
    \n-
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:592
    \n-
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:619
    \n+
    Definition: albertagrid/projection.hh:208
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,892 +5,1216 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-misc.hh\n+elementinfo.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_MISC_HH\n- 6#define DUNE_ALBERTA_MISC_HH\n+ 5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH\n+ 6#define DUNE_ALBERTA_ELEMENTINFO_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13#include \n- 14\n- 15#include \n+ 13#include \n+ 14#include \n+ 15#include \n 16\n- 17#if HAVE_ALBERTA\n- 18\n- 19// should the coordinates be cached in a vector (required for ALBERTA 2.0)?\n- 20#ifndef DUNE_ALBERTA_CACHE_COORDINATES\n-21#define DUNE_ALBERTA_CACHE_COORDINATES 1\n- 22#endif\n- 23\n- 24namespace Dune\n- 25{\n- 26\n- 27 // Exceptions\n- 28 // ----------\n- 29\n-30 class AlbertaError\n- 31 : public Exception\n- 32 {};\n+ 17#include \n+ 18#include \n+ 19\n+ 20#if HAVE_ALBERTA\n+ 21\n+ 22namespace Dune\n+ 23{\n+ 24\n+ 25 namespace Alberta\n+ 26 {\n+ 27\n+ 28 // External Forward Declarations\n+ 29 // -----------------------------\n+ 30\n+ 31 template< int dim >\n+ 32 class MeshPointer;\n 33\n-34 class AlbertaIOError\n- 35 : public IOError\n- 36 {};\n+ 34 struct BasicNodeProjection;\n+ 35\n+ 36\n 37\n- 38\n- 39\n- 40 namespace Alberta\n- 41 {\n- 42\n- 43 // Import Types\n- 44 // ------------\n- 45\n-46 static const int dimWorld = DIM_OF_WORLD;\n- 47\n-48 typedef ALBERTA REAL Real;\n-49 typedef ALBERTA REAL_B LocalVector; // in barycentric coordinates\n-50 typedef ALBERTA REAL_D GlobalVector;\n-51 typedef ALBERTA REAL_DD GlobalMatrix;\n-52 typedef ALBERTA AFF_TRAFO AffineTransformation;\n-53 typedef ALBERTA MESH Mesh;\n-54 typedef ALBERTA EL Element;\n- 55\n-56 static const int meshRefined = MESH_REFINED;\n-57 static const int meshCoarsened = MESH_COARSENED;\n- 58\n-59 static const int InteriorBoundary = INTERIOR;\n-60 static const int DirichletBoundary = DIRICHLET;\n-61 typedef ALBERTA BNDRY_TYPE BoundaryId;\n- 62\n-63 typedef U_CHAR ElementType;\n- 64\n-65 typedef ALBERTA FE_SPACE DofSpace;\n- 66\n- 67\n- 68\n- 69 // Memory Manipulation Functions\n- 70 // -----------------------------\n+ 38 // ElementInfo\n+ 39 // -----------\n+ 40\n+ 41 template< int dim >\n+42 class ElementInfo\n+ 43 {\n+ 44 struct Instance;\n+ 45 class Stack;\n+ 46\n+ 47 template< int >\n+ 48 struct Library;\n+ 49\n+ 50 typedef Instance *InstancePtr;\n+ 51\n+ 52 public:\n+53 static const int dimension = dim;\n+ 54\n+55 static const int numVertices = NumSubEntities<_dimension,_dimension_>::\n+value;\n+56 static const int numFaces = NumSubEntities<_dimension,_1_>::value;\n+ 57\n+58 typedef Alberta::MacroElement<_dimension_> MacroElement;\n+59 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n+60 typedef Alberta::FillFlags<_dimension_> FillFlags;\n+ 61\n+62 static const int maxNeighbors = N_NEIGH_MAX;\n+ 63\n+64 static const int maxLevelNeighbors = Library< dimWorld >::maxLevelNeighbors;\n+ 65\n+ 66#if !DUNE_ALBERTA_CACHE_COORDINATES\n+67 typedef GeometryCacheProxy<_dim_> GeometryCache;\n+ 68#endif\n+ 69\n+ 70 struct Seed;\n 71\n- 72 template< class Data >\n-73 inline Data *memAlloc ( size_t size )\n- 74 {\n- 75 return MEM_ALLOC( size, Data );\n- 76 }\n- 77\n- 78 template< class Data >\n-79 inline Data *memCAlloc ( size_t size )\n- 80 {\n- 81 return MEM_CALLOC( size, Data );\n- 82 }\n+ 72 private:\n+ 73 explicit ElementInfo ( const InstancePtr &instance );\n+ 74\n+ 75 public:\n+76 ElementInfo ();\n+77 ElementInfo ( const MeshPointer &mesh, const MacroElement ¯oElement,\n+ 78 typename FillFlags::Flags fillFlags = FillFlags::standard );\n+79 ElementInfo ( const MeshPointer &mesh, const Seed &seed,\n+ 80 typename FillFlags::Flags fillFlags = FillFlags::standard );\n+81 ElementInfo ( const ElementInfo &other );\n+82 ElementInfo ( ElementInfo&& other );\n 83\n- 84 template< class Data >\n-85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )\n- 86 {\n- 87 return MEM_REALLOC( ptr, oldSize, newSize, Data );\n- 88 }\n- 89\n- 90 template< class Data >\n-91 inline void memFree ( Data *ptr, size_t size )\n- 92 {\n- 93 return MEM_FREE( ptr, size, Data );\n- 94 }\n- 95\n- 96\n- 97\n- 98 // GlobalSpace\n- 99 // -----------\n- 100\n-101 class GlobalSpace\n- 102 {\n- 103 typedef GlobalSpace This;\n- 104\n- 105 public:\n-106 typedef GlobalMatrix Matrix;\n-107 typedef GlobalVector Vector;\n- 108\n- 109 private:\n- 110 Matrix identityMatrix_;\n- 111 Vector nullVector_;\n- 112\n- 113 GlobalSpace ()\n- 114 {\n- 115 for( int i = 0; i < dimWorld; ++i )\n- 116 {\n- 117 for( int j = 0; j < dimWorld; ++j )\n- 118 identityMatrix_[ i ][ j ] = Real( 0 );\n- 119 identityMatrix_[ i ][ i ] = Real( 1 );\n- 120 nullVector_[ i ] = Real( 0 );\n- 121 }\n- 122 }\n- 123\n- 124 static This &instance ()\n- 125 {\n- 126 static This theInstance;\n- 127 return theInstance;\n- 128 }\n- 129\n- 130 public:\n-131 static const Matrix &identityMatrix ()\n- 132 {\n- 133 return instance().identityMatrix_;\n- 134 }\n- 135\n-136 static const Vector &nullVector ()\n- 137 {\n- 138 return instance().nullVector_;\n- 139 }\n- 140 };\n- 141\n- 142\n- 143\n- 144 // NumSubEntities\n- 145 // --------------\n- 146\n- 147 template< int dim, int codim >\n-148 struct NumSubEntities;\n- 149\n- 150 template< int dim >\n-151 struct NumSubEntities< dim, 0 >\n- 152 {\n-153 static const int value = 1;\n- 154 };\n- 155\n- 156 template< int dim >\n-157 struct NumSubEntities< dim, dim >\n- 158 {\n-159 static const int value = dim+1;\n- 160 };\n+84 ~ElementInfo ();\n+ 85\n+86 ElementInfo &operator=( const ElementInfo &other );\n+87 ElementInfo &operator=( ElementInfo &&other );\n+ 88\n+89 explicit operator bool () const { return (instance_ != null()); }\n+ 90\n+91 bool operator==( const ElementInfo &other ) const;\n+92 bool operator!=( const ElementInfo &other ) const;\n+ 93\n+94 const MacroElement ¯oElement () const;\n+95 ElementInfo father () const;\n+96 int indexInFather () const;\n+97 ElementInfo child ( int i ) const;\n+98 bool isLeaf () const;\n+ 99\n+100 Seed seed () const;\n+ 101\n+102 MeshPointer mesh () const;\n+ 103\n+104 bool mightVanish () const;\n+ 105\n+106 int level () const;\n+ 107 // see ALBERTA documentation for definition of element type\n+ 108 // values are 0, 1, 2\n+109 int type () const;\n+ 110\n+111 int getMark () const;\n+112 void setMark ( int refCount ) const;\n+ 113\n+114 bool hasLeafNeighbor ( const int face ) const;\n+115 ElementInfo leafNeighbor ( const int face ) const;\n+ 116\n+ 117 /* obtain all level neighbors of a face\n+ 118 *\n+ 119 * param[in] face face for which the neighbors are desired\n+ 120 * param[out] neighbor array storing the neighbors\n+ 121 * param[out] faceInNeighbor array storing the faces in neighbor\n+ 122 * (-1, if this neighbor does not exist)\n+ 123 *\n+ 124 * returns (potential) number of neighbors (i.e., the number of valid\n+ 125 * entries in the output arrays\n+ 126 */\n+127 int levelNeighbors ( const int face, ElementInfo (&neighbor)\n+[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const;\n+ 128\n+ 129 template< int codim >\n+130 int twist ( int subEntity ) const;\n+131 int twistInNeighbor ( int face ) const;\n+132 bool isBoundary ( int face ) const;\n+133 int boundaryId ( int face ) const;\n+134 AffineTransformation *transformation ( int face ) const;\n+135 BasicNodeProjection *boundaryProjection ( int face ) const;\n+ 136\n+137 bool hasCoordinates () const;\n+138 const GlobalVector &coordinate ( int vertex ) const;\n+ 139#if !DUNE_ALBERTA_CACHE_COORDINATES\n+140 GeometryCache geometryCache () const\n+ 141 {\n+ 142 return GeometryCache( instance_->geometryCache, instance_->elInfo );\n+ 143 }\n+ 144#endif\n+ 145\n+ 146 template< class Functor >\n+147 void hierarchicTraverse ( Functor &functor ) const;\n+ 148\n+ 149 template< class Functor >\n+150 void leafTraverse ( Functor &functor ) const;\n+ 151\n+152 const Element *element () const;\n+153 const Element *neighbor ( int face ) const;\n+154 Element *el () const;\n+155 ALBERTA EL_INFO &elInfo () const;\n+ 156\n+ 157 static ElementInfo\n+158 createFake ( const MeshPointer &mesh,\n+ 159 const Element *element, int level, int type = 0 );\n+160 static ElementInfo createFake ( const ALBERTA EL_INFO &elInfo );\n 161\n- 162 template<>\n-163 struct NumSubEntities< 0, 0 >\n- 164 {\n-165 static const int value = 1;\n- 166 };\n- 167\n- 168 template<>\n-169 struct NumSubEntities< 2, 1 >\n- 170 {\n-171 static const int value = 3;\n- 172 };\n- 173\n- 174 template<>\n-175 struct NumSubEntities< 3, 1 >\n- 176 {\n-177 static const int value = 4;\n- 178 };\n+ 162 private:\n+ 163 static bool isLeaf ( Element *element );\n+ 164 static bool mightVanish ( Element *element, int depth );\n+ 165\n+ 166 static void fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA\n+EL_INFO &elInfo );\n+ 167 static void fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA\n+EL_INFO &elInfo );\n+ 168\n+ 169 void addReference () const;\n+ 170 void removeReference () const;\n+ 171\n+ 172 static InstancePtr null ();\n+ 173 static Stack &stack ();\n+ 174\n+ 175 InstancePtr instance_;\n+ 176 };\n+ 177\n+ 178\n 179\n- 180 template<>\n-181 struct NumSubEntities< 3, 2 >\n- 182 {\n-183 static const int value = 6;\n- 184 };\n- 185\n- 186\n- 187\n- 188 // CodimType\n- 189 // ---------\n- 190\n- 191 template< int dim, int codim >\n-192 struct CodimType;\n+ 180 // ElementInfo::Instance\n+ 181 // ---------------------\n+ 182\n+ 183 template< int dim >\n+184 struct ElementInfo< dim >::Instance\n+ 185 {\n+186 ALBERTA EL_INFO elInfo;\n+187 unsigned int refCount;\n+ 188\n+189 InstancePtr &parent ()\n+ 190 {\n+ 191 return parent_;\n+ 192 }\n 193\n- 194 template< int dim >\n-195 struct CodimType< dim, 0 >\n- 196 {\n-197 static const int value = CENTER;\n- 198 };\n- 199\n- 200 template< int dim >\n-201 struct CodimType< dim, dim >\n- 202 {\n-203 static const int value = VERTEX;\n- 204 };\n- 205\n- 206 template<>\n-207 struct CodimType< 2, 1 >\n- 208 {\n-209 static const int value = EDGE;\n- 210 };\n- 211\n- 212 template<>\n-213 struct CodimType< 3, 1 >\n- 214 {\n-215 static const int value = FACE;\n- 216 };\n+ 194 private:\n+ 195 InstancePtr parent_;\n+ 196\n+ 197#if !DUNE_ALBERTA_CACHE_COORDINATES\n+ 198 public:\n+199 Alberta::GeometryCache<_dim_> geometryCache;\n+ 200#endif\n+ 201 };\n+ 202\n+ 203\n+ 204\n+ 205 // ElementInfo::Stack\n+ 206 // ------------------\n+ 207\n+ 208 template< int dim >\n+209 class ElementInfo< dim >::Stack\n+ 210 {\n+ 211 InstancePtr top_;\n+ 212 Instance null_;\n+ 213\n+ 214 public:\n+215 Stack ();\n+216 ~Stack ();\n 217\n- 218 template<>\n-219 struct CodimType< 3, 2 >\n- 220 {\n-221 static const int value = EDGE;\n- 222 };\n+218 InstancePtr allocate ();\n+219 void release ( InstancePtr &p );\n+220 InstancePtr null ();\n+ 221 };\n+ 222\n 223\n 224\n- 225\n- 226 // FillFlags\n- 227 // ---------\n- 228\n- 229 template< int dim >\n-230 struct FillFlags\n+ 225 // ElementInfo::Library\n+ 226 // --------------------\n+ 227\n+ 228 template< int dim >\n+ 229 template< int >\n+ 230 struct ElementInfo< dim >::Library\n 231 {\n-232 typedef ALBERTA FLAGS Flags;\n+ 232 typedef Alberta::ElementInfo<_dim_> ElementInfo;\n 233\n-234 static const Flags nothing = FILL_NOTHING;\n+ 234 static const int maxLevelNeighbors = (1 << (dim-1));\n 235\n-236 static const Flags coords = FILL_COORDS;\n- 237\n-238 static const Flags neighbor = FILL_NEIGH;\n- 239\n-240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION :\n-FILL_NOTHING);\n- 241\n-242 static const Flags projection = FILL_PROJECTION;\n- 243\n-244 static const Flags elementType = FILL_NOTHING;\n- 245\n-246 static const Flags boundaryId = FILL_MACRO_WALLS;\n+ 236 static int\n+ 237 leafNeighbor ( const ElementInfo &element, const int face, ElementInfo\n+&neighbor );\n+ 238\n+ 239 static int\n+ 240 levelNeighbors ( const ElementInfo &element, const int face,\n+ 241 ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)\n+[ maxLevelNeighbors ] );\n+ 242\n+ 243 private:\n+ 244 static int\n+ 245 macroNeighbor ( const ElementInfo &element, const int face, ElementInfo\n+&neighbor );\n+ 246 };\n 247\n-248 static const Flags nonPeriodic = FILL_NON_PERIODIC;\n+ 248\n 249\n-250 static const Flags all = coords | neighbor | boundaryId | nonPeriodic\n- 251 | orientation | projection | elementType;\n+ 250 // ElementInfo::Seed\n+ 251 // -----------------\n 252\n-253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;\n- 254\n- 255#if DUNE_ALBERTA_CACHE_COORDINATES\n-256 static const Flags standard = standardWithCoords & ~coords;\n- 257#else\n- 258 static const Flags standard = standardWithCoords;\n- 259#endif\n- 260 };\n- 261\n- 262\n+ 253 template< int dim >\n+254 struct ElementInfo< dim >::Seed\n+ 255 {\n+256 Seed ()\n+ 257 : macroIndex_( -1 ), level_( 0 ), path_( 0 )\n+ 258 {}\n+ 259\n+260 Seed ( const int macroIndex, const int level, const unsigned long path )\n+ 261 : macroIndex_( macroIndex ), level_( level ), path_( path )\n+ 262 {}\n 263\n- 264 // RefinementEdge\n- 265 // --------------\n- 266\n- 267 template< int dim >\n-268 struct RefinementEdge\n- 269 {\n-270 static const int value = 0;\n- 271 };\n- 272\n- 273 template<>\n-274 struct RefinementEdge< 2 >\n- 275 {\n-276 static const int value = 2;\n- 277 };\n+264 bool operator==( const Seed &other ) const\n+ 265 {\n+ 266 return (macroIndex() == other.macroIndex()) && (level() == other.level())\n+&& (path() == other.path());\n+ 267 }\n+ 268\n+269 bool operator< ( const Seed &other ) const\n+ 270 {\n+ 271 const bool ml = (macroIndex() < other.macroIndex());\n+ 272 const bool me = (macroIndex() == other.macroIndex());\n+ 273 const bool ll = (level() < other.level());\n+ 274 const bool le = (level() == other.level());\n+ 275 const bool pl = (path() < other.path());\n+ 276 return ml | (me & (ll | (le & pl)));\n+ 277 }\n 278\n- 279\n- 280\n- 281 // Dune2AlbertaNumbering\n- 282 // ---------------------\n+279 bool operator!=( const Seed &other ) const { return !(*this == other); }\n+280 bool operator<= ( const Seed &other ) const { return !(other < *this); }\n+281 bool operator> ( const Seed &other ) const { return (other < *this); }\n+282 bool operator>= ( const Seed &other ) const { return !(*this < other); }\n 283\n- 284 template< int dim, int codim >\n-285 struct Dune2AlbertaNumbering\n- 286 {\n-287 static int apply ( const int i )\n- 288 {\n- 289 assert( (i >= 0) && (i < NumSubEntities<_dim,_codim_>::value) );\n- 290 return i;\n- 291 }\n- 292 };\n- 293\n- 294 template<>\n-295 struct Dune2AlbertaNumbering< 3, 2 >\n- 296 {\n-297 static const int numSubEntities = NumSubEntities<_3,_2_>::value;\n- 298\n-299 static int apply ( const int i )\n- 300 {\n- 301 assert( (i >= 0) && (i < numSubEntities) );\n- 302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 };\n- 303 return dune2alberta[ i ];\n- 304 }\n- 305 };\n- 306\n+284 bool isValid ( ) const { return macroIndex_ != -1; }\n+ 285\n+286 int macroIndex () const { return macroIndex_; }\n+287 int level () const { return level_; }\n+288 unsigned long path () const { return path_; }\n+ 289\n+ 290 private:\n+ 291 int macroIndex_;\n+ 292 int level_;\n+ 293 unsigned long path_;\n+ 294 };\n+ 295\n+ 296\n+ 297\n+ 298 // Implementation of ElementInfo\n+ 299 // -----------------------------\n+ 300\n+ 301 template< int dim >\n+ 302 inline ElementInfo<_dim_>::ElementInfo ( const InstancePtr &instance )\n+ 303 : instance_( instance )\n+ 304 {\n+ 305 addReference();\n+ 306 }\n 307\n 308\n- 309 // Generic2AlbertaNumbering\n- 310 // ------------------------\n- 311\n- 312 template< int dim, int codim >\n-313 struct Generic2AlbertaNumbering\n- 314 {\n-315 static int apply ( const int i )\n- 316 {\n- 317 assert( (i >= 0) && (i < NumSubEntities<_dim,_codim_>::value) );\n- 318 return i;\n- 319 }\n- 320 };\n- 321\n- 322 template< int dim >\n-323 struct Generic2AlbertaNumbering< dim, 1 >\n- 324 {\n-325 static int apply ( const int i )\n- 326 {\n- 327 assert( (i >= 0) && (i < NumSubEntities<_dim,_1_>::value) );\n- 328 return dim - i;\n- 329 }\n- 330 };\n- 331\n- 332 template<>\n-333 struct Generic2AlbertaNumbering< 1, 1 >\n- 334 {\n-335 static int apply ( const int i )\n- 336 {\n- 337 assert( (i >= 0) && (i < NumSubEntities<_1,_1_>::value) );\n- 338 return i;\n- 339 }\n- 340 };\n- 341\n- 342 template<>\n-343 struct Generic2AlbertaNumbering< 3, 2 >\n- 344 {\n-345 static const int numSubEntities = NumSubEntities<_3,_2_>::value;\n+ 309 template< int dim >\n+310 inline ElementInfo<_dim_>::ElementInfo ()\n+ 311 : instance_( null() )\n+ 312 {\n+ 313 addReference();\n+ 314 }\n+ 315\n+ 316\n+ 317 template< int dim >\n+ 318 inline ElementInfo<_dim_>\n+319::ElementInfo ( const MeshPointer &mesh, const MacroElement ¯oElement,\n+ 320 typename FillFlags::Flags fillFlags )\n+ 321 {\n+ 322 instance_ = stack().allocate();\n+ 323 instance_->parent() = null();\n+ 324 ++(instance_->parent()->refCount);\n+ 325\n+ 326 addReference();\n+ 327\n+ 328 elInfo().fill_flag = fillFlags;\n+ 329\n+ 330 // Alberta fills opp_vertex only if there is a neighbor\n+ 331 for( int k = 0; k < maxNeighbors; ++k )\n+ 332 elInfo().opp_vertex[ k ] = -1;\n+ 333\n+ 334 fill( mesh, ¯oElement, elInfo() );\n+ 335 }\n+ 336\n+ 337\n+ 338 template< int dim >\n+ 339 inline ElementInfo<_dim_>\n+340::ElementInfo ( const MeshPointer &mesh, const Seed &seed,\n+ 341 typename FillFlags::Flags fillFlags )\n+ 342 {\n+ 343 instance_ = stack().allocate();\n+ 344 instance_->parent() = null();\n+ 345 ++(instance_->parent()->refCount);\n 346\n-347 static int apply ( const int i )\n- 348 {\n- 349 assert( (i >= 0) && (i < numSubEntities) );\n- 350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };\n- 351 return generic2alberta[ i ];\n- 352 }\n- 353 };\n- 354\n+ 347 addReference();\n+ 348\n+ 349 // fill in macro element info\n+ 350 elInfo().fill_flag = fillFlags;\n+ 351\n+ 352 // Alberta fills opp_vertex only if there is a neighbor\n+ 353 for( int k = 0; k < maxNeighbors; ++k )\n+ 354 elInfo().opp_vertex[ k ] = -1;\n 355\n- 356\n- 357 // NumberingMap\n- 358 // ------------\n- 359\n- 360 template< int dim, template< int, int > class Numbering =\n-Generic2AlbertaNumbering >\n-361 class NumberingMap\n- 362 {\n- 363 typedef NumberingMap<_dim,_Numbering_> This;\n+ 356 fill( mesh, ((Mesh *)mesh)->macro_els + seed.macroIndex(), elInfo() );\n+ 357\n+ 358 // traverse the seed's path\n+ 359 unsigned long path = seed.path();\n+ 360 for( int i = 0; i < seed.level(); ++i )\n+ 361 {\n+ 362 InstancePtr child = stack().allocate();\n+ 363 child->parent() = instance_;\n 364\n- 365 template< int codim >\n- 366 struct Initialize;\n- 367\n- 368 int *dune2alberta_[ dim+1 ];\n- 369 int *alberta2dune_[ dim+1 ];\n- 370 int numSubEntities_[ dim+1 ];\n- 371\n- 372 NumberingMap ( const This & );\n- 373 This &operator= ( const This & );\n- 374\n- 375 public:\n-376 NumberingMap ()\n- 377 {\n- 378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i )\n-{ Initialize< i >::apply( *this ); } );\n- 379 }\n+ 365 // Alberta fills opp_vertex only if there is a neighbor\n+ 366 for( int k = 0; k < maxNeighbors; ++k )\n+ 367 child->elInfo.opp_vertex[ k ] = -2;\n+ 368\n+ 369 fill( path & 1, elInfo(), child->elInfo );\n+ 370\n+ 371 instance_ = child;\n+ 372 addReference();\n+ 373\n+ 374 path = path >> 1;\n+ 375 }\n+ 376\n+ 377 assert( this->seed() == seed );\n+ 378 }\n+ 379\n 380\n-381 ~NumberingMap ()\n- 382 {\n- 383 for( int codim = 0; codim <= dim; ++codim )\n+ 381 template< int dim >\n+382 inline ElementInfo<_dim_>::ElementInfo ( const ElementInfo &other )\n+ 383 : instance_( other.instance_ )\n 384 {\n- 385 delete[]( dune2alberta_[ codim ] );\n- 386 delete[]( alberta2dune_[ codim ] );\n- 387 }\n- 388 }\n- 389\n-390 int dune2alberta ( int codim, int i ) const\n+ 385 addReference();\n+ 386 }\n+ 387\n+ 388 template< int dim >\n+389 inline ElementInfo<_dim_>::ElementInfo ( ElementInfo &&other )\n+ 390 : instance_( NULL )\n 391 {\n- 392 assert( (codim >= 0) && (codim <= dim) );\n- 393 assert( (i >= 0) && (i < numSubEntities( codim )) );\n- 394 return dune2alberta_[ codim ][ i ];\n- 395 }\n- 396\n-397 int alberta2dune ( int codim, int i ) const\n+ 392 using std::swap;\n+ 393 swap( instance_, other.instance_ );\n+ 394 }\n+ 395\n+ 396 template< int dim >\n+397 inline ElementInfo<_dim_>::~ElementInfo ()\n 398 {\n- 399 assert( (codim >= 0) && (codim <= dim) );\n- 400 assert( (i >= 0) && (i < numSubEntities( codim )) );\n- 401 return alberta2dune_[ codim ][ i ];\n- 402 }\n- 403\n-404 int numSubEntities ( int codim ) const\n- 405 {\n- 406 assert( (codim >= 0) && (codim <= dim) );\n- 407 return numSubEntities_[ codim ];\n- 408 }\n- 409 };\n- 410\n- 411\n+ 399 removeReference();\n+ 400 }\n+ 401\n+ 402\n+ 403 template< int dim >\n+ 404 inline ElementInfo<_dim_> &\n+405 ElementInfo<_dim_>::operator=( const ElementInfo<_dim_> &other )\n+ 406 {\n+ 407 other.addReference();\n+ 408 removeReference();\n+ 409 instance_ = other.instance_;\n+ 410 return *this;\n+ 411 }\n 412\n- 413 // NumberingMap::Initialize\n- 414 // ------------------------\n- 415\n- 416 template< int dim, template< int, int > class Numbering >\n- 417 template< int codim >\n- 418 struct NumberingMap< dim, Numbering >::Initialize\n- 419 {\n- 420 static const int numSubEntities = NumSubEntities< dim, codim >::value;\n+ 413 template< int dim >\n+ 414 inline ElementInfo<_dim_> &\n+415 ElementInfo<_dim_>::operator=( ElementInfo<_dim_> &&other )\n+ 416 {\n+ 417 using std::swap;\n+ 418 swap( instance_, other.instance_ );\n+ 419 return *this;\n+ 420 }\n 421\n- 422 static void apply ( NumberingMap< dim, Numbering > &map )\n- 423 {\n- 424 map.numSubEntities_[ codim ] = numSubEntities;\n- 425 map.dune2alberta_[ codim ] = new int[ numSubEntities ];\n- 426 map.alberta2dune_[ codim ] = new int[ numSubEntities ];\n- 427\n- 428 for( int i = 0; i < numSubEntities; ++i )\n- 429 {\n- 430 const int j = Numbering< dim, codim >::apply( i );\n- 431 map.dune2alberta_[ codim ][ i ] = j;\n- 432 map.alberta2dune_[ codim ][ j ] = i;\n- 433 }\n- 434 }\n- 435 };\n+ 422 template< int dim >\n+ 423 inline bool\n+424 ElementInfo<_dim_>::operator==( const ElementInfo<_dim_> &other ) const\n+ 425 {\n+ 426 return (instance_->elInfo.el == other.instance_->elInfo.el);\n+ 427 }\n+ 428\n+ 429\n+ 430 template< int dim >\n+ 431 inline bool\n+432 ElementInfo<_dim_>::operator!=( const ElementInfo<_dim_> &other ) const\n+ 433 {\n+ 434 return (instance_->elInfo.el != other.instance_->elInfo.el);\n+ 435 }\n 436\n 437\n- 438\n- 439 // MapVertices\n- 440 // -----------\n- 441\n- 442 template< int dim, int codim >\n-443 struct MapVertices;\n- 444\n- 445 template< int dim >\n-446 struct MapVertices< dim, 0 >\n- 447 {\n-448 static int apply ( int subEntity, int vertex )\n- 449 {\n- 450 assert( subEntity == 0 );\n- 451 assert( (vertex >= 0) && (vertex <= NumSubEntities<_dim,_dim_>::value) );\n- 452 return vertex;\n+ 438 template< int dim >\n+ 439 inline const typename ElementInfo<_dim_>::MacroElement &\n+440 ElementInfo<_dim_>::macroElement () const\n+ 441 {\n+ 442 assert( !!(*this) );\n+ 443 assert( elInfo().macro_el != NULL );\n+ 444 return static_cast< const MacroElement & >( *(elInfo().macro_el) );\n+ 445 }\n+ 446\n+ 447\n+ 448 template< int dim >\n+449 inline ElementInfo<_dim_> ElementInfo<_dim_>::father () const\n+ 450 {\n+ 451 assert( !!(*this) );\n+ 452 return ElementInfo<_dim_>( instance_->parent() );\n 453 }\n- 454 };\n+ 454\n 455\n- 456 template<>\n-457 struct MapVertices< 2, 1 >\n+ 456 template< int dim >\n+457 inline int ElementInfo<_dim_>::indexInFather () const\n 458 {\n-459 static int apply ( int subEntity, int vertex )\n- 460 {\n- 461 assert( (subEntity >= 0) && (subEntity < 3) );\n- 462 assert( (vertex >= 0) && (vertex < 2) );\n- 463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} };\n- 464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} };\n- 465 return map[ subEntity ][ vertex ];\n+ 459 const Element *element = elInfo().el;\n+ 460 const Element *father = elInfo().parent->el;\n+ 461 assert( father != NULL );\n+ 462\n+ 463 const int index = (father->child[ 0 ] == element ? 0 : 1);\n+ 464 assert( father->child[ index ] == element );\n+ 465 return index;\n 466 }\n- 467 };\n+ 467\n 468\n- 469 template<>\n-470 struct MapVertices< 3, 1 >\n+ 469 template< int dim >\n+470 inline ElementInfo<_dim_> ElementInfo<_dim_>::child ( int i ) const\n 471 {\n-472 static int apply ( int subEntity, int vertex )\n- 473 {\n- 474 assert( (subEntity >= 0) && (subEntity < 4) );\n- 475 assert( (vertex >= 0) && (vertex < 3) );\n- 476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} };\n- 477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} };\n- 478 return map[ subEntity ][ vertex ];\n- 479 }\n- 480 };\n+ 472 assert( !isLeaf() );\n+ 473\n+ 474 InstancePtr child = stack().allocate();\n+ 475 child->parent() = instance_;\n+ 476 addReference();\n+ 477\n+ 478 // Alberta fills opp_vertex only if there is a neighbor\n+ 479 for( int k = 0; k < maxNeighbors; ++k )\n+ 480 child->elInfo.opp_vertex[ k ] = -2;\n 481\n- 482 template<>\n-483 struct MapVertices< 3, 2 >\n- 484 {\n-485 static int apply ( int subEntity, int vertex )\n- 486 {\n- 487 assert( (subEntity >= 0) && (subEntity < 6) );\n- 488 assert( (vertex >= 0) && (vertex < 2) );\n- 489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3},\n-{2,3} };\n- 490 return map[ subEntity ][ vertex ];\n- 491 }\n- 492 };\n+ 482 fill( i, elInfo(), child->elInfo );\n+ 483 return ElementInfo<_dim_>( child );\n+ 484 }\n+ 485\n+ 486\n+ 487 template< int dim >\n+488 inline bool ElementInfo<_dim_>::isLeaf () const\n+ 489 {\n+ 490 assert( !(*this) == false );\n+ 491 return isLeaf( el() );\n+ 492 }\n 493\n- 494 template< int dim >\n-495 struct MapVertices< dim, dim >\n- 496 {\n-497 static int apply ( int subEntity, int vertex )\n- 498 {\n- 499 assert( (subEntity >= 0) && (subEntity < NumSubEntities<_dim,_1_>::value)\n-);\n- 500 assert( vertex == 0 );\n- 501 return subEntity;\n- 502 }\n- 503 };\n- 504\n- 505\n- 506\n- 507 // Twist\n- 508 // -----\n- 509\n- 510 // ******************************************************************\n- 511 // Meaning of the twist (same as in ALU)\n- 512 // -------------------------------------\n- 513 //\n- 514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face\n- 515 // (here, we assume their indices to be increasing). Denote by k the\n- 516 // local number of a vertex v within the element and by t the twist.\n- 517 // Then, v = v_j, where j is computed by the following formula:\n- 518 //\n- 519 // / (2n + 1 - k + t) % n, if t < 0\n- 520 // j = <\n- 521 // \\ (k + t) % n, if t >= 0\n- 522 //\n- 523 // Note: We use the order of the 0-th vertex dof to assign the twist.\n- 524 // This is ok for two reasons:\n- 525 // - ALBERTA preserves the relative order of the dofs during\n- 526 // dof compression.\n- 527 // - ALBERTA enforces the first vertex dof admin to be periodic.\n- 528 // ******************************************************************\n- 529\n- 530 template< int dim, int subdim >\n-531 struct Twist\n- 532 {\n-533 static const int numSubEntities = NumSubEntities< dim, dim-subdim >::value;\n- 534\n-535 static const int minTwist = 0;\n-536 static const int maxTwist = 0;\n+ 494\n+ 495 template< int dim >\n+496 inline typename ElementInfo<_dim_>::Seed ElementInfo<_dim_>::seed () const\n+ 497 {\n+ 498 assert( !!(*this) );\n+ 499\n+ 500 int level = 0;\n+ 501 unsigned long path = 0;\n+ 502 for( InstancePtr p = instance_; p->parent() != null(); p = p->parent() )\n+ 503 {\n+ 504 const Element *element = p->elInfo.el;\n+ 505 const Element *father = p->parent()->elInfo.el;\n+ 506 const unsigned long child = static_cast< unsigned long >( father->child[ 1\n+] == element );\n+ 507 path = (path << 1) | child;\n+ 508 ++level;\n+ 509 }\n+ 510\n+ 511 if( level != elInfo().level )\n+ 512 DUNE_THROW( NotImplemented, \"Seed for fake elements not implemented.\" );\n+ 513\n+ 514 return Seed( macroElement().index, level, path );\n+ 515 }\n+ 516\n+ 517\n+ 518 template< int dim >\n+519 inline typename ElementInfo<_dim_>::MeshPointer ElementInfo<_dim_>::mesh ()\n+const\n+ 520 {\n+ 521 return MeshPointer( elInfo().mesh );\n+ 522 }\n+ 523\n+ 524\n+ 525 template< int dim >\n+526 inline bool ElementInfo<_dim_>::mightVanish () const\n+ 527 {\n+ 528 return mightVanish( el(), 0 );\n+ 529 }\n+ 530\n+ 531\n+ 532 template< int dim >\n+533 inline int ElementInfo<_dim_>::level () const\n+ 534 {\n+ 535 return elInfo().level;\n+ 536 }\n 537\n-538 static int twist ( [[maybe_unused]] const Element *element,\n- 539 [[maybe_unused]] int subEntity )\n- 540 {\n- 541 assert( (subEntity >= 0) && (subEntity < numSubEntities) );\n+ 538\n+ 539 template< int dim >\n+540 inline int ElementInfo<_dim_>::type () const\n+ 541 {\n 542 return 0;\n 543 }\n- 544 };\n+ 544\n 545\n- 546 template< int dim >\n-547 struct Twist< dim, 1 >\n+ 546 template<>\n+547 inline int ElementInfo<_3_>::type () const\n 548 {\n-549 static const int numSubEntities = NumSubEntities< dim, dim-1 >::value;\n- 550\n-551 static const int minTwist = 0;\n-552 static const int maxTwist = 1;\n- 553\n-554 static int twist ( const Element *element, int subEntity )\n+ 549 return instance_->elInfo.el_type;\n+ 550 }\n+ 551\n+ 552\n+ 553 template< int dim >\n+554 inline int ElementInfo<_dim_>::getMark () const\n 555 {\n- 556 assert( (subEntity >= 0) && (subEntity < numSubEntities) );\n- 557 const int numVertices = NumSubEntities<_1,_1_>::value;\n- 558 int dof[ numVertices ];\n- 559 for( int i = 0; i < numVertices; ++i )\n- 560 {\n- 561 const int j = MapVertices<_dim,_dim-1_>::apply( subEntity, i );\n- 562 dof[ i ] = element->dof[ j ][ 0 ];\n- 563 }\n- 564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1);\n- 565 }\n- 566 };\n+ 556 return el()->mark;\n+ 557 }\n+ 558\n+ 559\n+ 560 template< int dim >\n+561 inline void ElementInfo<_dim_>::setMark ( int refCount ) const\n+ 562 {\n+ 563 assert( isLeaf() );\n+ 564 assert( (refCount >= -128) && (refCount < 127) );\n+ 565 el()->mark = refCount;\n+ 566 }\n 567\n 568\n- 569 template<>\n-570 struct Twist< 1, 1 >\n+ 569 template< int dim >\n+570 inline bool ElementInfo<_dim_>::hasLeafNeighbor ( const int face ) const\n 571 {\n-572 static const int minTwist = 0;\n-573 static const int maxTwist = 0;\n+ 572 assert( !!(*this) );\n+ 573 assert( (face >= 0) && (face < maxNeighbors) );\n 574\n-575 static int twist ( [[maybe_unused]] const Element *element,\n- 576 [[maybe_unused]] int subEntity )\n- 577 {\n- 578 assert( subEntity == 0 );\n- 579 return 0;\n- 580 }\n- 581 };\n+ 575 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n+ 576 const int macroFace = elInfo().macro_wall[ face ];\n+ 577 if( macroFace >= 0 )\n+ 578 return (macroElement().neighbor( macroFace ) != NULL);\n+ 579 else\n+ 580 return true;\n+ 581 }\n 582\n 583\n 584 template< int dim >\n-585 struct Twist< dim, 2 >\n+585 inline ElementInfo<_dim_> ElementInfo<_dim_>::leafNeighbor ( const int face\n+) const\n 586 {\n-587 static const int numSubEntities = NumSubEntities< dim, dim-2 >::value;\n- 588\n-589 static const int minTwist = -3;\n-590 static const int maxTwist = 2;\n- 591\n-592 static int twist ( const Element *element, int subEntity )\n- 593 {\n- 594 assert( (subEntity >= 0) && (subEntity < numSubEntities) );\n- 595 const int numVertices = NumSubEntities<_2,_2_>::value;\n- 596 int dof[ numVertices ];\n- 597 for( int i = 0; i < numVertices; ++i )\n- 598 {\n- 599 const int j = MapVertices<_dim,_dim-2_>::apply( subEntity, i );\n- 600 dof[ i ] = element->dof[ j ][ 0 ];\n- 601 }\n+ 587 assert( (face >= 0) && (face < numFaces) );\n+ 588 ElementInfo neighbor;\n+ 589 Library< dimWorld >::leafNeighbor( *this, face, neighbor );\n+ 590 return neighbor;\n+ 591 }\n+ 592\n+ 593\n+ 594 template< int dim >\n+ 595 inline int ElementInfo<_dim_>\n+596::levelNeighbors ( const int face, ElementInfo (&neighbor)\n+[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const\n+ 597 {\n+ 598 assert( (face >= 0) && (face < numFaces) );\n+ 599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor,\n+faceInNeighbor );\n+ 600 }\n+ 601\n 602\n- 603 const int twist[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 };\n- 604 const int k = int( dof[ 0 ] < dof[ 1 ] )\n- 605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1)\n- 606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2);\n- 607 assert( twist[ k ] != 666 );\n- 608 return twist[ k ];\n- 609 }\n- 610 };\n- 611\n- 612\n- 613 template<>\n-614 struct Twist< 2, 2 >\n- 615 {\n-616 static const int minTwist = 0;\n-617 static const int maxTwist = 0;\n+ 603 template< int dim >\n+ 604 template< int codim >\n+605 inline int ElementInfo<_dim_>::twist ( int subEntity ) const\n+ 606 {\n+ 607 return Twist<_dim,_dim-codim_>::twist( element(), subEntity );\n+ 608 }\n+ 609\n+ 610\n+ 611 template< int dim >\n+612 inline int ElementInfo<_dim_>::twistInNeighbor ( const int face ) const\n+ 613 {\n+ 614 assert( neighbor( face ) != NULL );\n+ 615 return Twist<_dim,_dim-1_>::twist( neighbor( face ), elInfo().opp_vertex\n+[ face ] );\n+ 616 }\n+ 617\n 618\n-619 static int twist ( [[maybe_unused]] const Element *element,\n- 620 [[maybe_unused]] int subEntity )\n+ 619 template< int dim >\n+620 inline bool ElementInfo<_dim_>::isBoundary ( int face ) const\n 621 {\n- 622 assert( subEntity == 0 );\n- 623 return 0;\n- 624 }\n- 625 };\n- 626\n- 627\n- 628\n- 629 template< int dim >\n-630 inline int applyTwist ( int twist, int i )\n- 631 {\n- 632 const int numCorners = NumSubEntities<_dim,_dim_>::value;\n- 633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) %\n-numCorners;\n- 634 }\n- 635\n- 636 template< int dim >\n-637 inline int applyInverseTwist ( int twist, int i )\n- 638 {\n- 639 const int numCorners = NumSubEntities<_dim,_dim_>::value;\n- 640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i -\n-twist) % numCorners;\n- 641 }\n- 642\n- 643 }\n- 644\n- 645}\n- 646\n- 647#endif // #if HAVE_ALBERTA\n+ 622 assert( !!(*this) );\n+ 623 assert( (face >= 0) && (face < maxNeighbors) );\n+ 624\n+ 625 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n+ 626 const int macroFace = elInfo().macro_wall[ face ];\n+ 627 if( macroFace >= 0 )\n+ 628 return macroElement().isBoundary( macroFace );\n+ 629 else\n+ 630 return false;\n+ 631 }\n+ 632\n+ 633\n+ 634 template< int dim >\n+635 inline int ElementInfo<_dim_>::boundaryId ( int face ) const\n+ 636 {\n+ 637 assert( !!(*this) );\n+ 638 assert( (face >= 0) && (face < N_WALLS_MAX) );\n+ 639\n+ 640 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n+ 641 const int macroFace = elInfo().macro_wall[ face ];\n+ 642 const int id = macroElement().boundaryId( macroFace );\n+ 643 // this assertion is only allowed, if FILL_BOUND is set\n+ 644 // assert( id == elInfo().wall_bound[ face ] );\n+ 645 return id;\n+ 646 }\n+ 647\n 648\n- 649#endif // #ifndef DUNE_ALBERTA_MISC_HH\n-albertaheader.hh\n-DIM_OF_WORLD\n-#define DIM_OF_WORLD\n-Definition: albertaheader.hh:23\n+ 649 template< int dim >\n+ 650 inline AffineTransformation *\n+651 ElementInfo<_dim_>::transformation ( int face ) const\n+ 652 {\n+ 653 assert( !!(*this) );\n+ 654 assert( (face >= 0) && (face < N_WALLS_MAX) );\n+ 655\n+ 656 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n+ 657 const int macroFace = elInfo().macro_wall[ face ];\n+ 658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]);\n+ 659 }\n+ 660\n+ 661\n+ 662 template< int dim >\n+ 663 inline BasicNodeProjection *\n+664 ElementInfo<_dim_>::boundaryProjection ( int face ) const\n+ 665 {\n+ 666 assert( !!(*this) );\n+ 667 assert( (face >= 0) && (face < N_WALLS_MAX) );\n+ 668\n+ 669 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n+ 670 const int macroFace = elInfo().macro_wall[ face ];\n+ 671 if( macroFace >= 0 )\n+ 672 return static_cast< BasicNodeProjection * >( macroElement().projection\n+[ macroFace+1 ] );\n+ 673 else\n+ 674 return 0;\n+ 675 }\n+ 676\n+ 677\n+ 678 template< int dim >\n+679 inline bool ElementInfo<_dim_>::hasCoordinates () const\n+ 680 {\n+ 681 return ((elInfo().fill_flag & FillFlags::coords) != 0);\n+ 682 }\n+ 683\n+ 684 template< int dim >\n+685 inline const GlobalVector &ElementInfo<_dim_>::coordinate ( int vertex )\n+const\n+ 686 {\n+ 687 assert( hasCoordinates() );\n+ 688 assert( (vertex >= 0) && (vertex < numVertices) );\n+ 689 return elInfo().coord[ vertex ];\n+ 690 }\n+ 691\n+ 692\n+ 693 template< int dim >\n+ 694 template< class Functor >\n+695 inline void ElementInfo<_dim_>::hierarchicTraverse ( Functor &functor )\n+const\n+ 696 {\n+ 697 functor( *this );\n+ 698 if( !isLeaf() )\n+ 699 {\n+ 700 child( 0 ).hierarchicTraverse( functor );\n+ 701 child( 1 ).hierarchicTraverse( functor );\n+ 702 }\n+ 703 }\n+ 704\n+ 705\n+ 706 template< int dim >\n+ 707 template< class Functor >\n+708 inline void ElementInfo<_dim_>::leafTraverse ( Functor &functor ) const\n+ 709 {\n+ 710 if( !isLeaf() )\n+ 711 {\n+ 712 child( 0 ).leafTraverse( functor );\n+ 713 child( 1 ).leafTraverse( functor );\n+ 714 }\n+ 715 else\n+ 716 functor( *this );\n+ 717 }\n+ 718\n+ 719\n+ 720 template< int dim >\n+721 inline const Element *ElementInfo<_dim_>::element () const\n+ 722 {\n+ 723 return elInfo().el;\n+ 724 }\n+ 725\n+ 726\n+ 727 template< int dim >\n+728 inline const Element *ElementInfo<_dim_>::neighbor ( int face ) const\n+ 729 {\n+ 730 assert( (face >= 0) && (face < numFaces) );\n+ 731 assert( (elInfo().fill_flag & FillFlags::neighbor) != 0 );\n+ 732 return elInfo().neigh[ face ];\n+ 733 }\n+ 734\n+ 735\n+ 736 template< int dim >\n+737 inline Element *ElementInfo<_dim_>::el () const\n+ 738 {\n+ 739 return elInfo().el;\n+ 740 }\n+ 741\n+ 742\n+ 743 template< int dim >\n+744 inline ALBERTA EL_INFO &ElementInfo<_dim_>::elInfo () const\n+ 745 {\n+ 746 return (instance_->elInfo);\n+ 747 }\n+ 748\n+ 749\n+ 750 template< int dim >\n+ 751 inline ElementInfo<_dim_>\n+752 ElementInfo<_dim_>::createFake ( const MeshPointer &mesh,\n+ 753 const Element *element, int level, int type )\n+ 754 {\n+ 755 InstancePtr instance = stack().allocate();\n+ 756 instance->parent() = null();\n+ 757 ++(instance->parent()->refCount);\n+ 758\n+ 759 instance->elInfo.mesh = mesh;\n+ 760 instance->elInfo.macro_el = NULL;\n+ 761 instance->elInfo.el = const_cast< Element * >( element );\n+ 762 instance->elInfo.parent = NULL;\n+ 763 instance->elInfo.fill_flag = FillFlags::nothing;\n+ 764 instance->elInfo.level = level;\n+ 765 instance->elInfo.el_type = type;\n+ 766\n+ 767 return ElementInfo<_dim_>( instance );\n+ 768 }\n+ 769\n+ 770\n+ 771 template< int dim >\n+ 772 inline ElementInfo<_dim_>\n+773 ElementInfo<_dim_>::createFake ( const ALBERTA EL_INFO &elInfo )\n+ 774 {\n+ 775 InstancePtr instance = stack().allocate();\n+ 776 instance->parent() = null();\n+ 777 ++(instance->parent()->refCount);\n+ 778\n+ 779 instance->elInfo = elInfo;\n+ 780 return ElementInfo<_dim_>( instance );\n+ 781 }\n+ 782\n+ 783\n+ 784 template< int dim >\n+ 785 inline bool ElementInfo<_dim_>::isLeaf ( Element *element )\n+ 786 {\n+ 787 return IS_LEAF_EL( element );\n+ 788 }\n+ 789\n+ 790\n+ 791 template< int dim >\n+ 792 inline bool ElementInfo<_dim_>::mightVanish ( Alberta::Element *element,\n+int depth )\n+ 793 {\n+ 794 if( isLeaf( element ) )\n+ 795 return (element->mark < depth);\n+ 796 else\n+ 797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish\n+( element->child[ 1 ], depth-1 ));\n+ 798 }\n+ 799\n+ 800\n+ 801 template< int dim >\n+ 802 inline void ElementInfo< dim >\n+ 803 ::fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo\n+)\n+ 804 {\n+ 805 ALBERTA fill_macro_info( mesh, mel, &elInfo );\n+ 806 }\n+ 807\n+ 808 template< int dim >\n+ 809 inline void ElementInfo< dim >\n+ 810 ::fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO\n+&elInfo )\n+ 811 {\n+ 812 ALBERTA fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo );\n+ 813 }\n+ 814\n+ 815\n+ 816 template< int dim >\n+ 817 inline void ElementInfo< dim >::addReference () const\n+ 818 {\n+ 819 ++(instance_->refCount);\n+ 820 }\n+ 821\n+ 822\n+ 823 template< int dim >\n+ 824 inline void ElementInfo< dim >::removeReference () const\n+ 825 {\n+ 826 // short-circuit for rvalues that have been drained as argument to a move\n+operation\n+ 827 if ( !instance_ )\n+ 828 return;\n+ 829 // this loop breaks when instance becomes null()\n+ 830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; )\n+ 831 {\n+ 832 const InstancePtr parent = instance->parent();\n+ 833 stack().release( instance );\n+ 834 instance = parent;\n+ 835 }\n+ 836 }\n+ 837\n+ 838\n+ 839 template< int dim >\n+ 840 inline typename ElementInfo< dim >::InstancePtr\n+ 841 ElementInfo< dim >::null ()\n+ 842 {\n+ 843 return stack().null();\n+ 844 }\n+ 845\n+ 846\n+ 847 template< int dim >\n+ 848 inline typename ElementInfo< dim >::Stack &\n+ 849 ElementInfo< dim >::stack ()\n+ 850 {\n+ 851 static Stack s;\n+ 852 return s;\n+ 853 }\n+ 854\n+ 855\n+ 856\n+ 857 // Implementation of ElementInfo::Stack\n+ 858 // ------------------------------------\n+ 859\n+ 860 template< int dim >\n+861 inline ElementInfo<_dim_>::Stack::Stack ()\n+ 862 : top_( 0 )\n+ 863 {\n+ 864 null_.elInfo.el = NULL;\n+ 865 null_.refCount = 1;\n+ 866 null_.parent() = 0;\n+ 867 }\n+ 868\n+ 869\n+ 870 template< int dim >\n+871 inline ElementInfo<_dim_>::Stack::~Stack ()\n+ 872 {\n+ 873 while( top_ != 0 )\n+ 874 {\n+ 875 InstancePtr p = top_;\n+ 876 top_ = p->parent();\n+ 877 delete p;\n+ 878 }\n+ 879 }\n+ 880\n+ 881\n+ 882 template< int dim >\n+ 883 inline typename ElementInfo<_dim_>::InstancePtr\n+884 ElementInfo<_dim_>::Stack::allocate ()\n+ 885 {\n+ 886 InstancePtr p = top_;\n+ 887 if( p != 0 )\n+ 888 top_ = p->parent();\n+ 889 else\n+ 890 p = new Instance;\n+ 891 p->refCount = 0;\n+ 892 return p;\n+ 893 }\n+ 894\n+ 895\n+ 896 template< int dim >\n+897 inline void ElementInfo<_dim_>::Stack::release ( InstancePtr &p )\n+ 898 {\n+ 899 assert( (p != null()) && (p->refCount == 0) );\n+ 900 p->parent() = top_;\n+ 901 top_ = p;\n+ 902 }\n+ 903\n+ 904\n+ 905 template< int dim >\n+ 906 inline typename ElementInfo<_dim_>::InstancePtr\n+907 ElementInfo<_dim_>::Stack::null ()\n+ 908 {\n+ 909 return &null_;\n+ 910 }\n+ 911\n+ 912 } // namespace Alberta\n+ 913\n+ 914} // namespace Dune\n+ 915\n+ 916#endif // #if HAVE_ALBERTA\n+ 917\n+ 918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH\n+geometrycache.hh\n+macroelement.hh\n ALBERTA\n #define ALBERTA\n Definition: albertaheader.hh:29\n+std::swap\n+void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n+> &b)\n+Definition: utility/persistentcontainer.hh:83\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::applyInverseTwist\n-int applyInverseTwist(int twist, int i)\n-Definition: misc.hh:637\n Dune::Alberta::Mesh\n ALBERTA MESH Mesh\n Definition: misc.hh:53\n-Dune::Alberta::applyTwist\n-int applyTwist(int twist, int i)\n-Definition: misc.hh:630\n-Dune::Alberta::memFree\n-void memFree(Data *ptr, size_t size)\n-Definition: misc.hh:91\n-Dune::Alberta::GlobalMatrix\n-ALBERTA REAL_DD GlobalMatrix\n-Definition: misc.hh:51\n Dune::Alberta::AffineTransformation\n ALBERTA AFF_TRAFO AffineTransformation\n Definition: misc.hh:52\n-Dune::Alberta::LocalVector\n-ALBERTA REAL_B LocalVector\n-Definition: misc.hh:49\n Dune::Alberta::Element\n ALBERTA EL Element\n Definition: misc.hh:54\n-Dune::Alberta::BoundaryId\n-ALBERTA BNDRY_TYPE BoundaryId\n-Definition: misc.hh:61\n-Dune::Alberta::InteriorBoundary\n-static const int InteriorBoundary\n-Definition: misc.hh:59\n-Dune::Alberta::Real\n-ALBERTA REAL Real\n-Definition: misc.hh:48\n-Dune::Alberta::meshRefined\n-static const int meshRefined\n-Definition: misc.hh:56\n-Dune::Alberta::memAlloc\n-Data * memAlloc(size_t size)\n-Definition: misc.hh:73\n-Dune::Alberta::memReAlloc\n-Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)\n-Definition: misc.hh:85\n-Dune::Alberta::DirichletBoundary\n-static const int DirichletBoundary\n-Definition: misc.hh:60\n-Dune::Alberta::DofSpace\n-ALBERTA FE_SPACE DofSpace\n-Definition: misc.hh:65\n-Dune::Alberta::memCAlloc\n-Data * memCAlloc(size_t size)\n-Definition: misc.hh:79\n-Dune::Alberta::dimWorld\n-static const int dimWorld\n-Definition: misc.hh:46\n-Dune::Alberta::ElementType\n-U_CHAR ElementType\n-Definition: misc.hh:63\n-Dune::Alberta::meshCoarsened\n-static const int meshCoarsened\n-Definition: misc.hh:57\n Dune::Alberta::GlobalVector\n ALBERTA REAL_D GlobalVector\n Definition: misc.hh:50\n Dune::VTK::vertex\n @ vertex\n Definition: common.hh:133\n-Dune::AlbertaError\n-Definition: misc.hh:32\n-Dune::AlbertaIOError\n-Definition: misc.hh:36\n-Dune::Alberta::GlobalSpace\n-Definition: misc.hh:102\n-Dune::Alberta::GlobalSpace::identityMatrix\n-static const Matrix & identityMatrix()\n-Definition: misc.hh:131\n-Dune::Alberta::GlobalSpace::nullVector\n-static const Vector & nullVector()\n-Definition: misc.hh:136\n-Dune::Alberta::GlobalSpace::Matrix\n-GlobalMatrix Matrix\n-Definition: misc.hh:106\n-Dune::Alberta::GlobalSpace::Vector\n-GlobalVector Vector\n-Definition: misc.hh:107\n+Dune::Alberta::MeshPointer<_dimension_>\n+Dune::Alberta::ElementInfo\n+Definition: elementinfo.hh:43\n+Dune::Alberta::ElementInfo::leafNeighbor\n+ElementInfo leafNeighbor(const int face) const\n+Definition: elementinfo.hh:585\n+Dune::Alberta::ElementInfo::isLeaf\n+bool isLeaf() const\n+Definition: elementinfo.hh:488\n+Dune::Alberta::ElementInfo::createFake\n+static ElementInfo createFake(const MeshPointer &mesh, const Element *element,\n+int level, int type=0)\n+Definition: elementinfo.hh:752\n+Dune::Alberta::ElementInfo::child\n+ElementInfo child(int i) const\n+Definition: elementinfo.hh:470\n+Dune::Alberta::ElementInfo::level\n+int level() const\n+Definition: elementinfo.hh:533\n+Dune::Alberta::ElementInfo::mightVanish\n+bool mightVanish() const\n+Definition: elementinfo.hh:526\n+Dune::Alberta::ElementInfo::numFaces\n+static const int numFaces\n+Definition: elementinfo.hh:56\n+Dune::Alberta::ElementInfo::twist\n+int twist(int subEntity) const\n+Definition: elementinfo.hh:605\n+Dune::Alberta::ElementInfo::twistInNeighbor\n+int twistInNeighbor(int face) const\n+Definition: elementinfo.hh:612\n+Dune::Alberta::ElementInfo::MacroElement\n+Alberta::MacroElement< dimension > MacroElement\n+Definition: elementinfo.hh:58\n+Dune::Alberta::ElementInfo::boundaryProjection\n+BasicNodeProjection * boundaryProjection(int face) const\n+Definition: elementinfo.hh:664\n+Dune::Alberta::ElementInfo::macroElement\n+const MacroElement & macroElement() const\n+Definition: elementinfo.hh:440\n+Dune::Alberta::ElementInfo::maxLevelNeighbors\n+static const int maxLevelNeighbors\n+Definition: elementinfo.hh:64\n+Dune::Alberta::ElementInfo::father\n+ElementInfo father() const\n+Definition: elementinfo.hh:449\n+Dune::Alberta::ElementInfo::ElementInfo\n+ElementInfo(const ElementInfo &other)\n+Definition: elementinfo.hh:382\n+Dune::Alberta::ElementInfo::GeometryCache\n+GeometryCacheProxy< dim > GeometryCache\n+Definition: elementinfo.hh:67\n+Dune::Alberta::ElementInfo::operator=\n+ElementInfo & operator=(const ElementInfo &other)\n+Definition: elementinfo.hh:405\n+Dune::Alberta::ElementInfo::hasLeafNeighbor\n+bool hasLeafNeighbor(const int face) const\n+Definition: elementinfo.hh:570\n+Dune::Alberta::ElementInfo::operator==\n+bool operator==(const ElementInfo &other) const\n+Definition: elementinfo.hh:424\n+Dune::Alberta::ElementInfo::dimension\n+static const int dimension\n+Definition: elementinfo.hh:53\n+Dune::Alberta::ElementInfo::hierarchicTraverse\n+void hierarchicTraverse(Functor &functor) const\n+Definition: elementinfo.hh:695\n+Dune::Alberta::ElementInfo::type\n+int type() const\n+Definition: elementinfo.hh:540\n+Dune::Alberta::ElementInfo::maxNeighbors\n+static const int maxNeighbors\n+Definition: elementinfo.hh:62\n+Dune::Alberta::ElementInfo::setMark\n+void setMark(int refCount) const\n+Definition: elementinfo.hh:561\n+Dune::Alberta::ElementInfo::~ElementInfo\n+~ElementInfo()\n+Definition: elementinfo.hh:397\n+Dune::Alberta::ElementInfo::coordinate\n+const GlobalVector & coordinate(int vertex) const\n+Definition: elementinfo.hh:685\n+Dune::Alberta::ElementInfo::numVertices\n+static const int numVertices\n+Definition: elementinfo.hh:55\n+Dune::Alberta::ElementInfo::getMark\n+int getMark() const\n+Definition: elementinfo.hh:554\n+Dune::Alberta::ElementInfo::leafTraverse\n+void leafTraverse(Functor &functor) const\n+Definition: elementinfo.hh:708\n+Dune::Alberta::ElementInfo::MeshPointer\n+Alberta::MeshPointer< dimension > MeshPointer\n+Definition: elementinfo.hh:59\n+Dune::Alberta::ElementInfo::neighbor\n+const Element * neighbor(int face) const\n+Definition: elementinfo.hh:728\n+Dune::Alberta::ElementInfo::createFake\n+static ElementInfo createFake(const ALBERTA EL_INFO &elInfo)\n+Definition: elementinfo.hh:773\n+Dune::Alberta::ElementInfo::ElementInfo\n+ElementInfo()\n+Definition: elementinfo.hh:310\n+Dune::Alberta::ElementInfo::boundaryId\n+int boundaryId(int face) const\n+Definition: elementinfo.hh:635\n+Dune::Alberta::ElementInfo::operator!=\n+bool operator!=(const ElementInfo &other) const\n+Definition: elementinfo.hh:432\n+Dune::Alberta::ElementInfo::FillFlags\n+Alberta::FillFlags< dimension > FillFlags\n+Definition: elementinfo.hh:60\n+Dune::Alberta::ElementInfo::ElementInfo\n+ElementInfo(const MeshPointer &mesh, const MacroElement ¯oElement, typename\n+FillFlags::Flags fillFlags=FillFlags::standard)\n+Definition: elementinfo.hh:319\n+Dune::Alberta::ElementInfo::transformation\n+AffineTransformation * transformation(int face) const\n+Definition: elementinfo.hh:651\n+Dune::Alberta::ElementInfo::isBoundary\n+bool isBoundary(int face) const\n+Definition: elementinfo.hh:620\n+Dune::Alberta::ElementInfo::indexInFather\n+int indexInFather() const\n+Definition: elementinfo.hh:457\n+Dune::Alberta::ElementInfo::seed\n+Seed seed() const\n+Definition: elementinfo.hh:496\n+Dune::Alberta::ElementInfo::el\n+Element * el() const\n+Definition: elementinfo.hh:737\n+Dune::Alberta::ElementInfo::element\n+const Element * element() const\n+Definition: elementinfo.hh:721\n+Dune::Alberta::ElementInfo::elInfo\n+ALBERTA EL_INFO & elInfo() const\n+Definition: elementinfo.hh:744\n+Dune::Alberta::ElementInfo::mesh\n+MeshPointer mesh() const\n+Definition: elementinfo.hh:519\n+Dune::Alberta::ElementInfo::geometryCache\n+GeometryCache geometryCache() const\n+Definition: elementinfo.hh:140\n+Dune::Alberta::ElementInfo::hasCoordinates\n+bool hasCoordinates() const\n+Definition: elementinfo.hh:679\n+Dune::Alberta::ElementInfo::levelNeighbors\n+int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors],\n+int(&faceInNeighbor)[maxLevelNeighbors]) const\n+Definition: elementinfo.hh:596\n+Dune::Alberta::ElementInfo::ElementInfo\n+ElementInfo(ElementInfo &&other)\n+Definition: elementinfo.hh:389\n+Dune::Alberta::ElementInfo::ElementInfo\n+ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags::\n+Flags fillFlags=FillFlags::standard)\n+Definition: elementinfo.hh:340\n+Dune::Alberta::ElementInfo::Instance\n+Definition: elementinfo.hh:185\n+Dune::Alberta::ElementInfo::Instance::parent\n+InstancePtr & parent()\n+Definition: elementinfo.hh:189\n+Dune::Alberta::ElementInfo::Instance::geometryCache\n+Alberta::GeometryCache< dim > geometryCache\n+Definition: elementinfo.hh:199\n+Dune::Alberta::ElementInfo::Instance::elInfo\n+ALBERTA EL_INFO elInfo\n+Definition: elementinfo.hh:186\n+Dune::Alberta::ElementInfo::Instance::refCount\n+unsigned int refCount\n+Definition: elementinfo.hh:187\n+Dune::Alberta::ElementInfo::Stack\n+Definition: elementinfo.hh:210\n+Dune::Alberta::ElementInfo::Stack::null\n+InstancePtr null()\n+Definition: elementinfo.hh:907\n+Dune::Alberta::ElementInfo::Stack::~Stack\n+~Stack()\n+Definition: elementinfo.hh:871\n+Dune::Alberta::ElementInfo::Stack::release\n+void release(InstancePtr &p)\n+Definition: elementinfo.hh:897\n+Dune::Alberta::ElementInfo::Stack::Stack\n+Stack()\n+Definition: elementinfo.hh:861\n+Dune::Alberta::ElementInfo::Stack::allocate\n+InstancePtr allocate()\n+Definition: elementinfo.hh:884\n+Dune::Alberta::ElementInfo::Seed\n+Definition: elementinfo.hh:255\n+Dune::Alberta::ElementInfo::Seed::Seed\n+Seed(const int macroIndex, const int level, const unsigned long path)\n+Definition: elementinfo.hh:260\n+Dune::Alberta::ElementInfo::Seed::Seed\n+Seed()\n+Definition: elementinfo.hh:256\n+Dune::Alberta::ElementInfo::Seed::level\n+int level() const\n+Definition: elementinfo.hh:287\n+Dune::Alberta::ElementInfo::Seed::isValid\n+bool isValid() const\n+Definition: elementinfo.hh:284\n+Dune::Alberta::ElementInfo::Seed::path\n+unsigned long path() const\n+Definition: elementinfo.hh:288\n+Dune::Alberta::ElementInfo::Seed::macroIndex\n+int macroIndex() const\n+Definition: elementinfo.hh:286\n+Dune::Alberta::GeometryCache\n+Definition: geometrycache.hh:24\n+Dune::Alberta::GeometryCacheProxy\n+Definition: geometrycache.hh:91\n+Dune::Alberta::MacroElement\n+Definition: macroelement.hh:24\n Dune::Alberta::NumSubEntities\n Definition: misc.hh:148\n-Dune::Alberta::CodimType\n-Definition: misc.hh:192\n Dune::Alberta::FillFlags\n Definition: misc.hh:231\n Dune::Alberta::FillFlags::nothing\n static const Flags nothing\n Definition: misc.hh:234\n-Dune::Alberta::FillFlags::nonPeriodic\n-static const Flags nonPeriodic\n-Definition: misc.hh:248\n Dune::Alberta::FillFlags::boundaryId\n static const Flags boundaryId\n Definition: misc.hh:246\n-Dune::Alberta::FillFlags::elementType\n-static const Flags elementType\n-Definition: misc.hh:244\n Dune::Alberta::FillFlags::Flags\n ALBERTA FLAGS Flags\n Definition: misc.hh:232\n-Dune::Alberta::FillFlags::projection\n-static const Flags projection\n-Definition: misc.hh:242\n Dune::Alberta::FillFlags::coords\n static const Flags coords\n Definition: misc.hh:236\n-Dune::Alberta::FillFlags::orientation\n-static const Flags orientation\n-Definition: misc.hh:240\n Dune::Alberta::FillFlags::standard\n static const Flags standard\n Definition: misc.hh:256\n Dune::Alberta::FillFlags::neighbor\n static const Flags neighbor\n Definition: misc.hh:238\n-Dune::Alberta::FillFlags::all\n-static const Flags all\n-Definition: misc.hh:250\n-Dune::Alberta::FillFlags::standardWithCoords\n-static const Flags standardWithCoords\n-Definition: misc.hh:253\n-Dune::Alberta::RefinementEdge\n-Definition: misc.hh:269\n-Dune::Alberta::RefinementEdge::value\n-static const int value\n-Definition: misc.hh:270\n-Dune::Alberta::Dune2AlbertaNumbering\n-Definition: misc.hh:286\n-Dune::Alberta::Dune2AlbertaNumbering::apply\n-static int apply(const int i)\n-Definition: misc.hh:287\n-Dune::Alberta::Dune2AlbertaNumbering<_3,_2_>::apply\n-static int apply(const int i)\n-Definition: misc.hh:299\n-Dune::Alberta::Generic2AlbertaNumbering\n-Definition: misc.hh:314\n-Dune::Alberta::Generic2AlbertaNumbering::apply\n-static int apply(const int i)\n-Definition: misc.hh:315\n-Dune::Alberta::Generic2AlbertaNumbering<_dim,_1_>::apply\n-static int apply(const int i)\n-Definition: misc.hh:325\n-Dune::Alberta::Generic2AlbertaNumbering<_1,_1_>::apply\n-static int apply(const int i)\n-Definition: misc.hh:335\n-Dune::Alberta::Generic2AlbertaNumbering<_3,_2_>::apply\n-static int apply(const int i)\n-Definition: misc.hh:347\n-Dune::Alberta::NumberingMap\n-Definition: misc.hh:362\n-Dune::Alberta::NumberingMap::alberta2dune\n-int alberta2dune(int codim, int i) const\n-Definition: misc.hh:397\n-Dune::Alberta::NumberingMap::numSubEntities\n-int numSubEntities(int codim) const\n-Definition: misc.hh:404\n-Dune::Alberta::NumberingMap::dune2alberta\n-int dune2alberta(int codim, int i) const\n-Definition: misc.hh:390\n-Dune::Alberta::NumberingMap::~NumberingMap\n-~NumberingMap()\n-Definition: misc.hh:381\n-Dune::Alberta::NumberingMap::NumberingMap\n-NumberingMap()\n-Definition: misc.hh:376\n-Dune::Alberta::MapVertices\n-Definition: misc.hh:443\n-Dune::Alberta::MapVertices<_dim,_0_>::apply\n-static int apply(int subEntity, int vertex)\n-Definition: misc.hh:448\n-Dune::Alberta::MapVertices<_2,_1_>::apply\n-static int apply(int subEntity, int vertex)\n-Definition: misc.hh:459\n-Dune::Alberta::MapVertices<_3,_1_>::apply\n-static int apply(int subEntity, int vertex)\n-Definition: misc.hh:472\n-Dune::Alberta::MapVertices<_3,_2_>::apply\n-static int apply(int subEntity, int vertex)\n-Definition: misc.hh:485\n-Dune::Alberta::MapVertices<_dim,_dim_>::apply\n-static int apply(int subEntity, int vertex)\n-Definition: misc.hh:497\n-Dune::Alberta::Twist\n-Definition: misc.hh:532\n-Dune::Alberta::Twist::maxTwist\n-static const int maxTwist\n-Definition: misc.hh:536\n-Dune::Alberta::Twist::minTwist\n-static const int minTwist\n-Definition: misc.hh:535\n Dune::Alberta::Twist::twist\n static int twist(const Element *element, int subEntity)\n Definition: misc.hh:538\n-Dune::Alberta::Twist::numSubEntities\n-static const int numSubEntities\n-Definition: misc.hh:533\n-Dune::Alberta::Twist<_dim,_1_>::twist\n-static int twist(const Element *element, int subEntity)\n-Definition: misc.hh:554\n-Dune::Alberta::Twist<_1,_1_>::twist\n-static int twist(const Element *element, int subEntity)\n-Definition: misc.hh:575\n-Dune::Alberta::Twist<_dim,_2_>::twist\n-static int twist(const Element *element, int subEntity)\n-Definition: misc.hh:592\n-Dune::Alberta::Twist<_2,_2_>::twist\n-static int twist(const Element *element, int subEntity)\n-Definition: misc.hh:619\n+Dune::Alberta::BasicNodeProjection\n+Definition: albertagrid/projection.hh:208\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00641.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00641.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dofvector.hh File Reference\n+dune-grid: refinement.hh File Reference\n \n \n \n \n \n \n \n@@ -64,59 +64,59 @@\n \n \n \n
    \n \n-
    dofvector.hh File Reference
    \n+Namespaces
    \n+
    refinement.hh File Reference
    \n \n
    \n-
    #include <cstdlib>
    \n-#include <limits>
    \n-#include <dune/grid/albertagrid/misc.hh>
    \n-#include <dune/grid/albertagrid/elementinfo.hh>
    \n-#include <dune/grid/albertagrid/refinement.hh>
    \n+\n+

    provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather \n+More...

    \n+
    #include <cassert>
    \n+#include <dune/grid/albertagrid/misc.hh>
    \n+#include <dune/grid/albertagrid/elementinfo.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n+\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n+\n+\n \n

    \n Classes

    struct  Dune::Alberta::DofVectorProvider< int >
    class  Dune::Alberta::Patch< dim >
     
    struct  Dune::Alberta::ForEachInteriorSubChild< dim, 0 >
     
    struct  Dune::Alberta::ForEachInteriorSubChild< dim, dim >
     
    struct  Dune::Alberta::DofVectorProvider< signed char >
    struct  Dune::Alberta::ForEachInteriorSubChild< 2, 1 >
     
    struct  Dune::Alberta::DofVectorProvider< unsigned char >
    struct  Dune::Alberta::ForEachInteriorSubChild< 3, 1 >
     
    struct  Dune::Alberta::DofVectorProvider< Real >
    struct  Dune::Alberta::ForEachInteriorSubChild< 3, 2 >
     
    struct  Dune::Alberta::DofVectorProvider< GlobalVector >
    struct  Dune::Alberta::GeometryInFather< 1 >
     
    class  Dune::Alberta::DofVectorPointer< Dof >
    struct  Dune::Alberta::GeometryInFather< 2 >
     
    struct  Dune::Alberta::GeometryInFather< 3 >
     
    \n \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n-\n-\n-\n-\n-\n-\n-\n

    \n-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)
     
    \n-
    \n+

    Detailed Description

    \n+

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

    \n+
    Author
    Martin Nolte
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,44 +5,48 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces | Functions\n-dofvector.hh File Reference\n-#include \n-#include \n+Classes | Namespaces\n+refinement.hh File Reference\n+provides a wrapper for ALBERTA's refinement patches and the corners for\n+geometryInFather More...\n+#include \n #include \n #include \n-#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::Alberta::DofVectorProvider<_int_>\n+ class \u00a0Dune::Alberta::Patch<_dim_>\n \u00a0\n-struct \u00a0Dune::Alberta::DofVectorProvider<_signed_char_>\n+struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_dim,_0_>\n \u00a0\n-struct \u00a0Dune::Alberta::DofVectorProvider<_unsigned_char_>\n+struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_dim,_dim_>\n \u00a0\n-struct \u00a0Dune::Alberta::DofVectorProvider<_Real_>\n+struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_2,_1_>\n \u00a0\n-struct \u00a0Dune::Alberta::DofVectorProvider<_GlobalVector_>\n+struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_3,_1_>\n \u00a0\n- class \u00a0Dune::Alberta::DofVectorPointer<_Dof_>\n+struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_3,_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::GeometryInFather<_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::GeometryInFather<_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::GeometryInFather<_3_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n- Functions\n-void\u00a0Dune::Alberta::abs (const DofVectorPointer< int > &dofVector)\n-\u00a0\n- int\u00a0Dune::Alberta::max (const DofVectorPointer< int > &dofVector)\n-\u00a0\n- int\u00a0Dune::Alberta::min (const DofVectorPointer< int > &dofVector)\n-\u00a0\n+***** Detailed Description *****\n+provides a wrapper for ALBERTA's refinement patches and the corners for\n+geometryInFather\n+ Author\n+ Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00641_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dofvector.hh Source File\n+dune-grid: refinement.hh Source File\n \n \n \n \n \n \n \n@@ -62,438 +62,400 @@\n \n \n \n
    \n-
    dofvector.hh
    \n+
    refinement.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_DOFVECTOR_HH
    \n-
    6#define DUNE_ALBERTA_DOFVECTOR_HH
    \n+
    5#ifndef DUNE_ALBERTA_REFINEMENT_HH
    \n+
    6#define DUNE_ALBERTA_REFINEMENT_HH
    \n
    7
    \n-
    8#include <cstdlib>
    \n-
    9#include <limits>
    \n-
    10
    \n-\n-\n-\n-
    14
    \n-
    15#if HAVE_ALBERTA
    \n-
    16
    \n-
    17namespace Dune
    \n-
    18{
    \n-
    19
    \n-
    20 namespace Alberta
    \n-
    21 {
    \n-
    22
    \n-
    23 // External Forward Declarations
    \n-
    24 // -----------------------------
    \n-
    25
    \n-
    26 template< int dim >
    \n-
    27 class MeshPointer;
    \n-
    28
    \n+
    14#include <cassert>
    \n+
    15
    \n+\n+\n+
    18
    \n+
    19#if HAVE_ALBERTA
    \n+
    20
    \n+
    21namespace Dune
    \n+
    22{
    \n+
    23
    \n+
    24 namespace Alberta
    \n+
    25 {
    \n+
    26
    \n+
    27 // Internal Forward Declarations
    \n+
    28 // -----------------------------
    \n
    29
    \n-
    30
    \n-
    31 // DofVectorProvider
    \n-
    32 // -----------------
    \n+
    30 template< int dim, int codim >
    \n+\n+
    32
    \n
    33
    \n-
    34 template< class Dof >
    \n-\n-
    36
    \n-
    37 template<>
    \n-
    38 struct DofVectorProvider< int >
    \n-
    39 {
    \n-
    40 typedef ALBERTA DOF_INT_VEC DofVector;
    \n-
    41
    \n-
    42 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n-
    43 {
    \n-
    44 return ALBERTA get_dof_int_vec( name.c_str(), dofSpace );
    \n-
    45 }
    \n-
    46
    \n-
    47 static void free ( DofVector *dofVector )
    \n-
    48 {
    \n-
    49 ALBERTA free_dof_int_vec( dofVector );
    \n-
    50 }
    \n-
    51
    \n-
    52 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n-
    53 {
    \n-
    54 return ALBERTA read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n-
    55 }
    \n+
    34
    \n+
    35 // Patch
    \n+
    36 // -----
    \n+
    37
    \n+
    38 template< int dim >
    \n+
    39 class Patch
    \n+
    40 {
    \n+
    41 typedef Patch< dim > This;
    \n+
    42
    \n+
    43 static_assert(((dim >= 1) && (dim <= 3)),
    \n+
    44 "Alberta supports only dimensions 1, 2, 3");
    \n+
    45
    \n+
    46 public:
    \n+
    47 static const int dimension = dim;
    \n+
    48
    \n+\n+
    50
    \n+
    51 typedef ALBERTA RC_LIST_EL ElementList;
    \n+
    52
    \n+
    53 private:
    \n+
    54 ElementList *list_;
    \n+
    55 int count_;
    \n
    56
    \n-
    57 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n-
    58 {
    \n-
    59 int success = ALBERTA write_dof_int_vec_xdr( dofVector, filename.c_str() );
    \n-
    60 return (success == 0);
    \n-
    61 }
    \n-
    62 };
    \n-
    63
    \n-
    64 template<>
    \n-
    65 struct DofVectorProvider< signed char >
    \n-
    66 {
    \n-
    67 typedef ALBERTA DOF_SCHAR_VEC DofVector;
    \n-
    68
    \n-
    69 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n-
    70 {
    \n-
    71 return ALBERTA get_dof_schar_vec( name.c_str(), dofSpace );
    \n-
    72 }
    \n-
    73
    \n-
    74 static void free ( DofVector *dofVector )
    \n-
    75 {
    \n-
    76 ALBERTA free_dof_schar_vec( dofVector );
    \n-
    77 }
    \n+
    57 public:
    \n+
    58 Patch ( ElementList *list, int count )
    \n+
    59 : list_( list ),
    \n+
    60 count_( count )
    \n+
    61 {
    \n+
    62 assert( count > 0 );
    \n+
    63 }
    \n+
    64
    \n+
    65 Element *operator[] ( int i ) const;
    \n+
    66
    \n+
    67 int count () const
    \n+
    68 {
    \n+
    69 return count_;
    \n+
    70 }
    \n+
    71
    \n+
    72 template< class LevelProvider >
    \n+
    73 ElementInfo elementInfo ( int i, const LevelProvider &levelProvider ) const;
    \n+
    74
    \n+
    75 int elementType ( int i ) const;
    \n+
    76 bool hasNeighbor ( int i, int neighbor ) const;
    \n+
    77 int neighborIndex ( int i, int neighbor ) const;
    \n
    78
    \n-
    79 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n-
    80 {
    \n-
    81 return ALBERTA read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n-
    82 }
    \n-
    83
    \n-
    84 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n-
    85 {
    \n-
    86 int success = ALBERTA write_dof_schar_vec_xdr( dofVector, filename.c_str() );
    \n-
    87 return (success == 0);
    \n-
    88 }
    \n-
    89 };
    \n-
    90
    \n-
    91 template<>
    \n-
    92 struct DofVectorProvider< unsigned char >
    \n-
    93 {
    \n-
    94 typedef ALBERTA DOF_UCHAR_VEC DofVector;
    \n-
    95
    \n-
    96 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n-
    97 {
    \n-
    98 return ALBERTA get_dof_uchar_vec( name.c_str(), dofSpace );
    \n-
    99 }
    \n+
    79 template< class Functor >
    \n+
    80 void forEach ( Functor &functor ) const
    \n+
    81 {
    \n+
    82 for( int i = 0; i < count(); ++i )
    \n+
    83 functor( (*this)[ i ] );
    \n+
    84 }
    \n+
    85
    \n+
    86 template< int codim, class Functor >
    \n+
    87 void forEachInteriorSubChild ( Functor &functor ) const
    \n+
    88 {
    \n+\n+
    90 }
    \n+
    91 };
    \n+
    92
    \n+
    93
    \n+
    94 template< int dim >
    \n+
    95 inline Element *Patch< dim >::operator[] ( int i ) const
    \n+
    96 {
    \n+
    97 assert( (i >= 0) && (i < count()) );
    \n+
    98 return list_[ i ].el_info.el;
    \n+
    99 }
    \n
    100
    \n-
    101 static void free ( DofVector *dofVector )
    \n-
    102 {
    \n-
    103 ALBERTA free_dof_uchar_vec( dofVector );
    \n-
    104 }
    \n-
    105
    \n-
    106 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n-
    107 {
    \n-
    108 return ALBERTA read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n-
    109 }
    \n+
    101
    \n+
    102 template< int dim >
    \n+
    103 template< class LevelProvider >
    \n+
    104 inline typename Patch< dim >::ElementInfo
    \n+
    105 Patch< dim >::elementInfo ( int i, const LevelProvider &levelProvider ) const
    \n+
    106 {
    \n+
    107 assert( (i >= 0) && (i < count()) );
    \n+
    108 return ElementInfo::createFake( list_[ i ].el_info );
    \n+
    109 }
    \n
    110
    \n-
    111 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n-
    112 {
    \n-
    113 int success = ALBERTA write_dof_uchar_vec_xdr( dofVector, filename.c_str() );
    \n-
    114 return (success == 0);
    \n-
    115 }
    \n-
    116 };
    \n-
    117
    \n-
    118 template<>
    \n-\n-
    120 {
    \n-
    121 typedef ALBERTA DOF_REAL_VEC DofVector;
    \n+
    111 template<>
    \n+
    112 template< class LevelProvider >
    \n+
    113 inline typename Patch< 2 >::ElementInfo
    \n+
    114 Patch< 2 >::elementInfo ( int i, const LevelProvider &levelProvider ) const
    \n+
    115 {
    \n+
    116 assert( (i >= 0) && (i < count()) );
    \n+
    117 const MeshPointer< 2 > &mesh = levelProvider.mesh();
    \n+
    118 const Element *element = (*this)[ i ];
    \n+
    119 const int level = levelProvider( element );
    \n+
    120 return ElementInfo::createFake( mesh, element, level );
    \n+
    121 }
    \n
    122
    \n-
    123 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n-
    124 {
    \n-
    125 return ALBERTA get_dof_real_vec( name.c_str(), dofSpace );
    \n-
    126 }
    \n-
    127
    \n-
    128 static void free ( DofVector *dofVector )
    \n-
    129 {
    \n-
    130 ALBERTA free_dof_real_vec( dofVector );
    \n-
    131 }
    \n-
    132
    \n-
    133 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n-
    134 {
    \n-
    135 return ALBERTA read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n-
    136 }
    \n+
    123
    \n+
    124 template< int dim >
    \n+
    125 inline int Patch< dim >::elementType ( int i ) const
    \n+
    126 {
    \n+
    127 assert( (i >= 0) && (i < count()) );
    \n+
    128 return list_[ i ].el_info.el_type;
    \n+
    129 }
    \n+
    130
    \n+
    131
    \n+
    132 template< int dim >
    \n+
    133 inline bool Patch< dim >::hasNeighbor ( int i, int neighbor ) const
    \n+
    134 {
    \n+
    135 return (list_[ i ].neigh[ neighbor ] != NULL);
    \n+
    136 }
    \n
    137
    \n-
    138 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n-
    139 {
    \n-
    140 int success = ALBERTA write_dof_real_vec_xdr( dofVector, filename.c_str() );
    \n-
    141 return (success == 0);
    \n-
    142 }
    \n-
    143 };
    \n+
    138 template< int dim >
    \n+
    139 inline int Patch< dim >::neighborIndex ( int i, int neighbor ) const
    \n+
    140 {
    \n+
    141 assert( hasNeighbor( i, neighbor ) );
    \n+
    142 return (list_[ i ].neigh[ neighbor ]->no);
    \n+
    143 }
    \n
    144
    \n-
    145 template<>
    \n-\n-
    147 {
    \n-
    148 typedef ALBERTA DOF_REAL_D_VEC DofVector;
    \n+
    145
    \n+
    146
    \n+
    147 // ForEachInteriorSubChild
    \n+
    148 // -----------------------
    \n
    149
    \n-
    150 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n-
    151 {
    \n-
    152 return ALBERTA get_dof_real_d_vec( name.c_str(), dofSpace );
    \n-
    153 }
    \n-
    154
    \n-
    155 static void free ( DofVector *dofVector )
    \n-
    156 {
    \n-
    157 ALBERTA free_dof_real_d_vec( dofVector );
    \n-
    158 }
    \n-
    159
    \n-
    160 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n-
    161 {
    \n-
    162 return ALBERTA read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n-
    163 }
    \n+
    150 template< int dim >
    \n+
    151 struct ForEachInteriorSubChild< dim, 0 >
    \n+
    152 {
    \n+
    153 template< class Functor >
    \n+
    154 static void apply ( Functor &functor, const Patch< dim > &patch )
    \n+
    155 {
    \n+
    156 for( int i = 0; i < patch.count(); ++i )
    \n+
    157 {
    \n+
    158 Element *const father = patch[ i ];
    \n+
    159 functor( father->child[ 0 ], 0 );
    \n+
    160 functor( father->child[ 1 ], 0 );
    \n+
    161 }
    \n+
    162 }
    \n+
    163 };
    \n
    164
    \n-
    165 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n-
    166 {
    \n-
    167 int success = ALBERTA write_dof_real_d_vec_xdr( dofVector, filename.c_str() );
    \n-
    168 return (success == 0);
    \n-
    169 }
    \n-
    170 };
    \n-
    171
    \n-
    172
    \n-
    173
    \n-
    174 // DofVectorPointer
    \n-
    175 // ----------------
    \n-
    176
    \n-
    177 template< class Dof >
    \n-\n-
    179 {
    \n-\n-
    181
    \n-\n+
    165 template< int dim >
    \n+
    166 struct ForEachInteriorSubChild< dim, dim >
    \n+
    167 {
    \n+
    168 template< class Functor >
    \n+
    169 static void apply ( Functor &functor, const Patch< dim > &patch )
    \n+
    170 {
    \n+
    171 functor( patch[ 0 ]->child[ 0 ], dim );
    \n+
    172 }
    \n+
    173 };
    \n+
    174
    \n+
    175 template<>
    \n+\n+
    177 {
    \n+
    178 template< class Functor >
    \n+
    179 static void apply ( Functor &functor, const Patch< 2 > &patch )
    \n+
    180 {
    \n+
    181 // see alberta/src/2d/lagrange_2_2d.c for details
    \n+
    182 Element *const firstFather = patch[ 0 ];
    \n
    183
    \n-
    184 public:
    \n-
    185 typedef typename DofVectorProvider::DofVector DofVector;
    \n-
    186
    \n-
    187 static const bool supportsAdaptationData = true;
    \n-
    188
    \n-
    189 private:
    \n-
    190 DofVector *dofVector_;
    \n-
    191
    \n-
    192 public:
    \n-\n-
    194 : dofVector_( NULL )
    \n-
    195 {}
    \n-
    196
    \n-\n-
    198 const std::string &name = "" )
    \n-
    199 : dofVector_ ( DofVectorProvider::get( dofSpace, name ) )
    \n-
    200 {}
    \n-
    201
    \n-
    202 explicit DofVectorPointer ( DofVector *dofVector )
    \n-
    203 : dofVector_( dofVector )
    \n-
    204 {}
    \n-
    205
    \n-
    206 explicit operator bool () const
    \n-
    207 {
    \n-
    208 return (bool)dofVector_;
    \n-
    209 }
    \n-
    210
    \n-
    211 operator DofVector * () const
    \n-
    212 {
    \n-
    213 return dofVector_;
    \n-
    214 }
    \n+
    184 Element *const firstChild = firstFather->child[ 0 ];
    \n+
    185 functor( firstChild, 0 );
    \n+
    186 functor( firstChild, 1 );
    \n+
    187
    \n+
    188 functor( firstFather->child[ 1 ], 1 );
    \n+
    189
    \n+
    190 if( patch.count() > 1 )
    \n+
    191 {
    \n+
    192 Element *const father = patch[ 1 ];
    \n+
    193 functor( father->child[ 0 ], 1 );
    \n+
    194 }
    \n+
    195 }
    \n+
    196 };
    \n+
    197
    \n+
    198 template<>
    \n+\n+
    200 {
    \n+
    201 template< class Functor >
    \n+
    202 static void apply ( Functor &functor, const Patch< 3 > &patch )
    \n+
    203 {
    \n+
    204 // see alberta/src/3d/lagrange_3_3d.c for details
    \n+
    205 Element *const firstFather = patch[ 0 ];
    \n+
    206
    \n+
    207 Element *const firstChild = firstFather->child[ 0 ];
    \n+
    208 functor( firstChild, 0 );
    \n+
    209 functor( firstChild, 1 );
    \n+
    210 functor( firstChild, 2 );
    \n+
    211
    \n+
    212 Element *const secondChild = firstFather->child[ 1 ];
    \n+
    213 functor( secondChild, 1 );
    \n+
    214 functor( secondChild, 2 );
    \n
    215
    \n-
    216 operator Dof * () const
    \n-
    217 {
    \n-
    218 Dof *ptr = NULL;
    \n-
    219 GET_DOF_VEC( ptr, dofVector_ );
    \n-
    220 return ptr;
    \n-
    221 }
    \n-
    222
    \n-
    223 const DofSpace *dofSpace () const
    \n-
    224 {
    \n-
    225 return dofVector_->fe_space;
    \n-
    226 }
    \n+
    216 for( int i = 1; i < patch.count(); ++i )
    \n+
    217 {
    \n+
    218 Element *const father = patch[ i ];
    \n+
    219 const int type = patch.elementType( i );
    \n+
    220
    \n+
    221 int lr_set = 0;
    \n+
    222 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
    \n+
    223 lr_set |= 1;
    \n+
    224 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
    \n+
    225 lr_set |= 2;
    \n+
    226 assert( lr_set != 0 );
    \n
    227
    \n-
    228 std::string name () const
    \n-
    229 {
    \n-
    230 if( dofVector_ )
    \n-
    231 return dofVector_->name;
    \n-
    232 else
    \n-
    233 return std::string();
    \n-
    234 }
    \n+
    228 functor( father->child[ 0 ], 0 );
    \n+
    229 switch( lr_set )
    \n+
    230 {
    \n+
    231 case 1 :
    \n+
    232 functor( father->child[ 0 ], 2 );
    \n+
    233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) );
    \n+
    234 break;
    \n
    235
    \n-
    236 void create ( const DofSpace *dofSpace, const std::string &name = "" )
    \n-
    237 {
    \n-
    238 release();
    \n-
    239 dofVector_ = DofVectorProvider::get( dofSpace, name );
    \n-
    240 }
    \n-
    241
    \n-
    242 template< int dim >
    \n-
    243 void read ( const std::string &filename, const MeshPointer< dim > &meshPointer )
    \n-
    244 {
    \n-
    245 release();
    \n-
    246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL );
    \n-
    247 }
    \n-
    248
    \n-
    249 bool write ( const std::string &filename ) const
    \n-
    250 {
    \n-
    251 return DofVectorProvider::write( dofVector_, filename );
    \n-
    252 }
    \n+
    236 case 2 :
    \n+
    237 functor( father->child[ 0 ], 1 );
    \n+
    238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) );
    \n+
    239 break;
    \n+
    240 }
    \n+
    241 }
    \n+
    242 }
    \n+
    243 };
    \n+
    244
    \n+
    245 template<>
    \n+\n+
    247 {
    \n+
    248 template< class Functor >
    \n+
    249 static void apply ( Functor &functor, const Patch< 3 > &patch )
    \n+
    250 {
    \n+
    251 // see alberta/src/3d/lagrange_2_3d.c for details
    \n+
    252 Element *const firstFather = patch[ 0 ];
    \n
    253
    \n-
    254 void release ()
    \n-
    255 {
    \n-
    256 if( dofVector_ )
    \n-
    257 {
    \n-
    258 DofVectorProvider::free( dofVector_ );
    \n-
    259 dofVector_ = NULL;
    \n-
    260 }
    \n-
    261 }
    \n-
    262
    \n-
    263 template< class Functor >
    \n-
    264 void forEach ( Functor &functor ) const
    \n-
    265 {
    \n-
    266 Dof *array = (Dof *)(*this);
    \n-
    267 FOR_ALL_DOFS( dofSpace()->admin, functor( array[ dof ] ) );
    \n-
    268 }
    \n-
    269
    \n-
    270 void initialize ( const Dof &value )
    \n-
    271 {
    \n-
    272 Dof *array = (Dof *)(*this);
    \n-
    273 FOR_ALL_DOFS( dofSpace()->admin, array[ dof ] = value );
    \n-
    274 }
    \n-
    275
    \n-
    276 template< class AdaptationData >
    \n-
    277 AdaptationData *getAdaptationData () const
    \n-
    278 {
    \n-
    279 assert( dofVector_ );
    \n-
    280 assert( dofVector_->user_data );
    \n-
    281 return static_cast< AdaptationData * >( dofVector_->user_data );
    \n-
    282 }
    \n-
    283
    \n-
    284 template< class AdaptationData >
    \n-
    285 void setAdaptationData ( AdaptationData *adaptationData )
    \n-
    286 {
    \n-
    287 assert( dofVector_ );
    \n-
    288 dofVector_->user_data = adaptationData;
    \n-
    289 }
    \n+
    254 Element *const firstChild = firstFather->child[ 0 ];
    \n+
    255 functor( firstChild, 2 );
    \n+
    256 functor( firstChild, 4 );
    \n+
    257 functor( firstChild, 5 );
    \n+
    258
    \n+
    259 functor( firstFather->child[ 1 ], 2 );
    \n+
    260
    \n+
    261 for( int i = 1; i < patch.count(); ++i )
    \n+
    262 {
    \n+
    263 Element *const father = patch[ i ];
    \n+
    264
    \n+
    265 int lr_set = 0;
    \n+
    266 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
    \n+
    267 lr_set = 1;
    \n+
    268 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
    \n+
    269 lr_set += 2;
    \n+
    270 assert( lr_set != 0 );
    \n+
    271
    \n+
    272 switch( lr_set )
    \n+
    273 {
    \n+
    274 case 1 :
    \n+
    275 functor( father->child[ 0 ], 4 );
    \n+
    276 break;
    \n+
    277
    \n+
    278 case 2 :
    \n+
    279 functor( father->child[ 0 ], 5 );
    \n+
    280 break;
    \n+
    281 }
    \n+
    282 }
    \n+
    283 }
    \n+
    284 };
    \n+
    285
    \n+
    286
    \n+
    287
    \n+
    288 // GeometryInFather
    \n+
    289 // ----------------
    \n
    290
    \n-
    291 template< class Interpolation >
    \n-\n-
    293 {
    \n-
    294 assert( dofVector_ );
    \n-
    295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >;
    \n-
    296 }
    \n-
    297
    \n-
    298 template< class Restriction >
    \n-\n-
    300 {
    \n-
    301 assert( dofVector_ );
    \n-
    302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >;
    \n-
    303 }
    \n-
    304
    \n-
    305 private:
    \n-
    306 template< class Interpolation >
    \n-
    307 static void refineInterpolate ( DofVector *dofVector, RC_LIST_EL *list, int n )
    \n-
    308 {
    \n-
    309 const This dofVectorPointer( dofVector );
    \n-
    310 typename Interpolation::Patch patch( list, n );
    \n-
    311 Interpolation::interpolateVector( dofVectorPointer, patch );
    \n-
    312 }
    \n-
    313
    \n-
    314 template< class Restriction >
    \n-
    315 static void coarsenRestrict ( DofVector *dofVector, RC_LIST_EL *list, int n )
    \n-
    316 {
    \n-
    317 const This dofVectorPointer( dofVector );
    \n-
    318 typename Restriction::Patch patch( list, n );
    \n-
    319 Restriction::restrictVector( dofVectorPointer, patch );
    \n-
    320 }
    \n-
    321 };
    \n-
    322
    \n-
    323
    \n-
    324
    \n-
    325 // Auxiliary Functions
    \n-
    326 // --------------------
    \n-
    327
    \n-
    328 inline void abs ( const DofVectorPointer< int > &dofVector )
    \n-
    329 {
    \n-
    330 assert( !dofVector == false );
    \n-
    331 int *array = (int *)dofVector;
    \n-
    332 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
    \n-
    333 array[ dof ] = std::abs( array[ dof ] ) );
    \n-
    334 }
    \n+
    291 template< int dim >
    \n+\n+
    293
    \n+
    294 template<>
    \n+\n+
    296 {
    \n+
    297 static const int dim = 1;
    \n+
    298
    \n+
    299 typedef Real LocalVector[ dim ];
    \n+
    300
    \n+
    301 static const LocalVector &
    \n+
    302 coordinate ( int child, int /* orientation */, int i )
    \n+
    303 {
    \n+
    304 static const Real coords[ 2 ][ dim+1 ][ dim ]
    \n+
    305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } };
    \n+
    306 assert( (i >= 0) && (i <= dim) );
    \n+
    307 return coords[ child ][ i ];
    \n+
    308 }
    \n+
    309 };
    \n+
    310
    \n+
    311 template<>
    \n+\n+
    313 {
    \n+
    314 static const int dim = 2;
    \n+
    315
    \n+
    316 typedef Real LocalVector[ dim ];
    \n+
    317
    \n+
    318 static const LocalVector &
    \n+
    319 coordinate ( int child, int /* orientation */, int i )
    \n+
    320 {
    \n+
    321 static const Real coords[ 2 ][ dim+1 ][ dim ]
    \n+
    322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} },
    \n+
    323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } };
    \n+
    324 assert( (i >= 0) && (i <= dim) );
    \n+
    325 return coords[ child ][ i ];
    \n+
    326 }
    \n+
    327 };
    \n+
    328
    \n+
    329 template<>
    \n+\n+
    331 {
    \n+
    332 static const int dim = 3;
    \n+
    333
    \n+
    334 typedef Real LocalVector[ dim ];
    \n
    335
    \n-
    336
    \n-
    337 inline int max ( const DofVectorPointer< int > &dofVector )
    \n-
    338 {
    \n-
    339 assert( !dofVector == false );
    \n-
    340 int *array = (int *)dofVector;
    \n-
    341 int result = std::numeric_limits< int >::min();
    \n-
    342 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
    \n-
    343 result = std::max( result, array[ dof ] ) );
    \n-
    344 return result;
    \n-
    345 }
    \n-
    346
    \n-
    347
    \n-
    348 inline int min ( const DofVectorPointer< int > &dofVector )
    \n-
    349 {
    \n-
    350 assert( !dofVector == false );
    \n-
    351 int *array = (int *)dofVector;
    \n-
    352 int result = std::numeric_limits< int >::max();
    \n-
    353 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
    \n-
    354 result = std::min( result, array[ dof ] ) );
    \n-
    355 return result;
    \n-
    356 }
    \n-
    357
    \n-
    358 } // namespace Alberta
    \n-
    359
    \n-
    360} // namespace Dune
    \n-
    361
    \n-
    362#endif // #if HAVE_ALBERTA
    \n-
    363
    \n-
    364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH
    \n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-
    provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    336 static const LocalVector &
    \n+
    337 coordinate ( int child, int orientation, int i )
    \n+
    338 {
    \n+
    339 static const Real coords[ 2 ][ dim+1 ][ dim ]
    \n+
    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} },
    \n+
    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} } };
    \n+
    342 static const int flip[ 2 ][ 2 ][ dim+1 ]
    \n+
    343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } };
    \n+
    344 assert( (i >= 0) && (i <= dim) );
    \n+
    345 i = flip[ child ][ orientation ][ i ];
    \n+
    346 return coords[ child ][ i ];
    \n+
    347 }
    \n+
    348 };
    \n+
    349
    \n+
    350 }
    \n+
    351
    \n+
    352}
    \n+
    353
    \n+
    354#endif // #if HAVE_ALBERTA
    \n+
    355
    \n+
    356#endif
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    ALBERTA MESH Mesh
    Definition: misc.hh:53
    \n-
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n+
    ALBERTA REAL_B LocalVector
    Definition: misc.hh:49
    \n+
    ALBERTA EL Element
    Definition: misc.hh:54
    \n
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n-
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n-
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n-
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n-
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n
    Definition: meshpointer.hh:40
    \n-
    Definition: dofvector.hh:35
    \n-
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:42
    \n-
    ALBERTA DOF_INT_VEC DofVector
    Definition: dofvector.hh:40
    \n-
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:57
    \n-
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:47
    \n-
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:52
    \n-
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:84
    \n-
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:74
    \n-
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:69
    \n-
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:79
    \n-
    ALBERTA DOF_SCHAR_VEC DofVector
    Definition: dofvector.hh:67
    \n-
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:101
    \n-
    ALBERTA DOF_UCHAR_VEC DofVector
    Definition: dofvector.hh:94
    \n-
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:106
    \n-
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:96
    \n-
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:111
    \n-
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:123
    \n-
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:133
    \n-
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:128
    \n-
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:138
    \n-
    ALBERTA DOF_REAL_VEC DofVector
    Definition: dofvector.hh:121
    \n-
    ALBERTA DOF_REAL_D_VEC DofVector
    Definition: dofvector.hh:148
    \n-
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:155
    \n-
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:165
    \n-
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:160
    \n-
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:150
    \n-
    Definition: dofvector.hh:179
    \n-
    DofVectorProvider::DofVector DofVector
    Definition: dofvector.hh:185
    \n-
    void setupInterpolation()
    Definition: dofvector.hh:292
    \n-
    void initialize(const Dof &value)
    Definition: dofvector.hh:270
    \n-
    void read(const std::string &filename, const MeshPointer< dim > &meshPointer)
    Definition: dofvector.hh:243
    \n-
    void create(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:236
    \n-
    void release()
    Definition: dofvector.hh:254
    \n-
    AdaptationData * getAdaptationData() const
    Definition: dofvector.hh:277
    \n-
    void setupRestriction()
    Definition: dofvector.hh:299
    \n-
    DofVectorPointer()
    Definition: dofvector.hh:193
    \n-
    void setAdaptationData(AdaptationData *adaptationData)
    Definition: dofvector.hh:285
    \n-
    bool write(const std::string &filename) const
    Definition: dofvector.hh:249
    \n-
    DofVectorPointer(DofVector *dofVector)
    Definition: dofvector.hh:202
    \n-
    const DofSpace * dofSpace() const
    Definition: dofvector.hh:223
    \n-
    static const bool supportsAdaptationData
    Definition: dofvector.hh:187
    \n-
    std::string name() const
    Definition: dofvector.hh:228
    \n-
    void forEach(Functor &functor) const
    Definition: dofvector.hh:264
    \n-
    DofVectorPointer(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:197
    \n+\n+
    static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
    Definition: elementinfo.hh:752
    \n+
    Definition: refinement.hh:31
    \n+
    Definition: refinement.hh:40
    \n+
    int neighborIndex(int i, int neighbor) const
    Definition: refinement.hh:139
    \n+
    int elementType(int i) const
    Definition: refinement.hh:125
    \n+
    int count() const
    Definition: refinement.hh:67
    \n+
    ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const
    Definition: refinement.hh:105
    \n+
    void forEach(Functor &functor) const
    Definition: refinement.hh:80
    \n+
    Element * operator[](int i) const
    Definition: refinement.hh:95
    \n+
    void forEachInteriorSubChild(Functor &functor) const
    Definition: refinement.hh:87
    \n+
    static const int dimension
    Definition: refinement.hh:47
    \n+
    bool hasNeighbor(int i, int neighbor) const
    Definition: refinement.hh:133
    \n+
    Patch(ElementList *list, int count)
    Definition: refinement.hh:58
    \n+
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: refinement.hh:49
    \n+
    ALBERTA RC_LIST_EL ElementList
    Definition: refinement.hh:51
    \n+
    static void apply(Functor &functor, const Patch< dim > &patch)
    Definition: refinement.hh:154
    \n+
    static void apply(Functor &functor, const Patch< dim > &patch)
    Definition: refinement.hh:169
    \n+
    static void apply(Functor &functor, const Patch< 2 > &patch)
    Definition: refinement.hh:179
    \n+
    static void apply(Functor &functor, const Patch< 3 > &patch)
    Definition: refinement.hh:202
    \n+
    static void apply(Functor &functor, const Patch< 3 > &patch)
    Definition: refinement.hh:249
    \n+
    Definition: refinement.hh:292
    \n+
    static const LocalVector & coordinate(int child, int, int i)
    Definition: refinement.hh:302
    \n+
    static const LocalVector & coordinate(int child, int, int i)
    Definition: refinement.hh:319
    \n+
    static const LocalVector & coordinate(int child, int orientation, int i)
    Definition: refinement.hh:337
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,565 +5,457 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-dofvector.hh\n+refinement.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_DOFVECTOR_HH\n- 6#define DUNE_ALBERTA_DOFVECTOR_HH\n+ 5#ifndef DUNE_ALBERTA_REFINEMENT_HH\n+ 6#define DUNE_ALBERTA_REFINEMENT_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13#include \n- 14\n- 15#if HAVE_ALBERTA\n- 16\n- 17namespace Dune\n- 18{\n- 19\n- 20 namespace Alberta\n- 21 {\n- 22\n- 23 // External Forward Declarations\n- 24 // -----------------------------\n- 25\n- 26 template< int dim >\n- 27 class MeshPointer;\n- 28\n+ 14#include \n+ 15\n+ 16#include \n+ 17#include \n+ 18\n+ 19#if HAVE_ALBERTA\n+ 20\n+ 21namespace Dune\n+ 22{\n+ 23\n+ 24 namespace Alberta\n+ 25 {\n+ 26\n+ 27 // Internal Forward Declarations\n+ 28 // -----------------------------\n 29\n- 30\n- 31 // DofVectorProvider\n- 32 // -----------------\n+ 30 template< int dim, int codim >\n+31 struct ForEachInteriorSubChild;\n+ 32\n 33\n- 34 template< class Dof >\n-35 struct DofVectorProvider;\n- 36\n- 37 template<>\n-38 struct DofVectorProvider< int >\n- 39 {\n-40 typedef ALBERTA DOF_INT_VEC DofVector;\n- 41\n-42 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n- 43 {\n- 44 return ALBERTA get_dof_int_vec( name.c_str(), dofSpace );\n- 45 }\n- 46\n-47 static void free ( DofVector *dofVector )\n- 48 {\n- 49 ALBERTA free_dof_int_vec( dofVector );\n- 50 }\n- 51\n-52 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace )\n- 53 {\n- 54 return ALBERTA read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace );\n- 55 }\n+ 34\n+ 35 // Patch\n+ 36 // -----\n+ 37\n+ 38 template< int dim >\n+39 class Patch\n+ 40 {\n+ 41 typedef Patch<_dim_> This;\n+ 42\n+ 43 static_assert(((dim >= 1) && (dim <= 3)),\n+ 44 \"Alberta supports only dimensions 1, 2, 3\");\n+ 45\n+ 46 public:\n+47 static const int dimension = dim;\n+ 48\n+49 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n+ 50\n+51 typedef ALBERTA RC_LIST_EL ElementList;\n+ 52\n+ 53 private:\n+ 54 ElementList *list_;\n+ 55 int count_;\n 56\n-57 static bool write ( const DofVector *dofVector, const std::string &filename\n-)\n- 58 {\n- 59 int success = ALBERTA write_dof_int_vec_xdr( dofVector, filename.c_str() );\n- 60 return (success == 0);\n- 61 }\n- 62 };\n- 63\n- 64 template<>\n-65 struct DofVectorProvider< signed char >\n- 66 {\n-67 typedef ALBERTA DOF_SCHAR_VEC DofVector;\n- 68\n-69 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n- 70 {\n- 71 return ALBERTA get_dof_schar_vec( name.c_str(), dofSpace );\n- 72 }\n- 73\n-74 static void free ( DofVector *dofVector )\n- 75 {\n- 76 ALBERTA free_dof_schar_vec( dofVector );\n- 77 }\n+ 57 public:\n+58 Patch ( ElementList *list, int count )\n+ 59 : list_( list ),\n+ 60 count_( count )\n+ 61 {\n+ 62 assert( count > 0 );\n+ 63 }\n+ 64\n+ 65 Element *operator[]( int i ) const;\n+ 66\n+67 int count () const\n+ 68 {\n+ 69 return count_;\n+ 70 }\n+ 71\n+ 72 template< class LevelProvider >\n+ 73 ElementInfo elementInfo ( int i, const LevelProvider &levelProvider )\n+const;\n+ 74\n+ 75 int elementType ( int i ) const;\n+ 76 bool hasNeighbor ( int i, int neighbor ) const;\n+ 77 int neighborIndex ( int i, int neighbor ) const;\n 78\n-79 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace )\n- 80 {\n- 81 return ALBERTA read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace );\n- 82 }\n- 83\n-84 static bool write ( const DofVector *dofVector, const std::string &filename\n-)\n- 85 {\n- 86 int success = ALBERTA write_dof_schar_vec_xdr( dofVector, filename.c_str()\n-);\n- 87 return (success == 0);\n- 88 }\n- 89 };\n- 90\n- 91 template<>\n-92 struct DofVectorProvider< unsigned char >\n- 93 {\n-94 typedef ALBERTA DOF_UCHAR_VEC DofVector;\n- 95\n-96 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n- 97 {\n- 98 return ALBERTA get_dof_uchar_vec( name.c_str(), dofSpace );\n+ 79 template< class Functor >\n+80 void forEach ( Functor &functor ) const\n+ 81 {\n+ 82 for( int i = 0; i < count(); ++i )\n+ 83 functor( (*this)[ i ] );\n+ 84 }\n+ 85\n+ 86 template< int codim, class Functor >\n+87 void forEachInteriorSubChild ( Functor &functor ) const\n+ 88 {\n+ 89 ForEachInteriorSubChild<_dim,_codim_>::apply( functor, *this );\n+ 90 }\n+ 91 };\n+ 92\n+ 93\n+ 94 template< int dim >\n+95 inline Element *Patch<_dim_>::operator[]( int i ) const\n+ 96 {\n+ 97 assert( (i >= 0) && (i < count()) );\n+ 98 return list_[ i ].el_info.el;\n 99 }\n 100\n-101 static void free ( DofVector *dofVector )\n- 102 {\n- 103 ALBERTA free_dof_uchar_vec( dofVector );\n- 104 }\n- 105\n-106 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace )\n- 107 {\n- 108 return ALBERTA read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace );\n+ 101\n+ 102 template< int dim >\n+ 103 template< class LevelProvider >\n+ 104 inline typename Patch<_dim_>::ElementInfo\n+105 Patch<_dim_>::elementInfo ( int i, const LevelProvider &levelProvider )\n+const\n+ 106 {\n+ 107 assert( (i >= 0) && (i < count()) );\n+ 108 return ElementInfo::createFake( list_[ i ].el_info );\n 109 }\n 110\n-111 static bool write ( const DofVector *dofVector, const std::string &filename\n-)\n- 112 {\n- 113 int success = ALBERTA write_dof_uchar_vec_xdr( dofVector, filename.c_str()\n-);\n- 114 return (success == 0);\n- 115 }\n- 116 };\n- 117\n- 118 template<>\n-119 struct DofVectorProvider< Real >\n- 120 {\n-121 typedef ALBERTA DOF_REAL_VEC DofVector;\n+ 111 template<>\n+ 112 template< class LevelProvider >\n+ 113 inline typename Patch<_2_>::ElementInfo\n+114 Patch<_2_>::elementInfo ( int i, const LevelProvider &levelProvider ) const\n+ 115 {\n+ 116 assert( (i >= 0) && (i < count()) );\n+ 117 const MeshPointer<_2_> &mesh = levelProvider.mesh();\n+ 118 const Element *element = (*this)[ i ];\n+ 119 const int level = levelProvider( element );\n+ 120 return ElementInfo::createFake( mesh, element, level );\n+ 121 }\n 122\n-123 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n- 124 {\n- 125 return ALBERTA get_dof_real_vec( name.c_str(), dofSpace );\n- 126 }\n- 127\n-128 static void free ( DofVector *dofVector )\n- 129 {\n- 130 ALBERTA free_dof_real_vec( dofVector );\n- 131 }\n- 132\n-133 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace )\n+ 123\n+ 124 template< int dim >\n+125 inline int Patch<_dim_>::elementType ( int i ) const\n+ 126 {\n+ 127 assert( (i >= 0) && (i < count()) );\n+ 128 return list_[ i ].el_info.el_type;\n+ 129 }\n+ 130\n+ 131\n+ 132 template< int dim >\n+133 inline bool Patch<_dim_>::hasNeighbor ( int i, int neighbor ) const\n 134 {\n- 135 return ALBERTA read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace );\n+ 135 return (list_[ i ].neigh[ neighbor ] != NULL);\n 136 }\n 137\n-138 static bool write ( const DofVector *dofVector, const std::string &filename\n-)\n- 139 {\n- 140 int success = ALBERTA write_dof_real_vec_xdr( dofVector, filename.c_str()\n-);\n- 141 return (success == 0);\n- 142 }\n- 143 };\n+ 138 template< int dim >\n+139 inline int Patch<_dim_>::neighborIndex ( int i, int neighbor ) const\n+ 140 {\n+ 141 assert( hasNeighbor( i, neighbor ) );\n+ 142 return (list_[ i ].neigh[ neighbor ]->no);\n+ 143 }\n 144\n- 145 template<>\n-146 struct DofVectorProvider< GlobalVector >\n- 147 {\n-148 typedef ALBERTA DOF_REAL_D_VEC DofVector;\n+ 145\n+ 146\n+ 147 // ForEachInteriorSubChild\n+ 148 // -----------------------\n 149\n-150 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n- 151 {\n- 152 return ALBERTA get_dof_real_d_vec( name.c_str(), dofSpace );\n- 153 }\n- 154\n-155 static void free ( DofVector *dofVector )\n- 156 {\n- 157 ALBERTA free_dof_real_d_vec( dofVector );\n- 158 }\n- 159\n-160 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace )\n- 161 {\n- 162 return ALBERTA read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace\n-);\n- 163 }\n+ 150 template< int dim >\n+151 struct ForEachInteriorSubChild< dim, 0 >\n+ 152 {\n+ 153 template< class Functor >\n+154 static void apply ( Functor &functor, const Patch<_dim_> &patch )\n+ 155 {\n+ 156 for( int i = 0; i < patch.count(); ++i )\n+ 157 {\n+ 158 Element *const father = patch[ i ];\n+ 159 functor( father->child[ 0 ], 0 );\n+ 160 functor( father->child[ 1 ], 0 );\n+ 161 }\n+ 162 }\n+ 163 };\n 164\n-165 static bool write ( const DofVector *dofVector, const std::string &filename\n-)\n- 166 {\n- 167 int success = ALBERTA write_dof_real_d_vec_xdr( dofVector, filename.c_str\n-() );\n- 168 return (success == 0);\n- 169 }\n- 170 };\n- 171\n- 172\n- 173\n- 174 // DofVectorPointer\n- 175 // ----------------\n- 176\n- 177 template< class Dof >\n-178 class DofVectorPointer\n- 179 {\n- 180 typedef DofVectorPointer<_Dof_> This;\n- 181\n- 182 typedef Alberta::DofVectorProvider<_Dof_> DofVectorProvider;\n+ 165 template< int dim >\n+166 struct ForEachInteriorSubChild< dim, dim >\n+ 167 {\n+ 168 template< class Functor >\n+169 static void apply ( Functor &functor, const Patch<_dim_> &patch )\n+ 170 {\n+ 171 functor( patch[ 0 ]->child[ 0 ], dim );\n+ 172 }\n+ 173 };\n+ 174\n+ 175 template<>\n+176 struct ForEachInteriorSubChild< 2, 1 >\n+ 177 {\n+ 178 template< class Functor >\n+179 static void apply ( Functor &functor, const Patch<_2_> &patch )\n+ 180 {\n+ 181 // see alberta/src/2d/lagrange_2_2d.c for details\n+ 182 Element *const firstFather = patch[ 0 ];\n 183\n- 184 public:\n-185 typedef typename DofVectorProvider::DofVector DofVector;\n- 186\n-187 static const bool supportsAdaptationData = true;\n- 188\n- 189 private:\n- 190 DofVector *dofVector_;\n- 191\n- 192 public:\n-193 DofVectorPointer ()\n- 194 : dofVector_( NULL )\n- 195 {}\n- 196\n-197 explicit DofVectorPointer ( const DofSpace *dofSpace,\n- 198 const std::string &name = \"\" )\n- 199 : dofVector_ ( DofVectorProvider::get( dofSpace, name ) )\n- 200 {}\n- 201\n-202 explicit DofVectorPointer ( DofVector *dofVector )\n- 203 : dofVector_( dofVector )\n- 204 {}\n- 205\n-206 explicit operator bool () const\n- 207 {\n- 208 return (bool)dofVector_;\n- 209 }\n- 210\n-211 operator DofVector * () const\n- 212 {\n- 213 return dofVector_;\n- 214 }\n+ 184 Element *const firstChild = firstFather->child[ 0 ];\n+ 185 functor( firstChild, 0 );\n+ 186 functor( firstChild, 1 );\n+ 187\n+ 188 functor( firstFather->child[ 1 ], 1 );\n+ 189\n+ 190 if( patch.count() > 1 )\n+ 191 {\n+ 192 Element *const father = patch[ 1 ];\n+ 193 functor( father->child[ 0 ], 1 );\n+ 194 }\n+ 195 }\n+ 196 };\n+ 197\n+ 198 template<>\n+199 struct ForEachInteriorSubChild< 3, 1 >\n+ 200 {\n+ 201 template< class Functor >\n+202 static void apply ( Functor &functor, const Patch<_3_> &patch )\n+ 203 {\n+ 204 // see alberta/src/3d/lagrange_3_3d.c for details\n+ 205 Element *const firstFather = patch[ 0 ];\n+ 206\n+ 207 Element *const firstChild = firstFather->child[ 0 ];\n+ 208 functor( firstChild, 0 );\n+ 209 functor( firstChild, 1 );\n+ 210 functor( firstChild, 2 );\n+ 211\n+ 212 Element *const secondChild = firstFather->child[ 1 ];\n+ 213 functor( secondChild, 1 );\n+ 214 functor( secondChild, 2 );\n 215\n-216 operator Dof * () const\n+ 216 for( int i = 1; i < patch.count(); ++i )\n 217 {\n- 218 Dof *ptr = NULL;\n- 219 GET_DOF_VEC( ptr, dofVector_ );\n- 220 return ptr;\n- 221 }\n- 222\n-223 const DofSpace *dofSpace () const\n- 224 {\n- 225 return dofVector_->fe_space;\n- 226 }\n+ 218 Element *const father = patch[ i ];\n+ 219 const int type = patch.elementType( i );\n+ 220\n+ 221 int lr_set = 0;\n+ 222 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )\n+ 223 lr_set |= 1;\n+ 224 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )\n+ 225 lr_set |= 2;\n+ 226 assert( lr_set != 0 );\n 227\n-228 std::string name () const\n- 229 {\n- 230 if( dofVector_ )\n- 231 return dofVector_->name;\n- 232 else\n- 233 return std::string();\n- 234 }\n+ 228 functor( father->child[ 0 ], 0 );\n+ 229 switch( lr_set )\n+ 230 {\n+ 231 case 1 :\n+ 232 functor( father->child[ 0 ], 2 );\n+ 233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) );\n+ 234 break;\n 235\n-236 void create ( const DofSpace *dofSpace, const std::string &name = \"\" )\n- 237 {\n- 238 release();\n- 239 dofVector_ = DofVectorProvider::get( dofSpace, name );\n+ 236 case 2 :\n+ 237 functor( father->child[ 0 ], 1 );\n+ 238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) );\n+ 239 break;\n 240 }\n- 241\n- 242 template< int dim >\n-243 void read ( const std::string &filename, const MeshPointer<_dim_>\n-&meshPointer )\n- 244 {\n- 245 release();\n- 246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL );\n- 247 }\n- 248\n-249 bool write ( const std::string &filename ) const\n+ 241 }\n+ 242 }\n+ 243 };\n+ 244\n+ 245 template<>\n+246 struct ForEachInteriorSubChild< 3, 2 >\n+ 247 {\n+ 248 template< class Functor >\n+249 static void apply ( Functor &functor, const Patch<_3_> &patch )\n 250 {\n- 251 return DofVectorProvider::write( dofVector_, filename );\n- 252 }\n+ 251 // see alberta/src/3d/lagrange_2_3d.c for details\n+ 252 Element *const firstFather = patch[ 0 ];\n 253\n-254 void release ()\n- 255 {\n- 256 if( dofVector_ )\n- 257 {\n- 258 DofVectorProvider::free( dofVector_ );\n- 259 dofVector_ = NULL;\n- 260 }\n- 261 }\n- 262\n- 263 template< class Functor >\n-264 void forEach ( Functor &functor ) const\n- 265 {\n- 266 Dof *array = (Dof *)(*this);\n- 267 FOR_ALL_DOFS( dofSpace()->admin, functor( array[ dof ] ) );\n- 268 }\n- 269\n-270 void initialize ( const Dof &value )\n- 271 {\n- 272 Dof *array = (Dof *)(*this);\n- 273 FOR_ALL_DOFS( dofSpace()->admin, array[ dof ] = value );\n- 274 }\n- 275\n- 276 template< class AdaptationData >\n-277 AdaptationData *getAdaptationData () const\n- 278 {\n- 279 assert( dofVector_ );\n- 280 assert( dofVector_->user_data );\n- 281 return static_cast< AdaptationData * >( dofVector_->user_data );\n+ 254 Element *const firstChild = firstFather->child[ 0 ];\n+ 255 functor( firstChild, 2 );\n+ 256 functor( firstChild, 4 );\n+ 257 functor( firstChild, 5 );\n+ 258\n+ 259 functor( firstFather->child[ 1 ], 2 );\n+ 260\n+ 261 for( int i = 1; i < patch.count(); ++i )\n+ 262 {\n+ 263 Element *const father = patch[ i ];\n+ 264\n+ 265 int lr_set = 0;\n+ 266 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )\n+ 267 lr_set = 1;\n+ 268 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )\n+ 269 lr_set += 2;\n+ 270 assert( lr_set != 0 );\n+ 271\n+ 272 switch( lr_set )\n+ 273 {\n+ 274 case 1 :\n+ 275 functor( father->child[ 0 ], 4 );\n+ 276 break;\n+ 277\n+ 278 case 2 :\n+ 279 functor( father->child[ 0 ], 5 );\n+ 280 break;\n+ 281 }\n 282 }\n- 283\n- 284 template< class AdaptationData >\n-285 void setAdaptationData ( AdaptationData *adaptationData )\n- 286 {\n- 287 assert( dofVector_ );\n- 288 dofVector_->user_data = adaptationData;\n- 289 }\n+ 283 }\n+ 284 };\n+ 285\n+ 286\n+ 287\n+ 288 // GeometryInFather\n+ 289 // ----------------\n 290\n- 291 template< class Interpolation >\n-292 void setupInterpolation ()\n- 293 {\n- 294 assert( dofVector_ );\n- 295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >;\n- 296 }\n- 297\n- 298 template< class Restriction >\n-299 void setupRestriction ()\n- 300 {\n- 301 assert( dofVector_ );\n- 302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >;\n- 303 }\n- 304\n- 305 private:\n- 306 template< class Interpolation >\n- 307 static void refineInterpolate ( DofVector *dofVector, RC_LIST_EL *list,\n-int n )\n- 308 {\n- 309 const This dofVectorPointer( dofVector );\n- 310 typename Interpolation::Patch patch( list, n );\n- 311 Interpolation::interpolateVector( dofVectorPointer, patch );\n- 312 }\n- 313\n- 314 template< class Restriction >\n- 315 static void coarsenRestrict ( DofVector *dofVector, RC_LIST_EL *list, int\n-n )\n- 316 {\n- 317 const This dofVectorPointer( dofVector );\n- 318 typename Restriction::Patch patch( list, n );\n- 319 Restriction::restrictVector( dofVectorPointer, patch );\n- 320 }\n- 321 };\n- 322\n- 323\n- 324\n- 325 // Auxiliary Functions\n- 326 // --------------------\n- 327\n-328 inline void abs ( const DofVectorPointer<_int_> &dofVector )\n- 329 {\n- 330 assert( !dofVector == false );\n- 331 int *array = (int *)dofVector;\n- 332 FOR_ALL_DOFS( dofVector.dofSpace()->admin,\n- 333 array[ dof ] = std::abs( array[ dof ] ) );\n- 334 }\n+ 291 template< int dim >\n+292 struct GeometryInFather;\n+ 293\n+ 294 template<>\n+295 struct GeometryInFather< 1 >\n+ 296 {\n+297 static const int dim = 1;\n+ 298\n+299 typedef Real LocalVector[ dim ];\n+ 300\n+ 301 static const LocalVector &\n+302 coordinate ( int child, int /* orientation */, int i )\n+ 303 {\n+ 304 static const Real coords[ 2 ][ dim+1 ][ dim ]\n+ 305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } };\n+ 306 assert( (i >= 0) && (i <= dim) );\n+ 307 return coords[ child ][ i ];\n+ 308 }\n+ 309 };\n+ 310\n+ 311 template<>\n+312 struct GeometryInFather< 2 >\n+ 313 {\n+314 static const int dim = 2;\n+ 315\n+316 typedef Real LocalVector[ dim ];\n+ 317\n+ 318 static const LocalVector &\n+319 coordinate ( int child, int /* orientation */, int i )\n+ 320 {\n+ 321 static const Real coords[ 2 ][ dim+1 ][ dim ]\n+ 322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} },\n+ 323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } };\n+ 324 assert( (i >= 0) && (i <= dim) );\n+ 325 return coords[ child ][ i ];\n+ 326 }\n+ 327 };\n+ 328\n+ 329 template<>\n+330 struct GeometryInFather< 3 >\n+ 331 {\n+332 static const int dim = 3;\n+ 333\n+334 typedef Real LocalVector[ dim ];\n 335\n- 336\n-337 inline int max ( const DofVectorPointer<_int_> &dofVector )\n+ 336 static const LocalVector &\n+337 coordinate ( int child, int orientation, int i )\n 338 {\n- 339 assert( !dofVector == false );\n- 340 int *array = (int *)dofVector;\n- 341 int result = std::numeric_limits<_int_>::min();\n- 342 FOR_ALL_DOFS( dofVector.dofSpace()->admin,\n- 343 result = std::max( result, array[ dof ] ) );\n- 344 return result;\n- 345 }\n- 346\n- 347\n-348 inline int min ( const DofVectorPointer<_int_> &dofVector )\n- 349 {\n- 350 assert( !dofVector == false );\n- 351 int *array = (int *)dofVector;\n- 352 int result = std::numeric_limits<_int_>::max();\n- 353 FOR_ALL_DOFS( dofVector.dofSpace()->admin,\n- 354 result = std::min( result, array[ dof ] ) );\n- 355 return result;\n- 356 }\n- 357\n- 358 } // namespace Alberta\n- 359\n- 360} // namespace Dune\n- 361\n- 362#endif // #if HAVE_ALBERTA\n- 363\n- 364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH\n+ 339 static const Real coords[ 2 ][ dim+1 ][ dim ]\n+ 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}\n+},\n+ 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} } };\n+ 342 static const int flip[ 2 ][ 2 ][ dim+1 ]\n+ 343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } };\n+ 344 assert( (i >= 0) && (i <= dim) );\n+ 345 i = flip[ child ][ orientation ][ i ];\n+ 346 return coords[ child ][ i ];\n+ 347 }\n+ 348 };\n+ 349\n+ 350 }\n+ 351\n+ 352}\n+ 353\n+ 354#endif // #if HAVE_ALBERTA\n+ 355\n+ 356#endif\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n misc.hh\n ALBERTA\n #define ALBERTA\n Definition: albertaheader.hh:29\n-refinement.hh\n-provides a wrapper for ALBERTA's refinement patches and the corners for\n-geometryInFather\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::Mesh\n-ALBERTA MESH Mesh\n-Definition: misc.hh:53\n-Dune::Alberta::abs\n-void abs(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:328\n+Dune::Alberta::LocalVector\n+ALBERTA REAL_B LocalVector\n+Definition: misc.hh:49\n+Dune::Alberta::Element\n+ALBERTA EL Element\n+Definition: misc.hh:54\n Dune::Alberta::Real\n ALBERTA REAL Real\n Definition: misc.hh:48\n-Dune::Alberta::DofSpace\n-ALBERTA FE_SPACE DofSpace\n-Definition: misc.hh:65\n-Dune::Alberta::min\n-int min(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:348\n-Dune::Alberta::max\n-int max(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:337\n-Dune::Alberta::GlobalVector\n-ALBERTA REAL_D GlobalVector\n-Definition: misc.hh:50\n Dune::Alberta::MeshPointer\n Definition: meshpointer.hh:40\n-Dune::Alberta::DofVectorProvider\n-Definition: dofvector.hh:35\n-Dune::Alberta::DofVectorProvider<_int_>::get\n-static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n-Definition: dofvector.hh:42\n-Dune::Alberta::DofVectorProvider<_int_>::DofVector\n-ALBERTA DOF_INT_VEC DofVector\n-Definition: dofvector.hh:40\n-Dune::Alberta::DofVectorProvider<_int_>::write\n-static bool write(const DofVector *dofVector, const std::string &filename)\n-Definition: dofvector.hh:57\n-Dune::Alberta::DofVectorProvider<_int_>::free\n-static void free(DofVector *dofVector)\n-Definition: dofvector.hh:47\n-Dune::Alberta::DofVectorProvider<_int_>::read\n-static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace)\n-Definition: dofvector.hh:52\n-Dune::Alberta::DofVectorProvider<_signed_char_>::write\n-static bool write(const DofVector *dofVector, const std::string &filename)\n-Definition: dofvector.hh:84\n-Dune::Alberta::DofVectorProvider<_signed_char_>::free\n-static void free(DofVector *dofVector)\n-Definition: dofvector.hh:74\n-Dune::Alberta::DofVectorProvider<_signed_char_>::get\n-static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n-Definition: dofvector.hh:69\n-Dune::Alberta::DofVectorProvider<_signed_char_>::read\n-static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace)\n-Definition: dofvector.hh:79\n-Dune::Alberta::DofVectorProvider<_signed_char_>::DofVector\n-ALBERTA DOF_SCHAR_VEC DofVector\n-Definition: dofvector.hh:67\n-Dune::Alberta::DofVectorProvider<_unsigned_char_>::free\n-static void free(DofVector *dofVector)\n-Definition: dofvector.hh:101\n-Dune::Alberta::DofVectorProvider<_unsigned_char_>::DofVector\n-ALBERTA DOF_UCHAR_VEC DofVector\n-Definition: dofvector.hh:94\n-Dune::Alberta::DofVectorProvider<_unsigned_char_>::read\n-static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace)\n-Definition: dofvector.hh:106\n-Dune::Alberta::DofVectorProvider<_unsigned_char_>::get\n-static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n-Definition: dofvector.hh:96\n-Dune::Alberta::DofVectorProvider<_unsigned_char_>::write\n-static bool write(const DofVector *dofVector, const std::string &filename)\n-Definition: dofvector.hh:111\n-Dune::Alberta::DofVectorProvider<_Real_>::get\n-static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n-Definition: dofvector.hh:123\n-Dune::Alberta::DofVectorProvider<_Real_>::read\n-static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace)\n-Definition: dofvector.hh:133\n-Dune::Alberta::DofVectorProvider<_Real_>::free\n-static void free(DofVector *dofVector)\n-Definition: dofvector.hh:128\n-Dune::Alberta::DofVectorProvider<_Real_>::write\n-static bool write(const DofVector *dofVector, const std::string &filename)\n-Definition: dofvector.hh:138\n-Dune::Alberta::DofVectorProvider<_Real_>::DofVector\n-ALBERTA DOF_REAL_VEC DofVector\n-Definition: dofvector.hh:121\n-Dune::Alberta::DofVectorProvider<_GlobalVector_>::DofVector\n-ALBERTA DOF_REAL_D_VEC DofVector\n-Definition: dofvector.hh:148\n-Dune::Alberta::DofVectorProvider<_GlobalVector_>::free\n-static void free(DofVector *dofVector)\n-Definition: dofvector.hh:155\n-Dune::Alberta::DofVectorProvider<_GlobalVector_>::write\n-static bool write(const DofVector *dofVector, const std::string &filename)\n-Definition: dofvector.hh:165\n-Dune::Alberta::DofVectorProvider<_GlobalVector_>::read\n-static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n-*dofSpace)\n-Definition: dofvector.hh:160\n-Dune::Alberta::DofVectorProvider<_GlobalVector_>::get\n-static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n-Definition: dofvector.hh:150\n-Dune::Alberta::DofVectorPointer\n-Definition: dofvector.hh:179\n-Dune::Alberta::DofVectorPointer::DofVector\n-DofVectorProvider::DofVector DofVector\n-Definition: dofvector.hh:185\n-Dune::Alberta::DofVectorPointer::setupInterpolation\n-void setupInterpolation()\n-Definition: dofvector.hh:292\n-Dune::Alberta::DofVectorPointer::initialize\n-void initialize(const Dof &value)\n-Definition: dofvector.hh:270\n-Dune::Alberta::DofVectorPointer::read\n-void read(const std::string &filename, const MeshPointer< dim > &meshPointer)\n-Definition: dofvector.hh:243\n-Dune::Alberta::DofVectorPointer::create\n-void create(const DofSpace *dofSpace, const std::string &name=\"\")\n-Definition: dofvector.hh:236\n-Dune::Alberta::DofVectorPointer::release\n-void release()\n-Definition: dofvector.hh:254\n-Dune::Alberta::DofVectorPointer::getAdaptationData\n-AdaptationData * getAdaptationData() const\n-Definition: dofvector.hh:277\n-Dune::Alberta::DofVectorPointer::setupRestriction\n-void setupRestriction()\n-Definition: dofvector.hh:299\n-Dune::Alberta::DofVectorPointer::DofVectorPointer\n-DofVectorPointer()\n-Definition: dofvector.hh:193\n-Dune::Alberta::DofVectorPointer::setAdaptationData\n-void setAdaptationData(AdaptationData *adaptationData)\n-Definition: dofvector.hh:285\n-Dune::Alberta::DofVectorPointer::write\n-bool write(const std::string &filename) const\n-Definition: dofvector.hh:249\n-Dune::Alberta::DofVectorPointer::DofVectorPointer\n-DofVectorPointer(DofVector *dofVector)\n-Definition: dofvector.hh:202\n-Dune::Alberta::DofVectorPointer::dofSpace\n-const DofSpace * dofSpace() const\n-Definition: dofvector.hh:223\n-Dune::Alberta::DofVectorPointer::supportsAdaptationData\n-static const bool supportsAdaptationData\n-Definition: dofvector.hh:187\n-Dune::Alberta::DofVectorPointer::name\n-std::string name() const\n-Definition: dofvector.hh:228\n-Dune::Alberta::DofVectorPointer::forEach\n+Dune::Alberta::ElementInfo<_dimension_>\n+Dune::Alberta::ElementInfo::createFake\n+static ElementInfo createFake(const MeshPointer &mesh, const Element *element,\n+int level, int type=0)\n+Definition: elementinfo.hh:752\n+Dune::Alberta::ForEachInteriorSubChild\n+Definition: refinement.hh:31\n+Dune::Alberta::Patch\n+Definition: refinement.hh:40\n+Dune::Alberta::Patch::neighborIndex\n+int neighborIndex(int i, int neighbor) const\n+Definition: refinement.hh:139\n+Dune::Alberta::Patch::elementType\n+int elementType(int i) const\n+Definition: refinement.hh:125\n+Dune::Alberta::Patch::count\n+int count() const\n+Definition: refinement.hh:67\n+Dune::Alberta::Patch::elementInfo\n+ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const\n+Definition: refinement.hh:105\n+Dune::Alberta::Patch::forEach\n void forEach(Functor &functor) const\n-Definition: dofvector.hh:264\n-Dune::Alberta::DofVectorPointer::DofVectorPointer\n-DofVectorPointer(const DofSpace *dofSpace, const std::string &name=\"\")\n-Definition: dofvector.hh:197\n+Definition: refinement.hh:80\n+Dune::Alberta::Patch::operator[]\n+Element * operator[](int i) const\n+Definition: refinement.hh:95\n+Dune::Alberta::Patch::forEachInteriorSubChild\n+void forEachInteriorSubChild(Functor &functor) const\n+Definition: refinement.hh:87\n+Dune::Alberta::Patch::dimension\n+static const int dimension\n+Definition: refinement.hh:47\n+Dune::Alberta::Patch::hasNeighbor\n+bool hasNeighbor(int i, int neighbor) const\n+Definition: refinement.hh:133\n+Dune::Alberta::Patch::Patch\n+Patch(ElementList *list, int count)\n+Definition: refinement.hh:58\n+Dune::Alberta::Patch::ElementInfo\n+Alberta::ElementInfo< dimension > ElementInfo\n+Definition: refinement.hh:49\n+Dune::Alberta::Patch::ElementList\n+ALBERTA RC_LIST_EL ElementList\n+Definition: refinement.hh:51\n+Dune::Alberta::ForEachInteriorSubChild<_dim,_0_>::apply\n+static void apply(Functor &functor, const Patch< dim > &patch)\n+Definition: refinement.hh:154\n+Dune::Alberta::ForEachInteriorSubChild<_dim,_dim_>::apply\n+static void apply(Functor &functor, const Patch< dim > &patch)\n+Definition: refinement.hh:169\n+Dune::Alberta::ForEachInteriorSubChild<_2,_1_>::apply\n+static void apply(Functor &functor, const Patch< 2 > &patch)\n+Definition: refinement.hh:179\n+Dune::Alberta::ForEachInteriorSubChild<_3,_1_>::apply\n+static void apply(Functor &functor, const Patch< 3 > &patch)\n+Definition: refinement.hh:202\n+Dune::Alberta::ForEachInteriorSubChild<_3,_2_>::apply\n+static void apply(Functor &functor, const Patch< 3 > &patch)\n+Definition: refinement.hh:249\n+Dune::Alberta::GeometryInFather\n+Definition: refinement.hh:292\n+Dune::Alberta::GeometryInFather<_1_>::coordinate\n+static const LocalVector & coordinate(int child, int, int i)\n+Definition: refinement.hh:302\n+Dune::Alberta::GeometryInFather<_2_>::coordinate\n+static const LocalVector & coordinate(int child, int, int i)\n+Definition: refinement.hh:319\n+Dune::Alberta::GeometryInFather<_3_>::coordinate\n+static const LocalVector & coordinate(int child, int orientation, int i)\n+Definition: refinement.hh:337\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00644.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00644.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: treeiterator.hh File Reference\n+dune-grid: leveliterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,33 +65,27 @@\n
  • dune
  • grid
  • albertagrid
  • \n \n \n
    \n \n-
    treeiterator.hh File Reference
    \n+
    leveliterator.hh File Reference
    \n
    \n
    \n-
    #include <utility>
    \n-#include <dune/common/hybridutilities.hh>
    \n-#include <dune/common/typetraits.hh>
    \n-#include <dune/grid/albertagrid/elementinfo.hh>
    \n-#include <dune/grid/albertagrid/meshpointer.hh>
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::AlbertaMarkerVector< dim, dimworld >
     marker assigning subentities to one element containing them More...
    class  Dune::AlbertaGridLevelIterator< codim, pitype, GridImp >
     
    struct  Dune::AlbertaMarkerVector< dim, dimworld >::MarkSubEntities< bool >::Codim< codim >
     
    class  Dune::AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    class  Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,29 +6,22 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n Classes | Namespaces\n-treeiterator.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n+leveliterator.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::AlbertaMarkerVector<_dim,_dimworld_>\n-\u00a0 marker assigning subentities to one element containing them More...\n+class \u00a0Dune::AlbertaGridLevelIterator<_codim,_pitype,_GridImp_>\n \u00a0\n-struct \u00a0Dune::AlbertaMarkerVector<_dim,_dimworld_>::MarkSubEntities<_bool_>::\n- Codim<_codim_>\n-\u00a0\n- class \u00a0Dune::AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n+class \u00a0Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00644_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: treeiterator.hh Source File\n+dune-grid: leveliterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,586 +62,125 @@\n \n \n \n
    \n-
    treeiterator.hh
    \n+
    leveliterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_ALBERTA_TREEITERATOR_HH
    \n-
    7#define DUNE_ALBERTA_TREEITERATOR_HH
    \n-
    8
    \n-
    9#include <utility>
    \n-
    10
    \n-
    11#include <dune/common/hybridutilities.hh>
    \n-
    12#include <dune/common/typetraits.hh>
    \n+
    5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH
    \n+
    6#define DUNE_ALBERTA_LEVELITERATOR_HH
    \n+
    7
    \n+\n+
    9
    \n+\n+
    11
    \n+
    12#if HAVE_ALBERTA
    \n
    13
    \n-\n-\n+
    14namespace Dune
    \n+
    15{
    \n
    16
    \n-
    17#if HAVE_ALBERTA
    \n-
    18
    \n-
    19namespace Dune
    \n-
    20{
    \n-
    21
    \n-
    22 // AlbertaMarkerVector
    \n-
    23 // -------------------
    \n-
    24
    \n-
    33 template< int dim, int dimworld >
    \n-\n-
    35 {
    \n-\n-
    37
    \n-\n-
    39
    \n-
    40 //friend class AlbertaGrid< dim, dimworld >;
    \n-
    41
    \n-
    42 static const int dimension = Grid::dimension;
    \n-
    43
    \n-\n-\n-
    46
    \n-
    47 template< bool >
    \n-
    48 struct NoMarkSubEntities;
    \n-
    49 template< bool >
    \n-
    50 struct MarkSubEntities;
    \n-
    51
    \n-
    52 public:
    \n-
    54 explicit AlbertaMarkerVector ( const DofNumbering &dofNumbering )
    \n-
    55 : dofNumbering_( dofNumbering )
    \n-
    56 {
    \n-
    57 for( int codim = 0; codim <= dimension; ++codim )
    \n-
    58 marker_[ codim ] = 0;
    \n-
    59 }
    \n+
    17 // AlbertaGridLevelIterator
    \n+
    18 // ------------------------
    \n+
    19
    \n+
    20 template< int codim, PartitionIteratorType pitype, class GridImp >
    \n+\n+
    22 : public AlbertaGridTreeIterator< codim, GridImp, false >
    \n+
    23 {
    \n+\n+\n+
    26
    \n+
    27 public:
    \n+
    28 typedef typename Base::Entity Entity;
    \n+\n+
    30
    \n+\n+
    32 {}
    \n+
    33
    \n+
    35 AlbertaGridLevelIterator ( const GridImp &grid, int level )
    \n+
    36 : Base( grid, level )
    \n+
    37 {}
    \n+
    38
    \n+\n+
    41 const MarkerVector *vec,
    \n+
    42 int level )
    \n+
    43 : Base( grid, vec, level )
    \n+
    44 {}
    \n+
    45
    \n+
    47 void increment ()
    \n+
    48 {
    \n+\n+
    50 }
    \n+
    51 };
    \n+
    52
    \n+
    53
    \n+
    54 template< int codim, class GridImp >
    \n+\n+
    56 : public AlbertaGridTreeIterator< codim, GridImp, false >
    \n+
    57 {
    \n+\n+\n
    60
    \n-
    61 AlbertaMarkerVector ( const This &other )
    \n-
    62 : dofNumbering_( other.dofNumbering_ )
    \n-
    63 {
    \n-
    64 for( int codim = 0; codim <= dimension; ++codim )
    \n-
    65 marker_[ codim ] = 0;
    \n-
    66 }
    \n+
    61 public:
    \n+
    62 typedef typename Base::Entity Entity;
    \n+\n+
    64
    \n+\n+
    66 {}
    \n
    67
    \n-\n-
    69 {
    \n-
    70 clear();
    \n-
    71 }
    \n+
    69 AlbertaGridLevelIterator ( const GridImp &grid, int level )
    \n+
    70 : Base( grid, level )
    \n+
    71 {}
    \n
    72
    \n-
    73 private:
    \n-
    74 This &operator= ( const This & );
    \n-
    75
    \n-
    76 public:
    \n-
    78 template< int codim >
    \n-
    79 bool subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const;
    \n-
    80
    \n-
    81 template< int firstCodim, class Iterator >
    \n-
    82 void markSubEntities ( const Iterator &begin, const Iterator &end );
    \n-
    83
    \n-
    84 void clear ()
    \n-
    85 {
    \n-
    86 for( int codim = 0; codim <= dimension; ++codim )
    \n-
    87 {
    \n-
    88 if( marker_[ codim ] != 0 )
    \n-
    89 delete[] marker_[ codim ];
    \n-
    90 marker_[ codim ] = 0;
    \n-
    91 }
    \n-
    92 }
    \n-
    93
    \n-
    95 bool up2Date () const
    \n-
    96 {
    \n-
    97 return (marker_[ dimension ] != 0);
    \n-
    98 }
    \n-
    99
    \n-
    101 void print ( std::ostream &out = std::cout ) const;
    \n-
    102
    \n-
    103 private:
    \n-
    104 const DofNumbering &dofNumbering_;
    \n-
    105 int *marker_[ dimension+1 ];
    \n-
    106 };
    \n-
    107
    \n-
    108
    \n-
    109
    \n-
    110 // AlbertaMarkerVector::NoMarkSubEntities
    \n-
    111 // --------------------------------------
    \n-
    112
    \n-
    113 template< int dim, int dimworld >
    \n-
    114 template< bool >
    \n-
    115 struct AlbertaMarkerVector< dim, dimworld >::NoMarkSubEntities
    \n-
    116 {
    \n-
    117 template< int firstCodim, class Iterator >
    \n-
    118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering,
    \n-
    119 [[maybe_unused]] int *(&marker)[ dimension + 1 ],
    \n-
    120 [[maybe_unused]] const Iterator &begin,
    \n-
    121 [[maybe_unused]] const Iterator &end )
    \n-
    122 {}
    \n-
    123 };
    \n-
    124
    \n-
    125
    \n-
    126
    \n-
    127 // AlbertaMarkerVector::MarkSubEntities
    \n-
    128 // ------------------------------------
    \n-
    129
    \n-
    130 template< int dim, int dimworld >
    \n-
    131 template< bool >
    \n-
    132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities
    \n-
    133 {
    \n-
    134 template< int codim >
    \n-
    135 struct Codim
    \n-
    136 {
    \n-
    137 static const int numSubEntities = Alberta::NumSubEntities< dimension, codim >::value;
    \n-
    138
    \n-\n-
    140
    \n-
    141 static void apply ( const DofNumbering &dofNumbering,
    \n-
    142 int *(&marker)[ dimension + 1 ],
    \n-
    143 const ElementInfo &elementInfo )
    \n-
    144 {
    \n-
    145 int *array = marker[ codim ];
    \n-
    146
    \n-
    147 const int index = dofNumbering( elementInfo, 0, 0 );
    \n-
    148 for( int i = 0; i < numSubEntities; ++i )
    \n-
    149 {
    \n-
    150 int &mark = array[ dofNumbering( elementInfo, codim, i ) ];
    \n-
    151 mark = std::max( index, mark );
    \n-
    152 }
    \n-
    153 }
    \n-
    154 };
    \n-
    155
    \n-
    156 template< int firstCodim, class Iterator >
    \n-
    157 static void mark ( const DofNumbering &dofNumbering, int *(&marker)[ dimension + 1 ],
    \n-
    158 const Iterator &begin, const Iterator &end )
    \n-
    159 {
    \n-
    160 for( int codim = firstCodim; codim <= dimension; ++codim )
    \n-
    161 {
    \n-
    162 const int size = dofNumbering.size( codim );
    \n-
    163 marker[ codim ] = new int[ size ];
    \n-
    164
    \n-
    165 int *array = marker[ codim ];
    \n-
    166 for( int i = 0; i < size; ++i )
    \n-
    167 array[ i ] = -1;
    \n-
    168 }
    \n-
    169
    \n-
    170 for( Iterator it = begin; it != end; ++it )
    \n-
    171 {
    \n-
    172 const ElementInfo &elementInfo = it->impl().elementInfo();
    \n-
    173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{},
    \n-
    174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker, elementInfo ); } );
    \n-
    175 }
    \n-
    176 }
    \n-
    177 };
    \n-
    178
    \n-
    179
    \n-
    180
    \n-
    181 // AlbertaGridTreeIterator
    \n-
    182 // -----------------------
    \n-
    183
    \n-
    187 template< int codim, class GridImp, bool leafIterator >
    \n-\n-
    189 {
    \n-\n-
    191
    \n-
    192 public:
    \n-
    193 static const int dimension = GridImp::dimension;
    \n-
    194 static const int codimension = codim;
    \n-
    195 static const int dimensionworld = GridImp::dimensionworld;
    \n-
    196
    \n-
    197 private:
    \n-
    198 friend class AlbertaGrid< dimension, dimensionworld >;
    \n-
    199
    \n-
    200 static const int numSubEntities
    \n-\n-
    202
    \n-
    203 public:
    \n-\n-
    205 typedef typename MeshPointer::MacroIterator MacroIterator;
    \n-
    206
    \n-
    207 typedef typename GridImp::template Codim< codim >::Entity Entity;
    \n-\n-\n-
    210 typedef typename EntityImp::ElementInfo ElementInfo;
    \n-
    211
    \n-\n-
    213
    \n-\n-
    215
    \n-\n-
    218
    \n-
    220 This &operator= ( const This &other );
    \n-
    221
    \n-
    223 AlbertaGridTreeIterator ( const GridImp &grid, int travLevel );
    \n-
    224
    \n-\n-
    227 const MarkerVector *marker,
    \n-
    228 int travLevel );
    \n-
    229
    \n-
    231 bool equals ( const This &other ) const
    \n-
    232 {
    \n-
    233 return entity_.impl().equals( other.entity_.impl() );
    \n-
    234 }
    \n-
    235
    \n-\n-
    238 {
    \n-
    239 return entity_;
    \n-
    240 }
    \n-
    241
    \n-
    243 int level () const
    \n-
    244 {
    \n-
    245 return entity_.impl().level();
    \n-
    246 }
    \n-
    247
    \n-
    249 void increment();
    \n-
    250
    \n-
    251 protected:
    \n-
    253 const GridImp &grid () const
    \n-
    254 {
    \n-
    255 return entity_.impl().grid();
    \n-
    256 }
    \n-
    257
    \n-
    258 private:
    \n-
    259 void nextElement ( ElementInfo &elementInfo );
    \n-
    260 void nextElementStop (ElementInfo &elementInfo );
    \n-
    261 bool stopAtElement ( const ElementInfo &elementInfo ) const;
    \n-
    262
    \n-
    263 void goNext ( ElementInfo &elementInfo );
    \n-
    264 void goNext ( const std::integral_constant< int, 0 > cdVariable,
    \n-
    265 ElementInfo &elementInfo );
    \n-
    266 void goNext ( const std::integral_constant< int, 1 > cdVariable,
    \n-
    267 ElementInfo &elementInfo );
    \n-
    268 template< int cd >
    \n-
    269 void goNext ( const std::integral_constant< int, cd > cdVariable,
    \n-
    270 ElementInfo &elementInfo );
    \n-
    271
    \n-
    272 mutable Entity entity_;
    \n-
    273
    \n-
    275 int level_;
    \n-
    276
    \n-
    278 int subEntity_;
    \n-
    279
    \n-
    280 MacroIterator macroIterator_;
    \n-
    281
    \n-
    282 // knows on which element a point,edge,face is viewed
    \n-
    283 const MarkerVector *marker_;
    \n-
    284 };
    \n-
    285
    \n-
    286
    \n-
    287
    \n-
    288 // Implementation of AlbertaMarkerVector
    \n-
    289 // -------------------------------------
    \n-
    290
    \n-
    291 template< int dim, int dimworld >
    \n-
    292 template< int codim >
    \n-\n-
    294 ::subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const
    \n-
    295 {
    \n-
    296 assert( marker_[ codim ] != 0 );
    \n-
    297
    \n-
    298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity );
    \n-
    299 const int markIndex = marker_[ codim ][ subIndex ];
    \n-
    300 assert( (markIndex >= 0) );
    \n-
    301
    \n-
    302 const int index = dofNumbering_( elementInfo, 0, 0 );
    \n-
    303 return (markIndex == index);
    \n-
    304 }
    \n-
    305
    \n-
    306
    \n-
    307 template< int dim, int dimworld >
    \n-
    308 template< int firstCodim, class Iterator >
    \n-\n-
    310 ::markSubEntities ( const Iterator &begin, const Iterator &end )
    \n-
    311 {
    \n-
    312 clear();
    \n-
    313 std::conditional< (firstCodim <= dimension), MarkSubEntities<true>, NoMarkSubEntities<false> >::type
    \n-
    314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin, end );
    \n-
    315 }
    \n-
    316
    \n-
    317
    \n-
    318 template< int dim, int dimworld >
    \n-
    319 inline void AlbertaMarkerVector< dim, dimworld >::print ( std::ostream &out ) const
    \n-
    320 {
    \n-
    321 for( int codim = 1; codim <= dimension; ++codim )
    \n-
    322 {
    \n-
    323 int *marker = marker_[ codim ];
    \n-
    324 if( marker != 0 )
    \n-
    325 {
    \n-
    326 const int size = dofNumbering_.size( codim );
    \n-
    327 out << std::endl;
    \n-
    328 out << "Codimension " << codim << " (" << size << " entries)" << std::endl;
    \n-
    329 for( int i = 0; i < size; ++i )
    \n-
    330 out << "subentity " << i << " visited on Element " << marker[ i ] << std::endl;
    \n-
    331 }
    \n-
    332 }
    \n-
    333 }
    \n-
    334
    \n-
    335
    \n-
    336
    \n-
    337 // Implementation of AlbertaGridTreeIterator
    \n-
    338 // -----------------------------------------
    \n-
    339
    \n-
    340 template< int codim, class GridImp, bool leafIterator >
    \n-\n-\n-
    343 : entity_(),
    \n-
    344 level_( -1 ),
    \n-
    345 subEntity_( -1 ),
    \n-
    346 macroIterator_(),
    \n-
    347 marker_( NULL )
    \n-
    348 {}
    \n-
    349
    \n-
    350 template< int codim, class GridImp, bool leafIterator >
    \n-\n-
    352 ::AlbertaGridTreeIterator ( const GridImp &grid,
    \n-
    353 const MarkerVector *marker,
    \n-
    354 int travLevel )
    \n-
    355 : entity_( EntityImp( grid ) ),
    \n-
    356 level_( travLevel ),
    \n-
    357 subEntity_( (codim == 0 ? 0 : -1) ),
    \n-
    358 macroIterator_( grid.meshPointer().begin() ),
    \n-
    359 marker_( marker )
    \n-
    360 {
    \n-
    361 ElementInfo elementInfo = *macroIterator_;
    \n-
    362 nextElementStop( elementInfo );
    \n-
    363 if( codim > 0 )
    \n-
    364 goNext( elementInfo );
    \n-
    365 // it is ok to set the invalid ElementInfo
    \n-
    366 entity_.impl().setElement( elementInfo, subEntity_ );
    \n-
    367 }
    \n-
    368
    \n-
    369
    \n-
    370 // Make LevelIterator with point to element from previous iterations
    \n-
    371 template< int codim, class GridImp, bool leafIterator >
    \n-\n-
    373 ::AlbertaGridTreeIterator ( const GridImp &grid,
    \n-
    374 int travLevel )
    \n-
    375 : entity_( EntityImp( grid ) ),
    \n-
    376 level_( travLevel ),
    \n-
    377 subEntity_( -1 ),
    \n-
    378 macroIterator_( grid.meshPointer().end() ),
    \n-
    379 marker_( 0 )
    \n-
    380 {}
    \n-
    381
    \n-
    382
    \n-
    383 // Make LevelIterator with point to element from previous iterations
    \n-
    384 template< int codim, class GridImp, bool leafIterator >
    \n-\n-\n-
    387 : entity_( other.entity_ ),
    \n-
    388 level_( other.level_ ),
    \n-
    389 subEntity_( other.subEntity_ ),
    \n-
    390 macroIterator_( other.macroIterator_ ),
    \n-
    391 marker_( other.marker_ )
    \n-
    392 {}
    \n-
    393
    \n-
    394
    \n-
    395 // Make LevelIterator with point to element from previous iterations
    \n-
    396 template< int codim, class GridImp, bool leafIterator >
    \n-\n-\n-
    399 {
    \n-
    400 entity_ = other.entity_;
    \n-
    401 level_ = other.level_;
    \n-
    402 subEntity_ = other.subEntity_;
    \n-
    403 macroIterator_ = other.macroIterator_;
    \n-
    404 marker_ = other.marker_;
    \n-
    405
    \n-
    406 return *this;
    \n-
    407 }
    \n-
    408
    \n-
    409
    \n-
    410 template< int codim, class GridImp, bool leafIterator >
    \n-\n-
    412 {
    \n-
    413 ElementInfo elementInfo = entity_.impl().elementInfo_;
    \n-
    414 goNext ( elementInfo );
    \n-
    415 // it is ok to set the invalid ElementInfo
    \n-
    416 entity_.impl().setElement( elementInfo, subEntity_ );
    \n-
    417 }
    \n-
    418
    \n-
    419
    \n-
    420 template< int codim, class GridImp, bool leafIterator >
    \n-\n-
    422 ::nextElement ( ElementInfo &elementInfo )
    \n-
    423 {
    \n-
    424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) )
    \n-
    425 {
    \n-
    426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) )
    \n-
    427 elementInfo = elementInfo.father();
    \n-
    428 if( elementInfo.level() == 0 )
    \n-
    429 {
    \n-
    430 ++macroIterator_;
    \n-
    431 elementInfo = *macroIterator_;
    \n-
    432 }
    \n-
    433 else
    \n-
    434 elementInfo = elementInfo.father().child( 1 );
    \n-
    435 }
    \n-
    436 else
    \n-
    437 elementInfo = elementInfo.child( 0 );
    \n-
    438 }
    \n-
    439
    \n-
    440
    \n-
    441 template< int codim, class GridImp, bool leafIterator >
    \n-
    442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n-
    443 ::nextElementStop ( ElementInfo &elementInfo )
    \n-
    444 {
    \n-
    445 while( !(!elementInfo || stopAtElement( elementInfo )) )
    \n-
    446 nextElement( elementInfo );
    \n-
    447 }
    \n-
    448
    \n-
    449
    \n-
    450 template< int codim, class GridImp, bool leafIterator >
    \n-
    451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n-
    452 ::stopAtElement ( const ElementInfo &elementInfo ) const
    \n-
    453 {
    \n-
    454 if( !elementInfo )
    \n-
    455 return true;
    \n-
    456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level()));
    \n-
    457 }
    \n-
    458
    \n-
    459
    \n-
    460 template< int codim, class GridImp, bool leafIterator >
    \n-
    461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n-
    462 ::goNext ( ElementInfo &elementInfo )
    \n-
    463 {
    \n-
    464 std::integral_constant< int, codim > codimVariable;
    \n-
    465 goNext( codimVariable, elementInfo );
    \n-
    466 }
    \n-
    467
    \n-
    468 template< int codim, class GridImp, bool leafIterator >
    \n-
    469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n-
    470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */,
    \n-
    471 ElementInfo &elementInfo )
    \n-
    472 {
    \n-
    473 assert( stopAtElement( elementInfo ) );
    \n-
    474
    \n-
    475 nextElement( elementInfo );
    \n-
    476 nextElementStop( elementInfo );
    \n-
    477 }
    \n-
    478
    \n-
    479 template< int codim, class GridImp, bool leafIterator >
    \n-
    480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n-
    481 ::goNext ( const std::integral_constant< int, 1 > cdVariable,
    \n-
    482 ElementInfo &elementInfo )
    \n-
    483 {
    \n-
    484 assert( stopAtElement( elementInfo ) );
    \n-
    485
    \n-
    486 ++subEntity_;
    \n-
    487 if( subEntity_ >= numSubEntities )
    \n-
    488 {
    \n-
    489 subEntity_ = 0;
    \n-
    490 nextElement( elementInfo );
    \n-
    491 nextElementStop( elementInfo );
    \n-
    492 if( !elementInfo )
    \n-
    493 return;
    \n-
    494 }
    \n-
    495
    \n-
    496 if( leafIterator )
    \n-
    497 {
    \n-
    498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ : subEntity_);
    \n-
    499
    \n-
    500 const ALBERTA EL *neighbor = elementInfo.elInfo().neigh[ face ];
    \n-
    501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) )
    \n-
    502 {
    \n-
    503 // face is reached from element with largest number
    \n-
    504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 );
    \n-
    505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 );
    \n-
    506 if( elIndex < nbIndex )
    \n-
    507 goNext( cdVariable, elementInfo );
    \n-
    508 }
    \n-
    509 // uncomment this assertion only if codimension 1 entities are marked
    \n-
    510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) );
    \n-
    511 }
    \n-
    512 else
    \n-
    513 {
    \n-
    514 assert( marker_ != 0 );
    \n-
    515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) )
    \n-
    516 goNext( cdVariable, elementInfo );
    \n-
    517 }
    \n-
    518 }
    \n-
    519
    \n-
    520 template< int codim, class GridImp, bool leafIterator >
    \n-
    521 template< int cd >
    \n-
    522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n-
    523 ::goNext ( const std::integral_constant< int, cd > cdVariable,
    \n-
    524 ElementInfo &elementInfo )
    \n-
    525 {
    \n-
    526 assert( stopAtElement( elementInfo ) );
    \n-
    527
    \n-
    528 ++subEntity_;
    \n-
    529 if( subEntity_ >= numSubEntities )
    \n-
    530 {
    \n-
    531 subEntity_ = 0;
    \n-
    532 nextElement( elementInfo );
    \n-
    533 nextElementStop( elementInfo );
    \n-
    534 if( !elementInfo )
    \n-
    535 return;
    \n-
    536 }
    \n-
    537
    \n-
    538 assert( marker_ != 0 );
    \n-
    539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ ) )
    \n-
    540 goNext( cdVariable, elementInfo );
    \n-
    541 }
    \n-
    542
    \n-
    543}
    \n-
    544
    \n-
    545#endif // #if HAVE_ALBERTA
    \n-
    546
    \n-
    547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH
    \n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-
    provides a wrapper for ALBERTA's mesh structure
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+\n+
    75 const MarkerVector *,
    \n+
    76 int level )
    \n+
    77 : Base( grid, level )
    \n+
    78 {}
    \n+
    79
    \n+
    81 void increment ()
    \n+
    82 {
    \n+\n+
    84 }
    \n+
    85 };
    \n+
    86}
    \n+
    87
    \n+
    88#endif // #if HAVE_ALBERTA
    \n+
    89
    \n+
    90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH
    \n+\n+\n+
    @ Ghost_Partition
    only ghost entities
    Definition: gridenums.hh:142
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n-\n-
    static const int dimension
    Definition: agrid.hh:145
    \n-\n-\n-
    int size(int codim) const
    Definition: dofadmin.hh:163
    \n-\n
    Definition: treeiterator.hh:189
    \n-
    bool equals(const This &other) const
    equality
    Definition: treeiterator.hh:231
    \n-
    MakeableInterfaceObject< Entity > EntityObject
    Definition: treeiterator.hh:208
    \n-
    Alberta::MeshPointer< dimension > MeshPointer
    Definition: treeiterator.hh:204
    \n-
    AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int travLevel)
    Constructor making begin iterator.
    Definition: treeiterator.hh:352
    \n-
    AlbertaGridTreeIterator(const GridImp &grid, int travLevel)
    Constructor making end iterator.
    Definition: treeiterator.hh:373
    \n-
    EntityObject::ImplementationType EntityImp
    Definition: treeiterator.hh:209
    \n-
    static const int codimension
    Definition: treeiterator.hh:194
    \n-
    MeshPointer::MacroIterator MacroIterator
    Definition: treeiterator.hh:205
    \n-
    This & operator=(const This &other)
    Constructor making end iterator.
    Definition: treeiterator.hh:398
    \n-
    Entity & dereference() const
    dereferencing
    Definition: treeiterator.hh:237
    \n-
    AlbertaMarkerVector< dimension, dimensionworld > MarkerVector
    Definition: treeiterator.hh:212
    \n-
    GridImp::template Codim< codim >::Entity Entity
    Definition: treeiterator.hh:207
    \n-
    int level() const
    ask for level of entities
    Definition: treeiterator.hh:243
    \n-
    static const int dimensionworld
    Definition: treeiterator.hh:195
    \n-
    AlbertaGridTreeIterator()
    Definition: treeiterator.hh:342
    \n-
    void increment()
    increment
    Definition: treeiterator.hh:411
    \n-
    const GridImp & grid() const
    obtain a reference to the grid
    Definition: treeiterator.hh:253
    \n-
    static const int dimension
    Definition: treeiterator.hh:193
    \n-
    AlbertaGridTreeIterator(const This &other)
    Constructor making end iterator.
    Definition: treeiterator.hh:386
    \n-
    EntityImp::ElementInfo ElementInfo
    Definition: treeiterator.hh:210
    \n-
    Definition: misc.hh:148
    \n+
    GridImp::template Codim< codim >::Entity Entity
    Definition: treeiterator.hh:207
    \n+
    int level() const
    ask for level of entities
    Definition: treeiterator.hh:243
    \n+
    void increment()
    increment
    Definition: treeiterator.hh:411
    \n+
    const GridImp & grid() const
    obtain a reference to the grid
    Definition: treeiterator.hh:253
    \n+
    Definition: leveliterator.hh:23
    \n+
    Base::MarkerVector MarkerVector
    Definition: leveliterator.hh:29
    \n+
    AlbertaGridLevelIterator()
    Definition: leveliterator.hh:31
    \n+
    AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int level)
    Constructor making begin iterator.
    Definition: leveliterator.hh:40
    \n+
    Base::Entity Entity
    Definition: leveliterator.hh:28
    \n+
    AlbertaGridLevelIterator(const GridImp &grid, int level)
    Constructor making end iterator.
    Definition: leveliterator.hh:35
    \n+
    void increment()
    increment the iterator
    Definition: leveliterator.hh:47
    \n+\n+\n+
    void increment()
    increment the iterator
    Definition: leveliterator.hh:81
    \n+
    Base::Entity Entity
    Definition: leveliterator.hh:62
    \n+
    Base::MarkerVector MarkerVector
    Definition: leveliterator.hh:63
    \n+
    AlbertaGridLevelIterator(const GridImp &grid, int level)
    Constructor making end iterator.
    Definition: leveliterator.hh:69
    \n+
    AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level)
    Constructor making begin iterator (which is the end iterator in this case)
    Definition: leveliterator.hh:74
    \n
    marker assigning subentities to one element containing them
    Definition: treeiterator.hh:35
    \n-
    AlbertaMarkerVector(const DofNumbering &dofNumbering)
    create AlbertaMarkerVector with empty vectors
    Definition: treeiterator.hh:54
    \n-
    bool up2Date() const
    return true if marking is up to date
    Definition: treeiterator.hh:95
    \n-
    bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const
    visit subentity on this element?
    Definition: treeiterator.hh:294
    \n-
    void markSubEntities(const Iterator &begin, const Iterator &end)
    Definition: treeiterator.hh:310
    \n-
    ~AlbertaMarkerVector()
    Definition: treeiterator.hh:68
    \n-
    void clear()
    Definition: treeiterator.hh:84
    \n-
    AlbertaMarkerVector(const This &other)
    Definition: treeiterator.hh:61
    \n-
    void print(std::ostream &out=std::cout) const
    print for debugin' only
    Definition: treeiterator.hh:319
    \n-\n-
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: treeiterator.hh:139
    \n-
    static void apply(const DofNumbering &dofNumbering, int *(&marker)[dimension+1], const ElementInfo &elementInfo)
    Definition: treeiterator.hh:141
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-\n-
    InterfaceType::Implementation ImplementationType
    Definition: common/grid.hh:1108
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,695 +5,176 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-treeiterator.hh\n+leveliterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_ALBERTA_TREEITERATOR_HH\n- 7#define DUNE_ALBERTA_TREEITERATOR_HH\n- 8\n- 9#include \n- 10\n- 11#include \n- 12#include \n+ 5#ifndef DUNE_ALBERTA_LEVELITERATOR_HH\n+ 6#define DUNE_ALBERTA_LEVELITERATOR_HH\n+ 7\n+ 8#include \n+ 9\n+ 10#include \n+ 11\n+ 12#if HAVE_ALBERTA\n 13\n- 14#include \n- 15#include \n+ 14namespace Dune\n+ 15{\n 16\n- 17#if HAVE_ALBERTA\n- 18\n- 19namespace Dune\n- 20{\n- 21\n- 22 // AlbertaMarkerVector\n- 23 // -------------------\n- 24\n- 33 template< int dim, int dimworld >\n-34 class AlbertaMarkerVector\n- 35 {\n- 36 typedef AlbertaMarkerVector<_dim,_dimworld_> This;\n- 37\n- 38 typedef AlbertaGrid<_dim,_dimworld_> Grid;\n- 39\n- 40 //friend class AlbertaGrid< dim, dimworld >;\n- 41\n- 42 static const int dimension = Grid::dimension;\n- 43\n- 44 typedef Alberta::HierarchyDofNumbering<_dimension_> DofNumbering;\n- 45 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n- 46\n- 47 template< bool >\n- 48 struct NoMarkSubEntities;\n- 49 template< bool >\n- 50 struct MarkSubEntities;\n- 51\n- 52 public:\n-54 explicit AlbertaMarkerVector ( const DofNumbering &dofNumbering )\n- 55 : dofNumbering_( dofNumbering )\n- 56 {\n- 57 for( int codim = 0; codim <= dimension; ++codim )\n- 58 marker_[ codim ] = 0;\n- 59 }\n+ 17 // AlbertaGridLevelIterator\n+ 18 // ------------------------\n+ 19\n+ 20 template< int codim, PartitionIteratorType pitype, class GridImp >\n+21 class AlbertaGridLevelIterator\n+ 22 : public AlbertaGridTreeIterator< codim, GridImp, false >\n+ 23 {\n+ 24 typedef AlbertaGridLevelIterator<_codim,_pitype,_GridImp_> This;\n+ 25 typedef AlbertaGridTreeIterator<_codim,_GridImp,_false_> Base;\n+ 26\n+ 27 public:\n+28 typedef typename Base::Entity Entity;\n+29 typedef typename Base::MarkerVector MarkerVector;\n+ 30\n+31 AlbertaGridLevelIterator ()\n+ 32 {}\n+ 33\n+35 AlbertaGridLevelIterator ( const GridImp &grid, int level )\n+ 36 : Base( grid, level )\n+ 37 {}\n+ 38\n+40 AlbertaGridLevelIterator ( const GridImp &grid,\n+ 41 const MarkerVector *vec,\n+ 42 int level )\n+ 43 : Base( grid, vec, level )\n+ 44 {}\n+ 45\n+47 void increment ()\n+ 48 {\n+ 49 Base::increment();\n+ 50 }\n+ 51 };\n+ 52\n+ 53\n+ 54 template< int codim, class GridImp >\n+55 class AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >\n+ 56 : public AlbertaGridTreeIterator< codim, GridImp, false >\n+ 57 {\n+ 58 typedef AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_> This;\n+ 59 typedef AlbertaGridTreeIterator<_codim,_GridImp,_false_> Base;\n 60\n-61 AlbertaMarkerVector ( const This &other )\n- 62 : dofNumbering_( other.dofNumbering_ )\n- 63 {\n- 64 for( int codim = 0; codim <= dimension; ++codim )\n- 65 marker_[ codim ] = 0;\n- 66 }\n+ 61 public:\n+62 typedef typename Base::Entity Entity;\n+63 typedef typename Base::MarkerVector MarkerVector;\n+ 64\n+65 AlbertaGridLevelIterator ()\n+ 66 {}\n 67\n-68 ~AlbertaMarkerVector ()\n- 69 {\n- 70 clear();\n- 71 }\n+69 AlbertaGridLevelIterator ( const GridImp &grid, int level )\n+ 70 : Base( grid, level )\n+ 71 {}\n 72\n- 73 private:\n- 74 This &operator= ( const This & );\n- 75\n- 76 public:\n- 78 template< int codim >\n-79 bool subEntityOnElement ( const ElementInfo &elementInfo, int subEntity )\n-const;\n- 80\n- 81 template< int firstCodim, class Iterator >\n-82 void markSubEntities ( const Iterator &begin, const Iterator &end );\n- 83\n-84 void clear ()\n- 85 {\n- 86 for( int codim = 0; codim <= dimension; ++codim )\n- 87 {\n- 88 if( marker_[ codim ] != 0 )\n- 89 delete[] marker_[ codim ];\n- 90 marker_[ codim ] = 0;\n- 91 }\n- 92 }\n- 93\n-95 bool up2Date () const\n- 96 {\n- 97 return (marker_[ dimension ] != 0);\n- 98 }\n- 99\n-101 void print ( std::ostream &out = std::cout ) const;\n- 102\n- 103 private:\n- 104 const DofNumbering &dofNumbering_;\n- 105 int *marker_[ dimension+1 ];\n- 106 };\n- 107\n- 108\n- 109\n- 110 // AlbertaMarkerVector::NoMarkSubEntities\n- 111 // --------------------------------------\n- 112\n- 113 template< int dim, int dimworld >\n- 114 template< bool >\n- 115 struct AlbertaMarkerVector< dim, dimworld >::NoMarkSubEntities\n- 116 {\n- 117 template< int firstCodim, class Iterator >\n- 118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering,\n- 119 [[maybe_unused]] int *(&marker)[ dimension + 1 ],\n- 120 [[maybe_unused]] const Iterator &begin,\n- 121 [[maybe_unused]] const Iterator &end )\n- 122 {}\n- 123 };\n- 124\n- 125\n- 126\n- 127 // AlbertaMarkerVector::MarkSubEntities\n- 128 // ------------------------------------\n- 129\n- 130 template< int dim, int dimworld >\n- 131 template< bool >\n- 132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities\n- 133 {\n- 134 template< int codim >\n-135 struct Codim\n- 136 {\n-137 static const int numSubEntities = Alberta::NumSubEntities<_dimension,_codim\n->::value;\n- 138\n-139 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n- 140\n-141 static void apply ( const DofNumbering &dofNumbering,\n- 142 int *(&marker)[ dimension + 1 ],\n- 143 const ElementInfo &elementInfo )\n- 144 {\n- 145 int *array = marker[ codim ];\n- 146\n- 147 const int index = dofNumbering( elementInfo, 0, 0 );\n- 148 for( int i = 0; i < numSubEntities; ++i )\n- 149 {\n- 150 int &mark = array[ dofNumbering( elementInfo, codim, i ) ];\n- 151 mark = std::max( index, mark );\n- 152 }\n- 153 }\n- 154 };\n- 155\n- 156 template< int firstCodim, class Iterator >\n- 157 static void mark ( const DofNumbering &dofNumbering, int *(&marker)\n-[ dimension + 1 ],\n- 158 const Iterator &begin, const Iterator &end )\n- 159 {\n- 160 for( int codim = firstCodim; codim <= dimension; ++codim )\n- 161 {\n- 162 const int size = dofNumbering.size( codim );\n- 163 marker[ codim ] = new int[ size ];\n- 164\n- 165 int *array = marker[ codim ];\n- 166 for( int i = 0; i < size; ++i )\n- 167 array[ i ] = -1;\n- 168 }\n- 169\n- 170 for( Iterator it = begin; it != end; ++it )\n- 171 {\n- 172 const ElementInfo &elementInfo = it->impl().elementInfo();\n- 173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{},\n- 174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker,\n-elementInfo ); } );\n- 175 }\n- 176 }\n- 177 };\n- 178\n- 179\n- 180\n- 181 // AlbertaGridTreeIterator\n- 182 // -----------------------\n- 183\n- 187 template< int codim, class GridImp, bool leafIterator >\n-188 class AlbertaGridTreeIterator\n- 189 {\n- 190 typedef AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_> This;\n- 191\n- 192 public:\n-193 static const int dimension = GridImp::dimension;\n-194 static const int codimension = codim;\n-195 static const int dimensionworld = GridImp::dimensionworld;\n- 196\n- 197 private:\n- 198 friend class AlbertaGrid< dimension, dimensionworld >;\n- 199\n- 200 static const int numSubEntities\n- 201 = Alberta::NumSubEntities<_dimension,_codimension_>::value;\n- 202\n- 203 public:\n-204 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n-205 typedef typename MeshPointer::MacroIterator MacroIterator;\n- 206\n-207 typedef typename GridImp::template Codim< codim >::Entity Entity;\n-208 typedef MakeableInterfaceObject<_Entity_> EntityObject;\n-209 typedef typename EntityObject::ImplementationType EntityImp;\n-210 typedef typename EntityImp::ElementInfo ElementInfo;\n- 211\n-212 typedef AlbertaMarkerVector<_dimension,_dimensionworld_> MarkerVector;\n- 213\n-214 AlbertaGridTreeIterator ();\n- 215\n-217 AlbertaGridTreeIterator ( const This &other );\n- 218\n-220 This &operator=( const This &other );\n- 221\n-223 AlbertaGridTreeIterator ( const GridImp &grid, int travLevel );\n- 224\n-226 AlbertaGridTreeIterator ( const GridImp &grid,\n- 227 const MarkerVector *marker,\n- 228 int travLevel );\n- 229\n-231 bool equals ( const This &other ) const\n- 232 {\n- 233 return entity_.impl().equals( other.entity_.impl() );\n- 234 }\n- 235\n-237 Entity &dereference () const\n- 238 {\n- 239 return entity_;\n- 240 }\n- 241\n-243 int level () const\n- 244 {\n- 245 return entity_.impl().level();\n- 246 }\n- 247\n-249 void increment();\n- 250\n- 251 protected:\n-253 const GridImp &grid () const\n- 254 {\n- 255 return entity_.impl().grid();\n- 256 }\n- 257\n- 258 private:\n- 259 void nextElement ( ElementInfo &elementInfo );\n- 260 void nextElementStop (ElementInfo &elementInfo );\n- 261 bool stopAtElement ( const ElementInfo &elementInfo ) const;\n- 262\n- 263 void goNext ( ElementInfo &elementInfo );\n- 264 void goNext ( const std::integral_constant< int, 0 > cdVariable,\n- 265 ElementInfo &elementInfo );\n- 266 void goNext ( const std::integral_constant< int, 1 > cdVariable,\n- 267 ElementInfo &elementInfo );\n- 268 template< int cd >\n- 269 void goNext ( const std::integral_constant< int, cd > cdVariable,\n- 270 ElementInfo &elementInfo );\n- 271\n- 272 mutable Entity entity_;\n- 273\n- 275 int level_;\n- 276\n- 278 int subEntity_;\n- 279\n- 280 MacroIterator macroIterator_;\n- 281\n- 282 // knows on which element a point,edge,face is viewed\n- 283 const MarkerVector *marker_;\n- 284 };\n- 285\n- 286\n- 287\n- 288 // Implementation of AlbertaMarkerVector\n- 289 // -------------------------------------\n- 290\n- 291 template< int dim, int dimworld >\n- 292 template< int codim >\n- 293 inline bool AlbertaMarkerVector<_dim,_dimworld_>\n-294::subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const\n- 295 {\n- 296 assert( marker_[ codim ] != 0 );\n- 297\n- 298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity );\n- 299 const int markIndex = marker_[ codim ][ subIndex ];\n- 300 assert( (markIndex >= 0) );\n- 301\n- 302 const int index = dofNumbering_( elementInfo, 0, 0 );\n- 303 return (markIndex == index);\n- 304 }\n- 305\n- 306\n- 307 template< int dim, int dimworld >\n- 308 template< int firstCodim, class Iterator >\n- 309 inline void AlbertaMarkerVector<_dim,_dimworld_>\n-310::markSubEntities ( const Iterator &begin, const Iterator &end )\n- 311 {\n- 312 clear();\n- 313 std::conditional< (firstCodim <= dimension), MarkSubEntities,\n-NoMarkSubEntities >::type\n- 314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin,\n-end );\n- 315 }\n- 316\n- 317\n- 318 template< int dim, int dimworld >\n-319 inline void AlbertaMarkerVector<_dim,_dimworld_>::print ( std::ostream &out\n-) const\n- 320 {\n- 321 for( int codim = 1; codim <= dimension; ++codim )\n- 322 {\n- 323 int *marker = marker_[ codim ];\n- 324 if( marker != 0 )\n- 325 {\n- 326 const int size = dofNumbering_.size( codim );\n- 327 out << std::endl;\n- 328 out << \"Codimension \" << codim << \" (\" << size << \" entries)\" << std::\n-endl;\n- 329 for( int i = 0; i < size; ++i )\n- 330 out << \"subentity \" << i << \" visited on Element \" << marker[ i ] << std::\n-endl;\n- 331 }\n- 332 }\n- 333 }\n- 334\n- 335\n- 336\n- 337 // Implementation of AlbertaGridTreeIterator\n- 338 // -----------------------------------------\n- 339\n- 340 template< int codim, class GridImp, bool leafIterator >\n- 341 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n-342::AlbertaGridTreeIterator ()\n- 343 : entity_(),\n- 344 level_( -1 ),\n- 345 subEntity_( -1 ),\n- 346 macroIterator_(),\n- 347 marker_( NULL )\n- 348 {}\n- 349\n- 350 template< int codim, class GridImp, bool leafIterator >\n- 351 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n-352::AlbertaGridTreeIterator ( const GridImp &grid,\n- 353 const MarkerVector *marker,\n- 354 int travLevel )\n- 355 : entity_( EntityImp( grid ) ),\n- 356 level_( travLevel ),\n- 357 subEntity_( (codim == 0 ? 0 : -1) ),\n- 358 macroIterator_( grid.meshPointer().begin() ),\n- 359 marker_( marker )\n- 360 {\n- 361 ElementInfo elementInfo = *macroIterator_;\n- 362 nextElementStop( elementInfo );\n- 363 if( codim > 0 )\n- 364 goNext( elementInfo );\n- 365 // it is ok to set the invalid ElementInfo\n- 366 entity_.impl().setElement( elementInfo, subEntity_ );\n- 367 }\n- 368\n- 369\n- 370 // Make LevelIterator with point to element from previous iterations\n- 371 template< int codim, class GridImp, bool leafIterator >\n- 372 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n-373::AlbertaGridTreeIterator ( const GridImp &grid,\n- 374 int travLevel )\n- 375 : entity_( EntityImp( grid ) ),\n- 376 level_( travLevel ),\n- 377 subEntity_( -1 ),\n- 378 macroIterator_( grid.meshPointer().end() ),\n- 379 marker_( 0 )\n- 380 {}\n- 381\n- 382\n- 383 // Make LevelIterator with point to element from previous iterations\n- 384 template< int codim, class GridImp, bool leafIterator >\n- 385 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n-386::AlbertaGridTreeIterator( const This &other )\n- 387 : entity_( other.entity_ ),\n- 388 level_( other.level_ ),\n- 389 subEntity_( other.subEntity_ ),\n- 390 macroIterator_( other.macroIterator_ ),\n- 391 marker_( other.marker_ )\n- 392 {}\n- 393\n- 394\n- 395 // Make LevelIterator with point to element from previous iterations\n- 396 template< int codim, class GridImp, bool leafIterator >\n- 397 inline typename AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>::\n-This &\n-398 AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>::operator=( const\n-This &other )\n- 399 {\n- 400 entity_ = other.entity_;\n- 401 level_ = other.level_;\n- 402 subEntity_ = other.subEntity_;\n- 403 macroIterator_ = other.macroIterator_;\n- 404 marker_ = other.marker_;\n- 405\n- 406 return *this;\n- 407 }\n- 408\n- 409\n- 410 template< int codim, class GridImp, bool leafIterator >\n-411 inline void AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>::\n-increment ()\n- 412 {\n- 413 ElementInfo elementInfo = entity_.impl().elementInfo_;\n- 414 goNext ( elementInfo );\n- 415 // it is ok to set the invalid ElementInfo\n- 416 entity_.impl().setElement( elementInfo, subEntity_ );\n- 417 }\n- 418\n- 419\n- 420 template< int codim, class GridImp, bool leafIterator >\n- 421 inline void AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n- 422::nextElement ( ElementInfo &elementInfo )\n- 423 {\n- 424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) )\n- 425 {\n- 426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) )\n- 427 elementInfo = elementInfo.father();\n- 428 if( elementInfo.level() == 0 )\n- 429 {\n- 430 ++macroIterator_;\n- 431 elementInfo = *macroIterator_;\n- 432 }\n- 433 else\n- 434 elementInfo = elementInfo.father().child( 1 );\n- 435 }\n- 436 else\n- 437 elementInfo = elementInfo.child( 0 );\n- 438 }\n- 439\n- 440\n- 441 template< int codim, class GridImp, bool leafIterator >\n- 442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n- 443 ::nextElementStop ( ElementInfo &elementInfo )\n- 444 {\n- 445 while( !(!elementInfo || stopAtElement( elementInfo )) )\n- 446 nextElement( elementInfo );\n- 447 }\n- 448\n- 449\n- 450 template< int codim, class GridImp, bool leafIterator >\n- 451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n- 452 ::stopAtElement ( const ElementInfo &elementInfo ) const\n- 453 {\n- 454 if( !elementInfo )\n- 455 return true;\n- 456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level\n-()));\n- 457 }\n- 458\n- 459\n- 460 template< int codim, class GridImp, bool leafIterator >\n- 461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n- 462 ::goNext ( ElementInfo &elementInfo )\n- 463 {\n- 464 std::integral_constant< int, codim > codimVariable;\n- 465 goNext( codimVariable, elementInfo );\n- 466 }\n- 467\n- 468 template< int codim, class GridImp, bool leafIterator >\n- 469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n- 470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */,\n- 471 ElementInfo &elementInfo )\n- 472 {\n- 473 assert( stopAtElement( elementInfo ) );\n- 474\n- 475 nextElement( elementInfo );\n- 476 nextElementStop( elementInfo );\n- 477 }\n- 478\n- 479 template< int codim, class GridImp, bool leafIterator >\n- 480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n- 481 ::goNext ( const std::integral_constant< int, 1 > cdVariable,\n- 482 ElementInfo &elementInfo )\n- 483 {\n- 484 assert( stopAtElement( elementInfo ) );\n- 485\n- 486 ++subEntity_;\n- 487 if( subEntity_ >= numSubEntities )\n- 488 {\n- 489 subEntity_ = 0;\n- 490 nextElement( elementInfo );\n- 491 nextElementStop( elementInfo );\n- 492 if( !elementInfo )\n- 493 return;\n- 494 }\n- 495\n- 496 if( leafIterator )\n- 497 {\n- 498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ :\n-subEntity_);\n- 499\n- 500 const ALBERTA EL *neighbor = elementInfo.elInfo().neigh[ face ];\n- 501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) )\n- 502 {\n- 503 // face is reached from element with largest number\n- 504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 );\n- 505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 );\n- 506 if( elIndex < nbIndex )\n- 507 goNext( cdVariable, elementInfo );\n- 508 }\n- 509 // uncomment this assertion only if codimension 1 entities are marked\n- 510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo,\n-subEntity_ ) );\n- 511 }\n- 512 else\n- 513 {\n- 514 assert( marker_ != 0 );\n- 515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ )\n-)\n- 516 goNext( cdVariable, elementInfo );\n- 517 }\n- 518 }\n- 519\n- 520 template< int codim, class GridImp, bool leafIterator >\n- 521 template< int cd >\n- 522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n- 523 ::goNext ( const std::integral_constant< int, cd > cdVariable,\n- 524 ElementInfo &elementInfo )\n- 525 {\n- 526 assert( stopAtElement( elementInfo ) );\n- 527\n- 528 ++subEntity_;\n- 529 if( subEntity_ >= numSubEntities )\n- 530 {\n- 531 subEntity_ = 0;\n- 532 nextElement( elementInfo );\n- 533 nextElementStop( elementInfo );\n- 534 if( !elementInfo )\n- 535 return;\n- 536 }\n- 537\n- 538 assert( marker_ != 0 );\n- 539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ )\n-)\n- 540 goNext( cdVariable, elementInfo );\n- 541 }\n- 542\n- 543}\n- 544\n- 545#endif // #if HAVE_ALBERTA\n- 546\n- 547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH\n-ALBERTA\n-#define ALBERTA\n-Definition: albertaheader.hh:29\n-meshpointer.hh\n-provides a wrapper for ALBERTA's mesh structure\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n+74 AlbertaGridLevelIterator ( const GridImp &grid,\n+ 75 const MarkerVector *,\n+ 76 int level )\n+ 77 : Base( grid, level )\n+ 78 {}\n+ 79\n+81 void increment ()\n+ 82 {\n+ 83 Base::increment();\n+ 84 }\n+ 85 };\n+ 86}\n+ 87\n+ 88#endif // #if HAVE_ALBERTA\n+ 89\n+ 90#endif // #ifndef DUNE_ALBERTA_LEVELITERATOR_HH\n+entityiterator.hh\n+treeiterator.hh\n+Dune::Ghost_Partition\n+@ Ghost_Partition\n+only ghost entities\n+Definition: gridenums.hh:142\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::max\n-int max(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:337\n-Dune::AlbertaGrid<_dim,_dimworld_>\n-Dune::AlbertaGrid<_dim,_dimworld_>::dimension\n-static const int dimension\n-Definition: agrid.hh:145\n-Dune::Alberta::MeshPointer<_dimension_>\n-Dune::Alberta::HierarchyDofNumbering<_dimension_>\n-Dune::Alberta::HierarchyDofNumbering::size\n-int size(int codim) const\n-Definition: dofadmin.hh:163\n-Dune::Alberta::ElementInfo<_dimension_>\n Dune::AlbertaGridTreeIterator\n Definition: treeiterator.hh:189\n-Dune::AlbertaGridTreeIterator::equals\n-bool equals(const This &other) const\n-equality\n-Definition: treeiterator.hh:231\n-Dune::AlbertaGridTreeIterator::EntityObject\n-MakeableInterfaceObject< Entity > EntityObject\n-Definition: treeiterator.hh:208\n-Dune::AlbertaGridTreeIterator::MeshPointer\n-Alberta::MeshPointer< dimension > MeshPointer\n-Definition: treeiterator.hh:204\n-Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n-AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int\n-travLevel)\n-Constructor making begin iterator.\n-Definition: treeiterator.hh:352\n-Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n-AlbertaGridTreeIterator(const GridImp &grid, int travLevel)\n-Constructor making end iterator.\n-Definition: treeiterator.hh:373\n-Dune::AlbertaGridTreeIterator::EntityImp\n-EntityObject::ImplementationType EntityImp\n-Definition: treeiterator.hh:209\n-Dune::AlbertaGridTreeIterator::codimension\n-static const int codimension\n-Definition: treeiterator.hh:194\n-Dune::AlbertaGridTreeIterator::MacroIterator\n-MeshPointer::MacroIterator MacroIterator\n-Definition: treeiterator.hh:205\n-Dune::AlbertaGridTreeIterator::operator=\n-This & operator=(const This &other)\n-Constructor making end iterator.\n-Definition: treeiterator.hh:398\n-Dune::AlbertaGridTreeIterator::dereference\n-Entity & dereference() const\n-dereferencing\n-Definition: treeiterator.hh:237\n-Dune::AlbertaGridTreeIterator::MarkerVector\n-AlbertaMarkerVector< dimension, dimensionworld > MarkerVector\n-Definition: treeiterator.hh:212\n-Dune::AlbertaGridTreeIterator::Entity\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_false_>::Entity\n GridImp::template Codim< codim >::Entity Entity\n Definition: treeiterator.hh:207\n-Dune::AlbertaGridTreeIterator::level\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_false_>::level\n int level() const\n ask for level of entities\n Definition: treeiterator.hh:243\n-Dune::AlbertaGridTreeIterator::dimensionworld\n-static const int dimensionworld\n-Definition: treeiterator.hh:195\n-Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n-AlbertaGridTreeIterator()\n-Definition: treeiterator.hh:342\n-Dune::AlbertaGridTreeIterator::increment\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_false_>::increment\n void increment()\n increment\n Definition: treeiterator.hh:411\n-Dune::AlbertaGridTreeIterator::grid\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_false_>::grid\n const GridImp & grid() const\n obtain a reference to the grid\n Definition: treeiterator.hh:253\n-Dune::AlbertaGridTreeIterator::dimension\n-static const int dimension\n-Definition: treeiterator.hh:193\n-Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n-AlbertaGridTreeIterator(const This &other)\n+Dune::AlbertaGridLevelIterator\n+Definition: leveliterator.hh:23\n+Dune::AlbertaGridLevelIterator::MarkerVector\n+Base::MarkerVector MarkerVector\n+Definition: leveliterator.hh:29\n+Dune::AlbertaGridLevelIterator::AlbertaGridLevelIterator\n+AlbertaGridLevelIterator()\n+Definition: leveliterator.hh:31\n+Dune::AlbertaGridLevelIterator::AlbertaGridLevelIterator\n+AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *vec, int\n+level)\n+Constructor making begin iterator.\n+Definition: leveliterator.hh:40\n+Dune::AlbertaGridLevelIterator::Entity\n+Base::Entity Entity\n+Definition: leveliterator.hh:28\n+Dune::AlbertaGridLevelIterator::AlbertaGridLevelIterator\n+AlbertaGridLevelIterator(const GridImp &grid, int level)\n+Constructor making end iterator.\n+Definition: leveliterator.hh:35\n+Dune::AlbertaGridLevelIterator::increment\n+void increment()\n+increment the iterator\n+Definition: leveliterator.hh:47\n+Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>\n+Definition: leveliterator.hh:57\n+Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>::\n+AlbertaGridLevelIterator\n+AlbertaGridLevelIterator()\n+Definition: leveliterator.hh:65\n+Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>::increment\n+void increment()\n+increment the iterator\n+Definition: leveliterator.hh:81\n+Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>::Entity\n+Base::Entity Entity\n+Definition: leveliterator.hh:62\n+Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>::MarkerVector\n+Base::MarkerVector MarkerVector\n+Definition: leveliterator.hh:63\n+Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>::\n+AlbertaGridLevelIterator\n+AlbertaGridLevelIterator(const GridImp &grid, int level)\n Constructor making end iterator.\n-Definition: treeiterator.hh:386\n-Dune::AlbertaGridTreeIterator::ElementInfo\n-EntityImp::ElementInfo ElementInfo\n-Definition: treeiterator.hh:210\n-Dune::Alberta::NumSubEntities\n-Definition: misc.hh:148\n+Definition: leveliterator.hh:69\n+Dune::AlbertaGridLevelIterator<_codim,_Ghost_Partition,_GridImp_>::\n+AlbertaGridLevelIterator\n+AlbertaGridLevelIterator(const GridImp &grid, const MarkerVector *, int level)\n+Constructor making begin iterator (which is the end iterator in this case)\n+Definition: leveliterator.hh:74\n Dune::AlbertaMarkerVector\n marker assigning subentities to one element containing them\n Definition: treeiterator.hh:35\n-Dune::AlbertaMarkerVector::AlbertaMarkerVector\n-AlbertaMarkerVector(const DofNumbering &dofNumbering)\n-create AlbertaMarkerVector with empty vectors\n-Definition: treeiterator.hh:54\n-Dune::AlbertaMarkerVector::up2Date\n-bool up2Date() const\n-return true if marking is up to date\n-Definition: treeiterator.hh:95\n-Dune::AlbertaMarkerVector::subEntityOnElement\n-bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const\n-visit subentity on this element?\n-Definition: treeiterator.hh:294\n-Dune::AlbertaMarkerVector::markSubEntities\n-void markSubEntities(const Iterator &begin, const Iterator &end)\n-Definition: treeiterator.hh:310\n-Dune::AlbertaMarkerVector::~AlbertaMarkerVector\n-~AlbertaMarkerVector()\n-Definition: treeiterator.hh:68\n-Dune::AlbertaMarkerVector::clear\n-void clear()\n-Definition: treeiterator.hh:84\n-Dune::AlbertaMarkerVector::AlbertaMarkerVector\n-AlbertaMarkerVector(const This &other)\n-Definition: treeiterator.hh:61\n-Dune::AlbertaMarkerVector::print\n-void print(std::ostream &out=std::cout) const\n-print for debugin' only\n-Definition: treeiterator.hh:319\n-Dune::AlbertaMarkerVector::MarkSubEntities::Codim\n-Definition: treeiterator.hh:136\n-Dune::AlbertaMarkerVector::MarkSubEntities::Codim::ElementInfo\n-Alberta::ElementInfo< dimension > ElementInfo\n-Definition: treeiterator.hh:139\n-Dune::AlbertaMarkerVector::MarkSubEntities::Codim::apply\n-static void apply(const DofNumbering &dofNumbering, int *(&marker)\n-[dimension+1], const ElementInfo &elementInfo)\n-Definition: treeiterator.hh:141\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::MakeableInterfaceObject<_Entity_>\n-Dune::MakeableInterfaceObject<_Entity_>::ImplementationType\n-InterfaceType::Implementation ImplementationType\n-Definition: common/grid.hh:1108\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00647.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00647.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: undefine-3.0.hh File Reference\n+dune-grid: meshpointer.hh File Reference\n \n \n \n \n \n \n \n@@ -62,25 +62,50 @@\n \n \n \n
    \n-
    undefine-3.0.hh File Reference
    \n+ \n+
    meshpointer.hh File Reference
    \n
    \n
    \n \n-

    Contains #undefs for all preprocessor macros defined by alberta. \n+

    provides a wrapper for ALBERTA's mesh structure \n More...

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

    Go to the source code of this file.

    \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::Alberta::MeshPointer< dim >
     
    class  Dune::Alberta::MeshPointer< dim >::MacroIterator
     
    \n+\n+\n+\n+\n+\n+\n+

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n

    Detailed Description

    \n-

    Contains #undefs for all preprocessor macros defined by alberta.

    \n-

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

    \n+

    provides a wrapper for ALBERTA's mesh structure

    \n+
    Author
    Martin Nolte
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,16 +5,35 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-undefine-3.0.hh File Reference\n-Contains #undefs for all preprocessor macros defined by alberta. More...\n+Classes | Namespaces\n+meshpointer.hh File Reference\n+provides a wrapper for ALBERTA's mesh structure More...\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::Alberta::MeshPointer<_dim_>\n+\u00a0\n+class \u00a0Dune::Alberta::MeshPointer<_dim_>::MacroIterator\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n+\u00a0\n+namespace \u00a0Dune::Alberta\n+\u00a0\n ***** Detailed Description *****\n-Contains #undefs for all preprocessor macros defined by alberta.\n-This file is created automatically by the perl script undefAllMacros.pl.\n+provides a wrapper for ALBERTA's mesh structure\n+ Author\n+ Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00647_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: undefine-3.0.hh Source File\n+dune-grid: meshpointer.hh Source File\n \n \n \n \n \n \n \n@@ -62,900 +62,536 @@\n \n \n
    \n
    \n-
    undefine-3.0.hh
    \n+
    meshpointer.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    12#ifdef _ALBERTA_H_
    \n-
    13 #undef _ALBERTA_H_
    \n-
    14#endif // _ALBERTA_H_
    \n+
    5#ifndef DUNE_ALBERTA_MESHPOINTER_HH
    \n+
    6#define DUNE_ALBERTA_MESHPOINTER_HH
    \n+
    7
    \n+
    13#include <limits>
    \n+
    14#include <string>
    \n
    15
    \n-
    16#ifdef ALBERTA_MAGIC
    \n-
    17 #undef ALBERTA_MAGIC
    \n-
    18#endif // ALBERTA_MAGIC
    \n-
    19
    \n-
    20#ifdef ALBERTA_VERSION
    \n-
    21 #undef ALBERTA_VERSION
    \n-
    22#endif // ALBERTA_VERSION
    \n-
    23
    \n-
    24#ifdef DIM_LIMIT
    \n-
    25 #undef DIM_LIMIT
    \n-
    26#endif // DIM_LIMIT
    \n-
    27
    \n-
    28#ifdef DIM_MAX
    \n-
    29 #undef DIM_MAX
    \n-
    30#endif // DIM_MAX
    \n+\n+\n+\n+\n+
    20
    \n+
    21#if HAVE_ALBERTA
    \n+
    22
    \n+
    23namespace Dune
    \n+
    24{
    \n+
    25
    \n+
    26 namespace Alberta
    \n+
    27 {
    \n+
    28
    \n+
    29 // External Forward Declarations
    \n+
    30 // -----------------------------
    \n
    31
    \n-
    32#ifdef N_VERTICES
    \n-
    33 #undef N_VERTICES
    \n-
    34#endif // N_VERTICES
    \n-
    35
    \n-
    36#ifdef N_EDGES
    \n-
    37 #undef N_EDGES
    \n-
    38#endif // N_EDGES
    \n-
    39
    \n-
    40#ifdef N_WALLS
    \n-
    41 #undef N_WALLS
    \n-
    42#endif // N_WALLS
    \n-
    43
    \n-
    44#ifdef N_FACES
    \n-
    45 #undef N_FACES
    \n-
    46#endif // N_FACES
    \n-
    47
    \n-
    48#ifdef N_NEIGH
    \n-
    49 #undef N_NEIGH
    \n-
    50#endif // N_NEIGH
    \n-
    51
    \n-
    52#ifdef N_LAMBDA
    \n-
    53 #undef N_LAMBDA
    \n-
    54#endif // N_LAMBDA
    \n-
    55
    \n-
    56#ifdef DIM_FAC
    \n-
    57 #undef DIM_FAC
    \n-
    58#endif // DIM_FAC
    \n-
    59
    \n-
    60#ifdef VERTEX_OF_EDGE
    \n-
    61 #undef VERTEX_OF_EDGE
    \n-
    62#endif // VERTEX_OF_EDGE
    \n-
    63
    \n-
    64#ifdef VERTEX_OF_WALL
    \n-
    65 #undef VERTEX_OF_WALL
    \n-
    66#endif // VERTEX_OF_WALL
    \n-
    67
    \n-
    68#ifdef N_VERTICES_0D
    \n-
    69 #undef N_VERTICES_0D
    \n-
    70#endif // N_VERTICES_0D
    \n-
    71
    \n-
    72#ifdef N_EDGES_0D
    \n-
    73 #undef N_EDGES_0D
    \n-
    74#endif // N_EDGES_0D
    \n+
    32 template< int dim >
    \n+
    33 class HierarchyDofNumbering;
    \n+
    34
    \n+
    35 // MeshPointer
    \n+
    36 // -----------
    \n+
    37
    \n+
    38 template< int dim >
    \n+\n+
    40 {
    \n+\n+\n+
    43 typedef typename ElementInfo::FillFlags FillFlags;
    \n+
    44
    \n+
    45 class BoundaryProvider;
    \n+
    46
    \n+
    47 template< int dimWorld >
    \n+
    48 struct Library;
    \n+
    49
    \n+
    50 public:
    \n+
    51 class MacroIterator;
    \n+
    52
    \n+\n+
    54 : mesh_( 0 )
    \n+
    55 {}
    \n+
    56
    \n+
    57 explicit MeshPointer ( Mesh *mesh )
    \n+
    58 : mesh_( mesh )
    \n+
    59 {}
    \n+
    60
    \n+
    61 operator Mesh * () const
    \n+
    62 {
    \n+
    63 return mesh_;
    \n+
    64 }
    \n+
    65
    \n+
    66 explicit operator bool () const
    \n+
    67 {
    \n+
    68 return (bool)mesh_;
    \n+
    69 }
    \n+
    70
    \n+\n+
    72 {
    \n+
    73 return MacroIterator( *this, false );
    \n+
    74 }
    \n
    75
    \n-
    76#ifdef N_FACES_0D
    \n-
    77 #undef N_FACES_0D
    \n-
    78#endif // N_FACES_0D
    \n-
    79
    \n-
    80#ifdef N_NEIGH_0D
    \n-
    81 #undef N_NEIGH_0D
    \n-
    82#endif // N_NEIGH_0D
    \n+\n+
    77 {
    \n+
    78 return MacroIterator( *this, true );
    \n+
    79 }
    \n+
    80
    \n+
    81 int numMacroElements () const;
    \n+
    82 int size ( int codim ) const;
    \n
    83
    \n-
    84#ifdef N_WALLS_0D
    \n-
    85 #undef N_WALLS_0D
    \n-
    86#endif // N_WALLS_0D
    \n-
    87
    \n-
    88#ifdef N_LAMBDA_0D
    \n-
    89 #undef N_LAMBDA_0D
    \n-
    90#endif // N_LAMBDA_0D
    \n-
    91
    \n-
    92#ifdef DIM_FAC_0D
    \n-
    93 #undef DIM_FAC_0D
    \n-
    94#endif // DIM_FAC_0D
    \n-
    95
    \n-
    96#ifdef VERTEX_OF_EDGE_0D
    \n-
    97 #undef VERTEX_OF_EDGE_0D
    \n-
    98#endif // VERTEX_OF_EDGE_0D
    \n-
    99
    \n-
    100#ifdef VERTEX_OF_WALL_0D
    \n-
    101 #undef VERTEX_OF_WALL_0D
    \n-
    102#endif // VERTEX_OF_WALL_0D
    \n-
    103
    \n-
    104#ifdef N_VERTICES_1D
    \n-
    105 #undef N_VERTICES_1D
    \n-
    106#endif // N_VERTICES_1D
    \n-
    107
    \n-
    108#ifdef N_EDGES_1D
    \n-
    109 #undef N_EDGES_1D
    \n-
    110#endif // N_EDGES_1D
    \n-
    111
    \n-
    112#ifdef N_FACES_1D
    \n-
    113 #undef N_FACES_1D
    \n-
    114#endif // N_FACES_1D
    \n+
    84 // create a mesh from a macrodata structure
    \n+
    85 // params: macroData - macro data structure
    \n+
    86 // returns: number of boundary segments
    \n+
    87 unsigned int create ( const MacroData< dim > &macroData );
    \n+
    88
    \n+
    89 // create a mesh from a macrodata structure, adding projections
    \n+
    90 // params: macroData - macro data structure
    \n+
    91 // projectionFactory - factory for the projections
    \n+
    92 // returns: number of boundary segments
    \n+
    93 template< class Proj, class Impl >
    \n+
    94 unsigned int create ( const MacroData< dim > &macroData,
    \n+
    95 const ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
    \n+
    96
    \n+
    97 // create a mesh from a file
    \n+
    98 // params: filename - file name of an Alberta macro triangulation
    \n+
    99 // binary - read binary?
    \n+
    100 // returns: number of boundary segments
    \n+
    101 unsigned int create ( const std::string &filename, bool binary = false );
    \n+
    102
    \n+
    103 // read back a mesh from a file
    \n+
    104 // params: filename - file name of an Alberta save file
    \n+
    105 // time - variable to receive the time stored in the file
    \n+
    106 // returns: number of boundary segments
    \n+
    107 //
    \n+
    108 // notes: - projections are not preserved
    \n+
    109 // - we assume that projections are added in the same order they
    \n+
    110 // inserted in when the grid was created (otherwise the boundary
    \n+
    111 // indices change)
    \n+
    112 unsigned int read ( const std::string &filename, Real &time );
    \n+
    113
    \n+
    114 bool write ( const std::string &filename, Real time ) const;
    \n
    115
    \n-
    116#ifdef N_NEIGH_1D
    \n-
    117 #undef N_NEIGH_1D
    \n-
    118#endif // N_NEIGH_1D
    \n-
    119
    \n-
    120#ifdef N_WALLS_1D
    \n-
    121 #undef N_WALLS_1D
    \n-
    122#endif // N_WALLS_1D
    \n-
    123
    \n-
    124#ifdef N_LAMBDA_1D
    \n-
    125 #undef N_LAMBDA_1D
    \n-
    126#endif // N_LAMBDA_1D
    \n+
    116 void release ();
    \n+
    117
    \n+
    118 template< class Functor >
    \n+
    119 void hierarchicTraverse ( Functor &functor,
    \n+
    120 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;
    \n+
    121
    \n+
    122 template< class Functor >
    \n+
    123 void leafTraverse ( Functor &functor,
    \n+
    124 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;
    \n+
    125
    \n+
    126 bool coarsen ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
    \n
    127
    \n-
    128#ifdef DIM_FAC_1D
    \n-
    129 #undef DIM_FAC_1D
    \n-
    130#endif // DIM_FAC_1D
    \n-
    131
    \n-
    132#ifdef VERTEX_OF_EDGE_1D
    \n-
    133 #undef VERTEX_OF_EDGE_1D
    \n-
    134#endif // VERTEX_OF_EDGE_1D
    \n-
    135
    \n-
    136#ifdef VERTEX_OF_WALL_1D
    \n-
    137 #undef VERTEX_OF_WALL_1D
    \n-
    138#endif // VERTEX_OF_WALL_1D
    \n+
    128 bool refine ( typename FillFlags::Flags fillFlags = FillFlags::nothing );
    \n+
    129
    \n+
    130 private:
    \n+
    131 static ALBERTA NODE_PROJECTION *
    \n+
    132 initNodeProjection ( [[maybe_unused]] Mesh *mesh, ALBERTA MACRO_EL *macroElement, int n );
    \n+
    133 template< class ProjectionProvider >
    \n+
    134 static ALBERTA NODE_PROJECTION *
    \n+
    135 initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroElement, int n );
    \n+
    136
    \n+
    137 Mesh *mesh_;
    \n+
    138 };
    \n
    139
    \n-
    140#ifdef N_VERTICES_2D
    \n-
    141 #undef N_VERTICES_2D
    \n-
    142#endif // N_VERTICES_2D
    \n-
    143
    \n-
    144#ifdef N_EDGES_2D
    \n-
    145 #undef N_EDGES_2D
    \n-
    146#endif // N_EDGES_2D
    \n-
    147
    \n-
    148#ifdef N_FACES_2D
    \n-
    149 #undef N_FACES_2D
    \n-
    150#endif // N_FACES_2D
    \n-
    151
    \n-
    152#ifdef N_NEIGH_2D
    \n-
    153 #undef N_NEIGH_2D
    \n-
    154#endif // N_NEIGH_2D
    \n-
    155
    \n-
    156#ifdef N_WALLS_2D
    \n-
    157 #undef N_WALLS_2D
    \n-
    158#endif // N_WALLS_2D
    \n+
    140
    \n+
    141
    \n+
    142 // MeshPointer::Library
    \n+
    143 // --------------------
    \n+
    144
    \n+
    145 template< int dim >
    \n+
    146 template< int dimWorld >
    \n+
    147 struct MeshPointer< dim >::Library
    \n+
    148 {
    \n+\n+
    150
    \n+
    151 static inline unsigned int boundaryCount = 0;
    \n+
    152 static inline const void *projectionFactory = nullptr;
    \n+
    153
    \n+
    154 static void
    \n+
    155 create ( MeshPointer &ptr, const MacroData< dim > &macroData,
    \n+
    156 ALBERTA NODE_PROJECTION *(*initNodeProjection)( Mesh *, ALBERTA MACRO_EL *, int ) );
    \n+
    157 static void release ( MeshPointer &ptr );
    \n+
    158 };
    \n
    159
    \n-
    160#ifdef N_LAMBDA_2D
    \n-
    161 #undef N_LAMBDA_2D
    \n-
    162#endif // N_LAMBDA_2D
    \n-
    163
    \n-
    164#ifdef DIM_FAC_2D
    \n-
    165 #undef DIM_FAC_2D
    \n-
    166#endif // DIM_FAC_2D
    \n-
    167
    \n-
    168#ifdef VERTEX_OF_EDGE_2D
    \n-
    169 #undef VERTEX_OF_EDGE_2D
    \n-
    170#endif // VERTEX_OF_EDGE_2D
    \n+
    160
    \n+
    161
    \n+
    162 // MeshPointer::MacroIterator
    \n+
    163 // --------------------------
    \n+
    164
    \n+
    165 template< int dim >
    \n+\n+
    167 {
    \n+\n+
    169
    \n+
    170 friend class MeshPointer< dim >;
    \n
    171
    \n-
    172#ifdef VERTEX_OF_WALL_2D
    \n-
    173 #undef VERTEX_OF_WALL_2D
    \n-
    174#endif // VERTEX_OF_WALL_2D
    \n+
    172 public:
    \n+\n+\n
    175
    \n-
    176#ifdef N_VERTICES_3D
    \n-
    177 #undef N_VERTICES_3D
    \n-
    178#endif // N_VERTICES_3D
    \n-
    179
    \n-
    180#ifdef N_EDGES_3D
    \n-
    181 #undef N_EDGES_3D
    \n-
    182#endif // N_EDGES_3D
    \n-
    183
    \n-
    184#ifdef N_FACES_3D
    \n-
    185 #undef N_FACES_3D
    \n-
    186#endif // N_FACES_3D
    \n+\n+
    177 : mesh_(),
    \n+
    178 index_( -1 )
    \n+
    179 {}
    \n+
    180
    \n+
    181 private:
    \n+
    182
    \n+
    183 explicit MacroIterator ( const MeshPointer &mesh, bool end = false )
    \n+
    184 : mesh_( mesh ),
    \n+
    185 index_( end ? mesh.numMacroElements() : 0 )
    \n+
    186 {}
    \n
    187
    \n-
    188#ifdef N_NEIGH_3D
    \n-
    189 #undef N_NEIGH_3D
    \n-
    190#endif // N_NEIGH_3D
    \n-
    191
    \n-
    192#ifdef N_WALLS_3D
    \n-
    193 #undef N_WALLS_3D
    \n-
    194#endif // N_WALLS_3D
    \n-
    195
    \n-
    196#ifdef N_LAMBDA_3D
    \n-
    197 #undef N_LAMBDA_3D
    \n-
    198#endif // N_LAMBDA_3D
    \n-
    199
    \n-
    200#ifdef DIM_FAC_3D
    \n-
    201 #undef DIM_FAC_3D
    \n-
    202#endif // DIM_FAC_3D
    \n-
    203
    \n-
    204#ifdef VERTEX_OF_EDGE_3D
    \n-
    205 #undef VERTEX_OF_EDGE_3D
    \n-
    206#endif // VERTEX_OF_EDGE_3D
    \n-
    207
    \n-
    208#ifdef VERTEX_OF_WALL_3D
    \n-
    209 #undef VERTEX_OF_WALL_3D
    \n-
    210#endif // VERTEX_OF_WALL_3D
    \n-
    211
    \n-
    212#ifdef N_LAMBDA_MAX
    \n-
    213 #undef N_LAMBDA_MAX
    \n-
    214#endif // N_LAMBDA_MAX
    \n+
    188 public:
    \n+
    189 bool done () const
    \n+
    190 {
    \n+
    191 return (index_ >= mesh().numMacroElements());
    \n+
    192 }
    \n+
    193
    \n+
    194 bool equals ( const MacroIterator &other ) const
    \n+
    195 {
    \n+
    196 return (index_ == other.index_);
    \n+
    197 }
    \n+
    198
    \n+
    199 void increment ()
    \n+
    200 {
    \n+
    201 assert( !done() );
    \n+
    202 ++index_;
    \n+
    203 }
    \n+
    204
    \n+\n+
    206 {
    \n+
    207 assert( !done() );
    \n+
    208 return static_cast< const MacroElement & >( mesh().mesh_->macro_els[ index_ ] );
    \n+
    209 }
    \n+
    210
    \n+
    211 const MeshPointer &mesh () const
    \n+
    212 {
    \n+
    213 return mesh_;
    \n+
    214 }
    \n
    215
    \n-
    216#ifdef N_VERTICES_MAX
    \n-
    217 #undef N_VERTICES_MAX
    \n-
    218#endif // N_VERTICES_MAX
    \n-
    219
    \n-
    220#ifdef N_EDGES_MAX
    \n-
    221 #undef N_EDGES_MAX
    \n-
    222#endif // N_EDGES_MAX
    \n-
    223
    \n-
    224#ifdef N_FACES_MAX
    \n-
    225 #undef N_FACES_MAX
    \n-
    226#endif // N_FACES_MAX
    \n-
    227
    \n-
    228#ifdef N_NEIGH_MAX
    \n-
    229 #undef N_NEIGH_MAX
    \n-
    230#endif // N_NEIGH_MAX
    \n+
    216 This &operator++ ()
    \n+
    217 {
    \n+
    218 increment();
    \n+
    219 return *this;
    \n+
    220 }
    \n+
    221
    \n+
    222 ElementInfo operator* () const
    \n+
    223 {
    \n+
    224 return elementInfo();
    \n+
    225 }
    \n+
    226
    \n+
    227 bool operator== ( const MacroIterator &other ) const
    \n+
    228 {
    \n+
    229 return equals( other );
    \n+
    230 }
    \n
    231
    \n-
    232#ifdef N_WALLS_MAX
    \n-
    233 #undef N_WALLS_MAX
    \n-
    234#endif // N_WALLS_MAX
    \n-
    235
    \n-
    236#ifdef DIM_FAC_MAX
    \n-
    237 #undef DIM_FAC_MAX
    \n-
    238#endif // DIM_FAC_MAX
    \n-
    239
    \n-
    240#ifdef N_LAMBDA_LIMIT
    \n-
    241 #undef N_LAMBDA_LIMIT
    \n-
    242#endif // N_LAMBDA_LIMIT
    \n-
    243
    \n-
    244#ifdef N_VERTICES_LIMIT
    \n-
    245 #undef N_VERTICES_LIMIT
    \n-
    246#endif // N_VERTICES_LIMIT
    \n-
    247
    \n-
    248#ifdef N_EDGES_LIMIT
    \n-
    249 #undef N_EDGES_LIMIT
    \n-
    250#endif // N_EDGES_LIMIT
    \n+
    232 bool operator!= ( const MacroIterator &other ) const
    \n+
    233 {
    \n+
    234 return !equals( other );
    \n+
    235 }
    \n+
    236
    \n+\n+
    238 elementInfo ( typename FillFlags::Flags fillFlags = FillFlags::standard ) const
    \n+
    239 {
    \n+
    240 if( done() )
    \n+
    241 return ElementInfo();
    \n+
    242 else
    \n+
    243 return ElementInfo( mesh(), macroElement(), fillFlags );
    \n+
    244 }
    \n+
    245
    \n+
    246 private:
    \n+
    247 MeshPointer mesh_;
    \n+
    248 int index_;
    \n+
    249 };
    \n+
    250
    \n
    251
    \n-
    252#ifdef N_FACES_LIMIT
    \n-
    253 #undef N_FACES_LIMIT
    \n-
    254#endif // N_FACES_LIMIT
    \n+
    252
    \n+
    253 // Implementation of MeshPointer
    \n+
    254 // -----------------------------
    \n
    255
    \n-
    256#ifdef N_NEIGH_LIMIT
    \n-
    257 #undef N_NEIGH_LIMIT
    \n-
    258#endif // N_NEIGH_LIMIT
    \n-
    259
    \n-
    260#ifdef N_WALLS_LIMIT
    \n-
    261 #undef N_WALLS_LIMIT
    \n-
    262#endif // N_WALLS_LIMIT
    \n-
    263
    \n-
    264#ifdef DIM_FAC_LIMIT
    \n-
    265 #undef DIM_FAC_LIMIT
    \n-
    266#endif // DIM_FAC_LIMIT
    \n-
    267
    \n-
    268#ifdef INDEX
    \n-
    269 #undef INDEX
    \n-
    270#endif // INDEX
    \n-
    271
    \n-
    272#ifdef INDEX
    \n-
    273 #undef INDEX
    \n-
    274#endif // INDEX
    \n-
    275
    \n-
    276#ifdef IS_LEAF_EL
    \n-
    277 #undef IS_LEAF_EL
    \n-
    278#endif // IS_LEAF_EL
    \n-
    279
    \n-
    280#ifdef LEAF_DATA
    \n-
    281 #undef LEAF_DATA
    \n-
    282#endif // LEAF_DATA
    \n-
    283
    \n-
    284#ifdef INTERIOR
    \n-
    285 #undef INTERIOR
    \n-
    286#endif // INTERIOR
    \n-
    287
    \n-
    288#ifdef DIRICHLET
    \n-
    289 #undef DIRICHLET
    \n-
    290#endif // DIRICHLET
    \n-
    291
    \n-
    292#ifdef NEUMANN
    \n-
    293 #undef NEUMANN
    \n-
    294#endif // NEUMANN
    \n+
    256 template< int dim >
    \n+\n+
    258 {
    \n+
    259 return (mesh_ ? mesh_->n_macro_el : 0);
    \n+
    260 }
    \n+
    261
    \n+
    262
    \n+
    263 template<>
    \n+
    264 inline int MeshPointer< 1 >::size( int codim ) const
    \n+
    265 {
    \n+
    266 assert( (codim >= 0) && (codim <= 1) );
    \n+
    267 return (codim == 0 ? mesh_->n_elements : mesh_->n_vertices);
    \n+
    268 }
    \n+
    269
    \n+
    270 template<>
    \n+
    271 inline int MeshPointer< 2 >::size( int codim ) const
    \n+
    272 {
    \n+
    273 assert( (codim >= 0) && (codim <= 2) );
    \n+
    274 if( codim == 0 )
    \n+
    275 return mesh_->n_elements;
    \n+
    276 else if( codim == 2 )
    \n+
    277 return mesh_->n_vertices;
    \n+
    278 else
    \n+
    279 return mesh_->n_edges;
    \n+
    280 }
    \n+
    281
    \n+
    282 template<>
    \n+
    283 inline int MeshPointer< 3 >::size( int codim ) const
    \n+
    284 {
    \n+
    285 assert( (codim >= 0) && (codim <= 3) );
    \n+
    286 if( codim == 0 )
    \n+
    287 return mesh_->n_elements;
    \n+
    288 else if( codim == 3 )
    \n+
    289 return mesh_->n_vertices;
    \n+
    290 else if( codim == 1 )
    \n+
    291 return mesh_->n_faces;
    \n+
    292 else
    \n+
    293 return mesh_->n_edges;
    \n+
    294 }
    \n
    295
    \n-
    296#ifdef IS_NEUMANN
    \n-
    297 #undef IS_NEUMANN
    \n-
    298#endif // IS_NEUMANN
    \n-
    299
    \n-
    300#ifdef IS_DIRICHLET
    \n-
    301 #undef IS_DIRICHLET
    \n-
    302#endif // IS_DIRICHLET
    \n-
    303
    \n-
    304#ifdef IS_INTERIOR
    \n-
    305 #undef IS_INTERIOR
    \n-
    306#endif // IS_INTERIOR
    \n+
    296
    \n+
    297 template< int dim >
    \n+
    298 inline unsigned int MeshPointer< dim >
    \n+
    299 ::create ( const MacroData< dim > &macroData )
    \n+
    300 {
    \n+
    301 release();
    \n+
    302
    \n+
    303 Library< dimWorld >::boundaryCount = 0;
    \n+
    304 Library< dimWorld >::create( *this, macroData, &initNodeProjection );
    \n+
    305 return Library< dimWorld >::boundaryCount;
    \n+
    306 }
    \n
    307
    \n-
    308#ifdef N_BNDRY_TYPES
    \n-
    309 #undef N_BNDRY_TYPES
    \n-
    310#endif // N_BNDRY_TYPES
    \n-
    311
    \n-
    312#ifdef LIST_ENTRY
    \n-
    313 #undef LIST_ENTRY
    \n-
    314#endif // LIST_ENTRY
    \n-
    315
    \n-
    316#ifdef INIT_EL_TAG_CTX_INIT
    \n-
    317 #undef INIT_EL_TAG_CTX_INIT
    \n-
    318#endif // INIT_EL_TAG_CTX_INIT
    \n-
    319
    \n-
    320#ifdef INIT_EL_TAG_CTX_UNIQ
    \n-
    321 #undef INIT_EL_TAG_CTX_UNIQ
    \n-
    322#endif // INIT_EL_TAG_CTX_UNIQ
    \n-
    323
    \n-
    324#ifdef INIT_EL_TAG_CTX_NULL
    \n-
    325 #undef INIT_EL_TAG_CTX_NULL
    \n-
    326#endif // INIT_EL_TAG_CTX_NULL
    \n+
    308
    \n+
    309 template< int dim >
    \n+
    310 template< class Proj, class Impl >
    \n+
    311 inline unsigned int MeshPointer< dim >
    \n+
    312 ::create ( const MacroData< dim > &macroData,
    \n+
    313 const ProjectionFactoryInterface< Proj, Impl > &projectionFactory )
    \n+
    314 {
    \n+\n+
    316
    \n+
    317 release();
    \n+
    318
    \n+
    319 Library< dimWorld >::boundaryCount = 0;
    \n+
    320 Library< dimWorld >::projectionFactory = &projectionFactory;
    \n+
    321 Library< dimWorld >::create( *this, macroData, &initNodeProjection< ProjectionFactory > );
    \n+
    322 Library< dimWorld >::projectionFactory = nullptr;
    \n+
    323 return Library< dimWorld >::boundaryCount;
    \n+
    324 }
    \n+
    325
    \n+
    326
    \n
    327
    \n-
    328#ifdef INIT_EL_TAG_CTX_DFLT
    \n-
    329 #undef INIT_EL_TAG_CTX_DFLT
    \n-
    330#endif // INIT_EL_TAG_CTX_DFLT
    \n-
    331
    \n-
    332#ifdef INIT_EL_TAG_CTX_TAG
    \n-
    333 #undef INIT_EL_TAG_CTX_TAG
    \n-
    334#endif // INIT_EL_TAG_CTX_TAG
    \n-
    335
    \n-
    336#ifdef INIT_ELEMENT_METHOD
    \n-
    337 #undef INIT_ELEMENT_METHOD
    \n-
    338#endif // INIT_ELEMENT_METHOD
    \n+
    328
    \n+
    329 template< int dim >
    \n+
    330 inline unsigned int MeshPointer< dim >
    \n+
    331 ::create ( const std::string &filename, bool binary )
    \n+
    332 {
    \n+
    333 MacroData< dim > macroData;
    \n+
    334 macroData.read( filename, binary );
    \n+
    335 const unsigned int boundaryCount = create( macroData );
    \n+
    336 macroData.release();
    \n+
    337 return boundaryCount;
    \n+
    338 }
    \n
    339
    \n-
    340#ifdef INIT_ELEMENT_FLAGS
    \n-
    341 #undef INIT_ELEMENT_FLAGS
    \n-
    342#endif // INIT_ELEMENT_FLAGS
    \n-
    343
    \n-
    344#ifdef INIT_ELEMENT_DEFUN
    \n-
    345 #undef INIT_ELEMENT_DEFUN
    \n-
    346#endif // INIT_ELEMENT_DEFUN
    \n-
    347
    \n-
    348#ifdef INIT_OBJECT
    \n-
    349 #undef INIT_OBJECT
    \n-
    350#endif // INIT_OBJECT
    \n+
    340
    \n+
    341 template< int dim >
    \n+
    342 inline unsigned int MeshPointer< dim >::read ( const std::string &filename, Real &time )
    \n+
    343 {
    \n+
    344 release();
    \n+
    345
    \n+
    346 Library< dimWorld >::boundaryCount = 0;
    \n+
    347 mesh_ = ALBERTA read_mesh_xdr( filename.c_str(), &time, NULL, NULL );
    \n+
    348 return Library< dimWorld >::boundaryCount;
    \n+
    349 }
    \n+
    350
    \n
    351
    \n-
    352#ifdef INIT_ELEMENT_DECL
    \n-
    353 #undef INIT_ELEMENT_DECL
    \n-
    354#endif // INIT_ELEMENT_DECL
    \n-
    355
    \n-
    356#ifdef INIT_ELEMENT_INITIALIZER
    \n-
    357 #undef INIT_ELEMENT_INITIALIZER
    \n-
    358#endif // INIT_ELEMENT_INITIALIZER
    \n+
    352 template< int dim >
    \n+
    353 inline bool MeshPointer< dim >::write ( const std::string &filename, Real time ) const
    \n+
    354 {
    \n+
    355 int success = ALBERTA write_mesh_xdr( mesh_, filename.c_str(), time );
    \n+
    356 return (success == 0);
    \n+
    357 }
    \n+
    358
    \n
    359
    \n-
    360#ifdef INIT_ELEMENT
    \n-
    361 #undef INIT_ELEMENT
    \n-
    362#endif // INIT_ELEMENT
    \n-
    363
    \n-
    364#ifdef INIT_ELEMENT_NEEDED
    \n-
    365 #undef INIT_ELEMENT_NEEDED
    \n-
    366#endif // INIT_ELEMENT_NEEDED
    \n-
    367
    \n-
    368#ifdef INIT_ELEMENT_SETUP
    \n-
    369 #undef INIT_ELEMENT_SETUP
    \n-
    370#endif // INIT_ELEMENT_SETUP
    \n-
    371
    \n-
    372#ifdef INIT_OBJECT_SINGLE
    \n-
    373 #undef INIT_OBJECT_SINGLE
    \n-
    374#endif // INIT_OBJECT_SINGLE
    \n-
    375
    \n-
    376#ifdef INIT_ELEMENT_SINGLE
    \n-
    377 #undef INIT_ELEMENT_SINGLE
    \n-
    378#endif // INIT_ELEMENT_SINGLE
    \n-
    379
    \n-
    380#ifdef vertex_of_wall_2d
    \n-
    381 #undef vertex_of_wall_2d
    \n-
    382#endif // vertex_of_wall_2d
    \n-
    383
    \n-
    384#ifdef PARAM_STRATEGY_MASK
    \n-
    385 #undef PARAM_STRATEGY_MASK
    \n-
    386#endif // PARAM_STRATEGY_MASK
    \n-
    387
    \n-
    388#ifdef PARAM_PERIODIC_COORDS
    \n-
    389 #undef PARAM_PERIODIC_COORDS
    \n-
    390#endif // PARAM_PERIODIC_COORDS
    \n-
    391
    \n-
    392#ifdef FILL_EL_DET
    \n-
    393 #undef FILL_EL_DET
    \n-
    394#endif // FILL_EL_DET
    \n+
    360 template< int dim >
    \n+\n+
    362 {
    \n+
    363 Library< dimWorld >::release( *this );
    \n+
    364 }
    \n+
    365
    \n+
    366
    \n+
    367 template< int dim >
    \n+
    368 template< class Functor >
    \n+
    369 inline void MeshPointer< dim >
    \n+
    370 ::hierarchicTraverse ( Functor &functor,
    \n+
    371 typename FillFlags::Flags fillFlags ) const
    \n+
    372 {
    \n+
    373 const MacroIterator eit = end();
    \n+
    374 for( MacroIterator it = begin(); it != eit; ++it )
    \n+
    375 {
    \n+
    376 const ElementInfo info = it.elementInfo( fillFlags );
    \n+
    377 info.hierarchicTraverse( functor );
    \n+
    378 }
    \n+
    379 }
    \n+
    380
    \n+
    381
    \n+
    382 template< int dim >
    \n+
    383 template< class Functor >
    \n+
    384 inline void MeshPointer< dim >
    \n+
    385 ::leafTraverse ( Functor &functor,
    \n+
    386 typename FillFlags::Flags fillFlags ) const
    \n+
    387 {
    \n+
    388 const MacroIterator eit = end();
    \n+
    389 for( MacroIterator it = begin(); it != eit; ++it )
    \n+
    390 {
    \n+
    391 const ElementInfo info = it.elementInfo( fillFlags );
    \n+
    392 info.leafTraverse( functor );
    \n+
    393 }
    \n+
    394 }
    \n
    395
    \n-
    396#ifdef FILL_EL_LAMBDA
    \n-
    397 #undef FILL_EL_LAMBDA
    \n-
    398#endif // FILL_EL_LAMBDA
    \n-
    399
    \n-
    400#ifdef FILL_EL_WALL_SHIFT
    \n-
    401 #undef FILL_EL_WALL_SHIFT
    \n-
    402#endif // FILL_EL_WALL_SHIFT
    \n-
    403
    \n-
    404#ifdef FILL_EL_WALL_MASK
    \n-
    405 #undef FILL_EL_WALL_MASK
    \n-
    406#endif // FILL_EL_WALL_MASK
    \n-
    407
    \n-
    408#ifdef FILL_EL_WALL_DET
    \n-
    409 #undef FILL_EL_WALL_DET
    \n-
    410#endif // FILL_EL_WALL_DET
    \n+
    396
    \n+
    397 template< int dim >
    \n+
    398 inline bool MeshPointer< dim >::coarsen ( typename FillFlags::Flags fillFlags )
    \n+
    399 {
    \n+
    400 const bool coarsened = (ALBERTA coarsen( mesh_, fillFlags ) == meshCoarsened);
    \n+
    401 if( coarsened )
    \n+
    402 ALBERTA dof_compress( mesh_ );
    \n+
    403 return coarsened;
    \n+
    404 }
    \n+
    405
    \n+
    406 template< int dim >
    \n+
    407 inline bool MeshPointer< dim >::refine ( typename FillFlags::Flags fillFlags )
    \n+
    408 {
    \n+
    409 return (ALBERTA refine( mesh_, fillFlags ) == meshRefined);
    \n+
    410 }
    \n
    411
    \n-
    412#ifdef FILL_EL_WALL_NORMAL
    \n-
    413 #undef FILL_EL_WALL_NORMAL
    \n-
    414#endif // FILL_EL_WALL_NORMAL
    \n-
    415
    \n-
    416#ifdef FILL_EL_WALL_ORIENTATION
    \n-
    417 #undef FILL_EL_WALL_ORIENTATION
    \n-
    418#endif // FILL_EL_WALL_ORIENTATION
    \n-
    419
    \n-
    420#ifdef FILL_EL_WALL_REL_ORIENTATION
    \n-
    421 #undef FILL_EL_WALL_REL_ORIENTATION
    \n-
    422#endif // FILL_EL_WALL_REL_ORIENTATION
    \n+
    412
    \n+
    413 template< int dim >
    \n+
    414 inline ALBERTA NODE_PROJECTION *
    \n+
    415 MeshPointer< dim >::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroEl, int n )
    \n+
    416 {
    \n+
    417 const MacroElement &macroElement = static_cast< const MacroElement & >( *macroEl );
    \n+
    418 if( (n > 0) && macroElement.isBoundary( n-1 ) )
    \n+
    419 return new BasicNodeProjection( Library< dimWorld >::boundaryCount++ );
    \n+
    420 else
    \n+
    421 return 0;
    \n+
    422 }
    \n
    423
    \n-
    424#ifdef FILL_EL_WALL_DETS
    \n-
    425 #undef FILL_EL_WALL_DETS
    \n-
    426#endif // FILL_EL_WALL_DETS
    \n-
    427
    \n-
    428#ifdef FILL_EL_WALL_NORMALS
    \n-
    429 #undef FILL_EL_WALL_NORMALS
    \n-
    430#endif // FILL_EL_WALL_NORMALS
    \n+
    424
    \n+
    425 template< int dim >
    \n+
    426 template< class ProjectionFactory >
    \n+
    427 inline ALBERTA NODE_PROJECTION *
    \n+
    428 MeshPointer< dim >::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroEl, int n )
    \n+
    429 {
    \n+
    430 typedef typename ProjectionFactory::Projection Projection;
    \n
    431
    \n-
    432#ifdef FILL_EL_WALL_ORIENTATIONS
    \n-
    433 #undef FILL_EL_WALL_ORIENTATIONS
    \n-
    434#endif // FILL_EL_WALL_ORIENTATIONS
    \n-
    435
    \n-
    436#ifdef FILL_EL_WALL_REL_ORIENTATIONS
    \n-
    437 #undef FILL_EL_WALL_REL_ORIENTATIONS
    \n-
    438#endif // FILL_EL_WALL_REL_ORIENTATIONS
    \n-
    439
    \n-
    440#ifdef BNDRY_FLAGS_INIT
    \n-
    441 #undef BNDRY_FLAGS_INIT
    \n-
    442#endif // BNDRY_FLAGS_INIT
    \n-
    443
    \n-
    444#ifdef BNDRY_FLAGS_ALL
    \n-
    445 #undef BNDRY_FLAGS_ALL
    \n-
    446#endif // BNDRY_FLAGS_ALL
    \n-
    447
    \n-
    448#ifdef BNDRY_FLAGS_CPY
    \n-
    449 #undef BNDRY_FLAGS_CPY
    \n-
    450#endif // BNDRY_FLAGS_CPY
    \n-
    451
    \n-
    452#ifdef BNDRY_FLAGS_AND
    \n-
    453 #undef BNDRY_FLAGS_AND
    \n-
    454#endif // BNDRY_FLAGS_AND
    \n-
    455
    \n-
    456#ifdef BNDRY_FLAGS_OR
    \n-
    457 #undef BNDRY_FLAGS_OR
    \n-
    458#endif // BNDRY_FLAGS_OR
    \n-
    459
    \n-
    460#ifdef BNDRY_FLAGS_XOR
    \n-
    461 #undef BNDRY_FLAGS_XOR
    \n-
    462#endif // BNDRY_FLAGS_XOR
    \n-
    463
    \n-
    464#ifdef BNDRY_FLAGS_IS_INTERIOR
    \n-
    465 #undef BNDRY_FLAGS_IS_INTERIOR
    \n-
    466#endif // BNDRY_FLAGS_IS_INTERIOR
    \n-
    467
    \n-
    468#ifdef BNDRY_FLAGS_IS_AT_BNDRY
    \n-
    469 #undef BNDRY_FLAGS_IS_AT_BNDRY
    \n-
    470#endif // BNDRY_FLAGS_IS_AT_BNDRY
    \n-
    471
    \n-
    472#ifdef BNDRY_FLAGS_SET
    \n-
    473 #undef BNDRY_FLAGS_SET
    \n-
    474#endif // BNDRY_FLAGS_SET
    \n-
    475
    \n-
    476#ifdef BNDRY_FLAGS_IS_PARTOF
    \n-
    477 #undef BNDRY_FLAGS_IS_PARTOF
    \n-
    478#endif // BNDRY_FLAGS_IS_PARTOF
    \n-
    479
    \n-
    480#ifdef BNDRY_FLAGS_FFBB
    \n-
    481 #undef BNDRY_FLAGS_FFBB
    \n-
    482#endif // BNDRY_FLAGS_FFBB
    \n-
    483
    \n-
    484#ifdef RCLE_NONE
    \n-
    485 #undef RCLE_NONE
    \n-
    486#endif // RCLE_NONE
    \n-
    487
    \n-
    488#ifdef RCLE_COARSE_EDGE_COMPAT
    \n-
    489 #undef RCLE_COARSE_EDGE_COMPAT
    \n-
    490#endif // RCLE_COARSE_EDGE_COMPAT
    \n-
    491
    \n-
    492#ifdef FILL_NOTHING
    \n-
    493 #undef FILL_NOTHING
    \n-
    494#endif // FILL_NOTHING
    \n-
    495
    \n-
    496#ifdef FILL_COORDS
    \n-
    497 #undef FILL_COORDS
    \n-
    498#endif // FILL_COORDS
    \n-
    499
    \n-
    500#ifdef FILL_BOUND
    \n-
    501 #undef FILL_BOUND
    \n-
    502#endif // FILL_BOUND
    \n-
    503
    \n-
    504#ifdef FILL_NEIGH
    \n-
    505 #undef FILL_NEIGH
    \n-
    506#endif // FILL_NEIGH
    \n-
    507
    \n-
    508#ifdef FILL_OPP_COORDS
    \n-
    509 #undef FILL_OPP_COORDS
    \n-
    510#endif // FILL_OPP_COORDS
    \n-
    511
    \n-
    512#ifdef FILL_ORIENTATION
    \n-
    513 #undef FILL_ORIENTATION
    \n-
    514#endif // FILL_ORIENTATION
    \n-
    515
    \n-
    516#ifdef FILL_PROJECTION
    \n-
    517 #undef FILL_PROJECTION
    \n-
    518#endif // FILL_PROJECTION
    \n-
    519
    \n-
    520#ifdef FILL_MACRO_WALLS
    \n-
    521 #undef FILL_MACRO_WALLS
    \n-
    522#endif // FILL_MACRO_WALLS
    \n-
    523
    \n-
    524#ifdef FILL_WALL_MAP
    \n-
    525 #undef FILL_WALL_MAP
    \n-
    526#endif // FILL_WALL_MAP
    \n-
    527
    \n-
    528#ifdef FILL_NON_PERIODIC
    \n-
    529 #undef FILL_NON_PERIODIC
    \n-
    530#endif // FILL_NON_PERIODIC
    \n-
    531
    \n-
    532#ifdef FILL_MASTER_INFO
    \n-
    533 #undef FILL_MASTER_INFO
    \n-
    534#endif // FILL_MASTER_INFO
    \n-
    535
    \n-
    536#ifdef FILL_ANY
    \n-
    537 #undef FILL_ANY
    \n-
    538#endif // FILL_ANY
    \n-
    539
    \n-
    540#ifdef CALL_EVERY_EL_PREORDER
    \n-
    541 #undef CALL_EVERY_EL_PREORDER
    \n-
    542#endif // CALL_EVERY_EL_PREORDER
    \n-
    543
    \n-
    544#ifdef CALL_EVERY_EL_INORDER
    \n-
    545 #undef CALL_EVERY_EL_INORDER
    \n-
    546#endif // CALL_EVERY_EL_INORDER
    \n-
    547
    \n-
    548#ifdef CALL_EVERY_EL_POSTORDER
    \n-
    549 #undef CALL_EVERY_EL_POSTORDER
    \n-
    550#endif // CALL_EVERY_EL_POSTORDER
    \n-
    551
    \n-
    552#ifdef CALL_LEAF_EL
    \n-
    553 #undef CALL_LEAF_EL
    \n-
    554#endif // CALL_LEAF_EL
    \n-
    555
    \n-
    556#ifdef CALL_LEAF_EL_LEVEL
    \n-
    557 #undef CALL_LEAF_EL_LEVEL
    \n-
    558#endif // CALL_LEAF_EL_LEVEL
    \n-
    559
    \n-
    560#ifdef CALL_EL_LEVEL
    \n-
    561 #undef CALL_EL_LEVEL
    \n-
    562#endif // CALL_EL_LEVEL
    \n-
    563
    \n-
    564#ifdef CALL_MG_LEVEL
    \n-
    565 #undef CALL_MG_LEVEL
    \n-
    566#endif // CALL_MG_LEVEL
    \n-
    567
    \n-
    568#ifdef TEST_FLAG
    \n-
    569 #undef TEST_FLAG
    \n-
    570#endif // TEST_FLAG
    \n-
    571
    \n-
    572#ifdef ADM_FLAGS_MASK
    \n-
    573 #undef ADM_FLAGS_MASK
    \n-
    574#endif // ADM_FLAGS_MASK
    \n-
    575
    \n-
    576#ifdef UCHAR_name
    \n-
    577 #undef UCHAR_name
    \n-
    578#endif // UCHAR_name
    \n-
    579
    \n-
    580#ifdef uchar_VECNAME
    \n-
    581 #undef uchar_VECNAME
    \n-
    582#endif // uchar_VECNAME
    \n-
    583
    \n-
    584#ifdef SCHAR_name
    \n-
    585 #undef SCHAR_name
    \n-
    586#endif // SCHAR_name
    \n-
    587
    \n-
    588#ifdef schar_VECNAME
    \n-
    589 #undef schar_VECNAME
    \n-
    590#endif // schar_VECNAME
    \n-
    591
    \n-
    592#ifdef INT_name
    \n-
    593 #undef INT_name
    \n-
    594#endif // INT_name
    \n-
    595
    \n-
    596#ifdef int_VECNAME
    \n-
    597 #undef int_VECNAME
    \n-
    598#endif // int_VECNAME
    \n-
    599
    \n-
    600#ifdef DOF_name
    \n-
    601 #undef DOF_name
    \n-
    602#endif // DOF_name
    \n-
    603
    \n-
    604#ifdef dof_VECNAME
    \n-
    605 #undef dof_VECNAME
    \n-
    606#endif // dof_VECNAME
    \n-
    607
    \n-
    608#ifdef PTR_name
    \n-
    609 #undef PTR_name
    \n-
    610#endif // PTR_name
    \n-
    611
    \n-
    612#ifdef ptr_VECNAME
    \n-
    613 #undef ptr_VECNAME
    \n-
    614#endif // ptr_VECNAME
    \n-
    615
    \n-
    616#ifdef REAL_name
    \n-
    617 #undef REAL_name
    \n-
    618#endif // REAL_name
    \n-
    619
    \n-
    620#ifdef real_VECNAME
    \n-
    621 #undef real_VECNAME
    \n-
    622#endif // real_VECNAME
    \n-
    623
    \n-
    624#ifdef REAL_D_name
    \n-
    625 #undef REAL_D_name
    \n-
    626#endif // REAL_D_name
    \n-
    627
    \n-
    628#ifdef real_d_VECNAME
    \n-
    629 #undef real_d_VECNAME
    \n-
    630#endif // real_d_VECNAME
    \n-
    631
    \n-
    632#ifdef BNDRY_name
    \n-
    633 #undef BNDRY_name
    \n-
    634#endif // BNDRY_name
    \n-
    635
    \n-
    636#ifdef bndry_VECNAME
    \n-
    637 #undef bndry_VECNAME
    \n-
    638#endif // bndry_VECNAME
    \n-
    639
    \n-
    640#ifdef DECL_DOF_EL_VEC
    \n-
    641 #undef DECL_DOF_EL_VEC
    \n-
    642#endif // DECL_DOF_EL_VEC
    \n-
    643
    \n-
    644#ifdef PHI
    \n-
    645 #undef PHI
    \n-
    646#endif // PHI
    \n-
    647
    \n-
    648#ifdef GRD_PHI
    \n-
    649 #undef GRD_PHI
    \n-
    650#endif // GRD_PHI
    \n-
    651
    \n-
    652#ifdef D2_PHI
    \n-
    653 #undef D2_PHI
    \n-
    654#endif // D2_PHI
    \n-
    655
    \n-
    656#ifdef D3_PHI
    \n-
    657 #undef D3_PHI
    \n-
    658#endif // D3_PHI
    \n-
    659
    \n-
    660#ifdef D4_PHI
    \n-
    661 #undef D4_PHI
    \n-
    662#endif // D4_PHI
    \n-
    663
    \n-
    664#ifdef PHI_D
    \n-
    665 #undef PHI_D
    \n-
    666#endif // PHI_D
    \n-
    667
    \n-
    668#ifdef GRD_PHI_D
    \n-
    669 #undef GRD_PHI_D
    \n-
    670#endif // GRD_PHI_D
    \n-
    671
    \n-
    672#ifdef D2_PHI_D
    \n-
    673 #undef D2_PHI_D
    \n-
    674#endif // D2_PHI_D
    \n-
    675
    \n-
    676#ifdef GET_DOF_INDICES
    \n-
    677 #undef GET_DOF_INDICES
    \n-
    678#endif // GET_DOF_INDICES
    \n-
    679
    \n-
    680#ifdef INTERPOL
    \n-
    681 #undef INTERPOL
    \n-
    682#endif // INTERPOL
    \n-
    683
    \n-
    684#ifdef INTERPOL_D
    \n-
    685 #undef INTERPOL_D
    \n-
    686#endif // INTERPOL_D
    \n-
    687
    \n-
    688#ifdef INTERPOL_DOW
    \n-
    689 #undef INTERPOL_DOW
    \n-
    690#endif // INTERPOL_DOW
    \n-
    691
    \n-
    692#ifdef GET_BOUND
    \n-
    693 #undef GET_BOUND
    \n-
    694#endif // GET_BOUND
    \n-
    695
    \n-
    696#ifdef LAGRANGE_NODES
    \n-
    697 #undef LAGRANGE_NODES
    \n-
    698#endif // LAGRANGE_NODES
    \n-
    699
    \n-
    700#ifdef FILL_EL_QUAD_WORLD
    \n-
    701 #undef FILL_EL_QUAD_WORLD
    \n-
    702#endif // FILL_EL_QUAD_WORLD
    \n-
    703
    \n-
    704#ifdef FILL_EL_QUAD_DET
    \n-
    705 #undef FILL_EL_QUAD_DET
    \n-
    706#endif // FILL_EL_QUAD_DET
    \n-
    707
    \n-
    708#ifdef FILL_EL_QUAD_LAMBDA
    \n-
    709 #undef FILL_EL_QUAD_LAMBDA
    \n-
    710#endif // FILL_EL_QUAD_LAMBDA
    \n-
    711
    \n-
    712#ifdef FILL_EL_QUAD_DLAMBDA
    \n-
    713 #undef FILL_EL_QUAD_DLAMBDA
    \n-
    714#endif // FILL_EL_QUAD_DLAMBDA
    \n-
    715
    \n-
    716#ifdef FILL_EL_QUAD_GRD_WORLD
    \n-
    717 #undef FILL_EL_QUAD_GRD_WORLD
    \n-
    718#endif // FILL_EL_QUAD_GRD_WORLD
    \n-
    719
    \n-
    720#ifdef FILL_EL_QUAD_D2_WORLD
    \n-
    721 #undef FILL_EL_QUAD_D2_WORLD
    \n-
    722#endif // FILL_EL_QUAD_D2_WORLD
    \n-
    723
    \n-
    724#ifdef FILL_EL_QUAD_D3_WORLD
    \n-
    725 #undef FILL_EL_QUAD_D3_WORLD
    \n-
    726#endif // FILL_EL_QUAD_D3_WORLD
    \n-
    727
    \n-
    728#ifdef FILL_EL_QUAD_WALL_DET
    \n-
    729 #undef FILL_EL_QUAD_WALL_DET
    \n-
    730#endif // FILL_EL_QUAD_WALL_DET
    \n-
    731
    \n-
    732#ifdef FILL_EL_QUAD_WALL_NORMAL
    \n-
    733 #undef FILL_EL_QUAD_WALL_NORMAL
    \n-
    734#endif // FILL_EL_QUAD_WALL_NORMAL
    \n-
    735
    \n-
    736#ifdef FILL_EL_QUAD_GRD_NORMAL
    \n-
    737 #undef FILL_EL_QUAD_GRD_NORMAL
    \n-
    738#endif // FILL_EL_QUAD_GRD_NORMAL
    \n-
    739
    \n-
    740#ifdef FILL_EL_QUAD_D2_NORMAL
    \n-
    741 #undef FILL_EL_QUAD_D2_NORMAL
    \n-
    742#endif // FILL_EL_QUAD_D2_NORMAL
    \n-
    743
    \n-
    744#ifdef INIT_PHI
    \n-
    745 #undef INIT_PHI
    \n-
    746#endif // INIT_PHI
    \n-
    747
    \n-
    748#ifdef INIT_GRD_PHI
    \n-
    749 #undef INIT_GRD_PHI
    \n-
    750#endif // INIT_GRD_PHI
    \n-
    751
    \n-
    752#ifdef INIT_D2_PHI
    \n-
    753 #undef INIT_D2_PHI
    \n-
    754#endif // INIT_D2_PHI
    \n-
    755
    \n-
    756#ifdef INIT_D3_PHI
    \n-
    757 #undef INIT_D3_PHI
    \n-
    758#endif // INIT_D3_PHI
    \n-
    759
    \n-
    760#ifdef INIT_D4_PHI
    \n-
    761 #undef INIT_D4_PHI
    \n-
    762#endif // INIT_D4_PHI
    \n-
    763
    \n-
    764#ifdef INIT_TANGENTIAL
    \n-
    765 #undef INIT_TANGENTIAL
    \n-
    766#endif // INIT_TANGENTIAL
    \n-
    767
    \n-
    768#ifdef MESH_REFINED
    \n-
    769 #undef MESH_REFINED
    \n-
    770#endif // MESH_REFINED
    \n-
    771
    \n-
    772#ifdef MESH_COARSENED
    \n-
    773 #undef MESH_COARSENED
    \n-
    774#endif // MESH_COARSENED
    \n-
    775
    \n-
    776#ifdef GRAPH_MESH_BOUNDARY
    \n-
    777 #undef GRAPH_MESH_BOUNDARY
    \n-
    778#endif // GRAPH_MESH_BOUNDARY
    \n-
    779
    \n-
    780#ifdef GRAPH_MESH_ELEMENT_MARK
    \n-
    781 #undef GRAPH_MESH_ELEMENT_MARK
    \n-
    782#endif // GRAPH_MESH_ELEMENT_MARK
    \n-
    783
    \n-
    784#ifdef GRAPH_MESH_VERTEX_DOF
    \n-
    785 #undef GRAPH_MESH_VERTEX_DOF
    \n-
    786#endif // GRAPH_MESH_VERTEX_DOF
    \n-
    787
    \n-
    788#ifdef GRAPH_MESH_ELEMENT_INDEX
    \n-
    789 #undef GRAPH_MESH_ELEMENT_INDEX
    \n-
    790#endif // GRAPH_MESH_ELEMENT_INDEX
    \n-
    791
    \n-
    792#ifdef GET_MESH
    \n-
    793 #undef GET_MESH
    \n-
    794#endif // GET_MESH
    \n-
    795
    \n-
    796#ifdef GET_DOF_VEC
    \n-
    797 #undef GET_DOF_VEC
    \n-
    798#endif // GET_DOF_VEC
    \n-
    799
    \n-
    800#ifdef TRACE_DOF_VEC_PROTO
    \n-
    801 #undef TRACE_DOF_VEC_PROTO
    \n-
    802#endif // TRACE_DOF_VEC_PROTO
    \n-
    803
    \n-
    804#ifdef INIT_UH
    \n-
    805 #undef INIT_UH
    \n-
    806#endif // INIT_UH
    \n-
    807
    \n-
    808#ifdef INIT_GRD_UH
    \n-
    809 #undef INIT_GRD_UH
    \n-
    810#endif // INIT_GRD_UH
    \n-
    811
    \n-
    812#ifdef ellipt_est_d_init
    \n-
    813 #undef ellipt_est_d_init
    \n-
    814#endif // ellipt_est_d_init
    \n-
    815
    \n-
    816#ifdef head_est_d_init
    \n-
    817 #undef head_est_d_init
    \n-
    818#endif // head_est_d_init
    \n-
    819
    \n-
    820#ifdef element_est_d
    \n-
    821 #undef element_est_d
    \n-
    822#endif // element_est_d
    \n-
    823
    \n-
    824#ifdef element_est_d_finish
    \n-
    825 #undef element_est_d_finish
    \n-
    826#endif // element_est_d_finish
    \n-
    827
    \n-
    828#ifdef element_est_uh_d
    \n-
    829 #undef element_est_uh_d
    \n-
    830#endif // element_est_uh_d
    \n-
    831
    \n-
    832#ifdef element_est_grd_uh_d
    \n-
    833 #undef element_est_grd_uh_d
    \n-
    834#endif // element_est_grd_uh_d
    \n-
    835
    \n-
    836#ifdef ellipt_est_d_finish
    \n-
    837 #undef ellipt_est_d_finish
    \n-
    838#endif // ellipt_est_d_finish
    \n-
    839
    \n-
    840#ifdef heat_est_d_finish
    \n-
    841 #undef heat_est_d_finish
    \n-
    842#endif // heat_est_d_finish
    \n-
    843
    \n-
    844#ifdef TRAVERSE_FIRST
    \n-
    845 #undef TRAVERSE_FIRST
    \n-
    846#endif // TRAVERSE_FIRST
    \n-
    847
    \n-
    848#ifdef TRAVERSE_NEXT
    \n-
    849 #undef TRAVERSE_NEXT
    \n-
    850#endif // TRAVERSE_NEXT
    \n-
    851
    \n-
    852#ifdef TRAVERSE_START
    \n-
    853 #undef TRAVERSE_START
    \n-
    854#endif // TRAVERSE_START
    \n-
    855
    \n-
    856#ifdef TRAVERSE_STOP
    \n-
    857 #undef TRAVERSE_STOP
    \n-
    858#endif // TRAVERSE_STOP
    \n-
    859
    \n-
    860#ifdef TRAVERSE_NEIGHBOUR
    \n-
    861 #undef TRAVERSE_NEIGHBOUR
    \n-
    862#endif // TRAVERSE_NEIGHBOUR
    \n-
    863
    \n-
    864#ifdef IFF_TAG_ALBERTA
    \n-
    865 #undef IFF_TAG_ALBERTA
    \n-
    866#endif // IFF_TAG_ALBERTA
    \n-
    867
    \n-
    868#ifdef IFF_TAG_MESH
    \n-
    869 #undef IFF_TAG_MESH
    \n-
    870#endif // IFF_TAG_MESH
    \n-
    871
    \n-
    872#ifdef IFF_TAG_REAL_VEC
    \n-
    873 #undef IFF_TAG_REAL_VEC
    \n-
    874#endif // IFF_TAG_REAL_VEC
    \n-
    875
    \n-
    876#ifdef IFF_TAG_REAL_D_VEC
    \n-
    877 #undef IFF_TAG_REAL_D_VEC
    \n-
    878#endif // IFF_TAG_REAL_D_VEC
    \n-
    879
    \n-
    880#ifdef IFF_TAG_INT_VEC
    \n-
    881 #undef IFF_TAG_INT_VEC
    \n-
    882#endif // IFF_TAG_INT_VEC
    \n-
    883
    \n-
    884#ifdef IFF_TAG_UCHAR_VEC
    \n-
    885 #undef IFF_TAG_UCHAR_VEC
    \n-
    886#endif // IFF_TAG_UCHAR_VEC
    \n-
    887
    \n-
    888#ifdef IFF_TAG_SCHAR_VEC
    \n-
    889 #undef IFF_TAG_SCHAR_VEC
    \n-
    890#endif // IFF_TAG_SCHAR_VEC
    \n+
    432 const MacroElement &macroElement = static_cast< const MacroElement & >( *macroEl );
    \n+
    433
    \n+
    434 MeshPointer< dim > meshPointer( mesh );
    \n+
    435 ElementInfo elementInfo( meshPointer, macroElement, FillFlags::standard );
    \n+
    436 const ProjectionFactory &projectionFactory = *static_cast< const ProjectionFactory * >( Library< dimWorld >::projectionFactory );
    \n+
    437 if( (n > 0) && macroElement.isBoundary( n-1 ) )
    \n+
    438 {
    \n+
    439 const unsigned int boundaryIndex = Library< dimWorld >::boundaryCount++;
    \n+
    440 if( projectionFactory.hasProjection( elementInfo, n-1 ) )
    \n+
    441 {
    \n+
    442 Projection projection = projectionFactory.projection( elementInfo, n-1 );
    \n+
    443 return new NodeProjection< dim, Projection >( boundaryIndex, projection );
    \n+
    444 }
    \n+
    445 else
    \n+
    446 return new BasicNodeProjection( boundaryIndex );
    \n+
    447 }
    \n+
    448 else if( (dim < dimWorld) && (n == 0) )
    \n+
    449 {
    \n+
    450 const unsigned int boundaryIndex = std::numeric_limits< unsigned int >::max();
    \n+
    451 if( projectionFactory.hasProjection( elementInfo ) )
    \n+
    452 {
    \n+
    453 Projection projection = projectionFactory.projection( elementInfo );
    \n+
    454 return new NodeProjection< dim, Projection >( boundaryIndex, projection );
    \n+
    455 }
    \n+
    456 else
    \n+
    457 return 0;
    \n+
    458 }
    \n+
    459 else
    \n+
    460 return 0;
    \n+
    461 }
    \n+
    462
    \n+
    463 } // namespace Alberta
    \n+
    464
    \n+
    465} // namespace Dune
    \n+
    466
    \n+
    467#endif // #if HAVE_ALBERTA
    \n+
    468
    \n+
    469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's macro_data structure
    \n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n+
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    ALBERTA MESH Mesh
    Definition: misc.hh:53
    \n+
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n+
    static const int meshRefined
    Definition: misc.hh:56
    \n+
    static const int dimWorld
    Definition: misc.hh:46
    \n+
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n+
    static const int meshCoarsened
    Definition: misc.hh:57
    \n+
    Definition: meshpointer.hh:40
    \n+
    int numMacroElements() const
    Definition: meshpointer.hh:257
    \n+
    unsigned int create(const MacroData< dim > &macroData, const ProjectionFactoryInterface< Proj, Impl > &projectionFactory)
    Definition: meshpointer.hh:312
    \n+
    void release()
    Definition: meshpointer.hh:361
    \n+
    unsigned int read(const std::string &filename, Real &time)
    Definition: meshpointer.hh:342
    \n+
    MacroIterator end() const
    Definition: meshpointer.hh:76
    \n+
    bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing)
    Definition: meshpointer.hh:398
    \n+
    int size(int codim) const
    \n+
    unsigned int create(const std::string &filename, bool binary=false)
    Definition: meshpointer.hh:331
    \n+
    void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:385
    \n+
    unsigned int create(const MacroData< dim > &macroData)
    Definition: meshpointer.hh:299
    \n+
    MacroIterator begin() const
    Definition: meshpointer.hh:71
    \n+
    MeshPointer(Mesh *mesh)
    Definition: meshpointer.hh:57
    \n+
    bool write(const std::string &filename, Real time) const
    Definition: meshpointer.hh:353
    \n+
    bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing)
    Definition: meshpointer.hh:407
    \n+
    MeshPointer()
    Definition: meshpointer.hh:53
    \n+
    void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:370
    \n+
    Definition: elementinfo.hh:43
    \n+
    void hierarchicTraverse(Functor &functor) const
    Definition: elementinfo.hh:695
    \n+
    void leafTraverse(Functor &functor) const
    Definition: elementinfo.hh:708
    \n+
    Definition: macrodata.hh:30
    \n+
    void release()
    release the macro data structure
    Definition: macrodata.hh:127
    \n+
    void read(const std::string &filename, bool binary=false)
    Definition: macrodata.hh:413
    \n+
    Definition: macroelement.hh:24
    \n+
    bool isBoundary(const int face) const
    Definition: macroelement.hh:42
    \n+
    Definition: meshpointer.hh:167
    \n+
    const MeshPointer & mesh() const
    Definition: meshpointer.hh:211
    \n+
    const MacroElement & macroElement() const
    Definition: meshpointer.hh:205
    \n+
    Alberta::ElementInfo< dim > ElementInfo
    Definition: meshpointer.hh:174
    \n+
    Alberta::MeshPointer< dim > MeshPointer
    Definition: meshpointer.hh:173
    \n+
    ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:238
    \n+
    bool done() const
    Definition: meshpointer.hh:189
    \n+
    void increment()
    Definition: meshpointer.hh:199
    \n+
    bool equals(const MacroIterator &other) const
    Definition: meshpointer.hh:194
    \n+
    MacroIterator()
    Definition: meshpointer.hh:176
    \n+
    Definition: misc.hh:231
    \n+
    static const Flags nothing
    Definition: misc.hh:234
    \n+
    ALBERTA FLAGS Flags
    Definition: misc.hh:232
    \n+
    static const Flags standard
    Definition: misc.hh:256
    \n+
    Definition: albertagrid/projection.hh:135
    \n+
    Base::Projection Projection
    Definition: albertagrid/projection.hh:140
    \n+
    Definition: albertagrid/projection.hh:80
    \n+
    Definition: albertagrid/projection.hh:208
    \n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,896 +5,647 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-undefine-3.0.hh\n+meshpointer.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 12#ifdef _ALBERTA_H_\n- 13 #undef _ALBERTA_H_\n- 14#endif // _ALBERTA_H_\n+ 5#ifndef DUNE_ALBERTA_MESHPOINTER_HH\n+ 6#define DUNE_ALBERTA_MESHPOINTER_HH\n+ 7\n+ 13#include \n+ 14#include \n 15\n- 16#ifdef ALBERTA_MAGIC\n- 17 #undef ALBERTA_MAGIC\n- 18#endif // ALBERTA_MAGIC\n- 19\n- 20#ifdef ALBERTA_VERSION\n- 21 #undef ALBERTA_VERSION\n- 22#endif // ALBERTA_VERSION\n- 23\n- 24#ifdef DIM_LIMIT\n- 25 #undef DIM_LIMIT\n- 26#endif // DIM_LIMIT\n- 27\n- 28#ifdef DIM_MAX\n- 29 #undef DIM_MAX\n- 30#endif // DIM_MAX\n+ 16#include \n+ 17#include \n+ 18#include \n+ 19#include \n+ 20\n+ 21#if HAVE_ALBERTA\n+ 22\n+ 23namespace Dune\n+ 24{\n+ 25\n+ 26 namespace Alberta\n+ 27 {\n+ 28\n+ 29 // External Forward Declarations\n+ 30 // -----------------------------\n 31\n- 32#ifdef N_VERTICES\n- 33 #undef N_VERTICES\n- 34#endif // N_VERTICES\n- 35\n- 36#ifdef N_EDGES\n- 37 #undef N_EDGES\n- 38#endif // N_EDGES\n- 39\n- 40#ifdef N_WALLS\n- 41 #undef N_WALLS\n- 42#endif // N_WALLS\n- 43\n- 44#ifdef N_FACES\n- 45 #undef N_FACES\n- 46#endif // N_FACES\n- 47\n- 48#ifdef N_NEIGH\n- 49 #undef N_NEIGH\n- 50#endif // N_NEIGH\n- 51\n- 52#ifdef N_LAMBDA\n- 53 #undef N_LAMBDA\n- 54#endif // N_LAMBDA\n- 55\n- 56#ifdef DIM_FAC\n- 57 #undef DIM_FAC\n- 58#endif // DIM_FAC\n- 59\n- 60#ifdef VERTEX_OF_EDGE\n- 61 #undef VERTEX_OF_EDGE\n- 62#endif // VERTEX_OF_EDGE\n- 63\n- 64#ifdef VERTEX_OF_WALL\n- 65 #undef VERTEX_OF_WALL\n- 66#endif // VERTEX_OF_WALL\n- 67\n- 68#ifdef N_VERTICES_0D\n- 69 #undef N_VERTICES_0D\n- 70#endif // N_VERTICES_0D\n- 71\n- 72#ifdef N_EDGES_0D\n- 73 #undef N_EDGES_0D\n- 74#endif // N_EDGES_0D\n+ 32 template< int dim >\n+ 33 class HierarchyDofNumbering;\n+ 34\n+ 35 // MeshPointer\n+ 36 // -----------\n+ 37\n+ 38 template< int dim >\n+39 class MeshPointer\n+ 40 {\n+ 41 typedef Alberta::ElementInfo<_dim_> ElementInfo;\n+ 42 typedef typename ElementInfo::MacroElement MacroElement;\n+ 43 typedef typename ElementInfo::FillFlags FillFlags;\n+ 44\n+ 45 class BoundaryProvider;\n+ 46\n+ 47 template< int dimWorld >\n+ 48 struct Library;\n+ 49\n+ 50 public:\n+ 51 class MacroIterator;\n+ 52\n+53 MeshPointer ()\n+ 54 : mesh_( 0 )\n+ 55 {}\n+ 56\n+57 explicit MeshPointer ( Mesh *mesh )\n+ 58 : mesh_( mesh )\n+ 59 {}\n+ 60\n+61 operator Mesh * () const\n+ 62 {\n+ 63 return mesh_;\n+ 64 }\n+ 65\n+66 explicit operator bool () const\n+ 67 {\n+ 68 return (bool)mesh_;\n+ 69 }\n+ 70\n+71 MacroIterator begin () const\n+ 72 {\n+ 73 return MacroIterator( *this, false );\n+ 74 }\n 75\n- 76#ifdef N_FACES_0D\n- 77 #undef N_FACES_0D\n- 78#endif // N_FACES_0D\n- 79\n- 80#ifdef N_NEIGH_0D\n- 81 #undef N_NEIGH_0D\n- 82#endif // N_NEIGH_0D\n+76 MacroIterator end () const\n+ 77 {\n+ 78 return MacroIterator( *this, true );\n+ 79 }\n+ 80\n+81 int numMacroElements () const;\n+82 int size ( int codim ) const;\n 83\n- 84#ifdef N_WALLS_0D\n- 85 #undef N_WALLS_0D\n- 86#endif // N_WALLS_0D\n- 87\n- 88#ifdef N_LAMBDA_0D\n- 89 #undef N_LAMBDA_0D\n- 90#endif // N_LAMBDA_0D\n- 91\n- 92#ifdef DIM_FAC_0D\n- 93 #undef DIM_FAC_0D\n- 94#endif // DIM_FAC_0D\n- 95\n- 96#ifdef VERTEX_OF_EDGE_0D\n- 97 #undef VERTEX_OF_EDGE_0D\n- 98#endif // VERTEX_OF_EDGE_0D\n- 99\n- 100#ifdef VERTEX_OF_WALL_0D\n- 101 #undef VERTEX_OF_WALL_0D\n- 102#endif // VERTEX_OF_WALL_0D\n- 103\n- 104#ifdef N_VERTICES_1D\n- 105 #undef N_VERTICES_1D\n- 106#endif // N_VERTICES_1D\n- 107\n- 108#ifdef N_EDGES_1D\n- 109 #undef N_EDGES_1D\n- 110#endif // N_EDGES_1D\n- 111\n- 112#ifdef N_FACES_1D\n- 113 #undef N_FACES_1D\n- 114#endif // N_FACES_1D\n+ 84 // create a mesh from a macrodata structure\n+ 85 // params: macroData - macro data structure\n+ 86 // returns: number of boundary segments\n+87 unsigned int create ( const MacroData<_dim_> ¯oData );\n+ 88\n+ 89 // create a mesh from a macrodata structure, adding projections\n+ 90 // params: macroData - macro data structure\n+ 91 // projectionFactory - factory for the projections\n+ 92 // returns: number of boundary segments\n+ 93 template< class Proj, class Impl >\n+94 unsigned int create ( const MacroData<_dim_> ¯oData,\n+ 95 const ProjectionFactoryInterface<_Proj,_Impl_> &projectionFactory );\n+ 96\n+ 97 // create a mesh from a file\n+ 98 // params: filename - file name of an Alberta macro triangulation\n+ 99 // binary - read binary?\n+ 100 // returns: number of boundary segments\n+101 unsigned int create ( const std::string &filename, bool binary = false );\n+ 102\n+ 103 // read back a mesh from a file\n+ 104 // params: filename - file name of an Alberta save file\n+ 105 // time - variable to receive the time stored in the file\n+ 106 // returns: number of boundary segments\n+ 107 //\n+ 108 // notes: - projections are not preserved\n+ 109 // - we assume that projections are added in the same order they\n+ 110 // inserted in when the grid was created (otherwise the boundary\n+ 111 // indices change)\n+112 unsigned int read ( const std::string &filename, Real &time );\n+ 113\n+114 bool write ( const std::string &filename, Real time ) const;\n 115\n- 116#ifdef N_NEIGH_1D\n- 117 #undef N_NEIGH_1D\n- 118#endif // N_NEIGH_1D\n- 119\n- 120#ifdef N_WALLS_1D\n- 121 #undef N_WALLS_1D\n- 122#endif // N_WALLS_1D\n- 123\n- 124#ifdef N_LAMBDA_1D\n- 125 #undef N_LAMBDA_1D\n- 126#endif // N_LAMBDA_1D\n+116 void release ();\n+ 117\n+ 118 template< class Functor >\n+119 void hierarchicTraverse ( Functor &functor,\n+ 120 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;\n+ 121\n+ 122 template< class Functor >\n+123 void leafTraverse ( Functor &functor,\n+ 124 typename FillFlags::Flags fillFlags = FillFlags::standard ) const;\n+ 125\n+126 bool coarsen ( typename FillFlags::Flags fillFlags = FillFlags::nothing );\n 127\n- 128#ifdef DIM_FAC_1D\n- 129 #undef DIM_FAC_1D\n- 130#endif // DIM_FAC_1D\n- 131\n- 132#ifdef VERTEX_OF_EDGE_1D\n- 133 #undef VERTEX_OF_EDGE_1D\n- 134#endif // VERTEX_OF_EDGE_1D\n- 135\n- 136#ifdef VERTEX_OF_WALL_1D\n- 137 #undef VERTEX_OF_WALL_1D\n- 138#endif // VERTEX_OF_WALL_1D\n+128 bool refine ( typename FillFlags::Flags fillFlags = FillFlags::nothing );\n+ 129\n+ 130 private:\n+ 131 static ALBERTA NODE_PROJECTION *\n+ 132 initNodeProjection ( [[maybe_unused]] Mesh *mesh, ALBERTA MACRO_EL\n+*macroElement, int n );\n+ 133 template< class ProjectionProvider >\n+ 134 static ALBERTA NODE_PROJECTION *\n+ 135 initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL *macroElement, int n );\n+ 136\n+ 137 Mesh *mesh_;\n+ 138 };\n 139\n- 140#ifdef N_VERTICES_2D\n- 141 #undef N_VERTICES_2D\n- 142#endif // N_VERTICES_2D\n- 143\n- 144#ifdef N_EDGES_2D\n- 145 #undef N_EDGES_2D\n- 146#endif // N_EDGES_2D\n- 147\n- 148#ifdef N_FACES_2D\n- 149 #undef N_FACES_2D\n- 150#endif // N_FACES_2D\n- 151\n- 152#ifdef N_NEIGH_2D\n- 153 #undef N_NEIGH_2D\n- 154#endif // N_NEIGH_2D\n- 155\n- 156#ifdef N_WALLS_2D\n- 157 #undef N_WALLS_2D\n- 158#endif // N_WALLS_2D\n+ 140\n+ 141\n+ 142 // MeshPointer::Library\n+ 143 // --------------------\n+ 144\n+ 145 template< int dim >\n+ 146 template< int dimWorld >\n+ 147 struct MeshPointer< dim >::Library\n+ 148 {\n+ 149 typedef Alberta::MeshPointer<_dim_> MeshPointer;\n+ 150\n+ 151 static inline unsigned int boundaryCount = 0;\n+ 152 static inline const void *projectionFactory = nullptr;\n+ 153\n+ 154 static void\n+ 155 create ( MeshPointer &ptr, const MacroData<_dim_> ¯oData,\n+ 156 ALBERTA NODE_PROJECTION *(*initNodeProjection)( Mesh *, ALBERTA MACRO_EL\n+*, int ) );\n+ 157 static void release ( MeshPointer &ptr );\n+ 158 };\n 159\n- 160#ifdef N_LAMBDA_2D\n- 161 #undef N_LAMBDA_2D\n- 162#endif // N_LAMBDA_2D\n- 163\n- 164#ifdef DIM_FAC_2D\n- 165 #undef DIM_FAC_2D\n- 166#endif // DIM_FAC_2D\n- 167\n- 168#ifdef VERTEX_OF_EDGE_2D\n- 169 #undef VERTEX_OF_EDGE_2D\n- 170#endif // VERTEX_OF_EDGE_2D\n+ 160\n+ 161\n+ 162 // MeshPointer::MacroIterator\n+ 163 // --------------------------\n+ 164\n+ 165 template< int dim >\n+166 class MeshPointer< dim >::MacroIterator\n+ 167 {\n+168 typedef MacroIterator This;\n+ 169\n+ 170 friend class MeshPointer< dim >;\n 171\n- 172#ifdef VERTEX_OF_WALL_2D\n- 173 #undef VERTEX_OF_WALL_2D\n- 174#endif // VERTEX_OF_WALL_2D\n+ 172 public:\n+173 typedef Alberta::MeshPointer<_dim_> MeshPointer;\n+174 typedef Alberta::ElementInfo<_dim_> ElementInfo;\n 175\n- 176#ifdef N_VERTICES_3D\n- 177 #undef N_VERTICES_3D\n- 178#endif // N_VERTICES_3D\n- 179\n- 180#ifdef N_EDGES_3D\n- 181 #undef N_EDGES_3D\n- 182#endif // N_EDGES_3D\n- 183\n- 184#ifdef N_FACES_3D\n- 185 #undef N_FACES_3D\n- 186#endif // N_FACES_3D\n+176 MacroIterator ()\n+ 177 : mesh_(),\n+ 178 index_( -1 )\n+ 179 {}\n+ 180\n+ 181 private:\n+ 182\n+ 183 explicit MacroIterator ( const MeshPointer &mesh, bool end = false )\n+ 184 : mesh_( mesh ),\n+ 185 index_( end ? mesh.numMacroElements() : 0 )\n+ 186 {}\n 187\n- 188#ifdef N_NEIGH_3D\n- 189 #undef N_NEIGH_3D\n- 190#endif // N_NEIGH_3D\n- 191\n- 192#ifdef N_WALLS_3D\n- 193 #undef N_WALLS_3D\n- 194#endif // N_WALLS_3D\n- 195\n- 196#ifdef N_LAMBDA_3D\n- 197 #undef N_LAMBDA_3D\n- 198#endif // N_LAMBDA_3D\n- 199\n- 200#ifdef DIM_FAC_3D\n- 201 #undef DIM_FAC_3D\n- 202#endif // DIM_FAC_3D\n- 203\n- 204#ifdef VERTEX_OF_EDGE_3D\n- 205 #undef VERTEX_OF_EDGE_3D\n- 206#endif // VERTEX_OF_EDGE_3D\n- 207\n- 208#ifdef VERTEX_OF_WALL_3D\n- 209 #undef VERTEX_OF_WALL_3D\n- 210#endif // VERTEX_OF_WALL_3D\n- 211\n- 212#ifdef N_LAMBDA_MAX\n- 213 #undef N_LAMBDA_MAX\n- 214#endif // N_LAMBDA_MAX\n+ 188 public:\n+189 bool done () const\n+ 190 {\n+ 191 return (index_ >= mesh().numMacroElements());\n+ 192 }\n+ 193\n+194 bool equals ( const MacroIterator &other ) const\n+ 195 {\n+ 196 return (index_ == other.index_);\n+ 197 }\n+ 198\n+199 void increment ()\n+ 200 {\n+ 201 assert( !done() );\n+ 202 ++index_;\n+ 203 }\n+ 204\n+205 const MacroElement ¯oElement () const\n+ 206 {\n+ 207 assert( !done() );\n+ 208 return static_cast< const MacroElement & >( mesh().mesh_->macro_els\n+[ index_ ] );\n+ 209 }\n+ 210\n+211 const MeshPointer &mesh () const\n+ 212 {\n+ 213 return mesh_;\n+ 214 }\n 215\n- 216#ifdef N_VERTICES_MAX\n- 217 #undef N_VERTICES_MAX\n- 218#endif // N_VERTICES_MAX\n- 219\n- 220#ifdef N_EDGES_MAX\n- 221 #undef N_EDGES_MAX\n- 222#endif // N_EDGES_MAX\n- 223\n- 224#ifdef N_FACES_MAX\n- 225 #undef N_FACES_MAX\n- 226#endif // N_FACES_MAX\n- 227\n- 228#ifdef N_NEIGH_MAX\n- 229 #undef N_NEIGH_MAX\n- 230#endif // N_NEIGH_MAX\n+216 This &operator++ ()\n+ 217 {\n+ 218 increment();\n+ 219 return *this;\n+ 220 }\n+ 221\n+222 ElementInfo operator* () const\n+ 223 {\n+ 224 return elementInfo();\n+ 225 }\n+ 226\n+227 bool operator== ( const MacroIterator &other ) const\n+ 228 {\n+ 229 return equals( other );\n+ 230 }\n 231\n- 232#ifdef N_WALLS_MAX\n- 233 #undef N_WALLS_MAX\n- 234#endif // N_WALLS_MAX\n- 235\n- 236#ifdef DIM_FAC_MAX\n- 237 #undef DIM_FAC_MAX\n- 238#endif // DIM_FAC_MAX\n- 239\n- 240#ifdef N_LAMBDA_LIMIT\n- 241 #undef N_LAMBDA_LIMIT\n- 242#endif // N_LAMBDA_LIMIT\n- 243\n- 244#ifdef N_VERTICES_LIMIT\n- 245 #undef N_VERTICES_LIMIT\n- 246#endif // N_VERTICES_LIMIT\n- 247\n- 248#ifdef N_EDGES_LIMIT\n- 249 #undef N_EDGES_LIMIT\n- 250#endif // N_EDGES_LIMIT\n+232 bool operator!= ( const MacroIterator &other ) const\n+ 233 {\n+ 234 return !equals( other );\n+ 235 }\n+ 236\n+ 237 ElementInfo\n+238 elementInfo ( typename FillFlags::Flags fillFlags = FillFlags::standard )\n+const\n+ 239 {\n+ 240 if( done() )\n+ 241 return ElementInfo();\n+ 242 else\n+ 243 return ElementInfo( mesh(), macroElement(), fillFlags );\n+ 244 }\n+ 245\n+ 246 private:\n+ 247 MeshPointer mesh_;\n+ 248 int index_;\n+ 249 };\n+ 250\n 251\n- 252#ifdef N_FACES_LIMIT\n- 253 #undef N_FACES_LIMIT\n- 254#endif // N_FACES_LIMIT\n+ 252\n+ 253 // Implementation of MeshPointer\n+ 254 // -----------------------------\n 255\n- 256#ifdef N_NEIGH_LIMIT\n- 257 #undef N_NEIGH_LIMIT\n- 258#endif // N_NEIGH_LIMIT\n- 259\n- 260#ifdef N_WALLS_LIMIT\n- 261 #undef N_WALLS_LIMIT\n- 262#endif // N_WALLS_LIMIT\n- 263\n- 264#ifdef DIM_FAC_LIMIT\n- 265 #undef DIM_FAC_LIMIT\n- 266#endif // DIM_FAC_LIMIT\n- 267\n- 268#ifdef INDEX\n- 269 #undef INDEX\n- 270#endif // INDEX\n- 271\n- 272#ifdef INDEX\n- 273 #undef INDEX\n- 274#endif // INDEX\n- 275\n- 276#ifdef IS_LEAF_EL\n- 277 #undef IS_LEAF_EL\n- 278#endif // IS_LEAF_EL\n- 279\n- 280#ifdef LEAF_DATA\n- 281 #undef LEAF_DATA\n- 282#endif // LEAF_DATA\n- 283\n- 284#ifdef INTERIOR\n- 285 #undef INTERIOR\n- 286#endif // INTERIOR\n- 287\n- 288#ifdef DIRICHLET\n- 289 #undef DIRICHLET\n- 290#endif // DIRICHLET\n- 291\n- 292#ifdef NEUMANN\n- 293 #undef NEUMANN\n- 294#endif // NEUMANN\n+ 256 template< int dim >\n+257 inline int MeshPointer<_dim_>::numMacroElements () const\n+ 258 {\n+ 259 return (mesh_ ? mesh_->n_macro_el : 0);\n+ 260 }\n+ 261\n+ 262\n+ 263 template<>\n+264 inline int MeshPointer<_1_>::size( int codim ) const\n+ 265 {\n+ 266 assert( (codim >= 0) && (codim <= 1) );\n+ 267 return (codim == 0 ? mesh_->n_elements : mesh_->n_vertices);\n+ 268 }\n+ 269\n+ 270 template<>\n+271 inline int MeshPointer<_2_>::size( int codim ) const\n+ 272 {\n+ 273 assert( (codim >= 0) && (codim <= 2) );\n+ 274 if( codim == 0 )\n+ 275 return mesh_->n_elements;\n+ 276 else if( codim == 2 )\n+ 277 return mesh_->n_vertices;\n+ 278 else\n+ 279 return mesh_->n_edges;\n+ 280 }\n+ 281\n+ 282 template<>\n+283 inline int MeshPointer<_3_>::size( int codim ) const\n+ 284 {\n+ 285 assert( (codim >= 0) && (codim <= 3) );\n+ 286 if( codim == 0 )\n+ 287 return mesh_->n_elements;\n+ 288 else if( codim == 3 )\n+ 289 return mesh_->n_vertices;\n+ 290 else if( codim == 1 )\n+ 291 return mesh_->n_faces;\n+ 292 else\n+ 293 return mesh_->n_edges;\n+ 294 }\n 295\n- 296#ifdef IS_NEUMANN\n- 297 #undef IS_NEUMANN\n- 298#endif // IS_NEUMANN\n- 299\n- 300#ifdef IS_DIRICHLET\n- 301 #undef IS_DIRICHLET\n- 302#endif // IS_DIRICHLET\n- 303\n- 304#ifdef IS_INTERIOR\n- 305 #undef IS_INTERIOR\n- 306#endif // IS_INTERIOR\n+ 296\n+ 297 template< int dim >\n+ 298 inline unsigned int MeshPointer<_dim_>\n+299::create ( const MacroData<_dim_> ¯oData )\n+ 300 {\n+ 301 release();\n+ 302\n+ 303 Library< dimWorld >::boundaryCount = 0;\n+ 304 Library< dimWorld >::create( *this, macroData, &initNodeProjection );\n+ 305 return Library< dimWorld >::boundaryCount;\n+ 306 }\n 307\n- 308#ifdef N_BNDRY_TYPES\n- 309 #undef N_BNDRY_TYPES\n- 310#endif // N_BNDRY_TYPES\n- 311\n- 312#ifdef LIST_ENTRY\n- 313 #undef LIST_ENTRY\n- 314#endif // LIST_ENTRY\n- 315\n- 316#ifdef INIT_EL_TAG_CTX_INIT\n- 317 #undef INIT_EL_TAG_CTX_INIT\n- 318#endif // INIT_EL_TAG_CTX_INIT\n- 319\n- 320#ifdef INIT_EL_TAG_CTX_UNIQ\n- 321 #undef INIT_EL_TAG_CTX_UNIQ\n- 322#endif // INIT_EL_TAG_CTX_UNIQ\n- 323\n- 324#ifdef INIT_EL_TAG_CTX_NULL\n- 325 #undef INIT_EL_TAG_CTX_NULL\n- 326#endif // INIT_EL_TAG_CTX_NULL\n+ 308\n+ 309 template< int dim >\n+ 310 template< class Proj, class Impl >\n+ 311 inline unsigned int MeshPointer<_dim_>\n+312::create ( const MacroData<_dim_> ¯oData,\n+ 313 const ProjectionFactoryInterface<_Proj,_Impl_> &projectionFactory )\n+ 314 {\n+ 315 typedef ProjectionFactoryInterface<_Proj,_Impl_> ProjectionFactory;\n+ 316\n+ 317 release();\n+ 318\n+ 319 Library< dimWorld >::boundaryCount = 0;\n+ 320 Library< dimWorld >::projectionFactory = &projectionFactory;\n+ 321 Library< dimWorld >::create( *this, macroData, &initNodeProjection<\n+ProjectionFactory > );\n+ 322 Library< dimWorld >::projectionFactory = nullptr;\n+ 323 return Library< dimWorld >::boundaryCount;\n+ 324 }\n+ 325\n+ 326\n 327\n- 328#ifdef INIT_EL_TAG_CTX_DFLT\n- 329 #undef INIT_EL_TAG_CTX_DFLT\n- 330#endif // INIT_EL_TAG_CTX_DFLT\n- 331\n- 332#ifdef INIT_EL_TAG_CTX_TAG\n- 333 #undef INIT_EL_TAG_CTX_TAG\n- 334#endif // INIT_EL_TAG_CTX_TAG\n- 335\n- 336#ifdef INIT_ELEMENT_METHOD\n- 337 #undef INIT_ELEMENT_METHOD\n- 338#endif // INIT_ELEMENT_METHOD\n+ 328\n+ 329 template< int dim >\n+ 330 inline unsigned int MeshPointer<_dim_>\n+331::create ( const std::string &filename, bool binary )\n+ 332 {\n+ 333 MacroData<_dim_> macroData;\n+ 334 macroData.read( filename, binary );\n+ 335 const unsigned int boundaryCount = create( macroData );\n+ 336 macroData.release();\n+ 337 return boundaryCount;\n+ 338 }\n 339\n- 340#ifdef INIT_ELEMENT_FLAGS\n- 341 #undef INIT_ELEMENT_FLAGS\n- 342#endif // INIT_ELEMENT_FLAGS\n- 343\n- 344#ifdef INIT_ELEMENT_DEFUN\n- 345 #undef INIT_ELEMENT_DEFUN\n- 346#endif // INIT_ELEMENT_DEFUN\n- 347\n- 348#ifdef INIT_OBJECT\n- 349 #undef INIT_OBJECT\n- 350#endif // INIT_OBJECT\n+ 340\n+ 341 template< int dim >\n+342 inline unsigned int MeshPointer<_dim_>::read ( const std::string &filename,\n+Real &time )\n+ 343 {\n+ 344 release();\n+ 345\n+ 346 Library< dimWorld >::boundaryCount = 0;\n+ 347 mesh_ = ALBERTA read_mesh_xdr( filename.c_str(), &time, NULL, NULL );\n+ 348 return Library< dimWorld >::boundaryCount;\n+ 349 }\n+ 350\n 351\n- 352#ifdef INIT_ELEMENT_DECL\n- 353 #undef INIT_ELEMENT_DECL\n- 354#endif // INIT_ELEMENT_DECL\n- 355\n- 356#ifdef INIT_ELEMENT_INITIALIZER\n- 357 #undef INIT_ELEMENT_INITIALIZER\n- 358#endif // INIT_ELEMENT_INITIALIZER\n+ 352 template< int dim >\n+353 inline bool MeshPointer<_dim_>::write ( const std::string &filename, Real\n+time ) const\n+ 354 {\n+ 355 int success = ALBERTA write_mesh_xdr( mesh_, filename.c_str(), time );\n+ 356 return (success == 0);\n+ 357 }\n+ 358\n 359\n- 360#ifdef INIT_ELEMENT\n- 361 #undef INIT_ELEMENT\n- 362#endif // INIT_ELEMENT\n- 363\n- 364#ifdef INIT_ELEMENT_NEEDED\n- 365 #undef INIT_ELEMENT_NEEDED\n- 366#endif // INIT_ELEMENT_NEEDED\n- 367\n- 368#ifdef INIT_ELEMENT_SETUP\n- 369 #undef INIT_ELEMENT_SETUP\n- 370#endif // INIT_ELEMENT_SETUP\n- 371\n- 372#ifdef INIT_OBJECT_SINGLE\n- 373 #undef INIT_OBJECT_SINGLE\n- 374#endif // INIT_OBJECT_SINGLE\n- 375\n- 376#ifdef INIT_ELEMENT_SINGLE\n- 377 #undef INIT_ELEMENT_SINGLE\n- 378#endif // INIT_ELEMENT_SINGLE\n- 379\n- 380#ifdef vertex_of_wall_2d\n- 381 #undef vertex_of_wall_2d\n- 382#endif // vertex_of_wall_2d\n- 383\n- 384#ifdef PARAM_STRATEGY_MASK\n- 385 #undef PARAM_STRATEGY_MASK\n- 386#endif // PARAM_STRATEGY_MASK\n- 387\n- 388#ifdef PARAM_PERIODIC_COORDS\n- 389 #undef PARAM_PERIODIC_COORDS\n- 390#endif // PARAM_PERIODIC_COORDS\n- 391\n- 392#ifdef FILL_EL_DET\n- 393 #undef FILL_EL_DET\n- 394#endif // FILL_EL_DET\n+ 360 template< int dim >\n+361 inline void MeshPointer<_dim_>::release ()\n+ 362 {\n+ 363 Library< dimWorld >::release( *this );\n+ 364 }\n+ 365\n+ 366\n+ 367 template< int dim >\n+ 368 template< class Functor >\n+ 369 inline void MeshPointer<_dim_>\n+370::hierarchicTraverse ( Functor &functor,\n+ 371 typename FillFlags::Flags fillFlags ) const\n+ 372 {\n+ 373 const MacroIterator eit = end();\n+ 374 for( MacroIterator it = begin(); it != eit; ++it )\n+ 375 {\n+ 376 const ElementInfo info = it.elementInfo( fillFlags );\n+ 377 info.hierarchicTraverse( functor );\n+ 378 }\n+ 379 }\n+ 380\n+ 381\n+ 382 template< int dim >\n+ 383 template< class Functor >\n+ 384 inline void MeshPointer<_dim_>\n+385::leafTraverse ( Functor &functor,\n+ 386 typename FillFlags::Flags fillFlags ) const\n+ 387 {\n+ 388 const MacroIterator eit = end();\n+ 389 for( MacroIterator it = begin(); it != eit; ++it )\n+ 390 {\n+ 391 const ElementInfo info = it.elementInfo( fillFlags );\n+ 392 info.leafTraverse( functor );\n+ 393 }\n+ 394 }\n 395\n- 396#ifdef FILL_EL_LAMBDA\n- 397 #undef FILL_EL_LAMBDA\n- 398#endif // FILL_EL_LAMBDA\n- 399\n- 400#ifdef FILL_EL_WALL_SHIFT\n- 401 #undef FILL_EL_WALL_SHIFT\n- 402#endif // FILL_EL_WALL_SHIFT\n- 403\n- 404#ifdef FILL_EL_WALL_MASK\n- 405 #undef FILL_EL_WALL_MASK\n- 406#endif // FILL_EL_WALL_MASK\n- 407\n- 408#ifdef FILL_EL_WALL_DET\n- 409 #undef FILL_EL_WALL_DET\n- 410#endif // FILL_EL_WALL_DET\n+ 396\n+ 397 template< int dim >\n+398 inline bool MeshPointer<_dim_>::coarsen ( typename FillFlags::Flags\n+fillFlags )\n+ 399 {\n+ 400 const bool coarsened = (ALBERTA coarsen( mesh_, fillFlags ) ==\n+meshCoarsened);\n+ 401 if( coarsened )\n+ 402 ALBERTA dof_compress( mesh_ );\n+ 403 return coarsened;\n+ 404 }\n+ 405\n+ 406 template< int dim >\n+407 inline bool MeshPointer<_dim_>::refine ( typename FillFlags::Flags\n+fillFlags )\n+ 408 {\n+ 409 return (ALBERTA refine( mesh_, fillFlags ) == meshRefined);\n+ 410 }\n 411\n- 412#ifdef FILL_EL_WALL_NORMAL\n- 413 #undef FILL_EL_WALL_NORMAL\n- 414#endif // FILL_EL_WALL_NORMAL\n- 415\n- 416#ifdef FILL_EL_WALL_ORIENTATION\n- 417 #undef FILL_EL_WALL_ORIENTATION\n- 418#endif // FILL_EL_WALL_ORIENTATION\n- 419\n- 420#ifdef FILL_EL_WALL_REL_ORIENTATION\n- 421 #undef FILL_EL_WALL_REL_ORIENTATION\n- 422#endif // FILL_EL_WALL_REL_ORIENTATION\n+ 412\n+ 413 template< int dim >\n+ 414 inline ALBERTA NODE_PROJECTION *\n+ 415 MeshPointer<_dim_>::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL\n+*macroEl, int n )\n+ 416 {\n+ 417 const MacroElement ¯oElement = static_cast< const MacroElement & >\n+( *macroEl );\n+ 418 if( (n > 0) && macroElement.isBoundary( n-1 ) )\n+ 419 return new BasicNodeProjection( Library< dimWorld >::boundaryCount++ );\n+ 420 else\n+ 421 return 0;\n+ 422 }\n 423\n- 424#ifdef FILL_EL_WALL_DETS\n- 425 #undef FILL_EL_WALL_DETS\n- 426#endif // FILL_EL_WALL_DETS\n- 427\n- 428#ifdef FILL_EL_WALL_NORMALS\n- 429 #undef FILL_EL_WALL_NORMALS\n- 430#endif // FILL_EL_WALL_NORMALS\n+ 424\n+ 425 template< int dim >\n+ 426 template< class ProjectionFactory >\n+ 427 inline ALBERTA NODE_PROJECTION *\n+ 428 MeshPointer< dim >::initNodeProjection ( Mesh *mesh, ALBERTA MACRO_EL\n+*macroEl, int n )\n+ 429 {\n+ 430 typedef typename ProjectionFactory::Projection Projection;\n 431\n- 432#ifdef FILL_EL_WALL_ORIENTATIONS\n- 433 #undef FILL_EL_WALL_ORIENTATIONS\n- 434#endif // FILL_EL_WALL_ORIENTATIONS\n- 435\n- 436#ifdef FILL_EL_WALL_REL_ORIENTATIONS\n- 437 #undef FILL_EL_WALL_REL_ORIENTATIONS\n- 438#endif // FILL_EL_WALL_REL_ORIENTATIONS\n- 439\n- 440#ifdef BNDRY_FLAGS_INIT\n- 441 #undef BNDRY_FLAGS_INIT\n- 442#endif // BNDRY_FLAGS_INIT\n- 443\n- 444#ifdef BNDRY_FLAGS_ALL\n- 445 #undef BNDRY_FLAGS_ALL\n- 446#endif // BNDRY_FLAGS_ALL\n- 447\n- 448#ifdef BNDRY_FLAGS_CPY\n- 449 #undef BNDRY_FLAGS_CPY\n- 450#endif // BNDRY_FLAGS_CPY\n- 451\n- 452#ifdef BNDRY_FLAGS_AND\n- 453 #undef BNDRY_FLAGS_AND\n- 454#endif // BNDRY_FLAGS_AND\n- 455\n- 456#ifdef BNDRY_FLAGS_OR\n- 457 #undef BNDRY_FLAGS_OR\n- 458#endif // BNDRY_FLAGS_OR\n- 459\n- 460#ifdef BNDRY_FLAGS_XOR\n- 461 #undef BNDRY_FLAGS_XOR\n- 462#endif // BNDRY_FLAGS_XOR\n- 463\n- 464#ifdef BNDRY_FLAGS_IS_INTERIOR\n- 465 #undef BNDRY_FLAGS_IS_INTERIOR\n- 466#endif // BNDRY_FLAGS_IS_INTERIOR\n- 467\n- 468#ifdef BNDRY_FLAGS_IS_AT_BNDRY\n- 469 #undef BNDRY_FLAGS_IS_AT_BNDRY\n- 470#endif // BNDRY_FLAGS_IS_AT_BNDRY\n- 471\n- 472#ifdef BNDRY_FLAGS_SET\n- 473 #undef BNDRY_FLAGS_SET\n- 474#endif // BNDRY_FLAGS_SET\n- 475\n- 476#ifdef BNDRY_FLAGS_IS_PARTOF\n- 477 #undef BNDRY_FLAGS_IS_PARTOF\n- 478#endif // BNDRY_FLAGS_IS_PARTOF\n- 479\n- 480#ifdef BNDRY_FLAGS_FFBB\n- 481 #undef BNDRY_FLAGS_FFBB\n- 482#endif // BNDRY_FLAGS_FFBB\n- 483\n- 484#ifdef RCLE_NONE\n- 485 #undef RCLE_NONE\n- 486#endif // RCLE_NONE\n- 487\n- 488#ifdef RCLE_COARSE_EDGE_COMPAT\n- 489 #undef RCLE_COARSE_EDGE_COMPAT\n- 490#endif // RCLE_COARSE_EDGE_COMPAT\n- 491\n- 492#ifdef FILL_NOTHING\n- 493 #undef FILL_NOTHING\n- 494#endif // FILL_NOTHING\n- 495\n- 496#ifdef FILL_COORDS\n- 497 #undef FILL_COORDS\n- 498#endif // FILL_COORDS\n- 499\n- 500#ifdef FILL_BOUND\n- 501 #undef FILL_BOUND\n- 502#endif // FILL_BOUND\n- 503\n- 504#ifdef FILL_NEIGH\n- 505 #undef FILL_NEIGH\n- 506#endif // FILL_NEIGH\n- 507\n- 508#ifdef FILL_OPP_COORDS\n- 509 #undef FILL_OPP_COORDS\n- 510#endif // FILL_OPP_COORDS\n- 511\n- 512#ifdef FILL_ORIENTATION\n- 513 #undef FILL_ORIENTATION\n- 514#endif // FILL_ORIENTATION\n- 515\n- 516#ifdef FILL_PROJECTION\n- 517 #undef FILL_PROJECTION\n- 518#endif // FILL_PROJECTION\n- 519\n- 520#ifdef FILL_MACRO_WALLS\n- 521 #undef FILL_MACRO_WALLS\n- 522#endif // FILL_MACRO_WALLS\n- 523\n- 524#ifdef FILL_WALL_MAP\n- 525 #undef FILL_WALL_MAP\n- 526#endif // FILL_WALL_MAP\n- 527\n- 528#ifdef FILL_NON_PERIODIC\n- 529 #undef FILL_NON_PERIODIC\n- 530#endif // FILL_NON_PERIODIC\n- 531\n- 532#ifdef FILL_MASTER_INFO\n- 533 #undef FILL_MASTER_INFO\n- 534#endif // FILL_MASTER_INFO\n- 535\n- 536#ifdef FILL_ANY\n- 537 #undef FILL_ANY\n- 538#endif // FILL_ANY\n- 539\n- 540#ifdef CALL_EVERY_EL_PREORDER\n- 541 #undef CALL_EVERY_EL_PREORDER\n- 542#endif // CALL_EVERY_EL_PREORDER\n- 543\n- 544#ifdef CALL_EVERY_EL_INORDER\n- 545 #undef CALL_EVERY_EL_INORDER\n- 546#endif // CALL_EVERY_EL_INORDER\n- 547\n- 548#ifdef CALL_EVERY_EL_POSTORDER\n- 549 #undef CALL_EVERY_EL_POSTORDER\n- 550#endif // CALL_EVERY_EL_POSTORDER\n- 551\n- 552#ifdef CALL_LEAF_EL\n- 553 #undef CALL_LEAF_EL\n- 554#endif // CALL_LEAF_EL\n- 555\n- 556#ifdef CALL_LEAF_EL_LEVEL\n- 557 #undef CALL_LEAF_EL_LEVEL\n- 558#endif // CALL_LEAF_EL_LEVEL\n- 559\n- 560#ifdef CALL_EL_LEVEL\n- 561 #undef CALL_EL_LEVEL\n- 562#endif // CALL_EL_LEVEL\n- 563\n- 564#ifdef CALL_MG_LEVEL\n- 565 #undef CALL_MG_LEVEL\n- 566#endif // CALL_MG_LEVEL\n- 567\n- 568#ifdef TEST_FLAG\n- 569 #undef TEST_FLAG\n- 570#endif // TEST_FLAG\n- 571\n- 572#ifdef ADM_FLAGS_MASK\n- 573 #undef ADM_FLAGS_MASK\n- 574#endif // ADM_FLAGS_MASK\n- 575\n- 576#ifdef UCHAR_name\n- 577 #undef UCHAR_name\n- 578#endif // UCHAR_name\n- 579\n- 580#ifdef uchar_VECNAME\n- 581 #undef uchar_VECNAME\n- 582#endif // uchar_VECNAME\n- 583\n- 584#ifdef SCHAR_name\n- 585 #undef SCHAR_name\n- 586#endif // SCHAR_name\n- 587\n- 588#ifdef schar_VECNAME\n- 589 #undef schar_VECNAME\n- 590#endif // schar_VECNAME\n- 591\n- 592#ifdef INT_name\n- 593 #undef INT_name\n- 594#endif // INT_name\n- 595\n- 596#ifdef int_VECNAME\n- 597 #undef int_VECNAME\n- 598#endif // int_VECNAME\n- 599\n- 600#ifdef DOF_name\n- 601 #undef DOF_name\n- 602#endif // DOF_name\n- 603\n- 604#ifdef dof_VECNAME\n- 605 #undef dof_VECNAME\n- 606#endif // dof_VECNAME\n- 607\n- 608#ifdef PTR_name\n- 609 #undef PTR_name\n- 610#endif // PTR_name\n- 611\n- 612#ifdef ptr_VECNAME\n- 613 #undef ptr_VECNAME\n- 614#endif // ptr_VECNAME\n- 615\n- 616#ifdef REAL_name\n- 617 #undef REAL_name\n- 618#endif // REAL_name\n- 619\n- 620#ifdef real_VECNAME\n- 621 #undef real_VECNAME\n- 622#endif // real_VECNAME\n- 623\n- 624#ifdef REAL_D_name\n- 625 #undef REAL_D_name\n- 626#endif // REAL_D_name\n- 627\n- 628#ifdef real_d_VECNAME\n- 629 #undef real_d_VECNAME\n- 630#endif // real_d_VECNAME\n- 631\n- 632#ifdef BNDRY_name\n- 633 #undef BNDRY_name\n- 634#endif // BNDRY_name\n- 635\n- 636#ifdef bndry_VECNAME\n- 637 #undef bndry_VECNAME\n- 638#endif // bndry_VECNAME\n- 639\n- 640#ifdef DECL_DOF_EL_VEC\n- 641 #undef DECL_DOF_EL_VEC\n- 642#endif // DECL_DOF_EL_VEC\n- 643\n- 644#ifdef PHI\n- 645 #undef PHI\n- 646#endif // PHI\n- 647\n- 648#ifdef GRD_PHI\n- 649 #undef GRD_PHI\n- 650#endif // GRD_PHI\n- 651\n- 652#ifdef D2_PHI\n- 653 #undef D2_PHI\n- 654#endif // D2_PHI\n- 655\n- 656#ifdef D3_PHI\n- 657 #undef D3_PHI\n- 658#endif // D3_PHI\n- 659\n- 660#ifdef D4_PHI\n- 661 #undef D4_PHI\n- 662#endif // D4_PHI\n- 663\n- 664#ifdef PHI_D\n- 665 #undef PHI_D\n- 666#endif // PHI_D\n- 667\n- 668#ifdef GRD_PHI_D\n- 669 #undef GRD_PHI_D\n- 670#endif // GRD_PHI_D\n- 671\n- 672#ifdef D2_PHI_D\n- 673 #undef D2_PHI_D\n- 674#endif // D2_PHI_D\n- 675\n- 676#ifdef GET_DOF_INDICES\n- 677 #undef GET_DOF_INDICES\n- 678#endif // GET_DOF_INDICES\n- 679\n- 680#ifdef INTERPOL\n- 681 #undef INTERPOL\n- 682#endif // INTERPOL\n- 683\n- 684#ifdef INTERPOL_D\n- 685 #undef INTERPOL_D\n- 686#endif // INTERPOL_D\n- 687\n- 688#ifdef INTERPOL_DOW\n- 689 #undef INTERPOL_DOW\n- 690#endif // INTERPOL_DOW\n- 691\n- 692#ifdef GET_BOUND\n- 693 #undef GET_BOUND\n- 694#endif // GET_BOUND\n- 695\n- 696#ifdef LAGRANGE_NODES\n- 697 #undef LAGRANGE_NODES\n- 698#endif // LAGRANGE_NODES\n- 699\n- 700#ifdef FILL_EL_QUAD_WORLD\n- 701 #undef FILL_EL_QUAD_WORLD\n- 702#endif // FILL_EL_QUAD_WORLD\n- 703\n- 704#ifdef FILL_EL_QUAD_DET\n- 705 #undef FILL_EL_QUAD_DET\n- 706#endif // FILL_EL_QUAD_DET\n- 707\n- 708#ifdef FILL_EL_QUAD_LAMBDA\n- 709 #undef FILL_EL_QUAD_LAMBDA\n- 710#endif // FILL_EL_QUAD_LAMBDA\n- 711\n- 712#ifdef FILL_EL_QUAD_DLAMBDA\n- 713 #undef FILL_EL_QUAD_DLAMBDA\n- 714#endif // FILL_EL_QUAD_DLAMBDA\n- 715\n- 716#ifdef FILL_EL_QUAD_GRD_WORLD\n- 717 #undef FILL_EL_QUAD_GRD_WORLD\n- 718#endif // FILL_EL_QUAD_GRD_WORLD\n- 719\n- 720#ifdef FILL_EL_QUAD_D2_WORLD\n- 721 #undef FILL_EL_QUAD_D2_WORLD\n- 722#endif // FILL_EL_QUAD_D2_WORLD\n- 723\n- 724#ifdef FILL_EL_QUAD_D3_WORLD\n- 725 #undef FILL_EL_QUAD_D3_WORLD\n- 726#endif // FILL_EL_QUAD_D3_WORLD\n- 727\n- 728#ifdef FILL_EL_QUAD_WALL_DET\n- 729 #undef FILL_EL_QUAD_WALL_DET\n- 730#endif // FILL_EL_QUAD_WALL_DET\n- 731\n- 732#ifdef FILL_EL_QUAD_WALL_NORMAL\n- 733 #undef FILL_EL_QUAD_WALL_NORMAL\n- 734#endif // FILL_EL_QUAD_WALL_NORMAL\n- 735\n- 736#ifdef FILL_EL_QUAD_GRD_NORMAL\n- 737 #undef FILL_EL_QUAD_GRD_NORMAL\n- 738#endif // FILL_EL_QUAD_GRD_NORMAL\n- 739\n- 740#ifdef FILL_EL_QUAD_D2_NORMAL\n- 741 #undef FILL_EL_QUAD_D2_NORMAL\n- 742#endif // FILL_EL_QUAD_D2_NORMAL\n- 743\n- 744#ifdef INIT_PHI\n- 745 #undef INIT_PHI\n- 746#endif // INIT_PHI\n- 747\n- 748#ifdef INIT_GRD_PHI\n- 749 #undef INIT_GRD_PHI\n- 750#endif // INIT_GRD_PHI\n- 751\n- 752#ifdef INIT_D2_PHI\n- 753 #undef INIT_D2_PHI\n- 754#endif // INIT_D2_PHI\n- 755\n- 756#ifdef INIT_D3_PHI\n- 757 #undef INIT_D3_PHI\n- 758#endif // INIT_D3_PHI\n- 759\n- 760#ifdef INIT_D4_PHI\n- 761 #undef INIT_D4_PHI\n- 762#endif // INIT_D4_PHI\n- 763\n- 764#ifdef INIT_TANGENTIAL\n- 765 #undef INIT_TANGENTIAL\n- 766#endif // INIT_TANGENTIAL\n- 767\n- 768#ifdef MESH_REFINED\n- 769 #undef MESH_REFINED\n- 770#endif // MESH_REFINED\n- 771\n- 772#ifdef MESH_COARSENED\n- 773 #undef MESH_COARSENED\n- 774#endif // MESH_COARSENED\n- 775\n- 776#ifdef GRAPH_MESH_BOUNDARY\n- 777 #undef GRAPH_MESH_BOUNDARY\n- 778#endif // GRAPH_MESH_BOUNDARY\n- 779\n- 780#ifdef GRAPH_MESH_ELEMENT_MARK\n- 781 #undef GRAPH_MESH_ELEMENT_MARK\n- 782#endif // GRAPH_MESH_ELEMENT_MARK\n- 783\n- 784#ifdef GRAPH_MESH_VERTEX_DOF\n- 785 #undef GRAPH_MESH_VERTEX_DOF\n- 786#endif // GRAPH_MESH_VERTEX_DOF\n- 787\n- 788#ifdef GRAPH_MESH_ELEMENT_INDEX\n- 789 #undef GRAPH_MESH_ELEMENT_INDEX\n- 790#endif // GRAPH_MESH_ELEMENT_INDEX\n- 791\n- 792#ifdef GET_MESH\n- 793 #undef GET_MESH\n- 794#endif // GET_MESH\n- 795\n- 796#ifdef GET_DOF_VEC\n- 797 #undef GET_DOF_VEC\n- 798#endif // GET_DOF_VEC\n- 799\n- 800#ifdef TRACE_DOF_VEC_PROTO\n- 801 #undef TRACE_DOF_VEC_PROTO\n- 802#endif // TRACE_DOF_VEC_PROTO\n- 803\n- 804#ifdef INIT_UH\n- 805 #undef INIT_UH\n- 806#endif // INIT_UH\n- 807\n- 808#ifdef INIT_GRD_UH\n- 809 #undef INIT_GRD_UH\n- 810#endif // INIT_GRD_UH\n- 811\n- 812#ifdef ellipt_est_d_init\n- 813 #undef ellipt_est_d_init\n- 814#endif // ellipt_est_d_init\n- 815\n- 816#ifdef head_est_d_init\n- 817 #undef head_est_d_init\n- 818#endif // head_est_d_init\n- 819\n- 820#ifdef element_est_d\n- 821 #undef element_est_d\n- 822#endif // element_est_d\n- 823\n- 824#ifdef element_est_d_finish\n- 825 #undef element_est_d_finish\n- 826#endif // element_est_d_finish\n- 827\n- 828#ifdef element_est_uh_d\n- 829 #undef element_est_uh_d\n- 830#endif // element_est_uh_d\n- 831\n- 832#ifdef element_est_grd_uh_d\n- 833 #undef element_est_grd_uh_d\n- 834#endif // element_est_grd_uh_d\n- 835\n- 836#ifdef ellipt_est_d_finish\n- 837 #undef ellipt_est_d_finish\n- 838#endif // ellipt_est_d_finish\n- 839\n- 840#ifdef heat_est_d_finish\n- 841 #undef heat_est_d_finish\n- 842#endif // heat_est_d_finish\n- 843\n- 844#ifdef TRAVERSE_FIRST\n- 845 #undef TRAVERSE_FIRST\n- 846#endif // TRAVERSE_FIRST\n- 847\n- 848#ifdef TRAVERSE_NEXT\n- 849 #undef TRAVERSE_NEXT\n- 850#endif // TRAVERSE_NEXT\n- 851\n- 852#ifdef TRAVERSE_START\n- 853 #undef TRAVERSE_START\n- 854#endif // TRAVERSE_START\n- 855\n- 856#ifdef TRAVERSE_STOP\n- 857 #undef TRAVERSE_STOP\n- 858#endif // TRAVERSE_STOP\n- 859\n- 860#ifdef TRAVERSE_NEIGHBOUR\n- 861 #undef TRAVERSE_NEIGHBOUR\n- 862#endif // TRAVERSE_NEIGHBOUR\n- 863\n- 864#ifdef IFF_TAG_ALBERTA\n- 865 #undef IFF_TAG_ALBERTA\n- 866#endif // IFF_TAG_ALBERTA\n- 867\n- 868#ifdef IFF_TAG_MESH\n- 869 #undef IFF_TAG_MESH\n- 870#endif // IFF_TAG_MESH\n- 871\n- 872#ifdef IFF_TAG_REAL_VEC\n- 873 #undef IFF_TAG_REAL_VEC\n- 874#endif // IFF_TAG_REAL_VEC\n- 875\n- 876#ifdef IFF_TAG_REAL_D_VEC\n- 877 #undef IFF_TAG_REAL_D_VEC\n- 878#endif // IFF_TAG_REAL_D_VEC\n- 879\n- 880#ifdef IFF_TAG_INT_VEC\n- 881 #undef IFF_TAG_INT_VEC\n- 882#endif // IFF_TAG_INT_VEC\n- 883\n- 884#ifdef IFF_TAG_UCHAR_VEC\n- 885 #undef IFF_TAG_UCHAR_VEC\n- 886#endif // IFF_TAG_UCHAR_VEC\n- 887\n- 888#ifdef IFF_TAG_SCHAR_VEC\n- 889 #undef IFF_TAG_SCHAR_VEC\n- 890#endif // IFF_TAG_SCHAR_VEC\n+ 432 const MacroElement ¯oElement = static_cast< const MacroElement & >\n+( *macroEl );\n+ 433\n+ 434 MeshPointer< dim > meshPointer( mesh );\n+ 435 ElementInfo elementInfo( meshPointer, macroElement, FillFlags::standard );\n+ 436 const ProjectionFactory &projectionFactory = *static_cast< const\n+ProjectionFactory * >( Library< dimWorld >::projectionFactory );\n+ 437 if( (n > 0) && macroElement.isBoundary( n-1 ) )\n+ 438 {\n+ 439 const unsigned int boundaryIndex = Library< dimWorld >::boundaryCount++;\n+ 440 if( projectionFactory.hasProjection( elementInfo, n-1 ) )\n+ 441 {\n+ 442 Projection projection = projectionFactory.projection( elementInfo, n-1 );\n+ 443 return new NodeProjection< dim, Projection >( boundaryIndex, projection );\n+ 444 }\n+ 445 else\n+ 446 return new BasicNodeProjection( boundaryIndex );\n+ 447 }\n+ 448 else if( (dim < dimWorld) && (n == 0) )\n+ 449 {\n+ 450 const unsigned int boundaryIndex = std::numeric_limits<_unsigned_int_>::\n+max();\n+ 451 if( projectionFactory.hasProjection( elementInfo ) )\n+ 452 {\n+ 453 Projection projection = projectionFactory.projection( elementInfo );\n+ 454 return new NodeProjection< dim, Projection >( boundaryIndex, projection );\n+ 455 }\n+ 456 else\n+ 457 return 0;\n+ 458 }\n+ 459 else\n+ 460 return 0;\n+ 461 }\n+ 462\n+ 463 } // namespace Alberta\n+ 464\n+ 465} // namespace Dune\n+ 466\n+ 467#endif // #if HAVE_ALBERTA\n+ 468\n+ 469#endif // #ifndef DUNE_ALBERTA_MESHPOINTER_HH\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n+macrodata.hh\n+provides a wrapper for ALBERTA's macro_data structure\n+misc.hh\n+ALBERTA\n+#define ALBERTA\n+Definition: albertaheader.hh:29\n+Dune\n+Include standard header files.\n+Definition: agrid.hh:60\n+Dune::Alberta::Mesh\n+ALBERTA MESH Mesh\n+Definition: misc.hh:53\n+Dune::Alberta::Real\n+ALBERTA REAL Real\n+Definition: misc.hh:48\n+Dune::Alberta::meshRefined\n+static const int meshRefined\n+Definition: misc.hh:56\n+Dune::Alberta::dimWorld\n+static const int dimWorld\n+Definition: misc.hh:46\n+Dune::Alberta::max\n+int max(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:337\n+Dune::Alberta::meshCoarsened\n+static const int meshCoarsened\n+Definition: misc.hh:57\n+Dune::Alberta::MeshPointer\n+Definition: meshpointer.hh:40\n+Dune::Alberta::MeshPointer::numMacroElements\n+int numMacroElements() const\n+Definition: meshpointer.hh:257\n+Dune::Alberta::MeshPointer::create\n+unsigned int create(const MacroData< dim > ¯oData, const\n+ProjectionFactoryInterface< Proj, Impl > &projectionFactory)\n+Definition: meshpointer.hh:312\n+Dune::Alberta::MeshPointer::release\n+void release()\n+Definition: meshpointer.hh:361\n+Dune::Alberta::MeshPointer::read\n+unsigned int read(const std::string &filename, Real &time)\n+Definition: meshpointer.hh:342\n+Dune::Alberta::MeshPointer::end\n+MacroIterator end() const\n+Definition: meshpointer.hh:76\n+Dune::Alberta::MeshPointer::coarsen\n+bool coarsen(typename FillFlags::Flags fillFlags=FillFlags::nothing)\n+Definition: meshpointer.hh:398\n+Dune::Alberta::MeshPointer::size\n+int size(int codim) const\n+Dune::Alberta::MeshPointer::create\n+unsigned int create(const std::string &filename, bool binary=false)\n+Definition: meshpointer.hh:331\n+Dune::Alberta::MeshPointer::leafTraverse\n+void leafTraverse(Functor &functor, typename FillFlags::Flags\n+fillFlags=FillFlags::standard) const\n+Definition: meshpointer.hh:385\n+Dune::Alberta::MeshPointer::create\n+unsigned int create(const MacroData< dim > ¯oData)\n+Definition: meshpointer.hh:299\n+Dune::Alberta::MeshPointer::begin\n+MacroIterator begin() const\n+Definition: meshpointer.hh:71\n+Dune::Alberta::MeshPointer::MeshPointer\n+MeshPointer(Mesh *mesh)\n+Definition: meshpointer.hh:57\n+Dune::Alberta::MeshPointer::write\n+bool write(const std::string &filename, Real time) const\n+Definition: meshpointer.hh:353\n+Dune::Alberta::MeshPointer::refine\n+bool refine(typename FillFlags::Flags fillFlags=FillFlags::nothing)\n+Definition: meshpointer.hh:407\n+Dune::Alberta::MeshPointer::MeshPointer\n+MeshPointer()\n+Definition: meshpointer.hh:53\n+Dune::Alberta::MeshPointer::hierarchicTraverse\n+void hierarchicTraverse(Functor &functor, typename FillFlags::Flags\n+fillFlags=FillFlags::standard) const\n+Definition: meshpointer.hh:370\n+Dune::Alberta::ElementInfo\n+Definition: elementinfo.hh:43\n+Dune::Alberta::ElementInfo::hierarchicTraverse\n+void hierarchicTraverse(Functor &functor) const\n+Definition: elementinfo.hh:695\n+Dune::Alberta::ElementInfo::leafTraverse\n+void leafTraverse(Functor &functor) const\n+Definition: elementinfo.hh:708\n+Dune::Alberta::MacroData\n+Definition: macrodata.hh:30\n+Dune::Alberta::MacroData::release\n+void release()\n+release the macro data structure\n+Definition: macrodata.hh:127\n+Dune::Alberta::MacroData::read\n+void read(const std::string &filename, bool binary=false)\n+Definition: macrodata.hh:413\n+Dune::Alberta::MacroElement\n+Definition: macroelement.hh:24\n+Dune::Alberta::MacroElement::isBoundary\n+bool isBoundary(const int face) const\n+Definition: macroelement.hh:42\n+Dune::Alberta::MeshPointer::MacroIterator\n+Definition: meshpointer.hh:167\n+Dune::Alberta::MeshPointer::MacroIterator::mesh\n+const MeshPointer & mesh() const\n+Definition: meshpointer.hh:211\n+Dune::Alberta::MeshPointer::MacroIterator::macroElement\n+const MacroElement & macroElement() const\n+Definition: meshpointer.hh:205\n+Dune::Alberta::MeshPointer::MacroIterator::ElementInfo\n+Alberta::ElementInfo< dim > ElementInfo\n+Definition: meshpointer.hh:174\n+Dune::Alberta::MeshPointer::MacroIterator::MeshPointer\n+Alberta::MeshPointer< dim > MeshPointer\n+Definition: meshpointer.hh:173\n+Dune::Alberta::MeshPointer::MacroIterator::elementInfo\n+ElementInfo elementInfo(typename FillFlags::Flags fillFlags=FillFlags::\n+standard) const\n+Definition: meshpointer.hh:238\n+Dune::Alberta::MeshPointer::MacroIterator::done\n+bool done() const\n+Definition: meshpointer.hh:189\n+Dune::Alberta::MeshPointer::MacroIterator::increment\n+void increment()\n+Definition: meshpointer.hh:199\n+Dune::Alberta::MeshPointer::MacroIterator::equals\n+bool equals(const MacroIterator &other) const\n+Definition: meshpointer.hh:194\n+Dune::Alberta::MeshPointer::MacroIterator::MacroIterator\n+MacroIterator()\n+Definition: meshpointer.hh:176\n+Dune::Alberta::FillFlags\n+Definition: misc.hh:231\n+Dune::Alberta::FillFlags::nothing\n+static const Flags nothing\n+Definition: misc.hh:234\n+Dune::Alberta::FillFlags::Flags\n+ALBERTA FLAGS Flags\n+Definition: misc.hh:232\n+Dune::Alberta::FillFlags::standard\n+static const Flags standard\n+Definition: misc.hh:256\n+Dune::Alberta::ProjectionFactory\n+Definition: albertagrid/projection.hh:135\n+Dune::Alberta::ProjectionFactory::Projection\n+Base::Projection Projection\n+Definition: albertagrid/projection.hh:140\n+Dune::Alberta::ProjectionFactoryInterface\n+Definition: albertagrid/projection.hh:80\n+Dune::Alberta::BasicNodeProjection\n+Definition: albertagrid/projection.hh:208\n+projection.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00653.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00653.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: macroelement.hh File Reference\n+dune-grid: dofvector.hh File Reference\n \n \n \n \n \n \n \n@@ -64,34 +64,58 @@\n \n
    \n \n
    \n \n-
    macroelement.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    dofvector.hh File Reference
    \n \n
    \n-
    #include <dune/grid/albertagrid/misc.hh>
    \n+
    #include <cstdlib>
    \n+#include <limits>
    \n+#include <dune/grid/albertagrid/misc.hh>
    \n+#include <dune/grid/albertagrid/elementinfo.hh>
    \n+#include <dune/grid/albertagrid/refinement.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    struct  Dune::Alberta::MacroElement< dim >
    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 >
     
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n+\n+\n+\n+\n+\n+\n+\n

    \n+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)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,23 +5,44 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-macroelement.hh File Reference\n+Classes | Namespaces | Functions\n+dofvector.hh File Reference\n+#include \n+#include \n #include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::Alberta::MacroElement<_dim_>\n+struct \u00a0Dune::Alberta::DofVectorProvider<_int_>\n+\u00a0\n+struct \u00a0Dune::Alberta::DofVectorProvider<_signed_char_>\n+\u00a0\n+struct \u00a0Dune::Alberta::DofVectorProvider<_unsigned_char_>\n+\u00a0\n+struct \u00a0Dune::Alberta::DofVectorProvider<_Real_>\n+\u00a0\n+struct \u00a0Dune::Alberta::DofVectorProvider<_GlobalVector_>\n+\u00a0\n+ class \u00a0Dune::Alberta::DofVectorPointer<_Dof_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n+ Functions\n+void\u00a0Dune::Alberta::abs (const DofVectorPointer< int > &dofVector)\n+\u00a0\n+ int\u00a0Dune::Alberta::max (const DofVectorPointer< int > &dofVector)\n+\u00a0\n+ int\u00a0Dune::Alberta::min (const DofVectorPointer< int > &dofVector)\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00653_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: macroelement.hh Source File\n+dune-grid: dofvector.hh Source File\n \n \n \n \n \n \n \n@@ -62,96 +62,438 @@\n \n \n
    \n
    \n-
    macroelement.hh
    \n+
    dofvector.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_MACROELEMENT_HH
    \n-
    6#define DUNE_ALBERTA_MACROELEMENT_HH
    \n+
    5#ifndef DUNE_ALBERTA_DOFVECTOR_HH
    \n+
    6#define DUNE_ALBERTA_DOFVECTOR_HH
    \n
    7
    \n-\n-
    9
    \n-
    10#if HAVE_ALBERTA
    \n-
    11
    \n-
    12namespace Dune
    \n-
    13{
    \n+
    8#include <cstdlib>
    \n+
    9#include <limits>
    \n+
    10
    \n+\n+\n+\n
    14
    \n-
    15 namespace Alberta
    \n-
    16 {
    \n-
    17
    \n-
    18 // MacroElement
    \n-
    19 // ------------
    \n-
    20
    \n-
    21 template< int dim >
    \n-\n-
    23 : public ALBERTA MACRO_EL
    \n-
    24 {
    \n-
    25 const GlobalVector &coordinate ( const int vertex ) const;
    \n-
    26
    \n-
    27 int boundaryId ( const int face ) const;
    \n-
    28 bool isBoundary ( const int face ) const;
    \n-
    29 const MacroElement< dim > *neighbor ( const int face ) const;
    \n-
    30 };
    \n-
    31
    \n-
    32
    \n-
    33 template< int dim >
    \n-
    34 inline const GlobalVector &MacroElement< dim >::coordinate ( const int vertex ) const
    \n-
    35 {
    \n-
    36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) );
    \n-
    37 return *coord[ vertex ];
    \n-
    38 }
    \n-
    39
    \n-
    40
    \n-
    41 template< int dim >
    \n-
    42 inline bool MacroElement< dim >::isBoundary ( const int face ) const
    \n-
    43 {
    \n-
    44 return (boundaryId( face ) != InteriorBoundary);
    \n-
    45 }
    \n+
    15#if HAVE_ALBERTA
    \n+
    16
    \n+
    17namespace Dune
    \n+
    18{
    \n+
    19
    \n+
    20 namespace Alberta
    \n+
    21 {
    \n+
    22
    \n+
    23 // External Forward Declarations
    \n+
    24 // -----------------------------
    \n+
    25
    \n+
    26 template< int dim >
    \n+
    27 class MeshPointer;
    \n+
    28
    \n+
    29
    \n+
    30
    \n+
    31 // DofVectorProvider
    \n+
    32 // -----------------
    \n+
    33
    \n+
    34 template< class Dof >
    \n+\n+
    36
    \n+
    37 template<>
    \n+
    38 struct DofVectorProvider< int >
    \n+
    39 {
    \n+
    40 typedef ALBERTA DOF_INT_VEC DofVector;
    \n+
    41
    \n+
    42 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n+
    43 {
    \n+
    44 return ALBERTA get_dof_int_vec( name.c_str(), dofSpace );
    \n+
    45 }
    \n
    46
    \n-
    47
    \n-
    48 template< int dim >
    \n-
    49 inline int MacroElement< dim >::boundaryId ( const int face ) const
    \n-
    50 {
    \n-
    51 return wall_bound[ face ];
    \n-
    52 }
    \n-
    53
    \n-
    54
    \n-
    55 template< int dim >
    \n-
    56 const MacroElement< dim > *MacroElement< dim >::neighbor ( const int face ) const
    \n-
    57 {
    \n-
    58 assert( (face >= 0) && (face < N_NEIGH_MAX) );
    \n-
    59 return static_cast< const MacroElement * >( neigh[ face ] );
    \n-
    60 }
    \n-
    61
    \n-
    62 }
    \n+
    47 static void free ( DofVector *dofVector )
    \n+
    48 {
    \n+
    49 ALBERTA free_dof_int_vec( dofVector );
    \n+
    50 }
    \n+
    51
    \n+
    52 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n+
    53 {
    \n+
    54 return ALBERTA read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n+
    55 }
    \n+
    56
    \n+
    57 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n+
    58 {
    \n+
    59 int success = ALBERTA write_dof_int_vec_xdr( dofVector, filename.c_str() );
    \n+
    60 return (success == 0);
    \n+
    61 }
    \n+
    62 };
    \n
    63
    \n-
    64}
    \n-
    65
    \n-
    66#endif // #if HAVE_ALBERTA
    \n-
    67
    \n-
    68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
    \n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n+
    64 template<>
    \n+
    65 struct DofVectorProvider< signed char >
    \n+
    66 {
    \n+
    67 typedef ALBERTA DOF_SCHAR_VEC DofVector;
    \n+
    68
    \n+
    69 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n+
    70 {
    \n+
    71 return ALBERTA get_dof_schar_vec( name.c_str(), dofSpace );
    \n+
    72 }
    \n+
    73
    \n+
    74 static void free ( DofVector *dofVector )
    \n+
    75 {
    \n+
    76 ALBERTA free_dof_schar_vec( dofVector );
    \n+
    77 }
    \n+
    78
    \n+
    79 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n+
    80 {
    \n+
    81 return ALBERTA read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n+
    82 }
    \n+
    83
    \n+
    84 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n+
    85 {
    \n+
    86 int success = ALBERTA write_dof_schar_vec_xdr( dofVector, filename.c_str() );
    \n+
    87 return (success == 0);
    \n+
    88 }
    \n+
    89 };
    \n+
    90
    \n+
    91 template<>
    \n+
    92 struct DofVectorProvider< unsigned char >
    \n+
    93 {
    \n+
    94 typedef ALBERTA DOF_UCHAR_VEC DofVector;
    \n+
    95
    \n+
    96 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n+
    97 {
    \n+
    98 return ALBERTA get_dof_uchar_vec( name.c_str(), dofSpace );
    \n+
    99 }
    \n+
    100
    \n+
    101 static void free ( DofVector *dofVector )
    \n+
    102 {
    \n+
    103 ALBERTA free_dof_uchar_vec( dofVector );
    \n+
    104 }
    \n+
    105
    \n+
    106 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n+
    107 {
    \n+
    108 return ALBERTA read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n+
    109 }
    \n+
    110
    \n+
    111 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n+
    112 {
    \n+
    113 int success = ALBERTA write_dof_uchar_vec_xdr( dofVector, filename.c_str() );
    \n+
    114 return (success == 0);
    \n+
    115 }
    \n+
    116 };
    \n+
    117
    \n+
    118 template<>
    \n+\n+
    120 {
    \n+
    121 typedef ALBERTA DOF_REAL_VEC DofVector;
    \n+
    122
    \n+
    123 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n+
    124 {
    \n+
    125 return ALBERTA get_dof_real_vec( name.c_str(), dofSpace );
    \n+
    126 }
    \n+
    127
    \n+
    128 static void free ( DofVector *dofVector )
    \n+
    129 {
    \n+
    130 ALBERTA free_dof_real_vec( dofVector );
    \n+
    131 }
    \n+
    132
    \n+
    133 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n+
    134 {
    \n+
    135 return ALBERTA read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n+
    136 }
    \n+
    137
    \n+
    138 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n+
    139 {
    \n+
    140 int success = ALBERTA write_dof_real_vec_xdr( dofVector, filename.c_str() );
    \n+
    141 return (success == 0);
    \n+
    142 }
    \n+
    143 };
    \n+
    144
    \n+
    145 template<>
    \n+\n+
    147 {
    \n+
    148 typedef ALBERTA DOF_REAL_D_VEC DofVector;
    \n+
    149
    \n+
    150 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )
    \n+
    151 {
    \n+
    152 return ALBERTA get_dof_real_d_vec( name.c_str(), dofSpace );
    \n+
    153 }
    \n+
    154
    \n+
    155 static void free ( DofVector *dofVector )
    \n+
    156 {
    \n+
    157 ALBERTA free_dof_real_d_vec( dofVector );
    \n+
    158 }
    \n+
    159
    \n+
    160 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace *dofSpace )
    \n+
    161 {
    \n+
    162 return ALBERTA read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace );
    \n+
    163 }
    \n+
    164
    \n+
    165 static bool write ( const DofVector *dofVector, const std::string &filename )
    \n+
    166 {
    \n+
    167 int success = ALBERTA write_dof_real_d_vec_xdr( dofVector, filename.c_str() );
    \n+
    168 return (success == 0);
    \n+
    169 }
    \n+
    170 };
    \n+
    171
    \n+
    172
    \n+
    173
    \n+
    174 // DofVectorPointer
    \n+
    175 // ----------------
    \n+
    176
    \n+
    177 template< class Dof >
    \n+\n+
    179 {
    \n+\n+
    181
    \n+\n+
    183
    \n+
    184 public:
    \n+
    185 typedef typename DofVectorProvider::DofVector DofVector;
    \n+
    186
    \n+
    187 static const bool supportsAdaptationData = true;
    \n+
    188
    \n+
    189 private:
    \n+
    190 DofVector *dofVector_;
    \n+
    191
    \n+
    192 public:
    \n+\n+
    194 : dofVector_( NULL )
    \n+
    195 {}
    \n+
    196
    \n+\n+
    198 const std::string &name = "" )
    \n+
    199 : dofVector_ ( DofVectorProvider::get( dofSpace, name ) )
    \n+
    200 {}
    \n+
    201
    \n+
    202 explicit DofVectorPointer ( DofVector *dofVector )
    \n+
    203 : dofVector_( dofVector )
    \n+
    204 {}
    \n+
    205
    \n+
    206 explicit operator bool () const
    \n+
    207 {
    \n+
    208 return (bool)dofVector_;
    \n+
    209 }
    \n+
    210
    \n+
    211 operator DofVector * () const
    \n+
    212 {
    \n+
    213 return dofVector_;
    \n+
    214 }
    \n+
    215
    \n+
    216 operator Dof * () const
    \n+
    217 {
    \n+
    218 Dof *ptr = NULL;
    \n+
    219 GET_DOF_VEC( ptr, dofVector_ );
    \n+
    220 return ptr;
    \n+
    221 }
    \n+
    222
    \n+
    223 const DofSpace *dofSpace () const
    \n+
    224 {
    \n+
    225 return dofVector_->fe_space;
    \n+
    226 }
    \n+
    227
    \n+
    228 std::string name () const
    \n+
    229 {
    \n+
    230 if( dofVector_ )
    \n+
    231 return dofVector_->name;
    \n+
    232 else
    \n+
    233 return std::string();
    \n+
    234 }
    \n+
    235
    \n+
    236 void create ( const DofSpace *dofSpace, const std::string &name = "" )
    \n+
    237 {
    \n+
    238 release();
    \n+
    239 dofVector_ = DofVectorProvider::get( dofSpace, name );
    \n+
    240 }
    \n+
    241
    \n+
    242 template< int dim >
    \n+
    243 void read ( const std::string &filename, const MeshPointer< dim > &meshPointer )
    \n+
    244 {
    \n+
    245 release();
    \n+
    246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL );
    \n+
    247 }
    \n+
    248
    \n+
    249 bool write ( const std::string &filename ) const
    \n+
    250 {
    \n+
    251 return DofVectorProvider::write( dofVector_, filename );
    \n+
    252 }
    \n+
    253
    \n+
    254 void release ()
    \n+
    255 {
    \n+
    256 if( dofVector_ )
    \n+
    257 {
    \n+
    258 DofVectorProvider::free( dofVector_ );
    \n+
    259 dofVector_ = NULL;
    \n+
    260 }
    \n+
    261 }
    \n+
    262
    \n+
    263 template< class Functor >
    \n+
    264 void forEach ( Functor &functor ) const
    \n+
    265 {
    \n+
    266 Dof *array = (Dof *)(*this);
    \n+
    267 FOR_ALL_DOFS( dofSpace()->admin, functor( array[ dof ] ) );
    \n+
    268 }
    \n+
    269
    \n+
    270 void initialize ( const Dof &value )
    \n+
    271 {
    \n+
    272 Dof *array = (Dof *)(*this);
    \n+
    273 FOR_ALL_DOFS( dofSpace()->admin, array[ dof ] = value );
    \n+
    274 }
    \n+
    275
    \n+
    276 template< class AdaptationData >
    \n+
    277 AdaptationData *getAdaptationData () const
    \n+
    278 {
    \n+
    279 assert( dofVector_ );
    \n+
    280 assert( dofVector_->user_data );
    \n+
    281 return static_cast< AdaptationData * >( dofVector_->user_data );
    \n+
    282 }
    \n+
    283
    \n+
    284 template< class AdaptationData >
    \n+
    285 void setAdaptationData ( AdaptationData *adaptationData )
    \n+
    286 {
    \n+
    287 assert( dofVector_ );
    \n+
    288 dofVector_->user_data = adaptationData;
    \n+
    289 }
    \n+
    290
    \n+
    291 template< class Interpolation >
    \n+\n+
    293 {
    \n+
    294 assert( dofVector_ );
    \n+
    295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >;
    \n+
    296 }
    \n+
    297
    \n+
    298 template< class Restriction >
    \n+\n+
    300 {
    \n+
    301 assert( dofVector_ );
    \n+
    302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >;
    \n+
    303 }
    \n+
    304
    \n+
    305 private:
    \n+
    306 template< class Interpolation >
    \n+
    307 static void refineInterpolate ( DofVector *dofVector, RC_LIST_EL *list, int n )
    \n+
    308 {
    \n+
    309 const This dofVectorPointer( dofVector );
    \n+
    310 typename Interpolation::Patch patch( list, n );
    \n+
    311 Interpolation::interpolateVector( dofVectorPointer, patch );
    \n+
    312 }
    \n+
    313
    \n+
    314 template< class Restriction >
    \n+
    315 static void coarsenRestrict ( DofVector *dofVector, RC_LIST_EL *list, int n )
    \n+
    316 {
    \n+
    317 const This dofVectorPointer( dofVector );
    \n+
    318 typename Restriction::Patch patch( list, n );
    \n+
    319 Restriction::restrictVector( dofVectorPointer, patch );
    \n+
    320 }
    \n+
    321 };
    \n+
    322
    \n+
    323
    \n+
    324
    \n+
    325 // Auxiliary Functions
    \n+
    326 // --------------------
    \n+
    327
    \n+
    328 inline void abs ( const DofVectorPointer< int > &dofVector )
    \n+
    329 {
    \n+
    330 assert( !dofVector == false );
    \n+
    331 int *array = (int *)dofVector;
    \n+
    332 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
    \n+
    333 array[ dof ] = std::abs( array[ dof ] ) );
    \n+
    334 }
    \n+
    335
    \n+
    336
    \n+
    337 inline int max ( const DofVectorPointer< int > &dofVector )
    \n+
    338 {
    \n+
    339 assert( !dofVector == false );
    \n+
    340 int *array = (int *)dofVector;
    \n+
    341 int result = std::numeric_limits< int >::min();
    \n+
    342 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
    \n+
    343 result = std::max( result, array[ dof ] ) );
    \n+
    344 return result;
    \n+
    345 }
    \n+
    346
    \n+
    347
    \n+
    348 inline int min ( const DofVectorPointer< int > &dofVector )
    \n+
    349 {
    \n+
    350 assert( !dofVector == false );
    \n+
    351 int *array = (int *)dofVector;
    \n+
    352 int result = std::numeric_limits< int >::max();
    \n+
    353 FOR_ALL_DOFS( dofVector.dofSpace()->admin,
    \n+
    354 result = std::min( result, array[ dof ] ) );
    \n+
    355 return result;
    \n+
    356 }
    \n+
    357
    \n+
    358 } // namespace Alberta
    \n+
    359
    \n+
    360} // namespace Dune
    \n+
    361
    \n+
    362#endif // #if HAVE_ALBERTA
    \n+
    363
    \n+
    364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
    \n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    static const int InteriorBoundary
    Definition: misc.hh:59
    \n+
    ALBERTA MESH Mesh
    Definition: misc.hh:53
    \n+
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n+
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n+
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n+
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n+
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n-
    @ vertex
    Definition: common.hh:133
    \n-
    Definition: macroelement.hh:24
    \n-
    bool isBoundary(const int face) const
    Definition: macroelement.hh:42
    \n-
    const MacroElement< dim > * neighbor(const int face) const
    Definition: macroelement.hh:56
    \n-
    int boundaryId(const int face) const
    Definition: macroelement.hh:49
    \n-
    const GlobalVector & coordinate(const int vertex) const
    Definition: macroelement.hh:34
    \n+
    Definition: meshpointer.hh:40
    \n+
    Definition: dofvector.hh:35
    \n+
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:42
    \n+
    ALBERTA DOF_INT_VEC DofVector
    Definition: dofvector.hh:40
    \n+
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:57
    \n+
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:47
    \n+
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:52
    \n+
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:84
    \n+
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:74
    \n+
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:69
    \n+
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:79
    \n+
    ALBERTA DOF_SCHAR_VEC DofVector
    Definition: dofvector.hh:67
    \n+
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:101
    \n+
    ALBERTA DOF_UCHAR_VEC DofVector
    Definition: dofvector.hh:94
    \n+
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:106
    \n+
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:96
    \n+
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:111
    \n+
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:123
    \n+
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:133
    \n+
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:128
    \n+
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:138
    \n+
    ALBERTA DOF_REAL_VEC DofVector
    Definition: dofvector.hh:121
    \n+
    ALBERTA DOF_REAL_D_VEC DofVector
    Definition: dofvector.hh:148
    \n+
    static void free(DofVector *dofVector)
    Definition: dofvector.hh:155
    \n+
    static bool write(const DofVector *dofVector, const std::string &filename)
    Definition: dofvector.hh:165
    \n+
    static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace *dofSpace)
    Definition: dofvector.hh:160
    \n+
    static DofVector * get(const DofSpace *dofSpace, const std::string &name)
    Definition: dofvector.hh:150
    \n+
    Definition: dofvector.hh:179
    \n+
    DofVectorProvider::DofVector DofVector
    Definition: dofvector.hh:185
    \n+
    void setupInterpolation()
    Definition: dofvector.hh:292
    \n+
    void initialize(const Dof &value)
    Definition: dofvector.hh:270
    \n+
    void read(const std::string &filename, const MeshPointer< dim > &meshPointer)
    Definition: dofvector.hh:243
    \n+
    void create(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:236
    \n+
    void release()
    Definition: dofvector.hh:254
    \n+
    AdaptationData * getAdaptationData() const
    Definition: dofvector.hh:277
    \n+
    void setupRestriction()
    Definition: dofvector.hh:299
    \n+
    DofVectorPointer()
    Definition: dofvector.hh:193
    \n+
    void setAdaptationData(AdaptationData *adaptationData)
    Definition: dofvector.hh:285
    \n+
    bool write(const std::string &filename) const
    Definition: dofvector.hh:249
    \n+
    DofVectorPointer(DofVector *dofVector)
    Definition: dofvector.hh:202
    \n+
    const DofSpace * dofSpace() const
    Definition: dofvector.hh:223
    \n+
    static const bool supportsAdaptationData
    Definition: dofvector.hh:187
    \n+
    std::string name() const
    Definition: dofvector.hh:228
    \n+
    void forEach(Functor &functor) const
    Definition: dofvector.hh:264
    \n+
    DofVectorPointer(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:197
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,113 +5,565 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-macroelement.hh\n+dofvector.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_MACROELEMENT_HH\n- 6#define DUNE_ALBERTA_MACROELEMENT_HH\n+ 5#ifndef DUNE_ALBERTA_DOFVECTOR_HH\n+ 6#define DUNE_ALBERTA_DOFVECTOR_HH\n 7\n- 8#include \n- 9\n- 10#if HAVE_ALBERTA\n- 11\n- 12namespace Dune\n- 13{\n+ 8#include \n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13#include \n 14\n- 15 namespace Alberta\n- 16 {\n- 17\n- 18 // MacroElement\n- 19 // ------------\n- 20\n- 21 template< int dim >\n-22 struct MacroElement\n- 23 : public ALBERTA MACRO_EL\n- 24 {\n- 25 const GlobalVector &coordinate ( const int vertex ) const;\n- 26\n- 27 int boundaryId ( const int face ) const;\n- 28 bool isBoundary ( const int face ) const;\n- 29 const MacroElement<_dim_> *neighbor ( const int face ) const;\n- 30 };\n- 31\n- 32\n- 33 template< int dim >\n-34 inline const GlobalVector &MacroElement<_dim_>::coordinate ( const int\n-vertex ) const\n- 35 {\n- 36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) );\n- 37 return *coord[ vertex ];\n- 38 }\n- 39\n- 40\n- 41 template< int dim >\n-42 inline bool MacroElement<_dim_>::isBoundary ( const int face ) const\n+ 15#if HAVE_ALBERTA\n+ 16\n+ 17namespace Dune\n+ 18{\n+ 19\n+ 20 namespace Alberta\n+ 21 {\n+ 22\n+ 23 // External Forward Declarations\n+ 24 // -----------------------------\n+ 25\n+ 26 template< int dim >\n+ 27 class MeshPointer;\n+ 28\n+ 29\n+ 30\n+ 31 // DofVectorProvider\n+ 32 // -----------------\n+ 33\n+ 34 template< class Dof >\n+35 struct DofVectorProvider;\n+ 36\n+ 37 template<>\n+38 struct DofVectorProvider< int >\n+ 39 {\n+40 typedef ALBERTA DOF_INT_VEC DofVector;\n+ 41\n+42 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n 43 {\n- 44 return (boundaryId( face ) != InteriorBoundary);\n+ 44 return ALBERTA get_dof_int_vec( name.c_str(), dofSpace );\n 45 }\n 46\n- 47\n- 48 template< int dim >\n-49 inline int MacroElement<_dim_>::boundaryId ( const int face ) const\n- 50 {\n- 51 return wall_bound[ face ];\n- 52 }\n- 53\n- 54\n- 55 template< int dim >\n-56 const MacroElement<_dim_> *MacroElement<_dim_>::neighbor ( const int face )\n-const\n- 57 {\n- 58 assert( (face >= 0) && (face < N_NEIGH_MAX) );\n- 59 return static_cast< const MacroElement * >( neigh[ face ] );\n- 60 }\n- 61\n- 62 }\n+47 static void free ( DofVector *dofVector )\n+ 48 {\n+ 49 ALBERTA free_dof_int_vec( dofVector );\n+ 50 }\n+ 51\n+52 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace )\n+ 53 {\n+ 54 return ALBERTA read_dof_int_vec_xdr( filename.c_str(), mesh, dofSpace );\n+ 55 }\n+ 56\n+57 static bool write ( const DofVector *dofVector, const std::string &filename\n+)\n+ 58 {\n+ 59 int success = ALBERTA write_dof_int_vec_xdr( dofVector, filename.c_str() );\n+ 60 return (success == 0);\n+ 61 }\n+ 62 };\n 63\n- 64}\n- 65\n- 66#endif // #if HAVE_ALBERTA\n- 67\n- 68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH\n+ 64 template<>\n+65 struct DofVectorProvider< signed char >\n+ 66 {\n+67 typedef ALBERTA DOF_SCHAR_VEC DofVector;\n+ 68\n+69 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n+ 70 {\n+ 71 return ALBERTA get_dof_schar_vec( name.c_str(), dofSpace );\n+ 72 }\n+ 73\n+74 static void free ( DofVector *dofVector )\n+ 75 {\n+ 76 ALBERTA free_dof_schar_vec( dofVector );\n+ 77 }\n+ 78\n+79 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace )\n+ 80 {\n+ 81 return ALBERTA read_dof_schar_vec_xdr( filename.c_str(), mesh, dofSpace );\n+ 82 }\n+ 83\n+84 static bool write ( const DofVector *dofVector, const std::string &filename\n+)\n+ 85 {\n+ 86 int success = ALBERTA write_dof_schar_vec_xdr( dofVector, filename.c_str()\n+);\n+ 87 return (success == 0);\n+ 88 }\n+ 89 };\n+ 90\n+ 91 template<>\n+92 struct DofVectorProvider< unsigned char >\n+ 93 {\n+94 typedef ALBERTA DOF_UCHAR_VEC DofVector;\n+ 95\n+96 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n+ 97 {\n+ 98 return ALBERTA get_dof_uchar_vec( name.c_str(), dofSpace );\n+ 99 }\n+ 100\n+101 static void free ( DofVector *dofVector )\n+ 102 {\n+ 103 ALBERTA free_dof_uchar_vec( dofVector );\n+ 104 }\n+ 105\n+106 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace )\n+ 107 {\n+ 108 return ALBERTA read_dof_uchar_vec_xdr( filename.c_str(), mesh, dofSpace );\n+ 109 }\n+ 110\n+111 static bool write ( const DofVector *dofVector, const std::string &filename\n+)\n+ 112 {\n+ 113 int success = ALBERTA write_dof_uchar_vec_xdr( dofVector, filename.c_str()\n+);\n+ 114 return (success == 0);\n+ 115 }\n+ 116 };\n+ 117\n+ 118 template<>\n+119 struct DofVectorProvider< Real >\n+ 120 {\n+121 typedef ALBERTA DOF_REAL_VEC DofVector;\n+ 122\n+123 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n+ 124 {\n+ 125 return ALBERTA get_dof_real_vec( name.c_str(), dofSpace );\n+ 126 }\n+ 127\n+128 static void free ( DofVector *dofVector )\n+ 129 {\n+ 130 ALBERTA free_dof_real_vec( dofVector );\n+ 131 }\n+ 132\n+133 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace )\n+ 134 {\n+ 135 return ALBERTA read_dof_real_vec_xdr( filename.c_str(), mesh, dofSpace );\n+ 136 }\n+ 137\n+138 static bool write ( const DofVector *dofVector, const std::string &filename\n+)\n+ 139 {\n+ 140 int success = ALBERTA write_dof_real_vec_xdr( dofVector, filename.c_str()\n+);\n+ 141 return (success == 0);\n+ 142 }\n+ 143 };\n+ 144\n+ 145 template<>\n+146 struct DofVectorProvider< GlobalVector >\n+ 147 {\n+148 typedef ALBERTA DOF_REAL_D_VEC DofVector;\n+ 149\n+150 static DofVector *get ( const DofSpace *dofSpace, const std::string &name )\n+ 151 {\n+ 152 return ALBERTA get_dof_real_d_vec( name.c_str(), dofSpace );\n+ 153 }\n+ 154\n+155 static void free ( DofVector *dofVector )\n+ 156 {\n+ 157 ALBERTA free_dof_real_d_vec( dofVector );\n+ 158 }\n+ 159\n+160 static DofVector *read ( const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace )\n+ 161 {\n+ 162 return ALBERTA read_dof_real_d_vec_xdr( filename.c_str(), mesh, dofSpace\n+);\n+ 163 }\n+ 164\n+165 static bool write ( const DofVector *dofVector, const std::string &filename\n+)\n+ 166 {\n+ 167 int success = ALBERTA write_dof_real_d_vec_xdr( dofVector, filename.c_str\n+() );\n+ 168 return (success == 0);\n+ 169 }\n+ 170 };\n+ 171\n+ 172\n+ 173\n+ 174 // DofVectorPointer\n+ 175 // ----------------\n+ 176\n+ 177 template< class Dof >\n+178 class DofVectorPointer\n+ 179 {\n+ 180 typedef DofVectorPointer<_Dof_> This;\n+ 181\n+ 182 typedef Alberta::DofVectorProvider<_Dof_> DofVectorProvider;\n+ 183\n+ 184 public:\n+185 typedef typename DofVectorProvider::DofVector DofVector;\n+ 186\n+187 static const bool supportsAdaptationData = true;\n+ 188\n+ 189 private:\n+ 190 DofVector *dofVector_;\n+ 191\n+ 192 public:\n+193 DofVectorPointer ()\n+ 194 : dofVector_( NULL )\n+ 195 {}\n+ 196\n+197 explicit DofVectorPointer ( const DofSpace *dofSpace,\n+ 198 const std::string &name = \"\" )\n+ 199 : dofVector_ ( DofVectorProvider::get( dofSpace, name ) )\n+ 200 {}\n+ 201\n+202 explicit DofVectorPointer ( DofVector *dofVector )\n+ 203 : dofVector_( dofVector )\n+ 204 {}\n+ 205\n+206 explicit operator bool () const\n+ 207 {\n+ 208 return (bool)dofVector_;\n+ 209 }\n+ 210\n+211 operator DofVector * () const\n+ 212 {\n+ 213 return dofVector_;\n+ 214 }\n+ 215\n+216 operator Dof * () const\n+ 217 {\n+ 218 Dof *ptr = NULL;\n+ 219 GET_DOF_VEC( ptr, dofVector_ );\n+ 220 return ptr;\n+ 221 }\n+ 222\n+223 const DofSpace *dofSpace () const\n+ 224 {\n+ 225 return dofVector_->fe_space;\n+ 226 }\n+ 227\n+228 std::string name () const\n+ 229 {\n+ 230 if( dofVector_ )\n+ 231 return dofVector_->name;\n+ 232 else\n+ 233 return std::string();\n+ 234 }\n+ 235\n+236 void create ( const DofSpace *dofSpace, const std::string &name = \"\" )\n+ 237 {\n+ 238 release();\n+ 239 dofVector_ = DofVectorProvider::get( dofSpace, name );\n+ 240 }\n+ 241\n+ 242 template< int dim >\n+243 void read ( const std::string &filename, const MeshPointer<_dim_>\n+&meshPointer )\n+ 244 {\n+ 245 release();\n+ 246 dofVector_ = DofVectorProvider::read( filename, meshPointer, NULL );\n+ 247 }\n+ 248\n+249 bool write ( const std::string &filename ) const\n+ 250 {\n+ 251 return DofVectorProvider::write( dofVector_, filename );\n+ 252 }\n+ 253\n+254 void release ()\n+ 255 {\n+ 256 if( dofVector_ )\n+ 257 {\n+ 258 DofVectorProvider::free( dofVector_ );\n+ 259 dofVector_ = NULL;\n+ 260 }\n+ 261 }\n+ 262\n+ 263 template< class Functor >\n+264 void forEach ( Functor &functor ) const\n+ 265 {\n+ 266 Dof *array = (Dof *)(*this);\n+ 267 FOR_ALL_DOFS( dofSpace()->admin, functor( array[ dof ] ) );\n+ 268 }\n+ 269\n+270 void initialize ( const Dof &value )\n+ 271 {\n+ 272 Dof *array = (Dof *)(*this);\n+ 273 FOR_ALL_DOFS( dofSpace()->admin, array[ dof ] = value );\n+ 274 }\n+ 275\n+ 276 template< class AdaptationData >\n+277 AdaptationData *getAdaptationData () const\n+ 278 {\n+ 279 assert( dofVector_ );\n+ 280 assert( dofVector_->user_data );\n+ 281 return static_cast< AdaptationData * >( dofVector_->user_data );\n+ 282 }\n+ 283\n+ 284 template< class AdaptationData >\n+285 void setAdaptationData ( AdaptationData *adaptationData )\n+ 286 {\n+ 287 assert( dofVector_ );\n+ 288 dofVector_->user_data = adaptationData;\n+ 289 }\n+ 290\n+ 291 template< class Interpolation >\n+292 void setupInterpolation ()\n+ 293 {\n+ 294 assert( dofVector_ );\n+ 295 dofVector_->refine_interpol = &refineInterpolate< Interpolation >;\n+ 296 }\n+ 297\n+ 298 template< class Restriction >\n+299 void setupRestriction ()\n+ 300 {\n+ 301 assert( dofVector_ );\n+ 302 dofVector_->coarse_restrict = &coarsenRestrict< Restriction >;\n+ 303 }\n+ 304\n+ 305 private:\n+ 306 template< class Interpolation >\n+ 307 static void refineInterpolate ( DofVector *dofVector, RC_LIST_EL *list,\n+int n )\n+ 308 {\n+ 309 const This dofVectorPointer( dofVector );\n+ 310 typename Interpolation::Patch patch( list, n );\n+ 311 Interpolation::interpolateVector( dofVectorPointer, patch );\n+ 312 }\n+ 313\n+ 314 template< class Restriction >\n+ 315 static void coarsenRestrict ( DofVector *dofVector, RC_LIST_EL *list, int\n+n )\n+ 316 {\n+ 317 const This dofVectorPointer( dofVector );\n+ 318 typename Restriction::Patch patch( list, n );\n+ 319 Restriction::restrictVector( dofVectorPointer, patch );\n+ 320 }\n+ 321 };\n+ 322\n+ 323\n+ 324\n+ 325 // Auxiliary Functions\n+ 326 // --------------------\n+ 327\n+328 inline void abs ( const DofVectorPointer<_int_> &dofVector )\n+ 329 {\n+ 330 assert( !dofVector == false );\n+ 331 int *array = (int *)dofVector;\n+ 332 FOR_ALL_DOFS( dofVector.dofSpace()->admin,\n+ 333 array[ dof ] = std::abs( array[ dof ] ) );\n+ 334 }\n+ 335\n+ 336\n+337 inline int max ( const DofVectorPointer<_int_> &dofVector )\n+ 338 {\n+ 339 assert( !dofVector == false );\n+ 340 int *array = (int *)dofVector;\n+ 341 int result = std::numeric_limits<_int_>::min();\n+ 342 FOR_ALL_DOFS( dofVector.dofSpace()->admin,\n+ 343 result = std::max( result, array[ dof ] ) );\n+ 344 return result;\n+ 345 }\n+ 346\n+ 347\n+348 inline int min ( const DofVectorPointer<_int_> &dofVector )\n+ 349 {\n+ 350 assert( !dofVector == false );\n+ 351 int *array = (int *)dofVector;\n+ 352 int result = std::numeric_limits<_int_>::max();\n+ 353 FOR_ALL_DOFS( dofVector.dofSpace()->admin,\n+ 354 result = std::min( result, array[ dof ] ) );\n+ 355 return result;\n+ 356 }\n+ 357\n+ 358 } // namespace Alberta\n+ 359\n+ 360} // namespace Dune\n+ 361\n+ 362#endif // #if HAVE_ALBERTA\n+ 363\n+ 364#endif // #ifndef DUNE_ALBERTA_DOFVECTOR_HH\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n+refinement.hh\n+provides a wrapper for ALBERTA's refinement patches and the corners for\n+geometryInFather\n misc.hh\n ALBERTA\n #define ALBERTA\n Definition: albertaheader.hh:29\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::InteriorBoundary\n-static const int InteriorBoundary\n-Definition: misc.hh:59\n+Dune::Alberta::Mesh\n+ALBERTA MESH Mesh\n+Definition: misc.hh:53\n+Dune::Alberta::abs\n+void abs(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:328\n+Dune::Alberta::Real\n+ALBERTA REAL Real\n+Definition: misc.hh:48\n+Dune::Alberta::DofSpace\n+ALBERTA FE_SPACE DofSpace\n+Definition: misc.hh:65\n+Dune::Alberta::min\n+int min(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:348\n+Dune::Alberta::max\n+int max(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:337\n Dune::Alberta::GlobalVector\n ALBERTA REAL_D GlobalVector\n Definition: misc.hh:50\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n-Dune::Alberta::MacroElement\n-Definition: macroelement.hh:24\n-Dune::Alberta::MacroElement::isBoundary\n-bool isBoundary(const int face) const\n-Definition: macroelement.hh:42\n-Dune::Alberta::MacroElement::neighbor\n-const MacroElement< dim > * neighbor(const int face) const\n-Definition: macroelement.hh:56\n-Dune::Alberta::MacroElement::boundaryId\n-int boundaryId(const int face) const\n-Definition: macroelement.hh:49\n-Dune::Alberta::MacroElement::coordinate\n-const GlobalVector & coordinate(const int vertex) const\n-Definition: macroelement.hh:34\n+Dune::Alberta::MeshPointer\n+Definition: meshpointer.hh:40\n+Dune::Alberta::DofVectorProvider\n+Definition: dofvector.hh:35\n+Dune::Alberta::DofVectorProvider<_int_>::get\n+static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n+Definition: dofvector.hh:42\n+Dune::Alberta::DofVectorProvider<_int_>::DofVector\n+ALBERTA DOF_INT_VEC DofVector\n+Definition: dofvector.hh:40\n+Dune::Alberta::DofVectorProvider<_int_>::write\n+static bool write(const DofVector *dofVector, const std::string &filename)\n+Definition: dofvector.hh:57\n+Dune::Alberta::DofVectorProvider<_int_>::free\n+static void free(DofVector *dofVector)\n+Definition: dofvector.hh:47\n+Dune::Alberta::DofVectorProvider<_int_>::read\n+static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace)\n+Definition: dofvector.hh:52\n+Dune::Alberta::DofVectorProvider<_signed_char_>::write\n+static bool write(const DofVector *dofVector, const std::string &filename)\n+Definition: dofvector.hh:84\n+Dune::Alberta::DofVectorProvider<_signed_char_>::free\n+static void free(DofVector *dofVector)\n+Definition: dofvector.hh:74\n+Dune::Alberta::DofVectorProvider<_signed_char_>::get\n+static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n+Definition: dofvector.hh:69\n+Dune::Alberta::DofVectorProvider<_signed_char_>::read\n+static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace)\n+Definition: dofvector.hh:79\n+Dune::Alberta::DofVectorProvider<_signed_char_>::DofVector\n+ALBERTA DOF_SCHAR_VEC DofVector\n+Definition: dofvector.hh:67\n+Dune::Alberta::DofVectorProvider<_unsigned_char_>::free\n+static void free(DofVector *dofVector)\n+Definition: dofvector.hh:101\n+Dune::Alberta::DofVectorProvider<_unsigned_char_>::DofVector\n+ALBERTA DOF_UCHAR_VEC DofVector\n+Definition: dofvector.hh:94\n+Dune::Alberta::DofVectorProvider<_unsigned_char_>::read\n+static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace)\n+Definition: dofvector.hh:106\n+Dune::Alberta::DofVectorProvider<_unsigned_char_>::get\n+static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n+Definition: dofvector.hh:96\n+Dune::Alberta::DofVectorProvider<_unsigned_char_>::write\n+static bool write(const DofVector *dofVector, const std::string &filename)\n+Definition: dofvector.hh:111\n+Dune::Alberta::DofVectorProvider<_Real_>::get\n+static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n+Definition: dofvector.hh:123\n+Dune::Alberta::DofVectorProvider<_Real_>::read\n+static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace)\n+Definition: dofvector.hh:133\n+Dune::Alberta::DofVectorProvider<_Real_>::free\n+static void free(DofVector *dofVector)\n+Definition: dofvector.hh:128\n+Dune::Alberta::DofVectorProvider<_Real_>::write\n+static bool write(const DofVector *dofVector, const std::string &filename)\n+Definition: dofvector.hh:138\n+Dune::Alberta::DofVectorProvider<_Real_>::DofVector\n+ALBERTA DOF_REAL_VEC DofVector\n+Definition: dofvector.hh:121\n+Dune::Alberta::DofVectorProvider<_GlobalVector_>::DofVector\n+ALBERTA DOF_REAL_D_VEC DofVector\n+Definition: dofvector.hh:148\n+Dune::Alberta::DofVectorProvider<_GlobalVector_>::free\n+static void free(DofVector *dofVector)\n+Definition: dofvector.hh:155\n+Dune::Alberta::DofVectorProvider<_GlobalVector_>::write\n+static bool write(const DofVector *dofVector, const std::string &filename)\n+Definition: dofvector.hh:165\n+Dune::Alberta::DofVectorProvider<_GlobalVector_>::read\n+static DofVector * read(const std::string &filename, Mesh *mesh, DofSpace\n+*dofSpace)\n+Definition: dofvector.hh:160\n+Dune::Alberta::DofVectorProvider<_GlobalVector_>::get\n+static DofVector * get(const DofSpace *dofSpace, const std::string &name)\n+Definition: dofvector.hh:150\n+Dune::Alberta::DofVectorPointer\n+Definition: dofvector.hh:179\n+Dune::Alberta::DofVectorPointer::DofVector\n+DofVectorProvider::DofVector DofVector\n+Definition: dofvector.hh:185\n+Dune::Alberta::DofVectorPointer::setupInterpolation\n+void setupInterpolation()\n+Definition: dofvector.hh:292\n+Dune::Alberta::DofVectorPointer::initialize\n+void initialize(const Dof &value)\n+Definition: dofvector.hh:270\n+Dune::Alberta::DofVectorPointer::read\n+void read(const std::string &filename, const MeshPointer< dim > &meshPointer)\n+Definition: dofvector.hh:243\n+Dune::Alberta::DofVectorPointer::create\n+void create(const DofSpace *dofSpace, const std::string &name=\"\")\n+Definition: dofvector.hh:236\n+Dune::Alberta::DofVectorPointer::release\n+void release()\n+Definition: dofvector.hh:254\n+Dune::Alberta::DofVectorPointer::getAdaptationData\n+AdaptationData * getAdaptationData() const\n+Definition: dofvector.hh:277\n+Dune::Alberta::DofVectorPointer::setupRestriction\n+void setupRestriction()\n+Definition: dofvector.hh:299\n+Dune::Alberta::DofVectorPointer::DofVectorPointer\n+DofVectorPointer()\n+Definition: dofvector.hh:193\n+Dune::Alberta::DofVectorPointer::setAdaptationData\n+void setAdaptationData(AdaptationData *adaptationData)\n+Definition: dofvector.hh:285\n+Dune::Alberta::DofVectorPointer::write\n+bool write(const std::string &filename) const\n+Definition: dofvector.hh:249\n+Dune::Alberta::DofVectorPointer::DofVectorPointer\n+DofVectorPointer(DofVector *dofVector)\n+Definition: dofvector.hh:202\n+Dune::Alberta::DofVectorPointer::dofSpace\n+const DofSpace * dofSpace() const\n+Definition: dofvector.hh:223\n+Dune::Alberta::DofVectorPointer::supportsAdaptationData\n+static const bool supportsAdaptationData\n+Definition: dofvector.hh:187\n+Dune::Alberta::DofVectorPointer::name\n+std::string name() const\n+Definition: dofvector.hh:228\n+Dune::Alberta::DofVectorPointer::forEach\n+void forEach(Functor &functor) const\n+Definition: dofvector.hh:264\n+Dune::Alberta::DofVectorPointer::DofVectorPointer\n+DofVectorPointer(const DofSpace *dofSpace, const std::string &name=\"\")\n+Definition: dofvector.hh:197\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00656.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00656.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: intersection.cc File Reference\n+dune-grid: level.hh File Reference\n \n \n \n \n \n \n \n@@ -64,54 +64,43 @@\n \n \n \n
    \n \n-
    intersection.cc File Reference
    \n+Namespaces
    \n+
    level.hh File Reference
    \n \n
    \n-\n+
    #include <cassert>
    \n+#include <cstdlib>
    \n+#include <dune/grid/albertagrid/meshpointer.hh>
    \n+#include <dune/grid/albertagrid/dofadmin.hh>
    \n+#include <dune/grid/albertagrid/dofvector.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n+
    \n \n-\n+\n+\n+\n \n-\n+\n+\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n

    \n-Macros

    #define DUNE_ALBERTA_INTERSECTION_CC
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DUNE_ALBERTA_INTERSECTION_CC

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define DUNE_ALBERTA_INTERSECTION_CC
    \n-
    \n-\n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,29 +5,31 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces | Macros\n-intersection.cc File Reference\n-#include \n+Classes | Namespaces\n+level.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::AlbertaGridIntersectionBase<_Grid_>::GlobalCoordReader<_GridImp\n- >\n+ class \u00a0Dune::AlbertaGridLevelProvider<_dim_>\n \u00a0\n-struct \u00a0Dune::AlbertaGridIntersectionBase<_Grid_>::LocalCoordReader<_GridImp_>\n+ class \u00a0Dune::AlbertaGridLevelProvider<_dim_>::SetLocal\n+\u00a0\n+ class \u00a0Dune::AlbertaGridLevelProvider<_dim_>::CalcMaxLevel\n+\u00a0\n+struct \u00a0Dune::AlbertaGridLevelProvider<_dim_>::Interpolation\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n- Macros\n-#define\u00a0DUNE_ALBERTA_INTERSECTION_CC\n-\u00a0\n-***** Macro Definition Documentation *****\n-***** \u25c6\u00a0DUNE_ALBERTA_INTERSECTION_CC *****\n-#define DUNE_ALBERTA_INTERSECTION_CC\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00659.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00659.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: indexsets.cc File Reference\n+dune-grid: geometry.cc File Reference\n \n \n \n \n \n \n \n@@ -63,28 +63,57 @@\n \n \n
    \n \n-
    indexsets.cc File Reference
    \n+Classes |\n+Namespaces |\n+Macros
    \n+
    geometry.cc File Reference
    \n \n
    \n-
    #include <config.h>
    \n-#include <dune/grid/albertagrid/indexsets.hh>
    \n-#include <dune/grid/albertagrid/agrid.hh>
    \n+\n+\n+\n+\n+\n+\n+

    \n+Classes

    struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::GeoInFatherCoordReader< Grid >
     
    struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::FaceCoordReader< Grid >
     
    \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n

    \n+Macros

    #define DUNE_ALBERTA_GEOMETRY_CC
     
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DUNE_ALBERTA_GEOMETRY_CC

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DUNE_ALBERTA_GEOMETRY_CC
    \n+
    \n+\n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,19 +5,32 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Namespaces\n-indexsets.cc File Reference\n-#include \n-#include \n-#include \n+Classes | Namespaces | Macros\n+geometry.cc File Reference\n+#include \n+#include \n+#include \n+ Classes\n+struct \u00a0Dune::AlbertaGridLocalGeometryProvider<_Grid_>::\n+ GeoInFatherCoordReader<_Grid_>\n+\u00a0\n+struct \u00a0Dune::AlbertaGridLocalGeometryProvider<_Grid_>::FaceCoordReader<_Grid\n+ >\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+ Macros\n+#define\u00a0DUNE_ALBERTA_GEOMETRY_CC\n+\u00a0\n+***** Macro Definition Documentation *****\n+***** \u25c6\u00a0DUNE_ALBERTA_GEOMETRY_CC *****\n+#define DUNE_ALBERTA_GEOMETRY_CC\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00662.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00662.html", "unified_diff": "@@ -73,17 +73,17 @@\n
    \n
    \n \n

    provides a wrapper for ALBERTA's macro_data structure \n More...

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

    Go to the source code of this file.

    \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00662_source.html", "unified_diff": "@@ -75,32 +75,32 @@\n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_MACRODATA_HH
    \n
    6#define DUNE_ALBERTA_MACRODATA_HH
    \n
    7
    \n
    13#include <dune/common/fvector.hh>
    \n
    14#include <dune/common/fmatrix.hh>
    \n
    15
    \n-\n-\n-\n+\n+\n+\n
    19
    \n
    20#if HAVE_ALBERTA
    \n
    21
    \n
    22namespace Dune
    \n
    23{
    \n
    24
    \n
    25 namespace Alberta
    \n
    26 {
    \n
    27
    \n
    28 template< int dim >
    \n \n
    30 {
    \n
    31 typedef MacroData< dim > This;
    \n
    32
    \n-
    33 typedef ALBERTA MACRO_DATA Data;
    \n+
    33 typedef ALBERTA MACRO_DATA Data;
    \n
    34
    \n
    35 static const int dimension = dim;
    \n
    36 static const int numVertices = NumSubEntities< dimension, dimension >::value;
    \n
    37 static const int numEdges = NumSubEntities< dimension, dimension-1 >::value;
    \n
    38
    \n
    39 static const int initialSize = 4096;
    \n
    40
    \n@@ -151,15 +151,15 @@\n
    113
    \n
    124 bool checkNeighbors () const;
    \n
    125
    \n
    127 void release ()
    \n
    128 {
    \n
    129 if( data_ != NULL )
    \n
    130 {
    \n-
    131 ALBERTA free_macro_data( data_ );
    \n+
    131 ALBERTA free_macro_data( data_ );
    \n
    132 data_ = NULL;
    \n
    133 }
    \n
    134 vertexCount_ = elementCount_ = -1;
    \n
    135 }
    \n
    136
    \n
    142 int insertElement ( const ElementId &id );
    \n
    143
    \n@@ -188,17 +188,17 @@\n
    176 void checkCycles ();
    \n
    177
    \n
    178 void read ( const std::string &filename, bool binary = false );
    \n
    179
    \n
    180 bool write ( const std::string &filename, bool binary = false ) const
    \n
    181 {
    \n
    182 if( binary )
    \n-
    183 return ALBERTA write_macro_data_xdr( data_, filename.c_str() );
    \n+
    183 return ALBERTA write_macro_data_xdr( data_, filename.c_str() );
    \n
    184 else
    \n-
    185 return ALBERTA write_macro_data( data_, filename.c_str() );
    \n+
    185 return ALBERTA write_macro_data( data_, filename.c_str() );
    \n
    186 }
    \n
    187
    \n
    188 private:
    \n
    189 template< class Vector >
    \n
    190 void copy ( const Vector &x, GlobalVector &y )
    \n
    191 {
    \n
    192 for( int i = 0; i < dimWorld; ++i )
    \n@@ -289,15 +289,15 @@\n
    277 }
    \n
    278
    \n
    279
    \n
    280 template< int dim >
    \n \n
    282 {
    \n
    283 release();
    \n-
    284 data_ = ALBERTA alloc_macro_data( dim, initialSize, initialSize );
    \n+
    284 data_ = ALBERTA alloc_macro_data( dim, initialSize, initialSize );
    \n
    285 data_->boundary = memAlloc< BoundaryId >( initialSize*numVertices );
    \n
    286 if( dim == 3 )
    \n
    287 data_->el_type = memAlloc< ElementType >( initialSize );
    \n
    288 vertexCount_ = elementCount_ = 0;
    \n
    289 elementCount_ = 0;
    \n
    290 }
    \n
    291
    \n@@ -305,15 +305,15 @@\n
    293 template< int dim >
    \n \n
    295 {
    \n
    296 if( (vertexCount_ >= 0) && (elementCount_ >= 0) )
    \n
    297 {
    \n
    298 resizeVertices( vertexCount_ );
    \n
    299 resizeElements( elementCount_ );
    \n-
    300 ALBERTA compute_neigh_fast( data_ );
    \n+
    300 ALBERTA compute_neigh_fast( data_ );
    \n
    301
    \n
    302 // assign default boundary id (if none is assigned)
    \n
    303 for( int element = 0; element < elementCount_; ++element )
    \n
    304 {
    \n
    305 for( int i = 0; i < numVertices; ++i )
    \n
    306 {
    \n
    307 BoundaryId &id = boundaryId( element, i );
    \n@@ -413,26 +413,26 @@\n
    401
    \n
    402
    \n
    403 template< int dim >
    \n \n
    405 {
    \n
    406 // ensure that the macro data has been finalized
    \n
    407 finalize();
    \n-
    408 ALBERTA macro_test( data_, NULL );
    \n+
    408 ALBERTA macro_test( data_, NULL );
    \n
    409 }
    \n
    410
    \n
    411
    \n
    412 template< int dim >
    \n
    413 inline void MacroData< dim >::read ( const std::string &filename, bool binary )
    \n
    414 {
    \n
    415 release();
    \n
    416 if( binary )
    \n-
    417 data_ = ALBERTA read_macro_xdr( filename.c_str() );
    \n+
    417 data_ = ALBERTA read_macro_xdr( filename.c_str() );
    \n
    418 else
    \n-
    419 data_ = ALBERTA read_macro( filename.c_str() );
    \n+
    419 data_ = ALBERTA read_macro( filename.c_str() );
    \n
    420 }
    \n
    421
    \n
    422
    \n
    423 template< int dim >
    \n
    424 inline void MacroData< dim >::resizeElements ( const int newSize )
    \n
    425 {
    \n
    426 const int oldSize = data_->n_macro_elements;
    \n@@ -447,18 +447,18 @@\n
    435 }
    \n
    436
    \n
    437}
    \n
    438
    \n
    439#endif // #if HAVE_ALBERTA
    \n
    440
    \n
    441#endif
    \n-\n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-\n+\n+\n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    ALBERTA REAL_DD GlobalMatrix
    Definition: misc.hh:51
    \n
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n
    ALBERTA BNDRY_TYPE BoundaryId
    Definition: misc.hh:61
    \n
    static const int InteriorBoundary
    Definition: misc.hh:59
    \n
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -400,19 +400,19 @@\n 436\n 437}\n 438\n 439#endif // #if HAVE_ALBERTA\n 440\n 441#endif\n misc.hh\n+algebra.hh\n albertaheader.hh\n ALBERTA\n #define ALBERTA\n Definition: albertaheader.hh:29\n-algebra.hh\n std::swap\n void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n > &b)\n Definition: utility/persistentcontainer.hh:83\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00665.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00665.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: leveliterator.hh File Reference\n+dune-grid: undefine-3.0.hh File Reference\n \n \n \n \n \n \n \n@@ -62,38 +62,25 @@\n \n \n \n
    \n- \n-
    leveliterator.hh File Reference
    \n+
    undefine-3.0.hh File Reference
    \n
    \n
    \n-\n+\n+

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

    \n+\n

    Go to the source code of this file.

    \n-

    \n Classes

    class  Dune::Alberta::MacroData< dim >
     
    \n-\n-\n-\n-\n-\n-

    \n-Classes

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

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    Contains #undefs for all preprocessor macros defined by alberta.

    \n+

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

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

    Go to the source code of this file.

    \n \n \n-\n+\n \n

    \n Classes

    class  Dune::AlbertaReader< Grid >
    struct  Dune::Alberta::MacroElement< dim >
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,23 +6,22 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n Classes | Namespaces\n-albertareader.hh File Reference\n-#include \n-#include \n-#include \n-#include \n+macroelement.hh File Reference\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::AlbertaReader<_Grid_>\n+struct \u00a0Dune::Alberta::MacroElement<_dim_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::Alberta\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00674_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: albertareader.hh Source File\n+dune-grid: macroelement.hh Source File\n \n \n \n \n \n \n \n@@ -62,128 +62,96 @@\n \n \n
    \n
    \n-
    albertareader.hh
    \n+
    macroelement.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH
    \n-
    6#define DUNE_ALBERTA_ALBERTAREADER_HH
    \n+
    5#ifndef DUNE_ALBERTA_MACROELEMENT_HH
    \n+
    6#define DUNE_ALBERTA_MACROELEMENT_HH
    \n
    7
    \n-
    8#include <dune/geometry/type.hh>
    \n+\n
    9
    \n-\n-\n-
    12
    \n-\n+
    10#if HAVE_ALBERTA
    \n+
    11
    \n+
    12namespace Dune
    \n+
    13{
    \n
    14
    \n-
    15#if HAVE_ALBERTA
    \n-
    16
    \n-
    17namespace Dune
    \n-
    18{
    \n-
    19
    \n-
    20 template< class Grid >
    \n-\n-
    22 {
    \n-\n-
    24
    \n-
    25 public:
    \n-\n-
    27
    \n-
    28 typedef typename Grid::ctype ctype;
    \n-
    29
    \n-
    30 static const int dimension = Grid::dimension;
    \n-\n+
    15 namespace Alberta
    \n+
    16 {
    \n+
    17
    \n+
    18 // MacroElement
    \n+
    19 // ------------
    \n+
    20
    \n+
    21 template< int dim >
    \n+\n+
    23 : public ALBERTA MACRO_EL
    \n+
    24 {
    \n+
    25 const GlobalVector &coordinate ( const int vertex ) const;
    \n+
    26
    \n+
    27 int boundaryId ( const int face ) const;
    \n+
    28 bool isBoundary ( const int face ) const;
    \n+
    29 const MacroElement< dim > *neighbor ( const int face ) const;
    \n+
    30 };
    \n+
    31
    \n
    32
    \n-
    33 private:
    \n-
    34 static_assert(dimensionworld == Alberta::dimWorld,
    \n-
    35 "AlbertaReader: world dimension must match ALBERTA's world dimension.");
    \n-
    36
    \n-\n-
    38
    \n-
    39 MacroData macroData_;
    \n+
    33 template< int dim >
    \n+
    34 inline const GlobalVector &MacroElement< dim >::coordinate ( const int vertex ) const
    \n+
    35 {
    \n+
    36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) );
    \n+
    37 return *coord[ vertex ];
    \n+
    38 }
    \n+
    39
    \n
    40
    \n-
    41 AlbertaReader ( const This & );
    \n-
    42 This &operator= ( const This & );
    \n-
    43
    \n-
    44 public:
    \n-\n-
    46 {}
    \n+
    41 template< int dim >
    \n+
    42 inline bool MacroElement< dim >::isBoundary ( const int face ) const
    \n+
    43 {
    \n+
    44 return (boundaryId( face ) != InteriorBoundary);
    \n+
    45 }
    \n+
    46
    \n
    47
    \n-
    48 void readGrid ( const std::string &fileName, GridFactory &factory )
    \n-
    49 {
    \n-
    50 // read ALBERTA macro triangulation
    \n-
    51 macroData_.read( fileName, false );
    \n-
    52
    \n-
    53 // insert all vertices into the factory
    \n-
    54 const int numVertices = macroData_.vertexCount();
    \n-
    55 for( int i = 0; i < numVertices; ++i )
    \n-
    56 {
    \n-
    57 FieldVector< ctype, dimensionworld > v;
    \n-
    58 const Alberta::GlobalVector &coords = macroData_.vertex( i );
    \n-
    59 for( int j = 0; j < dimensionworld; ++j )
    \n-
    60 v[ j ] = coords[ j ];
    \n-
    61 factory.insertVertex( v );
    \n-
    62 }
    \n+
    48 template< int dim >
    \n+
    49 inline int MacroElement< dim >::boundaryId ( const int face ) const
    \n+
    50 {
    \n+
    51 return wall_bound[ face ];
    \n+
    52 }
    \n+
    53
    \n+
    54
    \n+
    55 template< int dim >
    \n+
    56 const MacroElement< dim > *MacroElement< dim >::neighbor ( const int face ) const
    \n+
    57 {
    \n+
    58 assert( (face >= 0) && (face < N_NEIGH_MAX) );
    \n+
    59 return static_cast< const MacroElement * >( neigh[ face ] );
    \n+
    60 }
    \n+
    61
    \n+
    62 }
    \n
    63
    \n-
    64 // insert all elements into the factory
    \n-
    65 std::vector< unsigned int > vertices( dimension+1 );
    \n-
    66 const int numElements = macroData_.elementCount();
    \n-
    67 for( int i = 0; i < numElements; ++i )
    \n-
    68 {
    \n-
    69 const typename MacroData::ElementId &id = macroData_.element( i );
    \n-
    70 for( int j = 0; j <= dimension; ++j )
    \n-
    71 vertices[ j ] = id[ j ];
    \n-
    72 factory.insertElement( GeometryTypes::simplex( dimension ), vertices );
    \n-
    73 }
    \n-
    74
    \n-
    75 // release ALBERTA macro data
    \n-
    76 macroData_.release();
    \n-
    77 }
    \n-
    78 };
    \n-
    79
    \n-
    80}
    \n-
    81
    \n-
    82#endif // #if HAVE_ALBERTA
    \n-
    83
    \n-
    84#endif
    \n-
    provides a wrapper for ALBERTA's macro_data structure
    \n+
    64}
    \n+
    65
    \n+
    66#endif // #if HAVE_ALBERTA
    \n+
    67
    \n+
    68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH
    \n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    static const int dimWorld
    Definition: misc.hh:46
    \n+
    static const int InteriorBoundary
    Definition: misc.hh:59
    \n
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n-
    Definition: albertareader.hh:22
    \n-
    Grid::ctype ctype
    Definition: albertareader.hh:28
    \n-
    static const int dimensionworld
    Definition: albertareader.hh:31
    \n-
    static const int dimension
    Definition: albertareader.hh:30
    \n-
    Dune::GridFactory< Grid > GridFactory
    Definition: albertareader.hh:26
    \n-
    AlbertaReader()
    Definition: albertareader.hh:45
    \n-
    void readGrid(const std::string &fileName, GridFactory &factory)
    Definition: albertareader.hh:48
    \n-\n-
    int ElementId[numVertices]
    Definition: macrodata.hh:48
    \n-
    void release()
    release the macro data structure
    Definition: macrodata.hh:127
    \n-
    int elementCount() const
    Definition: macrodata.hh:68
    \n-
    GlobalVector & vertex(int i) const
    Definition: macrodata.hh:255
    \n-
    int vertexCount() const
    Definition: macrodata.hh:63
    \n-
    ElementId & element(int i) const
    Definition: macrodata.hh:246
    \n-
    void read(const std::string &filename, bool binary=false)
    Definition: macrodata.hh:413
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n-
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/grid.hh:390
    \n-
    ct ctype
    Define type used for coordinates in grid module.
    Definition: common/grid.hh:532
    \n-\n-
    virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
    Insert an element into the coarse grid.
    Definition: common/gridfactory.hh:346
    \n-
    virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
    Insert a vertex into the coarse grid.
    Definition: common/gridfactory.hh:335
    \n-
    Provide a generic factory class for unstructured grids.
    \n-
    Different resources needed by all grid implementations.
    \n+
    @ vertex
    Definition: common.hh:133
    \n+
    Definition: macroelement.hh:24
    \n+
    bool isBoundary(const int face) const
    Definition: macroelement.hh:42
    \n+
    const MacroElement< dim > * neighbor(const int face) const
    Definition: macroelement.hh:56
    \n+
    int boundaryId(const int face) const
    Definition: macroelement.hh:49
    \n+
    const GlobalVector & coordinate(const int vertex) const
    Definition: macroelement.hh:34
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,177 +5,113 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-albertareader.hh\n+macroelement.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH\n- 6#define DUNE_ALBERTA_ALBERTAREADER_HH\n+ 5#ifndef DUNE_ALBERTA_MACROELEMENT_HH\n+ 6#define DUNE_ALBERTA_MACROELEMENT_HH\n 7\n- 8#include \n+ 8#include \n 9\n- 10#include \n- 11#include \n- 12\n- 13#include \n+ 10#if HAVE_ALBERTA\n+ 11\n+ 12namespace Dune\n+ 13{\n 14\n- 15#if HAVE_ALBERTA\n- 16\n- 17namespace Dune\n- 18{\n- 19\n- 20 template< class Grid >\n-21 class AlbertaReader\n- 22 {\n- 23 typedef AlbertaReader<_Grid_> This;\n- 24\n- 25 public:\n-26 typedef Dune::GridFactory<_Grid_> GridFactory;\n- 27\n-28 typedef typename Grid::ctype ctype;\n- 29\n-30 static const int dimension = Grid::dimension;\n-31 static const int dimensionworld = Grid::dimensionworld;\n+ 15 namespace Alberta\n+ 16 {\n+ 17\n+ 18 // MacroElement\n+ 19 // ------------\n+ 20\n+ 21 template< int dim >\n+22 struct MacroElement\n+ 23 : public ALBERTA MACRO_EL\n+ 24 {\n+ 25 const GlobalVector &coordinate ( const int vertex ) const;\n+ 26\n+ 27 int boundaryId ( const int face ) const;\n+ 28 bool isBoundary ( const int face ) const;\n+ 29 const MacroElement<_dim_> *neighbor ( const int face ) const;\n+ 30 };\n+ 31\n 32\n- 33 private:\n- 34 static_assert(dimensionworld == Alberta::dimWorld,\n- 35 \"AlbertaReader: world dimension must match ALBERTA's world dimension.\");\n- 36\n- 37 typedef Alberta::MacroData<_dimension_> MacroData;\n- 38\n- 39 MacroData macroData_;\n+ 33 template< int dim >\n+34 inline const GlobalVector &MacroElement<_dim_>::coordinate ( const int\n+vertex ) const\n+ 35 {\n+ 36 assert( (vertex >= 0) && (vertex < N_VERTICES_MAX) );\n+ 37 return *coord[ vertex ];\n+ 38 }\n+ 39\n 40\n- 41 AlbertaReader ( const This & );\n- 42 This &operator= ( const This & );\n- 43\n- 44 public:\n-45 AlbertaReader ()\n- 46 {}\n+ 41 template< int dim >\n+42 inline bool MacroElement<_dim_>::isBoundary ( const int face ) const\n+ 43 {\n+ 44 return (boundaryId( face ) != InteriorBoundary);\n+ 45 }\n+ 46\n 47\n-48 void readGrid ( const std::string &fileName, GridFactory &factory )\n- 49 {\n- 50 // read ALBERTA macro triangulation\n- 51 macroData_.read( fileName, false );\n- 52\n- 53 // insert all vertices into the factory\n- 54 const int numVertices = macroData_.vertexCount();\n- 55 for( int i = 0; i < numVertices; ++i )\n- 56 {\n- 57 FieldVector< ctype, dimensionworld > v;\n- 58 const Alberta::GlobalVector &coords = macroData_.vertex( i );\n- 59 for( int j = 0; j < dimensionworld; ++j )\n- 60 v[ j ] = coords[ j ];\n- 61 factory.insertVertex( v );\n+ 48 template< int dim >\n+49 inline int MacroElement<_dim_>::boundaryId ( const int face ) const\n+ 50 {\n+ 51 return wall_bound[ face ];\n+ 52 }\n+ 53\n+ 54\n+ 55 template< int dim >\n+56 const MacroElement<_dim_> *MacroElement<_dim_>::neighbor ( const int face )\n+const\n+ 57 {\n+ 58 assert( (face >= 0) && (face < N_NEIGH_MAX) );\n+ 59 return static_cast< const MacroElement * >( neigh[ face ] );\n+ 60 }\n+ 61\n 62 }\n 63\n- 64 // insert all elements into the factory\n- 65 std::vector< unsigned int > vertices( dimension+1 );\n- 66 const int numElements = macroData_.elementCount();\n- 67 for( int i = 0; i < numElements; ++i )\n- 68 {\n- 69 const typename MacroData::ElementId &id = macroData_.element( i );\n- 70 for( int j = 0; j <= dimension; ++j )\n- 71 vertices[ j ] = id[ j ];\n- 72 factory.insertElement( GeometryTypes::simplex( dimension ), vertices );\n- 73 }\n- 74\n- 75 // release ALBERTA macro data\n- 76 macroData_.release();\n- 77 }\n- 78 };\n- 79\n- 80}\n- 81\n- 82#endif // #if HAVE_ALBERTA\n- 83\n- 84#endif\n-macrodata.hh\n-provides a wrapper for ALBERTA's macro_data structure\n+ 64}\n+ 65\n+ 66#endif // #if HAVE_ALBERTA\n+ 67\n+ 68#endif // #ifndef DUNE_ALBERTA_MACROELEMENT_HH\n+misc.hh\n+ALBERTA\n+#define ALBERTA\n+Definition: albertaheader.hh:29\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::dimWorld\n-static const int dimWorld\n-Definition: misc.hh:46\n+Dune::Alberta::InteriorBoundary\n+static const int InteriorBoundary\n+Definition: misc.hh:59\n Dune::Alberta::GlobalVector\n ALBERTA REAL_D GlobalVector\n Definition: misc.hh:50\n-Dune::AlbertaReader\n-Definition: albertareader.hh:22\n-Dune::AlbertaReader::ctype\n-Grid::ctype ctype\n-Definition: albertareader.hh:28\n-Dune::AlbertaReader::dimensionworld\n-static const int dimensionworld\n-Definition: albertareader.hh:31\n-Dune::AlbertaReader::dimension\n-static const int dimension\n-Definition: albertareader.hh:30\n-Dune::AlbertaReader::GridFactory\n-Dune::GridFactory< Grid > GridFactory\n-Definition: albertareader.hh:26\n-Dune::AlbertaReader::AlbertaReader\n-AlbertaReader()\n-Definition: albertareader.hh:45\n-Dune::AlbertaReader::readGrid\n-void readGrid(const std::string &fileName, GridFactory &factory)\n-Definition: albertareader.hh:48\n-Dune::Alberta::MacroData<_dimension_>\n-Dune::Alberta::MacroData<_dimension_>::ElementId\n-int ElementId[numVertices]\n-Definition: macrodata.hh:48\n-Dune::Alberta::MacroData::release\n-void release()\n-release the macro data structure\n-Definition: macrodata.hh:127\n-Dune::Alberta::MacroData::elementCount\n-int elementCount() const\n-Definition: macrodata.hh:68\n-Dune::Alberta::MacroData::vertex\n-GlobalVector & vertex(int i) const\n-Definition: macrodata.hh:255\n-Dune::Alberta::MacroData::vertexCount\n-int vertexCount() const\n-Definition: macrodata.hh:63\n-Dune::Alberta::MacroData::element\n-ElementId & element(int i) const\n-Definition: macrodata.hh:246\n-Dune::Alberta::MacroData::read\n-void read(const std::string &filename, bool binary=false)\n-Definition: macrodata.hh:413\n-Dune::Grid::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/grid.hh:387\n-Dune::Grid::dimensionworld\n-static constexpr int dimensionworld\n-The dimension of the world the grid lives in.\n-Definition: common/grid.hh:390\n-Dune::Grid::ctype\n-ct ctype\n-Define type used for coordinates in grid module.\n-Definition: common/grid.hh:532\n-Dune::GridFactory<_Grid_>\n-Dune::GridFactory::insertElement\n-virtual void insertElement(const GeometryType &type, const std::vector<\n-unsigned int > &vertices)\n-Insert an element into the coarse grid.\n-Definition: common/gridfactory.hh:346\n-Dune::GridFactory::insertVertex\n-virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)\n-Insert a vertex into the coarse grid.\n-Definition: common/gridfactory.hh:335\n-gridfactory.hh\n-Provide a generic factory class for unstructured grids.\n-grid.hh\n-Different resources needed by all grid implementations.\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n+Dune::Alberta::MacroElement\n+Definition: macroelement.hh:24\n+Dune::Alberta::MacroElement::isBoundary\n+bool isBoundary(const int face) const\n+Definition: macroelement.hh:42\n+Dune::Alberta::MacroElement::neighbor\n+const MacroElement< dim > * neighbor(const int face) const\n+Definition: macroelement.hh:56\n+Dune::Alberta::MacroElement::boundaryId\n+int boundaryId(const int face) const\n+Definition: macroelement.hh:49\n+Dune::Alberta::MacroElement::coordinate\n+const GlobalVector & coordinate(const int vertex) const\n+Definition: macroelement.hh:34\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00677.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00677.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: indexstack.hh File Reference\n+dune-grid: intersection.cc File Reference\n \n \n \n \n \n \n \n@@ -64,42 +64,54 @@\n \n \n \n
    \n \n-
    indexstack.hh File Reference
    \n+Namespaces |\n+Macros
    \n+
    intersection.cc File Reference
    \n \n
    \n-\n-

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

    \n-
    #include <assert.h>
    \n-#include <stack>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/reservedvector.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-\n+
    \n \n-\n+\n+\n+\n \n

    \n Classes

    class  Dune::IndexStack< T, length >
    struct  Dune::AlbertaGridIntersectionBase< Grid >::GlobalCoordReader< GridImp >
     
    struct  Dune::AlbertaGridIntersectionBase< Grid >::LocalCoordReader< GridImp >
     
    \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n

    \n+Macros

    #define DUNE_ALBERTA_INTERSECTION_CC
     
    \n-

    Detailed Description

    \n-

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

    \n-
    Author
    Robert Kloefkorn
    \n-
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DUNE_ALBERTA_INTERSECTION_CC

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DUNE_ALBERTA_INTERSECTION_CC
    \n+
    \n+\n+
    \n+
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,31 +5,29 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-indexstack.hh File Reference\n-Provides an index stack that supplies indices for element numbering for a grid\n-(i.e. AlbertaGrid and ALUGrid) More...\n-#include \n-#include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n+Classes | Namespaces | Macros\n+intersection.cc File Reference\n+#include \n Classes\n-class \u00a0Dune::IndexStack<_T,_length_>\n+struct \u00a0Dune::AlbertaGridIntersectionBase<_Grid_>::GlobalCoordReader<_GridImp\n+ >\n+\u00a0\n+struct \u00a0Dune::AlbertaGridIntersectionBase<_Grid_>::LocalCoordReader<_GridImp_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Provides an index stack that supplies indices for element numbering for a grid\n-(i.e. AlbertaGrid and ALUGrid)\n- Author\n- Robert Kloefkorn\n+ Macros\n+#define\u00a0DUNE_ALBERTA_INTERSECTION_CC\n+\u00a0\n+***** Macro Definition Documentation *****\n+***** \u25c6\u00a0DUNE_ALBERTA_INTERSECTION_CC *****\n+#define DUNE_ALBERTA_INTERSECTION_CC\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00680.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00680.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: geometrycache.hh File Reference\n+dune-grid: albertagrid.cc File Reference\n \n \n \n \n \n \n \n@@ -64,38 +64,64 @@\n \n \n \n
    \n \n-
    geometrycache.hh File Reference
    \n+Namespaces |\n+Macros |\n+Functions |\n+Variables
    \n+
    albertagrid.cc File Reference
    \n \n
    \n-\n-

    Go to the source code of this file.

    \n-\n-\n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::Alberta::GeometryCache< dim >
     
    struct  Dune::Alberta::GeometryCacheProxy< dim >
     
    \n+
    #include "geometry.cc"
    \n+#include "entity.cc"
    \n+#include "intersection.cc"
    \n+
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n+\n+\n+\n+

    \n+Macros

    #define DUNE_ALBERTAGRID_CC
     
    \n+\n+\n+\n+\n+

    \n+Functions

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

    \n+Variables

    static void * Dune::Alberta::adaptationDataHandler_
     
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DUNE_ALBERTAGRID_CC

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DUNE_ALBERTAGRID_CC
    \n+
    \n+\n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,26 +5,34 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-geometrycache.hh File Reference\n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n- class \u00a0Dune::Alberta::GeometryCache<_dim_>\n-\u00a0\n-struct \u00a0Dune::Alberta::GeometryCacheProxy<_dim_>\n-\u00a0\n+Classes | Namespaces | Macros | Functions | Variables\n+albertagrid.cc File Reference\n+#include \"geometry.cc\"\n+#include \"entity.cc\"\n+#include \"intersection.cc\"\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n+ Macros\n+#define\u00a0DUNE_ALBERTAGRID_CC\n+\u00a0\n+ Functions\n+template\n+static void\u00a0Dune::checkAlbertaDimensions ()\n+\u00a0\n+ Variables\n+static void *\u00a0Dune::Alberta::adaptationDataHandler_\n+\u00a0\n+***** Macro Definition Documentation *****\n+***** \u25c6\u00a0DUNE_ALBERTAGRID_CC *****\n+#define DUNE_ALBERTAGRID_CC\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00683.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00683.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: undefine-2.0.hh File Reference\n+dune-grid: indexstack.hh File Reference\n \n \n \n \n \n \n \n@@ -62,25 +62,44 @@\n \n \n \n
    \n-
    undefine-2.0.hh File Reference
    \n+ \n+
    indexstack.hh File Reference
    \n
    \n
    \n \n-

    Contains #undefs for all preprocessor macros defined by alberta. \n+

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

    \n-\n+
    #include <assert.h>
    \n+#include <stack>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/reservedvector.hh>
    \n+
    \n

    Go to the source code of this file.

    \n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::IndexStack< T, length >
     
    \n+\n+\n+\n+\n+

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    Contains #undefs for all preprocessor macros defined by alberta.

    \n-

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

    \n+

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

    \n+
    Author
    Robert Kloefkorn
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,16 +5,31 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-undefine-2.0.hh File Reference\n-Contains #undefs for all preprocessor macros defined by alberta. More...\n+Classes | Namespaces\n+indexstack.hh File Reference\n+Provides an index stack that supplies indices for element numbering for a grid\n+(i.e. AlbertaGrid and ALUGrid) More...\n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::IndexStack<_T,_length_>\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n+\u00a0\n ***** Detailed Description *****\n-Contains #undefs for all preprocessor macros defined by alberta.\n-This file is created automatically by the perl script undefAllMacros.pl.\n+Provides an index stack that supplies indices for element numbering for a grid\n+(i.e. AlbertaGrid and ALUGrid)\n+ Author\n+ Robert Kloefkorn\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00683_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: undefine-2.0.hh Source File\n+dune-grid: indexstack.hh Source File\n \n \n \n \n \n \n \n@@ -62,476 +62,241 @@\n \n \n
    \n
    \n-
    undefine-2.0.hh
    \n+
    indexstack.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    12#ifdef _ALBERTA_H_
    \n-
    13 #undef _ALBERTA_H_
    \n-
    14#endif // _ALBERTA_H_
    \n-
    15
    \n-
    16#ifdef ALBERTA_VERSION
    \n-
    17 #undef ALBERTA_VERSION
    \n-
    18#endif // ALBERTA_VERSION
    \n-
    19
    \n-
    20#ifdef ALBERTA_DEBUG
    \n-
    21 #undef ALBERTA_DEBUG
    \n-
    22#endif // ALBERTA_DEBUG
    \n-
    23
    \n-
    24#ifdef DIM_MAX
    \n-
    25 #undef DIM_MAX
    \n-
    26#endif // DIM_MAX
    \n-
    27
    \n-
    28#ifdef N_VERTICES
    \n-
    29 #undef N_VERTICES
    \n-
    30#endif // N_VERTICES
    \n-
    31
    \n-
    32#ifdef N_EDGES
    \n-
    33 #undef N_EDGES
    \n-
    34#endif // N_EDGES
    \n-
    35
    \n-
    36#ifdef N_WALLS
    \n-
    37 #undef N_WALLS
    \n-
    38#endif // N_WALLS
    \n-
    39
    \n-
    40#ifdef N_FACES
    \n-
    41 #undef N_FACES
    \n-
    42#endif // N_FACES
    \n-
    43
    \n-
    44#ifdef N_NEIGH
    \n-
    45 #undef N_NEIGH
    \n-
    46#endif // N_NEIGH
    \n-
    47
    \n-
    48#ifdef DIM_FAC
    \n-
    49 #undef DIM_FAC
    \n-
    50#endif // DIM_FAC
    \n-
    51
    \n-
    52#ifdef N_VERTICES_0D
    \n-
    53 #undef N_VERTICES_0D
    \n-
    54#endif // N_VERTICES_0D
    \n-
    55
    \n-
    56#ifdef N_EDGES_0D
    \n-
    57 #undef N_EDGES_0D
    \n-
    58#endif // N_EDGES_0D
    \n+
    5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH
    \n+
    6#define DUNE_ALBERTAGRID_INDEXSTACK_HH
    \n+
    7
    \n+
    8#include <assert.h>
    \n+
    9#include <stack>
    \n+
    10
    \n+
    11#include <dune/common/exceptions.hh>
    \n+
    12#include <dune/common/reservedvector.hh>
    \n+
    13
    \n+
    20namespace Dune {
    \n+
    21
    \n+
    24 template <class T, int length>
    \n+\n+
    26 {
    \n+
    27 class MyFiniteStack : public ReservedVector<T,length>
    \n+
    28 {
    \n+
    29 typedef ReservedVector<T,length> BaseType ;
    \n+
    30 public:
    \n+
    32 bool full () const { return this->size() >= length; }
    \n+
    33
    \n+
    35 void push( const T& t ) { BaseType :: push_back( t ); }
    \n+
    36
    \n+
    38 T topAndPop ()
    \n+
    39 {
    \n+
    40 assert( !this->empty() );
    \n+
    41 assert( this->size() <= length );
    \n+
    42 // This code is not slower than using the array structure directly.
    \n+
    43 // The compiler removes the temporary completely. I measured this.
    \n+
    44 // See the commit message for revision 7837 for more details.
    \n+
    45 T tmp = this->back();
    \n+
    46 this->pop_back();
    \n+
    47 return tmp;
    \n+
    48 }
    \n+
    49 };
    \n+
    50
    \n+
    51 typedef MyFiniteStack StackType;
    \n+
    52 typedef typename std::stack < StackType * > StackListType;
    \n+
    53
    \n+
    54 StackListType fullStackList_;
    \n+
    55 StackListType emptyStackList_;
    \n+
    56
    \n+
    57 //typedef typename StackListType::Iterator DListIteratorType;
    \n+
    58 StackType * stack_;
    \n
    59
    \n-
    60#ifdef N_FACES_0D
    \n-
    61 #undef N_FACES_0D
    \n-
    62#endif // N_FACES_0D
    \n-
    63
    \n-
    64#ifdef N_NEIGH_0D
    \n-
    65 #undef N_NEIGH_0D
    \n-
    66#endif // N_NEIGH_0D
    \n-
    67
    \n-
    68#ifdef N_WALLS_0D
    \n-
    69 #undef N_WALLS_0D
    \n-
    70#endif // N_WALLS_0D
    \n+
    60 // current maxIndex
    \n+
    61 int maxIndex_;
    \n+
    62 public:
    \n+
    64 inline IndexStack();
    \n+
    65
    \n+
    67 inline ~IndexStack ();
    \n+
    68
    \n+
    70 inline void checkAndSetMax(T index) { if(index > maxIndex_) maxIndex_ = index;}
    \n
    71
    \n-
    72#ifdef N_VERTICES_1D
    \n-
    73 #undef N_VERTICES_1D
    \n-
    74#endif // N_VERTICES_1D
    \n-
    75
    \n-
    76#ifdef N_EDGES_1D
    \n-
    77 #undef N_EDGES_1D
    \n-
    78#endif // N_EDGES_1D
    \n-
    79
    \n-
    80#ifdef N_FACES_1D
    \n-
    81 #undef N_FACES_1D
    \n-
    82#endif // N_FACES_1D
    \n+
    73 inline void setMaxIndex(T index) { maxIndex_ = index; }
    \n+
    74
    \n+
    76 inline int getMaxIndex() const { return maxIndex_; }
    \n+
    77
    \n+
    79 inline int size() const { return getMaxIndex(); }
    \n+
    80
    \n+
    82 inline T getIndex ();
    \n
    83
    \n-
    84#ifdef N_NEIGH_1D
    \n-
    85 #undef N_NEIGH_1D
    \n-
    86#endif // N_NEIGH_1D
    \n-
    87
    \n-
    88#ifdef N_WALLS_1D
    \n-
    89 #undef N_WALLS_1D
    \n-
    90#endif // N_WALLS_1D
    \n-
    91
    \n-
    92#ifdef N_VERTICES_2D
    \n-
    93 #undef N_VERTICES_2D
    \n-
    94#endif // N_VERTICES_2D
    \n-
    95
    \n-
    96#ifdef N_EDGES_2D
    \n-
    97 #undef N_EDGES_2D
    \n-
    98#endif // N_EDGES_2D
    \n-
    99
    \n-
    100#ifdef N_FACES_2D
    \n-
    101 #undef N_FACES_2D
    \n-
    102#endif // N_FACES_2D
    \n-
    103
    \n-
    104#ifdef N_NEIGH_2D
    \n-
    105 #undef N_NEIGH_2D
    \n-
    106#endif // N_NEIGH_2D
    \n-
    107
    \n-
    108#ifdef N_WALLS_2D
    \n-
    109 #undef N_WALLS_2D
    \n-
    110#endif // N_WALLS_2D
    \n-
    111
    \n-
    112#ifdef N_VERTICES_3D
    \n-
    113 #undef N_VERTICES_3D
    \n-
    114#endif // N_VERTICES_3D
    \n-
    115
    \n-
    116#ifdef N_EDGES_3D
    \n-
    117 #undef N_EDGES_3D
    \n-
    118#endif // N_EDGES_3D
    \n-
    119
    \n-
    120#ifdef N_FACES_3D
    \n-
    121 #undef N_FACES_3D
    \n-
    122#endif // N_FACES_3D
    \n+
    85 inline void freeIndex(T index);
    \n+
    86
    \n+
    88 inline void test ();
    \n+
    89
    \n+
    90 // backup set to out stream
    \n+
    91 inline void backupIndexSet ( std::ostream & os );
    \n+
    92
    \n+
    93 // restore from in stream
    \n+
    94 inline void restoreIndexSet ( std::istream & is );
    \n+
    95 private:
    \n+
    96 // no copy constructor allowed
    \n+
    97 IndexStack( const IndexStack<T,length> & s) : maxIndex_ (0) , stack_(0) {}
    \n+
    98
    \n+
    99 // no assignment operator allowed
    \n+
    100 IndexStack<T,length> & operator = ( const IndexStack<T,length> & s)
    \n+
    101 {
    \n+
    102 DUNE_THROW(Exception, "IndexStack::operator = () not allowed!");
    \n+
    103 return *this;
    \n+
    104 }
    \n+
    105
    \n+
    106 // clear fullStacks
    \n+
    107 void clearStack ();
    \n+
    108
    \n+
    109 }; // end class IndexStack
    \n+
    110
    \n+
    111 //****************************************************************
    \n+
    112 // Inline implementation
    \n+
    113 // ***************************************************************
    \n+
    114 template <class T, int length>
    \n+\n+
    116 : stack_ ( new StackType () ) , maxIndex_ (0) {}
    \n+
    117
    \n+
    118 template <class T, int length>
    \n+\n+
    120 {
    \n+
    121 if(stack_) delete stack_;
    \n+
    122 stack_ = 0;
    \n
    123
    \n-
    124#ifdef N_NEIGH_3D
    \n-
    125 #undef N_NEIGH_3D
    \n-
    126#endif // N_NEIGH_3D
    \n-
    127
    \n-
    128#ifdef N_WALLS_3D
    \n-
    129 #undef N_WALLS_3D
    \n-
    130#endif // N_WALLS_3D
    \n-
    131
    \n-
    132#ifdef N_VERTICES_MAX
    \n-
    133 #undef N_VERTICES_MAX
    \n-
    134#endif // N_VERTICES_MAX
    \n-
    135
    \n-
    136#ifdef N_EDGES_MAX
    \n-
    137 #undef N_EDGES_MAX
    \n-
    138#endif // N_EDGES_MAX
    \n-
    139
    \n-
    140#ifdef N_FACES_MAX
    \n-
    141 #undef N_FACES_MAX
    \n-
    142#endif // N_FACES_MAX
    \n-
    143
    \n-
    144#ifdef N_NEIGH_MAX
    \n-
    145 #undef N_NEIGH_MAX
    \n-
    146#endif // N_NEIGH_MAX
    \n-
    147
    \n-
    148#ifdef N_WALLS_MAX
    \n-
    149 #undef N_WALLS_MAX
    \n-
    150#endif // N_WALLS_MAX
    \n-
    151
    \n-
    152#ifdef N_LAMBDA
    \n-
    153 #undef N_LAMBDA
    \n-
    154#endif // N_LAMBDA
    \n-
    155
    \n-
    156#ifdef LAMBDA_MAX
    \n-
    157 #undef LAMBDA_MAX
    \n-
    158#endif // LAMBDA_MAX
    \n-
    159
    \n-
    160#ifdef INDEX
    \n-
    161 #undef INDEX
    \n-
    162#endif // INDEX
    \n-
    163
    \n-
    164#ifdef INDEX
    \n-
    165 #undef INDEX
    \n-
    166#endif // INDEX
    \n-
    167
    \n-
    168#ifdef IS_LEAF_EL
    \n-
    169 #undef IS_LEAF_EL
    \n-
    170#endif // IS_LEAF_EL
    \n-
    171
    \n-
    172#ifdef LEAF_DATA
    \n-
    173 #undef LEAF_DATA
    \n-
    174#endif // LEAF_DATA
    \n+
    124 while( !fullStackList_.empty() )
    \n+
    125 {
    \n+
    126 StackType * st = fullStackList_.top();
    \n+
    127 if(st) delete st;
    \n+
    128 fullStackList_.pop();
    \n+
    129 }
    \n+
    130 while( !emptyStackList_.empty() )
    \n+
    131 {
    \n+
    132 StackType * st = emptyStackList_.top();
    \n+
    133 if(st) delete st;
    \n+
    134 emptyStackList_.pop();
    \n+
    135 }
    \n+
    136 }
    \n+
    137
    \n+
    138 template <class T, int length>
    \n+\n+
    140 {
    \n+
    141 if((*stack_).empty())
    \n+
    142 {
    \n+
    143 if( fullStackList_.size() <= 0)
    \n+
    144 {
    \n+
    145 return maxIndex_++;
    \n+
    146 }
    \n+
    147 else
    \n+
    148 {
    \n+
    149 emptyStackList_.push( stack_ );
    \n+
    150 stack_ = fullStackList_.top();
    \n+
    151 fullStackList_.pop();
    \n+
    152 }
    \n+
    153 }
    \n+
    154 return (*stack_).topAndPop();
    \n+
    155 }
    \n+
    156
    \n+
    157 template <class T, int length>
    \n+
    158 inline void IndexStack<T,length>::freeIndex ( T index )
    \n+
    159 {
    \n+
    160 if((*stack_).full())
    \n+
    161 {
    \n+
    162 fullStackList_.push( stack_ );
    \n+
    163 if(emptyStackList_.size() <= 0)
    \n+
    164 {
    \n+
    165 stack_ = new StackType ();
    \n+
    166 }
    \n+
    167 else
    \n+
    168 {
    \n+
    169 stack_ = emptyStackList_.top();
    \n+
    170 emptyStackList_.pop();
    \n+
    171 }
    \n+
    172 }
    \n+
    173 (*stack_).push(index);
    \n+
    174 }
    \n
    175
    \n-
    176#ifdef INTERIOR
    \n-
    177 #undef INTERIOR
    \n-
    178#endif // INTERIOR
    \n-
    179
    \n-
    180#ifdef DIRICHLET
    \n-
    181 #undef DIRICHLET
    \n-
    182#endif // DIRICHLET
    \n+
    176 template <class T, int length>
    \n+\n+
    178 {
    \n+
    179 T vec[2*length];
    \n+
    180
    \n+
    181 for(int i=0; i<2*length; i++)
    \n+
    182 vec[i] = getIndex();
    \n
    183
    \n-
    184#ifdef NEUMANN
    \n-
    185 #undef NEUMANN
    \n-
    186#endif // NEUMANN
    \n-
    187
    \n-
    188#ifdef IS_NEUMANN
    \n-
    189 #undef IS_NEUMANN
    \n-
    190#endif // IS_NEUMANN
    \n-
    191
    \n-
    192#ifdef IS_DIRICHLET
    \n-
    193 #undef IS_DIRICHLET
    \n-
    194#endif // IS_DIRICHLET
    \n-
    195
    \n-
    196#ifdef IS_INTERIOR
    \n-
    197 #undef IS_INTERIOR
    \n-
    198#endif // IS_INTERIOR
    \n-
    199
    \n-
    200#ifdef N_NODE_TYPES
    \n-
    201 #undef N_NODE_TYPES
    \n-
    202#endif // N_NODE_TYPES
    \n-
    203
    \n-
    204#ifdef VERTEX
    \n-
    205 #undef VERTEX
    \n-
    206#endif // VERTEX
    \n+
    184 for(int i=0; i<2*length; i++)
    \n+
    185 freeIndex(vec[i]);
    \n+
    186
    \n+
    187 for(int i=0; i<2*length; i++)
    \n+
    188 vec[i] = getIndex();
    \n+
    189
    \n+
    190 for(int i=0; i<2*length; i++)
    \n+
    191 printf(" index [%d] = %d \\n",i,vec[i]);
    \n+
    192 }
    \n+
    193
    \n+
    194 template <class T, int length>
    \n+
    195 inline void IndexStack<T,length>::backupIndexSet ( std::ostream & os )
    \n+
    196 {
    \n+
    197 // holes are not stored at the moment
    \n+
    198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ;
    \n+
    199 return ;
    \n+
    200 }
    \n+
    201
    \n+
    202 template <class T, int length>
    \n+
    203 inline void IndexStack<T,length>::restoreIndexSet ( std::istream & is )
    \n+
    204 {
    \n+
    205 is.read ( ((char *) &maxIndex_), sizeof(int) );
    \n+
    206 clearStack ();
    \n
    207
    \n-
    208#ifdef CENTER
    \n-
    209 #undef CENTER
    \n-
    210#endif // CENTER
    \n-
    211
    \n-
    212#ifdef EDGE
    \n-
    213 #undef EDGE
    \n-
    214#endif // EDGE
    \n-
    215
    \n-
    216#ifdef FACE
    \n-
    217 #undef FACE
    \n-
    218#endif // FACE
    \n-
    219
    \n-
    220#ifdef LIST_ENTRY
    \n-
    221 #undef LIST_ENTRY
    \n-
    222#endif // LIST_ENTRY
    \n-
    223
    \n-
    224#ifdef WALL_BOUND
    \n-
    225 #undef WALL_BOUND
    \n-
    226#endif // WALL_BOUND
    \n-
    227
    \n-
    228#ifdef FILL_NOTHING
    \n-
    229 #undef FILL_NOTHING
    \n-
    230#endif // FILL_NOTHING
    \n-
    231
    \n-
    232#ifdef FILL_COORDS
    \n-
    233 #undef FILL_COORDS
    \n-
    234#endif // FILL_COORDS
    \n-
    235
    \n-
    236#ifdef FILL_BOUND
    \n-
    237 #undef FILL_BOUND
    \n-
    238#endif // FILL_BOUND
    \n-
    239
    \n-
    240#ifdef FILL_NEIGH
    \n-
    241 #undef FILL_NEIGH
    \n-
    242#endif // FILL_NEIGH
    \n-
    243
    \n-
    244#ifdef FILL_OPP_COORDS
    \n-
    245 #undef FILL_OPP_COORDS
    \n-
    246#endif // FILL_OPP_COORDS
    \n-
    247
    \n-
    248#ifdef FILL_ORIENTATION
    \n-
    249 #undef FILL_ORIENTATION
    \n-
    250#endif // FILL_ORIENTATION
    \n-
    251
    \n-
    252#ifdef FILL_EL_TYPE
    \n-
    253 #undef FILL_EL_TYPE
    \n-
    254#endif // FILL_EL_TYPE
    \n-
    255
    \n-
    256#ifdef FILL_PROJECTION
    \n-
    257 #undef FILL_PROJECTION
    \n-
    258#endif // FILL_PROJECTION
    \n-
    259
    \n-
    260#ifdef FILL_ANY
    \n-
    261 #undef FILL_ANY
    \n-
    262#endif // FILL_ANY
    \n-
    263
    \n-
    264#ifdef HOOK_QUEUE_OFFSET
    \n-
    265 #undef HOOK_QUEUE_OFFSET
    \n-
    266#endif // HOOK_QUEUE_OFFSET
    \n-
    267
    \n-
    268#ifdef RUN_HOOKS_0
    \n-
    269 #undef RUN_HOOKS_0
    \n-
    270#endif // RUN_HOOKS_0
    \n-
    271
    \n-
    272#ifdef RUN_BAS_FCTS_HOOKS
    \n-
    273 #undef RUN_BAS_FCTS_HOOKS
    \n-
    274#endif // RUN_BAS_FCTS_HOOKS
    \n-
    275
    \n-
    276#ifdef RUN_HOOKS_1
    \n-
    277 #undef RUN_HOOKS_1
    \n-
    278#endif // RUN_HOOKS_1
    \n-
    279
    \n-
    280#ifdef RUN_HOOKS_2
    \n-
    281 #undef RUN_HOOKS_2
    \n-
    282#endif // RUN_HOOKS_2
    \n-
    283
    \n-
    284#ifdef RUN_HOOKS_3
    \n-
    285 #undef RUN_HOOKS_3
    \n-
    286#endif // RUN_HOOKS_3
    \n-
    287
    \n-
    288#ifdef RUN_HOOKS_4
    \n-
    289 #undef RUN_HOOKS_4
    \n-
    290#endif // RUN_HOOKS_4
    \n-
    291
    \n-
    292#ifdef RUN_HOOKS_5
    \n-
    293 #undef RUN_HOOKS_5
    \n-
    294#endif // RUN_HOOKS_5
    \n-
    295
    \n-
    296#ifdef RUN_HOOKS_6
    \n-
    297 #undef RUN_HOOKS_6
    \n-
    298#endif // RUN_HOOKS_6
    \n-
    299
    \n-
    300#ifdef RUN_HOOKS_7
    \n-
    301 #undef RUN_HOOKS_7
    \n-
    302#endif // RUN_HOOKS_7
    \n-
    303
    \n-
    304#ifdef CALL_EVERY_EL_PREORDER
    \n-
    305 #undef CALL_EVERY_EL_PREORDER
    \n-
    306#endif // CALL_EVERY_EL_PREORDER
    \n-
    307
    \n-
    308#ifdef CALL_EVERY_EL_INORDER
    \n-
    309 #undef CALL_EVERY_EL_INORDER
    \n-
    310#endif // CALL_EVERY_EL_INORDER
    \n-
    311
    \n-
    312#ifdef CALL_EVERY_EL_POSTORDER
    \n-
    313 #undef CALL_EVERY_EL_POSTORDER
    \n-
    314#endif // CALL_EVERY_EL_POSTORDER
    \n-
    315
    \n-
    316#ifdef CALL_LEAF_EL
    \n-
    317 #undef CALL_LEAF_EL
    \n-
    318#endif // CALL_LEAF_EL
    \n-
    319
    \n-
    320#ifdef CALL_LEAF_EL_LEVEL
    \n-
    321 #undef CALL_LEAF_EL_LEVEL
    \n-
    322#endif // CALL_LEAF_EL_LEVEL
    \n-
    323
    \n-
    324#ifdef CALL_EL_LEVEL
    \n-
    325 #undef CALL_EL_LEVEL
    \n-
    326#endif // CALL_EL_LEVEL
    \n-
    327
    \n-
    328#ifdef CALL_MG_LEVEL
    \n-
    329 #undef CALL_MG_LEVEL
    \n-
    330#endif // CALL_MG_LEVEL
    \n-
    331
    \n-
    332#ifdef TEST_FLAG
    \n-
    333 #undef TEST_FLAG
    \n-
    334#endif // TEST_FLAG
    \n-
    335
    \n-
    336#ifdef DOF_ADMIN_DEF
    \n-
    337 #undef DOF_ADMIN_DEF
    \n-
    338#endif // DOF_ADMIN_DEF
    \n-
    339
    \n-
    340#ifdef DOF_FREE_SIZE
    \n-
    341 #undef DOF_FREE_SIZE
    \n-
    342#endif // DOF_FREE_SIZE
    \n-
    343
    \n-
    344#ifdef DOF_UNIT_ALL_FREE
    \n-
    345 #undef DOF_UNIT_ALL_FREE
    \n-
    346#endif // DOF_UNIT_ALL_FREE
    \n-
    347
    \n-
    348#ifdef FOR_ALL_DOFS
    \n-
    349 #undef FOR_ALL_DOFS
    \n-
    350#endif // FOR_ALL_DOFS
    \n-
    351
    \n-
    352#ifdef FOR_ALL_FREE_DOFS
    \n-
    353 #undef FOR_ALL_FREE_DOFS
    \n-
    354#endif // FOR_ALL_FREE_DOFS
    \n-
    355
    \n-
    356#ifdef DOWBM_FULL
    \n-
    357 #undef DOWBM_FULL
    \n-
    358#endif // DOWBM_FULL
    \n-
    359
    \n-
    360#ifdef DOWBM_SYMM
    \n-
    361 #undef DOWBM_SYMM
    \n-
    362#endif // DOWBM_SYMM
    \n-
    363
    \n-
    364#ifdef DOWBM_DIAG
    \n-
    365 #undef DOWBM_DIAG
    \n-
    366#endif // DOWBM_DIAG
    \n-
    367
    \n-
    368#ifdef ROW_LENGTH
    \n-
    369 #undef ROW_LENGTH
    \n-
    370#endif // ROW_LENGTH
    \n-
    371
    \n-
    372#ifdef ENTRY_USED
    \n-
    373 #undef ENTRY_USED
    \n-
    374#endif // ENTRY_USED
    \n-
    375
    \n-
    376#ifdef ENTRY_NOT_USED
    \n-
    377 #undef ENTRY_NOT_USED
    \n-
    378#endif // ENTRY_NOT_USED
    \n-
    379
    \n-
    380#ifdef UNUSED_ENTRY
    \n-
    381 #undef UNUSED_ENTRY
    \n-
    382#endif // UNUSED_ENTRY
    \n-
    383
    \n-
    384#ifdef NO_MORE_ENTRIES
    \n-
    385 #undef NO_MORE_ENTRIES
    \n-
    386#endif // NO_MORE_ENTRIES
    \n-
    387
    \n-
    388#ifdef LAGRANGE_NODES
    \n-
    389 #undef LAGRANGE_NODES
    \n-
    390#endif // LAGRANGE_NODES
    \n-
    391
    \n-
    392#ifdef MAX_N_QUAD_POINTS
    \n-
    393 #undef MAX_N_QUAD_POINTS
    \n-
    394#endif // MAX_N_QUAD_POINTS
    \n-
    395
    \n-
    396#ifdef INIT_PHI
    \n-
    397 #undef INIT_PHI
    \n-
    398#endif // INIT_PHI
    \n-
    399
    \n-
    400#ifdef INIT_GRD_PHI
    \n-
    401 #undef INIT_GRD_PHI
    \n-
    402#endif // INIT_GRD_PHI
    \n-
    403
    \n-
    404#ifdef INIT_D2_PHI
    \n-
    405 #undef INIT_D2_PHI
    \n-
    406#endif // INIT_D2_PHI
    \n-
    407
    \n-
    408#ifdef MESH_REFINED
    \n-
    409 #undef MESH_REFINED
    \n-
    410#endif // MESH_REFINED
    \n-
    411
    \n-
    412#ifdef MESH_COARSENED
    \n-
    413 #undef MESH_COARSENED
    \n-
    414#endif // MESH_COARSENED
    \n-
    415
    \n-
    416#ifdef H1_NORM
    \n-
    417 #undef H1_NORM
    \n-
    418#endif // H1_NORM
    \n-
    419
    \n-
    420#ifdef L2_NORM
    \n-
    421 #undef L2_NORM
    \n-
    422#endif // L2_NORM
    \n-
    423
    \n-
    424#ifdef GRAPH_MESH_BOUNDARY
    \n-
    425 #undef GRAPH_MESH_BOUNDARY
    \n-
    426#endif // GRAPH_MESH_BOUNDARY
    \n-
    427
    \n-
    428#ifdef GRAPH_MESH_ELEMENT_MARK
    \n-
    429 #undef GRAPH_MESH_ELEMENT_MARK
    \n-
    430#endif // GRAPH_MESH_ELEMENT_MARK
    \n-
    431
    \n-
    432#ifdef GRAPH_MESH_VERTEX_DOF
    \n-
    433 #undef GRAPH_MESH_VERTEX_DOF
    \n-
    434#endif // GRAPH_MESH_VERTEX_DOF
    \n-
    435
    \n-
    436#ifdef GRAPH_MESH_ELEMENT_INDEX
    \n-
    437 #undef GRAPH_MESH_ELEMENT_INDEX
    \n-
    438#endif // GRAPH_MESH_ELEMENT_INDEX
    \n-
    439
    \n-
    440#ifdef GET_MESH
    \n-
    441 #undef GET_MESH
    \n-
    442#endif // GET_MESH
    \n-
    443
    \n-
    444#ifdef GET_DOF_VEC
    \n-
    445 #undef GET_DOF_VEC
    \n-
    446#endif // GET_DOF_VEC
    \n-
    447
    \n-
    448#ifdef CARD_SN_MAX
    \n-
    449 #undef CARD_SN_MAX
    \n-
    450#endif // CARD_SN_MAX
    \n-
    451
    \n-
    452#ifdef INIT_UH
    \n-
    453 #undef INIT_UH
    \n-
    454#endif // INIT_UH
    \n-
    455
    \n-
    456#ifdef INIT_GRD_UH
    \n-
    457 #undef INIT_GRD_UH
    \n-
    458#endif // INIT_GRD_UH
    \n-
    459
    \n-
    460#ifdef TRAVERSE_START
    \n-
    461 #undef TRAVERSE_START
    \n-
    462#endif // TRAVERSE_START
    \n-
    463
    \n-
    464#ifdef TRAVERSE_STOP
    \n-
    465 #undef TRAVERSE_STOP
    \n-
    466#endif // TRAVERSE_STOP
    \n+
    208 return ;
    \n+
    209 }
    \n+
    210
    \n+
    211 template <class T, int length>
    \n+\n+
    213 {
    \n+
    214 if(stack_)
    \n+
    215 {
    \n+
    216 delete stack_;
    \n+
    217 stack_ = new StackType();
    \n+
    218 assert(stack_);
    \n+
    219 }
    \n+
    220
    \n+
    221 while( !fullStackList_.empty() )
    \n+
    222 {
    \n+
    223 StackType * st = fullStackList_.top();
    \n+
    224 if(st) delete st;
    \n+
    225 fullStackList_.pop();
    \n+
    226 }
    \n+
    227 return;
    \n+
    228 }
    \n+
    229
    \n+
    230} // end namespace Dune
    \n+
    231#endif
    \n+
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    Definition: indexstack.hh:26
    \n+
    void restoreIndexSet(std::istream &is)
    Definition: indexstack.hh:203
    \n+
    void checkAndSetMax(T index)
    set index as maxIndex if index is bigger than maxIndex
    Definition: indexstack.hh:70
    \n+
    void backupIndexSet(std::ostream &os)
    Definition: indexstack.hh:195
    \n+
    ~IndexStack()
    Destructor, deleting all stacks.
    Definition: indexstack.hh:119
    \n+
    T getIndex()
    restore index from stack or create new index
    Definition: indexstack.hh:139
    \n+
    IndexStack()
    Constructor, create new IndexStack.
    Definition: indexstack.hh:115
    \n+
    void setMaxIndex(T index)
    set index as maxIndex
    Definition: indexstack.hh:73
    \n+
    int size() const
    return maxIndex which is also the
    Definition: indexstack.hh:79
    \n+
    void test()
    test stack functionality
    Definition: indexstack.hh:177
    \n+
    void freeIndex(T index)
    store index on stack
    Definition: indexstack.hh:158
    \n+
    int getMaxIndex() const
    return maxIndex which is also the
    Definition: indexstack.hh:76
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,472 +5,272 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-undefine-2.0.hh\n+indexstack.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 12#ifdef _ALBERTA_H_\n- 13 #undef _ALBERTA_H_\n- 14#endif // _ALBERTA_H_\n- 15\n- 16#ifdef ALBERTA_VERSION\n- 17 #undef ALBERTA_VERSION\n- 18#endif // ALBERTA_VERSION\n- 19\n- 20#ifdef ALBERTA_DEBUG\n- 21 #undef ALBERTA_DEBUG\n- 22#endif // ALBERTA_DEBUG\n- 23\n- 24#ifdef DIM_MAX\n- 25 #undef DIM_MAX\n- 26#endif // DIM_MAX\n- 27\n- 28#ifdef N_VERTICES\n- 29 #undef N_VERTICES\n- 30#endif // N_VERTICES\n- 31\n- 32#ifdef N_EDGES\n- 33 #undef N_EDGES\n- 34#endif // N_EDGES\n- 35\n- 36#ifdef N_WALLS\n- 37 #undef N_WALLS\n- 38#endif // N_WALLS\n- 39\n- 40#ifdef N_FACES\n- 41 #undef N_FACES\n- 42#endif // N_FACES\n- 43\n- 44#ifdef N_NEIGH\n- 45 #undef N_NEIGH\n- 46#endif // N_NEIGH\n- 47\n- 48#ifdef DIM_FAC\n- 49 #undef DIM_FAC\n- 50#endif // DIM_FAC\n- 51\n- 52#ifdef N_VERTICES_0D\n- 53 #undef N_VERTICES_0D\n- 54#endif // N_VERTICES_0D\n- 55\n- 56#ifdef N_EDGES_0D\n- 57 #undef N_EDGES_0D\n- 58#endif // N_EDGES_0D\n+ 5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH\n+ 6#define DUNE_ALBERTAGRID_INDEXSTACK_HH\n+ 7\n+ 8#include \n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13\n+ 20namespace Dune {\n+ 21\n+ 24 template \n+25 class IndexStack\n+ 26 {\n+ 27 class MyFiniteStack : public ReservedVector\n+ 28 {\n+ 29 typedef ReservedVector BaseType ;\n+ 30 public:\n+ 32 bool full () const { return this->size() >= length; }\n+ 33\n+ 35 void push( const T& t ) { BaseType :: push_back( t ); }\n+ 36\n+ 38 T topAndPop ()\n+ 39 {\n+ 40 assert( !this->empty() );\n+ 41 assert( this->size() <= length );\n+ 42 // This code is not slower than using the array structure directly.\n+ 43 // The compiler removes the temporary completely. I measured this.\n+ 44 // See the commit message for revision 7837 for more details.\n+ 45 T tmp = this->back();\n+ 46 this->pop_back();\n+ 47 return tmp;\n+ 48 }\n+ 49 };\n+ 50\n+ 51 typedef MyFiniteStack StackType;\n+ 52 typedef typename std::stack < StackType * > StackListType;\n+ 53\n+ 54 StackListType fullStackList_;\n+ 55 StackListType emptyStackList_;\n+ 56\n+ 57 //typedef typename StackListType::Iterator DListIteratorType;\n+ 58 StackType * stack_;\n 59\n- 60#ifdef N_FACES_0D\n- 61 #undef N_FACES_0D\n- 62#endif // N_FACES_0D\n- 63\n- 64#ifdef N_NEIGH_0D\n- 65 #undef N_NEIGH_0D\n- 66#endif // N_NEIGH_0D\n- 67\n- 68#ifdef N_WALLS_0D\n- 69 #undef N_WALLS_0D\n- 70#endif // N_WALLS_0D\n+ 60 // current maxIndex\n+ 61 int maxIndex_;\n+ 62 public:\n+ 64 inline IndexStack();\n+ 65\n+ 67 inline ~IndexStack ();\n+ 68\n+70 inline void checkAndSetMax(T index) { if(index > maxIndex_) maxIndex_ =\n+index;}\n 71\n- 72#ifdef N_VERTICES_1D\n- 73 #undef N_VERTICES_1D\n- 74#endif // N_VERTICES_1D\n- 75\n- 76#ifdef N_EDGES_1D\n- 77 #undef N_EDGES_1D\n- 78#endif // N_EDGES_1D\n- 79\n- 80#ifdef N_FACES_1D\n- 81 #undef N_FACES_1D\n- 82#endif // N_FACES_1D\n+73 inline void setMaxIndex(T index) { maxIndex_ = index; }\n+ 74\n+76 inline int getMaxIndex() const { return maxIndex_; }\n+ 77\n+79 inline int size() const { return getMaxIndex(); }\n+ 80\n+ 82 inline T getIndex ();\n 83\n- 84#ifdef N_NEIGH_1D\n- 85 #undef N_NEIGH_1D\n- 86#endif // N_NEIGH_1D\n- 87\n- 88#ifdef N_WALLS_1D\n- 89 #undef N_WALLS_1D\n- 90#endif // N_WALLS_1D\n- 91\n- 92#ifdef N_VERTICES_2D\n- 93 #undef N_VERTICES_2D\n- 94#endif // N_VERTICES_2D\n- 95\n- 96#ifdef N_EDGES_2D\n- 97 #undef N_EDGES_2D\n- 98#endif // N_EDGES_2D\n- 99\n- 100#ifdef N_FACES_2D\n- 101 #undef N_FACES_2D\n- 102#endif // N_FACES_2D\n- 103\n- 104#ifdef N_NEIGH_2D\n- 105 #undef N_NEIGH_2D\n- 106#endif // N_NEIGH_2D\n- 107\n- 108#ifdef N_WALLS_2D\n- 109 #undef N_WALLS_2D\n- 110#endif // N_WALLS_2D\n- 111\n- 112#ifdef N_VERTICES_3D\n- 113 #undef N_VERTICES_3D\n- 114#endif // N_VERTICES_3D\n- 115\n- 116#ifdef N_EDGES_3D\n- 117 #undef N_EDGES_3D\n- 118#endif // N_EDGES_3D\n- 119\n- 120#ifdef N_FACES_3D\n- 121 #undef N_FACES_3D\n- 122#endif // N_FACES_3D\n+ 85 inline void freeIndex(T index);\n+ 86\n+ 88 inline void test ();\n+ 89\n+ 90 // backup set to out stream\n+ 91 inline void backupIndexSet ( std::ostream & os );\n+ 92\n+ 93 // restore from in stream\n+ 94 inline void restoreIndexSet ( std::istream & is );\n+ 95 private:\n+ 96 // no copy constructor allowed\n+ 97 IndexStack( const IndexStack & s) : maxIndex_ (0) , stack_(0) {}\n+ 98\n+ 99 // no assignment operator allowed\n+ 100 IndexStack & operator = ( const IndexStack & s)\n+ 101 {\n+ 102 DUNE_THROW(Exception, \"IndexStack::operator = () not allowed!\");\n+ 103 return *this;\n+ 104 }\n+ 105\n+ 106 // clear fullStacks\n+ 107 void clearStack ();\n+ 108\n+ 109 }; // end class IndexStack\n+ 110\n+ 111 //****************************************************************\n+ 112 // Inline implementation\n+ 113 // ***************************************************************\n+ 114 template \n+115 inline IndexStack::IndexStack()\n+ 116 : stack_ ( new StackType () ) , maxIndex_ (0) {}\n+ 117\n+ 118 template \n+119 inline IndexStack::~IndexStack ()\n+ 120 {\n+ 121 if(stack_) delete stack_;\n+ 122 stack_ = 0;\n 123\n- 124#ifdef N_NEIGH_3D\n- 125 #undef N_NEIGH_3D\n- 126#endif // N_NEIGH_3D\n- 127\n- 128#ifdef N_WALLS_3D\n- 129 #undef N_WALLS_3D\n- 130#endif // N_WALLS_3D\n- 131\n- 132#ifdef N_VERTICES_MAX\n- 133 #undef N_VERTICES_MAX\n- 134#endif // N_VERTICES_MAX\n- 135\n- 136#ifdef N_EDGES_MAX\n- 137 #undef N_EDGES_MAX\n- 138#endif // N_EDGES_MAX\n- 139\n- 140#ifdef N_FACES_MAX\n- 141 #undef N_FACES_MAX\n- 142#endif // N_FACES_MAX\n- 143\n- 144#ifdef N_NEIGH_MAX\n- 145 #undef N_NEIGH_MAX\n- 146#endif // N_NEIGH_MAX\n- 147\n- 148#ifdef N_WALLS_MAX\n- 149 #undef N_WALLS_MAX\n- 150#endif // N_WALLS_MAX\n- 151\n- 152#ifdef N_LAMBDA\n- 153 #undef N_LAMBDA\n- 154#endif // N_LAMBDA\n- 155\n- 156#ifdef LAMBDA_MAX\n- 157 #undef LAMBDA_MAX\n- 158#endif // LAMBDA_MAX\n- 159\n- 160#ifdef INDEX\n- 161 #undef INDEX\n- 162#endif // INDEX\n- 163\n- 164#ifdef INDEX\n- 165 #undef INDEX\n- 166#endif // INDEX\n- 167\n- 168#ifdef IS_LEAF_EL\n- 169 #undef IS_LEAF_EL\n- 170#endif // IS_LEAF_EL\n- 171\n- 172#ifdef LEAF_DATA\n- 173 #undef LEAF_DATA\n- 174#endif // LEAF_DATA\n+ 124 while( !fullStackList_.empty() )\n+ 125 {\n+ 126 StackType * st = fullStackList_.top();\n+ 127 if(st) delete st;\n+ 128 fullStackList_.pop();\n+ 129 }\n+ 130 while( !emptyStackList_.empty() )\n+ 131 {\n+ 132 StackType * st = emptyStackList_.top();\n+ 133 if(st) delete st;\n+ 134 emptyStackList_.pop();\n+ 135 }\n+ 136 }\n+ 137\n+ 138 template \n+139 inline T IndexStack::getIndex ()\n+ 140 {\n+ 141 if((*stack_).empty())\n+ 142 {\n+ 143 if( fullStackList_.size() <= 0)\n+ 144 {\n+ 145 return maxIndex_++;\n+ 146 }\n+ 147 else\n+ 148 {\n+ 149 emptyStackList_.push( stack_ );\n+ 150 stack_ = fullStackList_.top();\n+ 151 fullStackList_.pop();\n+ 152 }\n+ 153 }\n+ 154 return (*stack_).topAndPop();\n+ 155 }\n+ 156\n+ 157 template \n+158 inline void IndexStack::freeIndex ( T index )\n+ 159 {\n+ 160 if((*stack_).full())\n+ 161 {\n+ 162 fullStackList_.push( stack_ );\n+ 163 if(emptyStackList_.size() <= 0)\n+ 164 {\n+ 165 stack_ = new StackType ();\n+ 166 }\n+ 167 else\n+ 168 {\n+ 169 stack_ = emptyStackList_.top();\n+ 170 emptyStackList_.pop();\n+ 171 }\n+ 172 }\n+ 173 (*stack_).push(index);\n+ 174 }\n 175\n- 176#ifdef INTERIOR\n- 177 #undef INTERIOR\n- 178#endif // INTERIOR\n- 179\n- 180#ifdef DIRICHLET\n- 181 #undef DIRICHLET\n- 182#endif // DIRICHLET\n+ 176 template \n+177 inline void IndexStack::test ()\n+ 178 {\n+ 179 T vec[2*length];\n+ 180\n+ 181 for(int i=0; i<2*length; i++)\n+ 182 vec[i] = getIndex();\n 183\n- 184#ifdef NEUMANN\n- 185 #undef NEUMANN\n- 186#endif // NEUMANN\n- 187\n- 188#ifdef IS_NEUMANN\n- 189 #undef IS_NEUMANN\n- 190#endif // IS_NEUMANN\n- 191\n- 192#ifdef IS_DIRICHLET\n- 193 #undef IS_DIRICHLET\n- 194#endif // IS_DIRICHLET\n- 195\n- 196#ifdef IS_INTERIOR\n- 197 #undef IS_INTERIOR\n- 198#endif // IS_INTERIOR\n- 199\n- 200#ifdef N_NODE_TYPES\n- 201 #undef N_NODE_TYPES\n- 202#endif // N_NODE_TYPES\n- 203\n- 204#ifdef VERTEX\n- 205 #undef VERTEX\n- 206#endif // VERTEX\n+ 184 for(int i=0; i<2*length; i++)\n+ 185 freeIndex(vec[i]);\n+ 186\n+ 187 for(int i=0; i<2*length; i++)\n+ 188 vec[i] = getIndex();\n+ 189\n+ 190 for(int i=0; i<2*length; i++)\n+ 191 printf(\" index [%d] = %d \\n\",i,vec[i]);\n+ 192 }\n+ 193\n+ 194 template \n+195 inline void IndexStack::backupIndexSet ( std::ostream & os )\n+ 196 {\n+ 197 // holes are not stored at the moment\n+ 198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ;\n+ 199 return ;\n+ 200 }\n+ 201\n+ 202 template \n+203 inline void IndexStack::restoreIndexSet ( std::istream & is )\n+ 204 {\n+ 205 is.read ( ((char *) &maxIndex_), sizeof(int) );\n+ 206 clearStack ();\n 207\n- 208#ifdef CENTER\n- 209 #undef CENTER\n- 210#endif // CENTER\n- 211\n- 212#ifdef EDGE\n- 213 #undef EDGE\n- 214#endif // EDGE\n- 215\n- 216#ifdef FACE\n- 217 #undef FACE\n- 218#endif // FACE\n- 219\n- 220#ifdef LIST_ENTRY\n- 221 #undef LIST_ENTRY\n- 222#endif // LIST_ENTRY\n- 223\n- 224#ifdef WALL_BOUND\n- 225 #undef WALL_BOUND\n- 226#endif // WALL_BOUND\n- 227\n- 228#ifdef FILL_NOTHING\n- 229 #undef FILL_NOTHING\n- 230#endif // FILL_NOTHING\n- 231\n- 232#ifdef FILL_COORDS\n- 233 #undef FILL_COORDS\n- 234#endif // FILL_COORDS\n- 235\n- 236#ifdef FILL_BOUND\n- 237 #undef FILL_BOUND\n- 238#endif // FILL_BOUND\n- 239\n- 240#ifdef FILL_NEIGH\n- 241 #undef FILL_NEIGH\n- 242#endif // FILL_NEIGH\n- 243\n- 244#ifdef FILL_OPP_COORDS\n- 245 #undef FILL_OPP_COORDS\n- 246#endif // FILL_OPP_COORDS\n- 247\n- 248#ifdef FILL_ORIENTATION\n- 249 #undef FILL_ORIENTATION\n- 250#endif // FILL_ORIENTATION\n- 251\n- 252#ifdef FILL_EL_TYPE\n- 253 #undef FILL_EL_TYPE\n- 254#endif // FILL_EL_TYPE\n- 255\n- 256#ifdef FILL_PROJECTION\n- 257 #undef FILL_PROJECTION\n- 258#endif // FILL_PROJECTION\n- 259\n- 260#ifdef FILL_ANY\n- 261 #undef FILL_ANY\n- 262#endif // FILL_ANY\n- 263\n- 264#ifdef HOOK_QUEUE_OFFSET\n- 265 #undef HOOK_QUEUE_OFFSET\n- 266#endif // HOOK_QUEUE_OFFSET\n- 267\n- 268#ifdef RUN_HOOKS_0\n- 269 #undef RUN_HOOKS_0\n- 270#endif // RUN_HOOKS_0\n- 271\n- 272#ifdef RUN_BAS_FCTS_HOOKS\n- 273 #undef RUN_BAS_FCTS_HOOKS\n- 274#endif // RUN_BAS_FCTS_HOOKS\n- 275\n- 276#ifdef RUN_HOOKS_1\n- 277 #undef RUN_HOOKS_1\n- 278#endif // RUN_HOOKS_1\n- 279\n- 280#ifdef RUN_HOOKS_2\n- 281 #undef RUN_HOOKS_2\n- 282#endif // RUN_HOOKS_2\n- 283\n- 284#ifdef RUN_HOOKS_3\n- 285 #undef RUN_HOOKS_3\n- 286#endif // RUN_HOOKS_3\n- 287\n- 288#ifdef RUN_HOOKS_4\n- 289 #undef RUN_HOOKS_4\n- 290#endif // RUN_HOOKS_4\n- 291\n- 292#ifdef RUN_HOOKS_5\n- 293 #undef RUN_HOOKS_5\n- 294#endif // RUN_HOOKS_5\n- 295\n- 296#ifdef RUN_HOOKS_6\n- 297 #undef RUN_HOOKS_6\n- 298#endif // RUN_HOOKS_6\n- 299\n- 300#ifdef RUN_HOOKS_7\n- 301 #undef RUN_HOOKS_7\n- 302#endif // RUN_HOOKS_7\n- 303\n- 304#ifdef CALL_EVERY_EL_PREORDER\n- 305 #undef CALL_EVERY_EL_PREORDER\n- 306#endif // CALL_EVERY_EL_PREORDER\n- 307\n- 308#ifdef CALL_EVERY_EL_INORDER\n- 309 #undef CALL_EVERY_EL_INORDER\n- 310#endif // CALL_EVERY_EL_INORDER\n- 311\n- 312#ifdef CALL_EVERY_EL_POSTORDER\n- 313 #undef CALL_EVERY_EL_POSTORDER\n- 314#endif // CALL_EVERY_EL_POSTORDER\n- 315\n- 316#ifdef CALL_LEAF_EL\n- 317 #undef CALL_LEAF_EL\n- 318#endif // CALL_LEAF_EL\n- 319\n- 320#ifdef CALL_LEAF_EL_LEVEL\n- 321 #undef CALL_LEAF_EL_LEVEL\n- 322#endif // CALL_LEAF_EL_LEVEL\n- 323\n- 324#ifdef CALL_EL_LEVEL\n- 325 #undef CALL_EL_LEVEL\n- 326#endif // CALL_EL_LEVEL\n- 327\n- 328#ifdef CALL_MG_LEVEL\n- 329 #undef CALL_MG_LEVEL\n- 330#endif // CALL_MG_LEVEL\n- 331\n- 332#ifdef TEST_FLAG\n- 333 #undef TEST_FLAG\n- 334#endif // TEST_FLAG\n- 335\n- 336#ifdef DOF_ADMIN_DEF\n- 337 #undef DOF_ADMIN_DEF\n- 338#endif // DOF_ADMIN_DEF\n- 339\n- 340#ifdef DOF_FREE_SIZE\n- 341 #undef DOF_FREE_SIZE\n- 342#endif // DOF_FREE_SIZE\n- 343\n- 344#ifdef DOF_UNIT_ALL_FREE\n- 345 #undef DOF_UNIT_ALL_FREE\n- 346#endif // DOF_UNIT_ALL_FREE\n- 347\n- 348#ifdef FOR_ALL_DOFS\n- 349 #undef FOR_ALL_DOFS\n- 350#endif // FOR_ALL_DOFS\n- 351\n- 352#ifdef FOR_ALL_FREE_DOFS\n- 353 #undef FOR_ALL_FREE_DOFS\n- 354#endif // FOR_ALL_FREE_DOFS\n- 355\n- 356#ifdef DOWBM_FULL\n- 357 #undef DOWBM_FULL\n- 358#endif // DOWBM_FULL\n- 359\n- 360#ifdef DOWBM_SYMM\n- 361 #undef DOWBM_SYMM\n- 362#endif // DOWBM_SYMM\n- 363\n- 364#ifdef DOWBM_DIAG\n- 365 #undef DOWBM_DIAG\n- 366#endif // DOWBM_DIAG\n- 367\n- 368#ifdef ROW_LENGTH\n- 369 #undef ROW_LENGTH\n- 370#endif // ROW_LENGTH\n- 371\n- 372#ifdef ENTRY_USED\n- 373 #undef ENTRY_USED\n- 374#endif // ENTRY_USED\n- 375\n- 376#ifdef ENTRY_NOT_USED\n- 377 #undef ENTRY_NOT_USED\n- 378#endif // ENTRY_NOT_USED\n- 379\n- 380#ifdef UNUSED_ENTRY\n- 381 #undef UNUSED_ENTRY\n- 382#endif // UNUSED_ENTRY\n- 383\n- 384#ifdef NO_MORE_ENTRIES\n- 385 #undef NO_MORE_ENTRIES\n- 386#endif // NO_MORE_ENTRIES\n- 387\n- 388#ifdef LAGRANGE_NODES\n- 389 #undef LAGRANGE_NODES\n- 390#endif // LAGRANGE_NODES\n- 391\n- 392#ifdef MAX_N_QUAD_POINTS\n- 393 #undef MAX_N_QUAD_POINTS\n- 394#endif // MAX_N_QUAD_POINTS\n- 395\n- 396#ifdef INIT_PHI\n- 397 #undef INIT_PHI\n- 398#endif // INIT_PHI\n- 399\n- 400#ifdef INIT_GRD_PHI\n- 401 #undef INIT_GRD_PHI\n- 402#endif // INIT_GRD_PHI\n- 403\n- 404#ifdef INIT_D2_PHI\n- 405 #undef INIT_D2_PHI\n- 406#endif // INIT_D2_PHI\n- 407\n- 408#ifdef MESH_REFINED\n- 409 #undef MESH_REFINED\n- 410#endif // MESH_REFINED\n- 411\n- 412#ifdef MESH_COARSENED\n- 413 #undef MESH_COARSENED\n- 414#endif // MESH_COARSENED\n- 415\n- 416#ifdef H1_NORM\n- 417 #undef H1_NORM\n- 418#endif // H1_NORM\n- 419\n- 420#ifdef L2_NORM\n- 421 #undef L2_NORM\n- 422#endif // L2_NORM\n- 423\n- 424#ifdef GRAPH_MESH_BOUNDARY\n- 425 #undef GRAPH_MESH_BOUNDARY\n- 426#endif // GRAPH_MESH_BOUNDARY\n- 427\n- 428#ifdef GRAPH_MESH_ELEMENT_MARK\n- 429 #undef GRAPH_MESH_ELEMENT_MARK\n- 430#endif // GRAPH_MESH_ELEMENT_MARK\n- 431\n- 432#ifdef GRAPH_MESH_VERTEX_DOF\n- 433 #undef GRAPH_MESH_VERTEX_DOF\n- 434#endif // GRAPH_MESH_VERTEX_DOF\n- 435\n- 436#ifdef GRAPH_MESH_ELEMENT_INDEX\n- 437 #undef GRAPH_MESH_ELEMENT_INDEX\n- 438#endif // GRAPH_MESH_ELEMENT_INDEX\n- 439\n- 440#ifdef GET_MESH\n- 441 #undef GET_MESH\n- 442#endif // GET_MESH\n- 443\n- 444#ifdef GET_DOF_VEC\n- 445 #undef GET_DOF_VEC\n- 446#endif // GET_DOF_VEC\n- 447\n- 448#ifdef CARD_SN_MAX\n- 449 #undef CARD_SN_MAX\n- 450#endif // CARD_SN_MAX\n- 451\n- 452#ifdef INIT_UH\n- 453 #undef INIT_UH\n- 454#endif // INIT_UH\n- 455\n- 456#ifdef INIT_GRD_UH\n- 457 #undef INIT_GRD_UH\n- 458#endif // INIT_GRD_UH\n- 459\n- 460#ifdef TRAVERSE_START\n- 461 #undef TRAVERSE_START\n- 462#endif // TRAVERSE_START\n- 463\n- 464#ifdef TRAVERSE_STOP\n- 465 #undef TRAVERSE_STOP\n- 466#endif // TRAVERSE_STOP\n+ 208 return ;\n+ 209 }\n+ 210\n+ 211 template \n+ 212 inline void IndexStack::clearStack ()\n+ 213 {\n+ 214 if(stack_)\n+ 215 {\n+ 216 delete stack_;\n+ 217 stack_ = new StackType();\n+ 218 assert(stack_);\n+ 219 }\n+ 220\n+ 221 while( !fullStackList_.empty() )\n+ 222 {\n+ 223 StackType * st = fullStackList_.top();\n+ 224 if(st) delete st;\n+ 225 fullStackList_.pop();\n+ 226 }\n+ 227 return;\n+ 228 }\n+ 229\n+ 230} // end namespace Dune\n+ 231#endif\n+Dune\n+Include standard header files.\n+Definition: agrid.hh:60\n+Dune::IndexStack\n+Definition: indexstack.hh:26\n+Dune::IndexStack::restoreIndexSet\n+void restoreIndexSet(std::istream &is)\n+Definition: indexstack.hh:203\n+Dune::IndexStack::checkAndSetMax\n+void checkAndSetMax(T index)\n+set index as maxIndex if index is bigger than maxIndex\n+Definition: indexstack.hh:70\n+Dune::IndexStack::backupIndexSet\n+void backupIndexSet(std::ostream &os)\n+Definition: indexstack.hh:195\n+Dune::IndexStack::~IndexStack\n+~IndexStack()\n+Destructor, deleting all stacks.\n+Definition: indexstack.hh:119\n+Dune::IndexStack::getIndex\n+T getIndex()\n+restore index from stack or create new index\n+Definition: indexstack.hh:139\n+Dune::IndexStack::IndexStack\n+IndexStack()\n+Constructor, create new IndexStack.\n+Definition: indexstack.hh:115\n+Dune::IndexStack::setMaxIndex\n+void setMaxIndex(T index)\n+set index as maxIndex\n+Definition: indexstack.hh:73\n+Dune::IndexStack::size\n+int size() const\n+return maxIndex which is also the\n+Definition: indexstack.hh:79\n+Dune::IndexStack::test\n+void test()\n+test stack functionality\n+Definition: indexstack.hh:177\n+Dune::IndexStack::freeIndex\n+void freeIndex(T index)\n+store index on stack\n+Definition: indexstack.hh:158\n+Dune::IndexStack::getMaxIndex\n+int getMaxIndex() const\n+return maxIndex which is also the\n+Definition: indexstack.hh:76\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00686.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00686.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: refinement.hh File Reference\n+dune-grid: misc.hh File Reference\n \n \n \n \n \n \n \n@@ -64,59 +64,187 @@\n \n \n \n
    \n \n-
    refinement.hh File Reference
    \n+Namespaces |\n+Macros |\n+Typedefs |\n+Functions |\n+Variables
    \n+
    misc.hh File Reference
    \n \n
    \n-\n-

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

    \n
    #include <cassert>
    \n-#include <dune/grid/albertagrid/misc.hh>
    \n-#include <dune/grid/albertagrid/elementinfo.hh>
    \n+#include <utility>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/hybridutilities.hh>
    \n+#include <dune/common/typetraits.hh>
    \n+#include <dune/grid/albertagrid/albertaheader.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::Alberta::Patch< dim >
    class  Dune::AlbertaError
     
    class  Dune::AlbertaIOError
     
    class  Dune::Alberta::GlobalSpace
     
    struct  Dune::Alberta::NumSubEntities< dim, 0 >
     
    struct  Dune::Alberta::NumSubEntities< dim, dim >
     
    struct  Dune::Alberta::NumSubEntities< 0, 0 >
     
    struct  Dune::Alberta::NumSubEntities< 2, 1 >
     
    struct  Dune::Alberta::NumSubEntities< 3, 1 >
     
    struct  Dune::Alberta::NumSubEntities< 3, 2 >
     
    struct  Dune::Alberta::CodimType< dim, 0 >
     
    struct  Dune::Alberta::CodimType< dim, dim >
     
    struct  Dune::Alberta::CodimType< 2, 1 >
     
    struct  Dune::Alberta::CodimType< 3, 1 >
     
    struct  Dune::Alberta::CodimType< 3, 2 >
     
    struct  Dune::Alberta::FillFlags< dim >
     
    struct  Dune::Alberta::RefinementEdge< dim >
     
    struct  Dune::Alberta::RefinementEdge< 2 >
     
    struct  Dune::Alberta::ForEachInteriorSubChild< dim, 0 >
    struct  Dune::Alberta::Dune2AlbertaNumbering< dim, codim >
     
    struct  Dune::Alberta::ForEachInteriorSubChild< dim, dim >
    struct  Dune::Alberta::Dune2AlbertaNumbering< 3, 2 >
     
    struct  Dune::Alberta::ForEachInteriorSubChild< 2, 1 >
    struct  Dune::Alberta::Generic2AlbertaNumbering< dim, codim >
     
    struct  Dune::Alberta::ForEachInteriorSubChild< 3, 1 >
    struct  Dune::Alberta::Generic2AlbertaNumbering< dim, 1 >
     
    struct  Dune::Alberta::ForEachInteriorSubChild< 3, 2 >
    struct  Dune::Alberta::Generic2AlbertaNumbering< 1, 1 >
     
    struct  Dune::Alberta::GeometryInFather< 1 >
    struct  Dune::Alberta::Generic2AlbertaNumbering< 3, 2 >
     
    struct  Dune::Alberta::GeometryInFather< 2 >
    class  Dune::Alberta::NumberingMap< dim, Numbering >
     
    struct  Dune::Alberta::GeometryInFather< 3 >
    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 >
     
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n+\n+\n+\n+

    \n+Macros

    #define DUNE_ALBERTA_CACHE_COORDINATES   1
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+

    \n+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
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+

    \n+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)
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n

    \n+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
     
    \n-

    Detailed Description

    \n-

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

    \n-
    Author
    Martin Nolte
    \n-
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DUNE_ALBERTA_CACHE_COORDINATES

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DUNE_ALBERTA_CACHE_COORDINATES   1
    \n+
    \n+\n+
    \n+
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,48 +5,151 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-refinement.hh File Reference\n-provides a wrapper for ALBERTA's refinement patches and the corners for\n-geometryInFather More...\n+Classes | Namespaces | Macros | Typedefs | Functions | Variables\n+misc.hh File Reference\n #include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::Alberta::Patch<_dim_>\n+ class \u00a0Dune::AlbertaError\n \u00a0\n-struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_dim,_0_>\n+ class \u00a0Dune::AlbertaIOError\n \u00a0\n-struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_dim,_dim_>\n+ class \u00a0Dune::Alberta::GlobalSpace\n \u00a0\n-struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_2,_1_>\n+struct \u00a0Dune::Alberta::NumSubEntities<_dim,_0_>\n \u00a0\n-struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_3,_1_>\n+struct \u00a0Dune::Alberta::NumSubEntities<_dim,_dim_>\n \u00a0\n-struct \u00a0Dune::Alberta::ForEachInteriorSubChild<_3,_2_>\n+struct \u00a0Dune::Alberta::NumSubEntities<_0,_0_>\n \u00a0\n-struct \u00a0Dune::Alberta::GeometryInFather<_1_>\n+struct \u00a0Dune::Alberta::NumSubEntities<_2,_1_>\n \u00a0\n-struct \u00a0Dune::Alberta::GeometryInFather<_2_>\n+struct \u00a0Dune::Alberta::NumSubEntities<_3,_1_>\n \u00a0\n-struct \u00a0Dune::Alberta::GeometryInFather<_3_>\n+struct \u00a0Dune::Alberta::NumSubEntities<_3,_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::CodimType<_dim,_0_>\n+\u00a0\n+struct \u00a0Dune::Alberta::CodimType<_dim,_dim_>\n+\u00a0\n+struct \u00a0Dune::Alberta::CodimType<_2,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::CodimType<_3,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::CodimType<_3,_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::FillFlags<_dim_>\n+\u00a0\n+struct \u00a0Dune::Alberta::RefinementEdge<_dim_>\n+\u00a0\n+struct \u00a0Dune::Alberta::RefinementEdge<_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Dune2AlbertaNumbering<_dim,_codim_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Dune2AlbertaNumbering<_3,_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_dim,_codim_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_dim,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_1,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Generic2AlbertaNumbering<_3,_2_>\n+\u00a0\n+ class \u00a0Dune::Alberta::NumberingMap<_dim,_Numbering_>\n+\u00a0\n+struct \u00a0Dune::Alberta::MapVertices<_dim,_0_>\n+\u00a0\n+struct \u00a0Dune::Alberta::MapVertices<_2,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::MapVertices<_3,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::MapVertices<_3,_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::MapVertices<_dim,_dim_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Twist<_dim,_subdim_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Twist<_dim,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Twist<_1,_1_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Twist<_dim,_2_>\n+\u00a0\n+struct \u00a0Dune::Alberta::Twist<_2,_2_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n-***** Detailed Description *****\n-provides a wrapper for ALBERTA's refinement patches and the corners for\n-geometryInFather\n- Author\n- Martin Nolte\n+ Macros\n+#define\u00a0DUNE_ALBERTA_CACHE_COORDINATES\u00a0\u00a0\u00a01\n+\u00a0\n+ Typedefs\n+ typedef ALBERTA REAL\u00a0Dune::Alberta::Real\n+\u00a0\n+ typedef ALBERTA REAL_B\u00a0Dune::Alberta::LocalVector\n+\u00a0\n+ typedef ALBERTA REAL_D\u00a0Dune::Alberta::GlobalVector\n+\u00a0\n+ typedef ALBERTA REAL_DD\u00a0Dune::Alberta::GlobalMatrix\n+\u00a0\n+ typedef ALBERTA AFF_TRAFO\u00a0Dune::Alberta::AffineTransformation\n+\u00a0\n+ typedef ALBERTA MESH\u00a0Dune::Alberta::Mesh\n+\u00a0\n+ typedef ALBERTA EL\u00a0Dune::Alberta::Element\n+\u00a0\n+typedef ALBERTA BNDRY_TYPE\u00a0Dune::Alberta::BoundaryId\n+\u00a0\n+ typedef U_CHAR\u00a0Dune::Alberta::ElementType\n+\u00a0\n+ typedef ALBERTA FE_SPACE\u00a0Dune::Alberta::DofSpace\n+\u00a0\n+ Functions\n+template\n+Data *\u00a0Dune::Alberta::memAlloc (size_t size)\n+\u00a0\n+template\n+Data *\u00a0Dune::Alberta::memCAlloc (size_t size)\n+\u00a0\n+template\n+Data *\u00a0Dune::Alberta::memReAlloc (Data *ptr, size_t oldSize, size_t newSize)\n+\u00a0\n+template\n+ void\u00a0Dune::Alberta::memFree (Data *ptr, size_t size)\n+\u00a0\n+template\n+ int\u00a0Dune::Alberta::applyTwist (int twist, int i)\n+\u00a0\n+template\n+ int\u00a0Dune::Alberta::applyInverseTwist (int twist, int i)\n+\u00a0\n+ Variables\n+static const int\u00a0Dune::Alberta::dimWorld = DIM_OF_WORLD\n+\u00a0\n+static const int\u00a0Dune::Alberta::meshRefined = MESH_REFINED\n+\u00a0\n+static const int\u00a0Dune::Alberta::meshCoarsened = MESH_COARSENED\n+\u00a0\n+static const int\u00a0Dune::Alberta::InteriorBoundary = INTERIOR\n+\u00a0\n+static const int\u00a0Dune::Alberta::DirichletBoundary = DIRICHLET\n+\u00a0\n+***** Macro Definition Documentation *****\n+***** \u25c6\u00a0DUNE_ALBERTA_CACHE_COORDINATES *****\n+#define DUNE_ALBERTA_CACHE_COORDINATES\u00a0\u00a0\u00a01\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00686_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: refinement.hh Source File\n+dune-grid: misc.hh Source File\n \n \n \n \n \n \n \n@@ -62,400 +62,745 @@\n \n \n \n
    \n-
    refinement.hh
    \n+
    misc.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_REFINEMENT_HH
    \n-
    6#define DUNE_ALBERTA_REFINEMENT_HH
    \n+
    5#ifndef DUNE_ALBERTA_MISC_HH
    \n+
    6#define DUNE_ALBERTA_MISC_HH
    \n
    7
    \n-
    14#include <cassert>
    \n-
    15
    \n-\n-\n+
    8#include <cassert>
    \n+
    9#include <utility>
    \n+
    10
    \n+
    11#include <dune/common/exceptions.hh>
    \n+
    12#include <dune/common/hybridutilities.hh>
    \n+
    13#include <dune/common/typetraits.hh>
    \n+
    14
    \n+\n+
    16
    \n+
    17#if HAVE_ALBERTA
    \n
    18
    \n-
    19#if HAVE_ALBERTA
    \n-
    20
    \n-
    21namespace Dune
    \n-
    22{
    \n+
    19// should the coordinates be cached in a vector (required for ALBERTA 2.0)?
    \n+
    20#ifndef DUNE_ALBERTA_CACHE_COORDINATES
    \n+
    21#define DUNE_ALBERTA_CACHE_COORDINATES 1
    \n+
    22#endif
    \n
    23
    \n-
    24 namespace Alberta
    \n-
    25 {
    \n+
    24namespace Dune
    \n+
    25{
    \n
    26
    \n-
    27 // Internal Forward Declarations
    \n-
    28 // -----------------------------
    \n+
    27 // Exceptions
    \n+
    28 // ----------
    \n
    29
    \n-
    30 template< int dim, int codim >
    \n-\n-
    32
    \n+\n+
    31 : public Exception
    \n+
    32 {};
    \n
    33
    \n-
    34
    \n-
    35 // Patch
    \n-
    36 // -----
    \n+\n+
    35 : public IOError
    \n+
    36 {};
    \n
    37
    \n-
    38 template< int dim >
    \n-
    39 class Patch
    \n-
    40 {
    \n-
    41 typedef Patch< dim > This;
    \n+
    38
    \n+
    39
    \n+
    40 namespace Alberta
    \n+
    41 {
    \n
    42
    \n-
    43 static_assert(((dim >= 1) && (dim <= 3)),
    \n-
    44 "Alberta supports only dimensions 1, 2, 3");
    \n+
    43 // Import Types
    \n+
    44 // ------------
    \n
    45
    \n-
    46 public:
    \n-
    47 static const int dimension = dim;
    \n-
    48
    \n-\n-
    50
    \n-
    51 typedef ALBERTA RC_LIST_EL ElementList;
    \n-
    52
    \n-
    53 private:
    \n-
    54 ElementList *list_;
    \n-
    55 int count_;
    \n-
    56
    \n-
    57 public:
    \n-
    58 Patch ( ElementList *list, int count )
    \n-
    59 : list_( list ),
    \n-
    60 count_( count )
    \n-
    61 {
    \n-
    62 assert( count > 0 );
    \n-
    63 }
    \n+
    46 static const int dimWorld = DIM_OF_WORLD;
    \n+
    47
    \n+
    48 typedef ALBERTA REAL Real;
    \n+
    49 typedef ALBERTA REAL_B LocalVector; // in barycentric coordinates
    \n+
    50 typedef ALBERTA REAL_D GlobalVector;
    \n+
    51 typedef ALBERTA REAL_DD GlobalMatrix;
    \n+
    52 typedef ALBERTA AFF_TRAFO AffineTransformation;
    \n+
    53 typedef ALBERTA MESH Mesh;
    \n+
    54 typedef ALBERTA EL Element;
    \n+
    55
    \n+
    56 static const int meshRefined = MESH_REFINED;
    \n+
    57 static const int meshCoarsened = MESH_COARSENED;
    \n+
    58
    \n+
    59 static const int InteriorBoundary = INTERIOR;
    \n+
    60 static const int DirichletBoundary = DIRICHLET;
    \n+
    61 typedef ALBERTA BNDRY_TYPE BoundaryId;
    \n+
    62
    \n+
    63 typedef U_CHAR ElementType;
    \n
    64
    \n-
    65 Element *operator[] ( int i ) const;
    \n+
    65 typedef ALBERTA FE_SPACE DofSpace;
    \n
    66
    \n-
    67 int count () const
    \n-
    68 {
    \n-
    69 return count_;
    \n-
    70 }
    \n+
    67
    \n+
    68
    \n+
    69 // Memory Manipulation Functions
    \n+
    70 // -----------------------------
    \n
    71
    \n-
    72 template< class LevelProvider >
    \n-
    73 ElementInfo elementInfo ( int i, const LevelProvider &levelProvider ) const;
    \n-
    74
    \n-
    75 int elementType ( int i ) const;
    \n-
    76 bool hasNeighbor ( int i, int neighbor ) const;
    \n-
    77 int neighborIndex ( int i, int neighbor ) const;
    \n-
    78
    \n-
    79 template< class Functor >
    \n-
    80 void forEach ( Functor &functor ) const
    \n-
    81 {
    \n-
    82 for( int i = 0; i < count(); ++i )
    \n-
    83 functor( (*this)[ i ] );
    \n-
    84 }
    \n-
    85
    \n-
    86 template< int codim, class Functor >
    \n-
    87 void forEachInteriorSubChild ( Functor &functor ) const
    \n-
    88 {
    \n-\n-
    90 }
    \n-
    91 };
    \n-
    92
    \n-
    93
    \n-
    94 template< int dim >
    \n-
    95 inline Element *Patch< dim >::operator[] ( int i ) const
    \n-
    96 {
    \n-
    97 assert( (i >= 0) && (i < count()) );
    \n-
    98 return list_[ i ].el_info.el;
    \n-
    99 }
    \n+
    72 template< class Data >
    \n+
    73 inline Data *memAlloc ( size_t size )
    \n+
    74 {
    \n+
    75 return MEM_ALLOC( size, Data );
    \n+
    76 }
    \n+
    77
    \n+
    78 template< class Data >
    \n+
    79 inline Data *memCAlloc ( size_t size )
    \n+
    80 {
    \n+
    81 return MEM_CALLOC( size, Data );
    \n+
    82 }
    \n+
    83
    \n+
    84 template< class Data >
    \n+
    85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )
    \n+
    86 {
    \n+
    87 return MEM_REALLOC( ptr, oldSize, newSize, Data );
    \n+
    88 }
    \n+
    89
    \n+
    90 template< class Data >
    \n+
    91 inline void memFree ( Data *ptr, size_t size )
    \n+
    92 {
    \n+
    93 return MEM_FREE( ptr, size, Data );
    \n+
    94 }
    \n+
    95
    \n+
    96
    \n+
    97
    \n+
    98 // GlobalSpace
    \n+
    99 // -----------
    \n
    100
    \n-
    101
    \n-
    102 template< int dim >
    \n-
    103 template< class LevelProvider >
    \n-
    104 inline typename Patch< dim >::ElementInfo
    \n-
    105 Patch< dim >::elementInfo ( int i, const LevelProvider &levelProvider ) const
    \n-
    106 {
    \n-
    107 assert( (i >= 0) && (i < count()) );
    \n-
    108 return ElementInfo::createFake( list_[ i ].el_info );
    \n-
    109 }
    \n-
    110
    \n-
    111 template<>
    \n-
    112 template< class LevelProvider >
    \n-
    113 inline typename Patch< 2 >::ElementInfo
    \n-
    114 Patch< 2 >::elementInfo ( int i, const LevelProvider &levelProvider ) const
    \n-
    115 {
    \n-
    116 assert( (i >= 0) && (i < count()) );
    \n-
    117 const MeshPointer< 2 > &mesh = levelProvider.mesh();
    \n-
    118 const Element *element = (*this)[ i ];
    \n-
    119 const int level = levelProvider( element );
    \n-
    120 return ElementInfo::createFake( mesh, element, level );
    \n-
    121 }
    \n-
    122
    \n+\n+
    102 {
    \n+
    103 typedef GlobalSpace This;
    \n+
    104
    \n+
    105 public:
    \n+\n+\n+
    108
    \n+
    109 private:
    \n+
    110 Matrix identityMatrix_;
    \n+
    111 Vector nullVector_;
    \n+
    112
    \n+
    113 GlobalSpace ()
    \n+
    114 {
    \n+
    115 for( int i = 0; i < dimWorld; ++i )
    \n+
    116 {
    \n+
    117 for( int j = 0; j < dimWorld; ++j )
    \n+
    118 identityMatrix_[ i ][ j ] = Real( 0 );
    \n+
    119 identityMatrix_[ i ][ i ] = Real( 1 );
    \n+
    120 nullVector_[ i ] = Real( 0 );
    \n+
    121 }
    \n+
    122 }
    \n
    123
    \n-
    124 template< int dim >
    \n-
    125 inline int Patch< dim >::elementType ( int i ) const
    \n-
    126 {
    \n-
    127 assert( (i >= 0) && (i < count()) );
    \n-
    128 return list_[ i ].el_info.el_type;
    \n-
    129 }
    \n-
    130
    \n-
    131
    \n-
    132 template< int dim >
    \n-
    133 inline bool Patch< dim >::hasNeighbor ( int i, int neighbor ) const
    \n-
    134 {
    \n-
    135 return (list_[ i ].neigh[ neighbor ] != NULL);
    \n-
    136 }
    \n-
    137
    \n-
    138 template< int dim >
    \n-
    139 inline int Patch< dim >::neighborIndex ( int i, int neighbor ) const
    \n-
    140 {
    \n-
    141 assert( hasNeighbor( i, neighbor ) );
    \n-
    142 return (list_[ i ].neigh[ neighbor ]->no);
    \n-
    143 }
    \n-
    144
    \n-
    145
    \n+
    124 static This &instance ()
    \n+
    125 {
    \n+
    126 static This theInstance;
    \n+
    127 return theInstance;
    \n+
    128 }
    \n+
    129
    \n+
    130 public:
    \n+
    131 static const Matrix &identityMatrix ()
    \n+
    132 {
    \n+
    133 return instance().identityMatrix_;
    \n+
    134 }
    \n+
    135
    \n+
    136 static const Vector &nullVector ()
    \n+
    137 {
    \n+
    138 return instance().nullVector_;
    \n+
    139 }
    \n+
    140 };
    \n+
    141
    \n+
    142
    \n+
    143
    \n+
    144 // NumSubEntities
    \n+
    145 // --------------
    \n
    146
    \n-
    147 // ForEachInteriorSubChild
    \n-
    148 // -----------------------
    \n+
    147 template< int dim, int codim >
    \n+\n
    149
    \n
    150 template< int dim >
    \n-
    151 struct ForEachInteriorSubChild< dim, 0 >
    \n+
    151 struct NumSubEntities< dim, 0 >
    \n
    152 {
    \n-
    153 template< class Functor >
    \n-
    154 static void apply ( Functor &functor, const Patch< dim > &patch )
    \n-
    155 {
    \n-
    156 for( int i = 0; i < patch.count(); ++i )
    \n-
    157 {
    \n-
    158 Element *const father = patch[ i ];
    \n-
    159 functor( father->child[ 0 ], 0 );
    \n-
    160 functor( father->child[ 1 ], 0 );
    \n-
    161 }
    \n-
    162 }
    \n-
    163 };
    \n-
    164
    \n-
    165 template< int dim >
    \n-
    166 struct ForEachInteriorSubChild< dim, dim >
    \n-
    167 {
    \n-
    168 template< class Functor >
    \n-
    169 static void apply ( Functor &functor, const Patch< dim > &patch )
    \n-
    170 {
    \n-
    171 functor( patch[ 0 ]->child[ 0 ], dim );
    \n-
    172 }
    \n-
    173 };
    \n-
    174
    \n-
    175 template<>
    \n-\n-
    177 {
    \n-
    178 template< class Functor >
    \n-
    179 static void apply ( Functor &functor, const Patch< 2 > &patch )
    \n-
    180 {
    \n-
    181 // see alberta/src/2d/lagrange_2_2d.c for details
    \n-
    182 Element *const firstFather = patch[ 0 ];
    \n-
    183
    \n-
    184 Element *const firstChild = firstFather->child[ 0 ];
    \n-
    185 functor( firstChild, 0 );
    \n-
    186 functor( firstChild, 1 );
    \n+
    153 static const int value = 1;
    \n+
    154 };
    \n+
    155
    \n+
    156 template< int dim >
    \n+
    157 struct NumSubEntities< dim, dim >
    \n+
    158 {
    \n+
    159 static const int value = dim+1;
    \n+
    160 };
    \n+
    161
    \n+
    162 template<>
    \n+
    163 struct NumSubEntities< 0, 0 >
    \n+
    164 {
    \n+
    165 static const int value = 1;
    \n+
    166 };
    \n+
    167
    \n+
    168 template<>
    \n+
    169 struct NumSubEntities< 2, 1 >
    \n+
    170 {
    \n+
    171 static const int value = 3;
    \n+
    172 };
    \n+
    173
    \n+
    174 template<>
    \n+
    175 struct NumSubEntities< 3, 1 >
    \n+
    176 {
    \n+
    177 static const int value = 4;
    \n+
    178 };
    \n+
    179
    \n+
    180 template<>
    \n+
    181 struct NumSubEntities< 3, 2 >
    \n+
    182 {
    \n+
    183 static const int value = 6;
    \n+
    184 };
    \n+
    185
    \n+
    186
    \n
    187
    \n-
    188 functor( firstFather->child[ 1 ], 1 );
    \n-
    189
    \n-
    190 if( patch.count() > 1 )
    \n-
    191 {
    \n-
    192 Element *const father = patch[ 1 ];
    \n-
    193 functor( father->child[ 0 ], 1 );
    \n-
    194 }
    \n-
    195 }
    \n-
    196 };
    \n-
    197
    \n-
    198 template<>
    \n-\n-
    200 {
    \n-
    201 template< class Functor >
    \n-
    202 static void apply ( Functor &functor, const Patch< 3 > &patch )
    \n-
    203 {
    \n-
    204 // see alberta/src/3d/lagrange_3_3d.c for details
    \n-
    205 Element *const firstFather = patch[ 0 ];
    \n-
    206
    \n-
    207 Element *const firstChild = firstFather->child[ 0 ];
    \n-
    208 functor( firstChild, 0 );
    \n-
    209 functor( firstChild, 1 );
    \n-
    210 functor( firstChild, 2 );
    \n+
    188 // CodimType
    \n+
    189 // ---------
    \n+
    190
    \n+
    191 template< int dim, int codim >
    \n+
    192 struct CodimType;
    \n+
    193
    \n+
    194 template< int dim >
    \n+
    195 struct CodimType< dim, 0 >
    \n+
    196 {
    \n+
    197 static const int value = CENTER;
    \n+
    198 };
    \n+
    199
    \n+
    200 template< int dim >
    \n+
    201 struct CodimType< dim, dim >
    \n+
    202 {
    \n+
    203 static const int value = VERTEX;
    \n+
    204 };
    \n+
    205
    \n+
    206 template<>
    \n+
    207 struct CodimType< 2, 1 >
    \n+
    208 {
    \n+
    209 static const int value = EDGE;
    \n+
    210 };
    \n
    211
    \n-
    212 Element *const secondChild = firstFather->child[ 1 ];
    \n-
    213 functor( secondChild, 1 );
    \n-
    214 functor( secondChild, 2 );
    \n-
    215
    \n-
    216 for( int i = 1; i < patch.count(); ++i )
    \n-
    217 {
    \n-
    218 Element *const father = patch[ i ];
    \n-
    219 const int type = patch.elementType( i );
    \n-
    220
    \n-
    221 int lr_set = 0;
    \n-
    222 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
    \n-
    223 lr_set |= 1;
    \n-
    224 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
    \n-
    225 lr_set |= 2;
    \n-
    226 assert( lr_set != 0 );
    \n-
    227
    \n-
    228 functor( father->child[ 0 ], 0 );
    \n-
    229 switch( lr_set )
    \n-
    230 {
    \n-
    231 case 1 :
    \n-
    232 functor( father->child[ 0 ], 2 );
    \n-
    233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) );
    \n-
    234 break;
    \n+
    212 template<>
    \n+
    213 struct CodimType< 3, 1 >
    \n+
    214 {
    \n+
    215 static const int value = FACE;
    \n+
    216 };
    \n+
    217
    \n+
    218 template<>
    \n+
    219 struct CodimType< 3, 2 >
    \n+
    220 {
    \n+
    221 static const int value = EDGE;
    \n+
    222 };
    \n+
    223
    \n+
    224
    \n+
    225
    \n+
    226 // FillFlags
    \n+
    227 // ---------
    \n+
    228
    \n+
    229 template< int dim >
    \n+\n+
    231 {
    \n+
    232 typedef ALBERTA FLAGS Flags;
    \n+
    233
    \n+
    234 static const Flags nothing = FILL_NOTHING;
    \n
    235
    \n-
    236 case 2 :
    \n-
    237 functor( father->child[ 0 ], 1 );
    \n-
    238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) );
    \n-
    239 break;
    \n-
    240 }
    \n-
    241 }
    \n-
    242 }
    \n-
    243 };
    \n-
    244
    \n-
    245 template<>
    \n-\n-
    247 {
    \n-
    248 template< class Functor >
    \n-
    249 static void apply ( Functor &functor, const Patch< 3 > &patch )
    \n-
    250 {
    \n-
    251 // see alberta/src/3d/lagrange_2_3d.c for details
    \n-
    252 Element *const firstFather = patch[ 0 ];
    \n-
    253
    \n-
    254 Element *const firstChild = firstFather->child[ 0 ];
    \n-
    255 functor( firstChild, 2 );
    \n-
    256 functor( firstChild, 4 );
    \n-
    257 functor( firstChild, 5 );
    \n-
    258
    \n-
    259 functor( firstFather->child[ 1 ], 2 );
    \n-
    260
    \n-
    261 for( int i = 1; i < patch.count(); ++i )
    \n-
    262 {
    \n-
    263 Element *const father = patch[ i ];
    \n-
    264
    \n-
    265 int lr_set = 0;
    \n-
    266 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )
    \n-
    267 lr_set = 1;
    \n-
    268 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )
    \n-
    269 lr_set += 2;
    \n-
    270 assert( lr_set != 0 );
    \n-
    271
    \n-
    272 switch( lr_set )
    \n-
    273 {
    \n-
    274 case 1 :
    \n-
    275 functor( father->child[ 0 ], 4 );
    \n-
    276 break;
    \n-
    277
    \n-
    278 case 2 :
    \n-
    279 functor( father->child[ 0 ], 5 );
    \n-
    280 break;
    \n-
    281 }
    \n-
    282 }
    \n-
    283 }
    \n-
    284 };
    \n-
    285
    \n-
    286
    \n-
    287
    \n-
    288 // GeometryInFather
    \n-
    289 // ----------------
    \n-
    290
    \n-
    291 template< int dim >
    \n-\n+
    236 static const Flags coords = FILL_COORDS;
    \n+
    237
    \n+
    238 static const Flags neighbor = FILL_NEIGH;
    \n+
    239
    \n+
    240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION : FILL_NOTHING);
    \n+
    241
    \n+
    242 static const Flags projection = FILL_PROJECTION;
    \n+
    243
    \n+
    244 static const Flags elementType = FILL_NOTHING;
    \n+
    245
    \n+
    246 static const Flags boundaryId = FILL_MACRO_WALLS;
    \n+
    247
    \n+
    248 static const Flags nonPeriodic = FILL_NON_PERIODIC;
    \n+
    249
    \n+\n+\n+
    252
    \n+
    253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;
    \n+
    254
    \n+
    255#if DUNE_ALBERTA_CACHE_COORDINATES
    \n+
    256 static const Flags standard = standardWithCoords & ~coords;
    \n+
    257#else
    \n+
    258 static const Flags standard = standardWithCoords;
    \n+
    259#endif
    \n+
    260 };
    \n+
    261
    \n+
    262
    \n+
    263
    \n+
    264 // RefinementEdge
    \n+
    265 // --------------
    \n+
    266
    \n+
    267 template< int dim >
    \n+\n+
    269 {
    \n+
    270 static const int value = 0;
    \n+
    271 };
    \n+
    272
    \n+
    273 template<>
    \n+
    274 struct RefinementEdge< 2 >
    \n+
    275 {
    \n+
    276 static const int value = 2;
    \n+
    277 };
    \n+
    278
    \n+
    279
    \n+
    280
    \n+
    281 // Dune2AlbertaNumbering
    \n+
    282 // ---------------------
    \n+
    283
    \n+
    284 template< int dim, int codim >
    \n+\n+
    286 {
    \n+
    287 static int apply ( const int i )
    \n+
    288 {
    \n+
    289 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
    \n+
    290 return i;
    \n+
    291 }
    \n+
    292 };
    \n
    293
    \n
    294 template<>
    \n-\n+\n
    296 {
    \n-
    297 static const int dim = 1;
    \n+
    297 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
    \n
    298
    \n-
    299 typedef Real LocalVector[ dim ];
    \n-
    300
    \n-
    301 static const LocalVector &
    \n-
    302 coordinate ( int child, int /* orientation */, int i )
    \n-
    303 {
    \n-
    304 static const Real coords[ 2 ][ dim+1 ][ dim ]
    \n-
    305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } };
    \n-
    306 assert( (i >= 0) && (i <= dim) );
    \n-
    307 return coords[ child ][ i ];
    \n-
    308 }
    \n-
    309 };
    \n-
    310
    \n-
    311 template<>
    \n-\n-
    313 {
    \n-
    314 static const int dim = 2;
    \n-
    315
    \n-
    316 typedef Real LocalVector[ dim ];
    \n-
    317
    \n-
    318 static const LocalVector &
    \n-
    319 coordinate ( int child, int /* orientation */, int i )
    \n-
    320 {
    \n-
    321 static const Real coords[ 2 ][ dim+1 ][ dim ]
    \n-
    322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} },
    \n-
    323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } };
    \n-
    324 assert( (i >= 0) && (i <= dim) );
    \n-
    325 return coords[ child ][ i ];
    \n-
    326 }
    \n-
    327 };
    \n-
    328
    \n-
    329 template<>
    \n-\n-
    331 {
    \n-
    332 static const int dim = 3;
    \n-
    333
    \n-
    334 typedef Real LocalVector[ dim ];
    \n-
    335
    \n-
    336 static const LocalVector &
    \n-
    337 coordinate ( int child, int orientation, int i )
    \n-
    338 {
    \n-
    339 static const Real coords[ 2 ][ dim+1 ][ dim ]
    \n-
    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} },
    \n-
    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} } };
    \n-
    342 static const int flip[ 2 ][ 2 ][ dim+1 ]
    \n-
    343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } };
    \n-
    344 assert( (i >= 0) && (i <= dim) );
    \n-
    345 i = flip[ child ][ orientation ][ i ];
    \n-
    346 return coords[ child ][ i ];
    \n-
    347 }
    \n-
    348 };
    \n-
    349
    \n-
    350 }
    \n-
    351
    \n-
    352}
    \n-
    353
    \n-
    354#endif // #if HAVE_ALBERTA
    \n+
    299 static int apply ( const int i )
    \n+
    300 {
    \n+
    301 assert( (i >= 0) && (i < numSubEntities) );
    \n+
    302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 };
    \n+
    303 return dune2alberta[ i ];
    \n+
    304 }
    \n+
    305 };
    \n+
    306
    \n+
    307
    \n+
    308
    \n+
    309 // Generic2AlbertaNumbering
    \n+
    310 // ------------------------
    \n+
    311
    \n+
    312 template< int dim, int codim >
    \n+\n+
    314 {
    \n+
    315 static int apply ( const int i )
    \n+
    316 {
    \n+
    317 assert( (i >= 0) && (i < NumSubEntities< dim, codim >::value) );
    \n+
    318 return i;
    \n+
    319 }
    \n+
    320 };
    \n+
    321
    \n+
    322 template< int dim >
    \n+\n+
    324 {
    \n+
    325 static int apply ( const int i )
    \n+
    326 {
    \n+
    327 assert( (i >= 0) && (i < NumSubEntities< dim, 1 >::value) );
    \n+
    328 return dim - i;
    \n+
    329 }
    \n+
    330 };
    \n+
    331
    \n+
    332 template<>
    \n+\n+
    334 {
    \n+
    335 static int apply ( const int i )
    \n+
    336 {
    \n+
    337 assert( (i >= 0) && (i < NumSubEntities< 1, 1 >::value) );
    \n+
    338 return i;
    \n+
    339 }
    \n+
    340 };
    \n+
    341
    \n+
    342 template<>
    \n+\n+
    344 {
    \n+
    345 static const int numSubEntities = NumSubEntities< 3, 2 >::value;
    \n+
    346
    \n+
    347 static int apply ( const int i )
    \n+
    348 {
    \n+
    349 assert( (i >= 0) && (i < numSubEntities) );
    \n+
    350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };
    \n+
    351 return generic2alberta[ i ];
    \n+
    352 }
    \n+
    353 };
    \n+
    354
    \n
    355
    \n-
    356#endif
    \n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    356
    \n+
    357 // NumberingMap
    \n+
    358 // ------------
    \n+
    359
    \n+
    360 template< int dim, template< int, int > class Numbering = Generic2AlbertaNumbering >
    \n+\n+
    362 {
    \n+\n+
    364
    \n+
    365 template< int codim >
    \n+
    366 struct Initialize;
    \n+
    367
    \n+
    368 int *dune2alberta_[ dim+1 ];
    \n+
    369 int *alberta2dune_[ dim+1 ];
    \n+
    370 int numSubEntities_[ dim+1 ];
    \n+
    371
    \n+
    372 NumberingMap ( const This & );
    \n+
    373 This &operator= ( const This & );
    \n+
    374
    \n+
    375 public:
    \n+\n+
    377 {
    \n+
    378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i ){ Initialize< i >::apply( *this ); } );
    \n+
    379 }
    \n+
    380
    \n+\n+
    382 {
    \n+
    383 for( int codim = 0; codim <= dim; ++codim )
    \n+
    384 {
    \n+
    385 delete[]( dune2alberta_[ codim ] );
    \n+
    386 delete[]( alberta2dune_[ codim ] );
    \n+
    387 }
    \n+
    388 }
    \n+
    389
    \n+
    390 int dune2alberta ( int codim, int i ) const
    \n+
    391 {
    \n+
    392 assert( (codim >= 0) && (codim <= dim) );
    \n+
    393 assert( (i >= 0) && (i < numSubEntities( codim )) );
    \n+
    394 return dune2alberta_[ codim ][ i ];
    \n+
    395 }
    \n+
    396
    \n+
    397 int alberta2dune ( int codim, int i ) const
    \n+
    398 {
    \n+
    399 assert( (codim >= 0) && (codim <= dim) );
    \n+
    400 assert( (i >= 0) && (i < numSubEntities( codim )) );
    \n+
    401 return alberta2dune_[ codim ][ i ];
    \n+
    402 }
    \n+
    403
    \n+
    404 int numSubEntities ( int codim ) const
    \n+
    405 {
    \n+
    406 assert( (codim >= 0) && (codim <= dim) );
    \n+
    407 return numSubEntities_[ codim ];
    \n+
    408 }
    \n+
    409 };
    \n+
    410
    \n+
    411
    \n+
    412
    \n+
    413 // NumberingMap::Initialize
    \n+
    414 // ------------------------
    \n+
    415
    \n+
    416 template< int dim, template< int, int > class Numbering >
    \n+
    417 template< int codim >
    \n+
    418 struct NumberingMap< dim, Numbering >::Initialize
    \n+
    419 {
    \n+
    420 static const int numSubEntities = NumSubEntities< dim, codim >::value;
    \n+
    421
    \n+
    422 static void apply ( NumberingMap< dim, Numbering > &map )
    \n+
    423 {
    \n+
    424 map.numSubEntities_[ codim ] = numSubEntities;
    \n+
    425 map.dune2alberta_[ codim ] = new int[ numSubEntities ];
    \n+
    426 map.alberta2dune_[ codim ] = new int[ numSubEntities ];
    \n+
    427
    \n+
    428 for( int i = 0; i < numSubEntities; ++i )
    \n+
    429 {
    \n+
    430 const int j = Numbering< dim, codim >::apply( i );
    \n+
    431 map.dune2alberta_[ codim ][ i ] = j;
    \n+
    432 map.alberta2dune_[ codim ][ j ] = i;
    \n+
    433 }
    \n+
    434 }
    \n+
    435 };
    \n+
    436
    \n+
    437
    \n+
    438
    \n+
    439 // MapVertices
    \n+
    440 // -----------
    \n+
    441
    \n+
    442 template< int dim, int codim >
    \n+\n+
    444
    \n+
    445 template< int dim >
    \n+
    446 struct MapVertices< dim, 0 >
    \n+
    447 {
    \n+
    448 static int apply ( int subEntity, int vertex )
    \n+
    449 {
    \n+
    450 assert( subEntity == 0 );
    \n+
    451 assert( (vertex >= 0) && (vertex <= NumSubEntities< dim, dim >::value) );
    \n+
    452 return vertex;
    \n+
    453 }
    \n+
    454 };
    \n+
    455
    \n+
    456 template<>
    \n+
    457 struct MapVertices< 2, 1 >
    \n+
    458 {
    \n+
    459 static int apply ( int subEntity, int vertex )
    \n+
    460 {
    \n+
    461 assert( (subEntity >= 0) && (subEntity < 3) );
    \n+
    462 assert( (vertex >= 0) && (vertex < 2) );
    \n+
    463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} };
    \n+
    464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} };
    \n+
    465 return map[ subEntity ][ vertex ];
    \n+
    466 }
    \n+
    467 };
    \n+
    468
    \n+
    469 template<>
    \n+
    470 struct MapVertices< 3, 1 >
    \n+
    471 {
    \n+
    472 static int apply ( int subEntity, int vertex )
    \n+
    473 {
    \n+
    474 assert( (subEntity >= 0) && (subEntity < 4) );
    \n+
    475 assert( (vertex >= 0) && (vertex < 3) );
    \n+
    476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} };
    \n+
    477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} };
    \n+
    478 return map[ subEntity ][ vertex ];
    \n+
    479 }
    \n+
    480 };
    \n+
    481
    \n+
    482 template<>
    \n+
    483 struct MapVertices< 3, 2 >
    \n+
    484 {
    \n+
    485 static int apply ( int subEntity, int vertex )
    \n+
    486 {
    \n+
    487 assert( (subEntity >= 0) && (subEntity < 6) );
    \n+
    488 assert( (vertex >= 0) && (vertex < 2) );
    \n+
    489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3}, {2,3} };
    \n+
    490 return map[ subEntity ][ vertex ];
    \n+
    491 }
    \n+
    492 };
    \n+
    493
    \n+
    494 template< int dim >
    \n+
    495 struct MapVertices< dim, dim >
    \n+
    496 {
    \n+
    497 static int apply ( int subEntity, int vertex )
    \n+
    498 {
    \n+
    499 assert( (subEntity >= 0) && (subEntity < NumSubEntities< dim, 1 >::value) );
    \n+
    500 assert( vertex == 0 );
    \n+
    501 return subEntity;
    \n+
    502 }
    \n+
    503 };
    \n+
    504
    \n+
    505
    \n+
    506
    \n+
    507 // Twist
    \n+
    508 // -----
    \n+
    509
    \n+
    510 // ******************************************************************
    \n+
    511 // Meaning of the twist (same as in ALU)
    \n+
    512 // -------------------------------------
    \n+
    513 //
    \n+
    514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face
    \n+
    515 // (here, we assume their indices to be increasing). Denote by k the
    \n+
    516 // local number of a vertex v within the element and by t the twist.
    \n+
    517 // Then, v = v_j, where j is computed by the following formula:
    \n+
    518 //
    \n+
    519 // / (2n + 1 - k + t) % n, if t < 0
    \n+
    520 // j = <
    \n+
    521 // \\ (k + t) % n, if t >= 0
    \n+
    522 //
    \n+
    523 // Note: We use the order of the 0-th vertex dof to assign the twist.
    \n+
    524 // This is ok for two reasons:
    \n+
    525 // - ALBERTA preserves the relative order of the dofs during
    \n+
    526 // dof compression.
    \n+
    527 // - ALBERTA enforces the first vertex dof admin to be periodic.
    \n+
    528 // ******************************************************************
    \n+
    529
    \n+
    530 template< int dim, int subdim >
    \n+
    531 struct Twist
    \n+
    532 {
    \n+
    533 static const int numSubEntities = NumSubEntities< dim, dim-subdim >::value;
    \n+
    534
    \n+
    535 static const int minTwist = 0;
    \n+
    536 static const int maxTwist = 0;
    \n+
    537
    \n+
    538 static int twist ( [[maybe_unused]] const Element *element,
    \n+
    539 [[maybe_unused]] int subEntity )
    \n+
    540 {
    \n+
    541 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
    \n+
    542 return 0;
    \n+
    543 }
    \n+
    544 };
    \n+
    545
    \n+
    546 template< int dim >
    \n+
    547 struct Twist< dim, 1 >
    \n+
    548 {
    \n+
    549 static const int numSubEntities = NumSubEntities< dim, dim-1 >::value;
    \n+
    550
    \n+
    551 static const int minTwist = 0;
    \n+
    552 static const int maxTwist = 1;
    \n+
    553
    \n+
    554 static int twist ( const Element *element, int subEntity )
    \n+
    555 {
    \n+
    556 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
    \n+
    557 const int numVertices = NumSubEntities< 1, 1 >::value;
    \n+
    558 int dof[ numVertices ];
    \n+
    559 for( int i = 0; i < numVertices; ++i )
    \n+
    560 {
    \n+
    561 const int j = MapVertices< dim, dim-1 >::apply( subEntity, i );
    \n+
    562 dof[ i ] = element->dof[ j ][ 0 ];
    \n+
    563 }
    \n+
    564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1);
    \n+
    565 }
    \n+
    566 };
    \n+
    567
    \n+
    568
    \n+
    569 template<>
    \n+
    570 struct Twist< 1, 1 >
    \n+
    571 {
    \n+
    572 static const int minTwist = 0;
    \n+
    573 static const int maxTwist = 0;
    \n+
    574
    \n+
    575 static int twist ( [[maybe_unused]] const Element *element,
    \n+
    576 [[maybe_unused]] int subEntity )
    \n+
    577 {
    \n+
    578 assert( subEntity == 0 );
    \n+
    579 return 0;
    \n+
    580 }
    \n+
    581 };
    \n+
    582
    \n+
    583
    \n+
    584 template< int dim >
    \n+
    585 struct Twist< dim, 2 >
    \n+
    586 {
    \n+
    587 static const int numSubEntities = NumSubEntities< dim, dim-2 >::value;
    \n+
    588
    \n+
    589 static const int minTwist = -3;
    \n+
    590 static const int maxTwist = 2;
    \n+
    591
    \n+
    592 static int twist ( const Element *element, int subEntity )
    \n+
    593 {
    \n+
    594 assert( (subEntity >= 0) && (subEntity < numSubEntities) );
    \n+
    595 const int numVertices = NumSubEntities< 2, 2 >::value;
    \n+
    596 int dof[ numVertices ];
    \n+
    597 for( int i = 0; i < numVertices; ++i )
    \n+
    598 {
    \n+
    599 const int j = MapVertices< dim, dim-2 >::apply( subEntity, i );
    \n+
    600 dof[ i ] = element->dof[ j ][ 0 ];
    \n+
    601 }
    \n+
    602
    \n+
    603 const int twist[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 };
    \n+
    604 const int k = int( dof[ 0 ] < dof[ 1 ] )
    \n+
    605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1)
    \n+
    606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2);
    \n+
    607 assert( twist[ k ] != 666 );
    \n+
    608 return twist[ k ];
    \n+
    609 }
    \n+
    610 };
    \n+
    611
    \n+
    612
    \n+
    613 template<>
    \n+
    614 struct Twist< 2, 2 >
    \n+
    615 {
    \n+
    616 static const int minTwist = 0;
    \n+
    617 static const int maxTwist = 0;
    \n+
    618
    \n+
    619 static int twist ( [[maybe_unused]] const Element *element,
    \n+
    620 [[maybe_unused]] int subEntity )
    \n+
    621 {
    \n+
    622 assert( subEntity == 0 );
    \n+
    623 return 0;
    \n+
    624 }
    \n+
    625 };
    \n+
    626
    \n+
    627
    \n+
    628
    \n+
    629 template< int dim >
    \n+
    630 inline int applyTwist ( int twist, int i )
    \n+
    631 {
    \n+
    632 const int numCorners = NumSubEntities< dim, dim >::value;
    \n+
    633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) % numCorners;
    \n+
    634 }
    \n+
    635
    \n+
    636 template< int dim >
    \n+
    637 inline int applyInverseTwist ( int twist, int i )
    \n+
    638 {
    \n+
    639 const int numCorners = NumSubEntities< dim, dim >::value;
    \n+
    640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i - twist) % numCorners;
    \n+
    641 }
    \n+
    642
    \n+
    643 }
    \n+
    644
    \n+
    645}
    \n+
    646
    \n+
    647#endif // #if HAVE_ALBERTA
    \n+
    648
    \n+
    649#endif // #ifndef DUNE_ALBERTA_MISC_HH
    \n+\n+
    #define DIM_OF_WORLD
    Definition: albertaheader.hh:23
    \n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    int applyInverseTwist(int twist, int i)
    Definition: misc.hh:637
    \n+
    ALBERTA MESH Mesh
    Definition: misc.hh:53
    \n+
    int applyTwist(int twist, int i)
    Definition: misc.hh:630
    \n+
    void memFree(Data *ptr, size_t size)
    Definition: misc.hh:91
    \n+
    ALBERTA REAL_DD GlobalMatrix
    Definition: misc.hh:51
    \n+
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n
    ALBERTA REAL_B LocalVector
    Definition: misc.hh:49
    \n
    ALBERTA EL Element
    Definition: misc.hh:54
    \n+
    ALBERTA BNDRY_TYPE BoundaryId
    Definition: misc.hh:61
    \n+
    static const int InteriorBoundary
    Definition: misc.hh:59
    \n
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n-
    Definition: meshpointer.hh:40
    \n-\n-
    static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
    Definition: elementinfo.hh:752
    \n-
    Definition: refinement.hh:31
    \n-
    Definition: refinement.hh:40
    \n-
    int neighborIndex(int i, int neighbor) const
    Definition: refinement.hh:139
    \n-
    int elementType(int i) const
    Definition: refinement.hh:125
    \n-
    int count() const
    Definition: refinement.hh:67
    \n-
    ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const
    Definition: refinement.hh:105
    \n-
    void forEach(Functor &functor) const
    Definition: refinement.hh:80
    \n-
    Element * operator[](int i) const
    Definition: refinement.hh:95
    \n-
    void forEachInteriorSubChild(Functor &functor) const
    Definition: refinement.hh:87
    \n-
    static const int dimension
    Definition: refinement.hh:47
    \n-
    bool hasNeighbor(int i, int neighbor) const
    Definition: refinement.hh:133
    \n-
    Patch(ElementList *list, int count)
    Definition: refinement.hh:58
    \n-
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: refinement.hh:49
    \n-
    ALBERTA RC_LIST_EL ElementList
    Definition: refinement.hh:51
    \n-
    static void apply(Functor &functor, const Patch< dim > &patch)
    Definition: refinement.hh:154
    \n-
    static void apply(Functor &functor, const Patch< dim > &patch)
    Definition: refinement.hh:169
    \n-
    static void apply(Functor &functor, const Patch< 2 > &patch)
    Definition: refinement.hh:179
    \n-
    static void apply(Functor &functor, const Patch< 3 > &patch)
    Definition: refinement.hh:202
    \n-
    static void apply(Functor &functor, const Patch< 3 > &patch)
    Definition: refinement.hh:249
    \n-
    Definition: refinement.hh:292
    \n-
    static const LocalVector & coordinate(int child, int, int i)
    Definition: refinement.hh:302
    \n-
    static const LocalVector & coordinate(int child, int, int i)
    Definition: refinement.hh:319
    \n-
    static const LocalVector & coordinate(int child, int orientation, int i)
    Definition: refinement.hh:337
    \n+
    static const int meshRefined
    Definition: misc.hh:56
    \n+
    Data * memAlloc(size_t size)
    Definition: misc.hh:73
    \n+
    Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)
    Definition: misc.hh:85
    \n+
    static const int DirichletBoundary
    Definition: misc.hh:60
    \n+
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n+
    Data * memCAlloc(size_t size)
    Definition: misc.hh:79
    \n+
    static const int dimWorld
    Definition: misc.hh:46
    \n+
    U_CHAR ElementType
    Definition: misc.hh:63
    \n+
    static const int meshCoarsened
    Definition: misc.hh:57
    \n+
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n+
    @ vertex
    Definition: common.hh:133
    \n+
    Definition: misc.hh:32
    \n+
    Definition: misc.hh:36
    \n+
    Definition: misc.hh:102
    \n+
    static const Matrix & identityMatrix()
    Definition: misc.hh:131
    \n+
    static const Vector & nullVector()
    Definition: misc.hh:136
    \n+
    GlobalMatrix Matrix
    Definition: misc.hh:106
    \n+
    GlobalVector Vector
    Definition: misc.hh:107
    \n+
    Definition: misc.hh:148
    \n+
    Definition: misc.hh:192
    \n+
    Definition: misc.hh:231
    \n+
    static const Flags nothing
    Definition: misc.hh:234
    \n+
    static const Flags nonPeriodic
    Definition: misc.hh:248
    \n+
    static const Flags boundaryId
    Definition: misc.hh:246
    \n+
    static const Flags elementType
    Definition: misc.hh:244
    \n+
    ALBERTA FLAGS Flags
    Definition: misc.hh:232
    \n+
    static const Flags projection
    Definition: misc.hh:242
    \n+
    static const Flags coords
    Definition: misc.hh:236
    \n+
    static const Flags orientation
    Definition: misc.hh:240
    \n+
    static const Flags standard
    Definition: misc.hh:256
    \n+
    static const Flags neighbor
    Definition: misc.hh:238
    \n+
    static const Flags all
    Definition: misc.hh:250
    \n+
    static const Flags standardWithCoords
    Definition: misc.hh:253
    \n+
    Definition: misc.hh:269
    \n+
    static const int value
    Definition: misc.hh:270
    \n+\n+
    static int apply(const int i)
    Definition: misc.hh:287
    \n+
    static int apply(const int i)
    Definition: misc.hh:299
    \n+\n+
    static int apply(const int i)
    Definition: misc.hh:315
    \n+
    static int apply(const int i)
    Definition: misc.hh:325
    \n+
    static int apply(const int i)
    Definition: misc.hh:335
    \n+
    static int apply(const int i)
    Definition: misc.hh:347
    \n+
    Definition: misc.hh:362
    \n+
    int alberta2dune(int codim, int i) const
    Definition: misc.hh:397
    \n+
    int numSubEntities(int codim) const
    Definition: misc.hh:404
    \n+
    int dune2alberta(int codim, int i) const
    Definition: misc.hh:390
    \n+
    ~NumberingMap()
    Definition: misc.hh:381
    \n+
    NumberingMap()
    Definition: misc.hh:376
    \n+
    Definition: misc.hh:443
    \n+
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:448
    \n+
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:459
    \n+
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:472
    \n+
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:485
    \n+
    static int apply(int subEntity, int vertex)
    Definition: misc.hh:497
    \n+
    Definition: misc.hh:532
    \n+
    static const int maxTwist
    Definition: misc.hh:536
    \n+
    static const int minTwist
    Definition: misc.hh:535
    \n+
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:538
    \n+
    static const int numSubEntities
    Definition: misc.hh:533
    \n+
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:554
    \n+
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:575
    \n+
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:592
    \n+
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:619
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,457 +5,892 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-refinement.hh\n+misc.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_REFINEMENT_HH\n- 6#define DUNE_ALBERTA_REFINEMENT_HH\n+ 5#ifndef DUNE_ALBERTA_MISC_HH\n+ 6#define DUNE_ALBERTA_MISC_HH\n 7\n- 14#include \n- 15\n- 16#include \n- 17#include \n+ 8#include \n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13#include \n+ 14\n+ 15#include \n+ 16\n+ 17#if HAVE_ALBERTA\n 18\n- 19#if HAVE_ALBERTA\n- 20\n- 21namespace Dune\n- 22{\n+ 19// should the coordinates be cached in a vector (required for ALBERTA 2.0)?\n+ 20#ifndef DUNE_ALBERTA_CACHE_COORDINATES\n+21#define DUNE_ALBERTA_CACHE_COORDINATES 1\n+ 22#endif\n 23\n- 24 namespace Alberta\n- 25 {\n+ 24namespace Dune\n+ 25{\n 26\n- 27 // Internal Forward Declarations\n- 28 // -----------------------------\n+ 27 // Exceptions\n+ 28 // ----------\n 29\n- 30 template< int dim, int codim >\n-31 struct ForEachInteriorSubChild;\n- 32\n+30 class AlbertaError\n+ 31 : public Exception\n+ 32 {};\n 33\n- 34\n- 35 // Patch\n- 36 // -----\n+34 class AlbertaIOError\n+ 35 : public IOError\n+ 36 {};\n 37\n- 38 template< int dim >\n-39 class Patch\n- 40 {\n- 41 typedef Patch<_dim_> This;\n+ 38\n+ 39\n+ 40 namespace Alberta\n+ 41 {\n 42\n- 43 static_assert(((dim >= 1) && (dim <= 3)),\n- 44 \"Alberta supports only dimensions 1, 2, 3\");\n+ 43 // Import Types\n+ 44 // ------------\n 45\n- 46 public:\n-47 static const int dimension = dim;\n- 48\n-49 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n- 50\n-51 typedef ALBERTA RC_LIST_EL ElementList;\n- 52\n- 53 private:\n- 54 ElementList *list_;\n- 55 int count_;\n- 56\n- 57 public:\n-58 Patch ( ElementList *list, int count )\n- 59 : list_( list ),\n- 60 count_( count )\n- 61 {\n- 62 assert( count > 0 );\n- 63 }\n+46 static const int dimWorld = DIM_OF_WORLD;\n+ 47\n+48 typedef ALBERTA REAL Real;\n+49 typedef ALBERTA REAL_B LocalVector; // in barycentric coordinates\n+50 typedef ALBERTA REAL_D GlobalVector;\n+51 typedef ALBERTA REAL_DD GlobalMatrix;\n+52 typedef ALBERTA AFF_TRAFO AffineTransformation;\n+53 typedef ALBERTA MESH Mesh;\n+54 typedef ALBERTA EL Element;\n+ 55\n+56 static const int meshRefined = MESH_REFINED;\n+57 static const int meshCoarsened = MESH_COARSENED;\n+ 58\n+59 static const int InteriorBoundary = INTERIOR;\n+60 static const int DirichletBoundary = DIRICHLET;\n+61 typedef ALBERTA BNDRY_TYPE BoundaryId;\n+ 62\n+63 typedef U_CHAR ElementType;\n 64\n- 65 Element *operator[]( int i ) const;\n+65 typedef ALBERTA FE_SPACE DofSpace;\n 66\n-67 int count () const\n- 68 {\n- 69 return count_;\n- 70 }\n+ 67\n+ 68\n+ 69 // Memory Manipulation Functions\n+ 70 // -----------------------------\n 71\n- 72 template< class LevelProvider >\n- 73 ElementInfo elementInfo ( int i, const LevelProvider &levelProvider )\n-const;\n- 74\n- 75 int elementType ( int i ) const;\n- 76 bool hasNeighbor ( int i, int neighbor ) const;\n- 77 int neighborIndex ( int i, int neighbor ) const;\n- 78\n- 79 template< class Functor >\n-80 void forEach ( Functor &functor ) const\n- 81 {\n- 82 for( int i = 0; i < count(); ++i )\n- 83 functor( (*this)[ i ] );\n- 84 }\n- 85\n- 86 template< int codim, class Functor >\n-87 void forEachInteriorSubChild ( Functor &functor ) const\n- 88 {\n- 89 ForEachInteriorSubChild<_dim,_codim_>::apply( functor, *this );\n- 90 }\n- 91 };\n- 92\n- 93\n- 94 template< int dim >\n-95 inline Element *Patch<_dim_>::operator[]( int i ) const\n- 96 {\n- 97 assert( (i >= 0) && (i < count()) );\n- 98 return list_[ i ].el_info.el;\n- 99 }\n+ 72 template< class Data >\n+73 inline Data *memAlloc ( size_t size )\n+ 74 {\n+ 75 return MEM_ALLOC( size, Data );\n+ 76 }\n+ 77\n+ 78 template< class Data >\n+79 inline Data *memCAlloc ( size_t size )\n+ 80 {\n+ 81 return MEM_CALLOC( size, Data );\n+ 82 }\n+ 83\n+ 84 template< class Data >\n+85 inline Data *memReAlloc ( Data *ptr, size_t oldSize, size_t newSize )\n+ 86 {\n+ 87 return MEM_REALLOC( ptr, oldSize, newSize, Data );\n+ 88 }\n+ 89\n+ 90 template< class Data >\n+91 inline void memFree ( Data *ptr, size_t size )\n+ 92 {\n+ 93 return MEM_FREE( ptr, size, Data );\n+ 94 }\n+ 95\n+ 96\n+ 97\n+ 98 // GlobalSpace\n+ 99 // -----------\n 100\n- 101\n- 102 template< int dim >\n- 103 template< class LevelProvider >\n- 104 inline typename Patch<_dim_>::ElementInfo\n-105 Patch<_dim_>::elementInfo ( int i, const LevelProvider &levelProvider )\n-const\n- 106 {\n- 107 assert( (i >= 0) && (i < count()) );\n- 108 return ElementInfo::createFake( list_[ i ].el_info );\n- 109 }\n- 110\n- 111 template<>\n- 112 template< class LevelProvider >\n- 113 inline typename Patch<_2_>::ElementInfo\n-114 Patch<_2_>::elementInfo ( int i, const LevelProvider &levelProvider ) const\n- 115 {\n- 116 assert( (i >= 0) && (i < count()) );\n- 117 const MeshPointer<_2_> &mesh = levelProvider.mesh();\n- 118 const Element *element = (*this)[ i ];\n- 119 const int level = levelProvider( element );\n- 120 return ElementInfo::createFake( mesh, element, level );\n+101 class GlobalSpace\n+ 102 {\n+ 103 typedef GlobalSpace This;\n+ 104\n+ 105 public:\n+106 typedef GlobalMatrix Matrix;\n+107 typedef GlobalVector Vector;\n+ 108\n+ 109 private:\n+ 110 Matrix identityMatrix_;\n+ 111 Vector nullVector_;\n+ 112\n+ 113 GlobalSpace ()\n+ 114 {\n+ 115 for( int i = 0; i < dimWorld; ++i )\n+ 116 {\n+ 117 for( int j = 0; j < dimWorld; ++j )\n+ 118 identityMatrix_[ i ][ j ] = Real( 0 );\n+ 119 identityMatrix_[ i ][ i ] = Real( 1 );\n+ 120 nullVector_[ i ] = Real( 0 );\n 121 }\n- 122\n+ 122 }\n 123\n- 124 template< int dim >\n-125 inline int Patch<_dim_>::elementType ( int i ) const\n- 126 {\n- 127 assert( (i >= 0) && (i < count()) );\n- 128 return list_[ i ].el_info.el_type;\n- 129 }\n- 130\n- 131\n- 132 template< int dim >\n-133 inline bool Patch<_dim_>::hasNeighbor ( int i, int neighbor ) const\n- 134 {\n- 135 return (list_[ i ].neigh[ neighbor ] != NULL);\n- 136 }\n- 137\n- 138 template< int dim >\n-139 inline int Patch<_dim_>::neighborIndex ( int i, int neighbor ) const\n- 140 {\n- 141 assert( hasNeighbor( i, neighbor ) );\n- 142 return (list_[ i ].neigh[ neighbor ]->no);\n- 143 }\n- 144\n- 145\n+ 124 static This &instance ()\n+ 125 {\n+ 126 static This theInstance;\n+ 127 return theInstance;\n+ 128 }\n+ 129\n+ 130 public:\n+131 static const Matrix &identityMatrix ()\n+ 132 {\n+ 133 return instance().identityMatrix_;\n+ 134 }\n+ 135\n+136 static const Vector &nullVector ()\n+ 137 {\n+ 138 return instance().nullVector_;\n+ 139 }\n+ 140 };\n+ 141\n+ 142\n+ 143\n+ 144 // NumSubEntities\n+ 145 // --------------\n 146\n- 147 // ForEachInteriorSubChild\n- 148 // -----------------------\n+ 147 template< int dim, int codim >\n+148 struct NumSubEntities;\n 149\n 150 template< int dim >\n-151 struct ForEachInteriorSubChild< dim, 0 >\n+151 struct NumSubEntities< dim, 0 >\n 152 {\n- 153 template< class Functor >\n-154 static void apply ( Functor &functor, const Patch<_dim_> &patch )\n- 155 {\n- 156 for( int i = 0; i < patch.count(); ++i )\n- 157 {\n- 158 Element *const father = patch[ i ];\n- 159 functor( father->child[ 0 ], 0 );\n- 160 functor( father->child[ 1 ], 0 );\n- 161 }\n- 162 }\n- 163 };\n- 164\n- 165 template< int dim >\n-166 struct ForEachInteriorSubChild< dim, dim >\n- 167 {\n- 168 template< class Functor >\n-169 static void apply ( Functor &functor, const Patch<_dim_> &patch )\n+153 static const int value = 1;\n+ 154 };\n+ 155\n+ 156 template< int dim >\n+157 struct NumSubEntities< dim, dim >\n+ 158 {\n+159 static const int value = dim+1;\n+ 160 };\n+ 161\n+ 162 template<>\n+163 struct NumSubEntities< 0, 0 >\n+ 164 {\n+165 static const int value = 1;\n+ 166 };\n+ 167\n+ 168 template<>\n+169 struct NumSubEntities< 2, 1 >\n 170 {\n- 171 functor( patch[ 0 ]->child[ 0 ], dim );\n- 172 }\n- 173 };\n- 174\n- 175 template<>\n-176 struct ForEachInteriorSubChild< 2, 1 >\n- 177 {\n- 178 template< class Functor >\n-179 static void apply ( Functor &functor, const Patch<_2_> &patch )\n- 180 {\n- 181 // see alberta/src/2d/lagrange_2_2d.c for details\n- 182 Element *const firstFather = patch[ 0 ];\n- 183\n- 184 Element *const firstChild = firstFather->child[ 0 ];\n- 185 functor( firstChild, 0 );\n- 186 functor( firstChild, 1 );\n+171 static const int value = 3;\n+ 172 };\n+ 173\n+ 174 template<>\n+175 struct NumSubEntities< 3, 1 >\n+ 176 {\n+177 static const int value = 4;\n+ 178 };\n+ 179\n+ 180 template<>\n+181 struct NumSubEntities< 3, 2 >\n+ 182 {\n+183 static const int value = 6;\n+ 184 };\n+ 185\n+ 186\n 187\n- 188 functor( firstFather->child[ 1 ], 1 );\n- 189\n- 190 if( patch.count() > 1 )\n- 191 {\n- 192 Element *const father = patch[ 1 ];\n- 193 functor( father->child[ 0 ], 1 );\n- 194 }\n- 195 }\n- 196 };\n- 197\n- 198 template<>\n-199 struct ForEachInteriorSubChild< 3, 1 >\n- 200 {\n- 201 template< class Functor >\n-202 static void apply ( Functor &functor, const Patch<_3_> &patch )\n- 203 {\n- 204 // see alberta/src/3d/lagrange_3_3d.c for details\n- 205 Element *const firstFather = patch[ 0 ];\n- 206\n- 207 Element *const firstChild = firstFather->child[ 0 ];\n- 208 functor( firstChild, 0 );\n- 209 functor( firstChild, 1 );\n- 210 functor( firstChild, 2 );\n+ 188 // CodimType\n+ 189 // ---------\n+ 190\n+ 191 template< int dim, int codim >\n+192 struct CodimType;\n+ 193\n+ 194 template< int dim >\n+195 struct CodimType< dim, 0 >\n+ 196 {\n+197 static const int value = CENTER;\n+ 198 };\n+ 199\n+ 200 template< int dim >\n+201 struct CodimType< dim, dim >\n+ 202 {\n+203 static const int value = VERTEX;\n+ 204 };\n+ 205\n+ 206 template<>\n+207 struct CodimType< 2, 1 >\n+ 208 {\n+209 static const int value = EDGE;\n+ 210 };\n 211\n- 212 Element *const secondChild = firstFather->child[ 1 ];\n- 213 functor( secondChild, 1 );\n- 214 functor( secondChild, 2 );\n- 215\n- 216 for( int i = 1; i < patch.count(); ++i )\n- 217 {\n- 218 Element *const father = patch[ i ];\n- 219 const int type = patch.elementType( i );\n- 220\n- 221 int lr_set = 0;\n- 222 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )\n- 223 lr_set |= 1;\n- 224 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )\n- 225 lr_set |= 2;\n- 226 assert( lr_set != 0 );\n- 227\n- 228 functor( father->child[ 0 ], 0 );\n- 229 switch( lr_set )\n- 230 {\n- 231 case 1 :\n- 232 functor( father->child[ 0 ], 2 );\n- 233 functor( father->child[ 1 ], (type == 0 ? 1 : 2) );\n- 234 break;\n+ 212 template<>\n+213 struct CodimType< 3, 1 >\n+ 214 {\n+215 static const int value = FACE;\n+ 216 };\n+ 217\n+ 218 template<>\n+219 struct CodimType< 3, 2 >\n+ 220 {\n+221 static const int value = EDGE;\n+ 222 };\n+ 223\n+ 224\n+ 225\n+ 226 // FillFlags\n+ 227 // ---------\n+ 228\n+ 229 template< int dim >\n+230 struct FillFlags\n+ 231 {\n+232 typedef ALBERTA FLAGS Flags;\n+ 233\n+234 static const Flags nothing = FILL_NOTHING;\n 235\n- 236 case 2 :\n- 237 functor( father->child[ 0 ], 1 );\n- 238 functor( father->child[ 1 ], (type == 0 ? 2 : 1) );\n- 239 break;\n- 240 }\n- 241 }\n- 242 }\n- 243 };\n- 244\n- 245 template<>\n-246 struct ForEachInteriorSubChild< 3, 2 >\n- 247 {\n- 248 template< class Functor >\n-249 static void apply ( Functor &functor, const Patch<_3_> &patch )\n- 250 {\n- 251 // see alberta/src/3d/lagrange_2_3d.c for details\n- 252 Element *const firstFather = patch[ 0 ];\n- 253\n- 254 Element *const firstChild = firstFather->child[ 0 ];\n- 255 functor( firstChild, 2 );\n- 256 functor( firstChild, 4 );\n- 257 functor( firstChild, 5 );\n- 258\n- 259 functor( firstFather->child[ 1 ], 2 );\n- 260\n- 261 for( int i = 1; i < patch.count(); ++i )\n- 262 {\n- 263 Element *const father = patch[ i ];\n- 264\n- 265 int lr_set = 0;\n- 266 if( patch.hasNeighbor( i, 0 ) && (patch.neighborIndex( i, 0 ) < i) )\n- 267 lr_set = 1;\n- 268 if( patch.hasNeighbor( i, 1 ) && (patch.neighborIndex( i, 1 ) < i) )\n- 269 lr_set += 2;\n- 270 assert( lr_set != 0 );\n- 271\n- 272 switch( lr_set )\n- 273 {\n- 274 case 1 :\n- 275 functor( father->child[ 0 ], 4 );\n- 276 break;\n- 277\n- 278 case 2 :\n- 279 functor( father->child[ 0 ], 5 );\n- 280 break;\n- 281 }\n- 282 }\n- 283 }\n- 284 };\n- 285\n- 286\n- 287\n- 288 // GeometryInFather\n- 289 // ----------------\n- 290\n- 291 template< int dim >\n-292 struct GeometryInFather;\n+236 static const Flags coords = FILL_COORDS;\n+ 237\n+238 static const Flags neighbor = FILL_NEIGH;\n+ 239\n+240 static const Flags orientation = (dim == 3 ? FILL_ORIENTATION :\n+FILL_NOTHING);\n+ 241\n+242 static const Flags projection = FILL_PROJECTION;\n+ 243\n+244 static const Flags elementType = FILL_NOTHING;\n+ 245\n+246 static const Flags boundaryId = FILL_MACRO_WALLS;\n+ 247\n+248 static const Flags nonPeriodic = FILL_NON_PERIODIC;\n+ 249\n+250 static const Flags all = coords | neighbor | boundaryId | nonPeriodic\n+ 251 | orientation | projection | elementType;\n+ 252\n+253 static const Flags standardWithCoords = all & ~nonPeriodic & ~projection;\n+ 254\n+ 255#if DUNE_ALBERTA_CACHE_COORDINATES\n+256 static const Flags standard = standardWithCoords & ~coords;\n+ 257#else\n+ 258 static const Flags standard = standardWithCoords;\n+ 259#endif\n+ 260 };\n+ 261\n+ 262\n+ 263\n+ 264 // RefinementEdge\n+ 265 // --------------\n+ 266\n+ 267 template< int dim >\n+268 struct RefinementEdge\n+ 269 {\n+270 static const int value = 0;\n+ 271 };\n+ 272\n+ 273 template<>\n+274 struct RefinementEdge< 2 >\n+ 275 {\n+276 static const int value = 2;\n+ 277 };\n+ 278\n+ 279\n+ 280\n+ 281 // Dune2AlbertaNumbering\n+ 282 // ---------------------\n+ 283\n+ 284 template< int dim, int codim >\n+285 struct Dune2AlbertaNumbering\n+ 286 {\n+287 static int apply ( const int i )\n+ 288 {\n+ 289 assert( (i >= 0) && (i < NumSubEntities<_dim,_codim_>::value) );\n+ 290 return i;\n+ 291 }\n+ 292 };\n 293\n 294 template<>\n-295 struct GeometryInFather< 1 >\n+295 struct Dune2AlbertaNumbering< 3, 2 >\n 296 {\n-297 static const int dim = 1;\n+297 static const int numSubEntities = NumSubEntities<_3,_2_>::value;\n 298\n-299 typedef Real LocalVector[ dim ];\n- 300\n- 301 static const LocalVector &\n-302 coordinate ( int child, int /* orientation */, int i )\n- 303 {\n- 304 static const Real coords[ 2 ][ dim+1 ][ dim ]\n- 305 = { { {0.0}, {0.5} }, { {0.5}, {1.0} } };\n- 306 assert( (i >= 0) && (i <= dim) );\n- 307 return coords[ child ][ i ];\n- 308 }\n- 309 };\n- 310\n- 311 template<>\n-312 struct GeometryInFather< 2 >\n- 313 {\n-314 static const int dim = 2;\n- 315\n-316 typedef Real LocalVector[ dim ];\n- 317\n- 318 static const LocalVector &\n-319 coordinate ( int child, int /* orientation */, int i )\n- 320 {\n- 321 static const Real coords[ 2 ][ dim+1 ][ dim ]\n- 322 = { { {0.0, 1.0}, {0.0, 0.0}, {0.5, 0.0} },\n- 323 { {1.0, 0.0}, {0.0, 1.0}, {0.5, 0.0} } };\n- 324 assert( (i >= 0) && (i <= dim) );\n- 325 return coords[ child ][ i ];\n- 326 }\n- 327 };\n- 328\n- 329 template<>\n-330 struct GeometryInFather< 3 >\n- 331 {\n-332 static const int dim = 3;\n- 333\n-334 typedef Real LocalVector[ dim ];\n- 335\n- 336 static const LocalVector &\n-337 coordinate ( int child, int orientation, int i )\n- 338 {\n- 339 static const Real coords[ 2 ][ dim+1 ][ dim ]\n- 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}\n-},\n- 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} } };\n- 342 static const int flip[ 2 ][ 2 ][ dim+1 ]\n- 343 = { { {0, 1, 2, 3}, {0, 1, 2, 3} }, { {0, 2, 1, 3}, {0, 1, 2, 3} } };\n- 344 assert( (i >= 0) && (i <= dim) );\n- 345 i = flip[ child ][ orientation ][ i ];\n- 346 return coords[ child ][ i ];\n- 347 }\n- 348 };\n- 349\n- 350 }\n- 351\n- 352}\n- 353\n- 354#endif // #if HAVE_ALBERTA\n+299 static int apply ( const int i )\n+ 300 {\n+ 301 assert( (i >= 0) && (i < numSubEntities) );\n+ 302 static int dune2alberta[ numSubEntities ] = { 0, 3, 1, 2, 4, 5 };\n+ 303 return dune2alberta[ i ];\n+ 304 }\n+ 305 };\n+ 306\n+ 307\n+ 308\n+ 309 // Generic2AlbertaNumbering\n+ 310 // ------------------------\n+ 311\n+ 312 template< int dim, int codim >\n+313 struct Generic2AlbertaNumbering\n+ 314 {\n+315 static int apply ( const int i )\n+ 316 {\n+ 317 assert( (i >= 0) && (i < NumSubEntities<_dim,_codim_>::value) );\n+ 318 return i;\n+ 319 }\n+ 320 };\n+ 321\n+ 322 template< int dim >\n+323 struct Generic2AlbertaNumbering< dim, 1 >\n+ 324 {\n+325 static int apply ( const int i )\n+ 326 {\n+ 327 assert( (i >= 0) && (i < NumSubEntities<_dim,_1_>::value) );\n+ 328 return dim - i;\n+ 329 }\n+ 330 };\n+ 331\n+ 332 template<>\n+333 struct Generic2AlbertaNumbering< 1, 1 >\n+ 334 {\n+335 static int apply ( const int i )\n+ 336 {\n+ 337 assert( (i >= 0) && (i < NumSubEntities<_1,_1_>::value) );\n+ 338 return i;\n+ 339 }\n+ 340 };\n+ 341\n+ 342 template<>\n+343 struct Generic2AlbertaNumbering< 3, 2 >\n+ 344 {\n+345 static const int numSubEntities = NumSubEntities<_3,_2_>::value;\n+ 346\n+347 static int apply ( const int i )\n+ 348 {\n+ 349 assert( (i >= 0) && (i < numSubEntities) );\n+ 350 static int generic2alberta[ numSubEntities ] = { 0, 1, 3, 2, 4, 5 };\n+ 351 return generic2alberta[ i ];\n+ 352 }\n+ 353 };\n+ 354\n 355\n- 356#endif\n-misc.hh\n+ 356\n+ 357 // NumberingMap\n+ 358 // ------------\n+ 359\n+ 360 template< int dim, template< int, int > class Numbering =\n+Generic2AlbertaNumbering >\n+361 class NumberingMap\n+ 362 {\n+ 363 typedef NumberingMap<_dim,_Numbering_> This;\n+ 364\n+ 365 template< int codim >\n+ 366 struct Initialize;\n+ 367\n+ 368 int *dune2alberta_[ dim+1 ];\n+ 369 int *alberta2dune_[ dim+1 ];\n+ 370 int numSubEntities_[ dim+1 ];\n+ 371\n+ 372 NumberingMap ( const This & );\n+ 373 This &operator= ( const This & );\n+ 374\n+ 375 public:\n+376 NumberingMap ()\n+ 377 {\n+ 378 Hybrid::forEach( std::make_index_sequence< dim+1 >{}, [ & ]( auto i )\n+{ Initialize< i >::apply( *this ); } );\n+ 379 }\n+ 380\n+381 ~NumberingMap ()\n+ 382 {\n+ 383 for( int codim = 0; codim <= dim; ++codim )\n+ 384 {\n+ 385 delete[]( dune2alberta_[ codim ] );\n+ 386 delete[]( alberta2dune_[ codim ] );\n+ 387 }\n+ 388 }\n+ 389\n+390 int dune2alberta ( int codim, int i ) const\n+ 391 {\n+ 392 assert( (codim >= 0) && (codim <= dim) );\n+ 393 assert( (i >= 0) && (i < numSubEntities( codim )) );\n+ 394 return dune2alberta_[ codim ][ i ];\n+ 395 }\n+ 396\n+397 int alberta2dune ( int codim, int i ) const\n+ 398 {\n+ 399 assert( (codim >= 0) && (codim <= dim) );\n+ 400 assert( (i >= 0) && (i < numSubEntities( codim )) );\n+ 401 return alberta2dune_[ codim ][ i ];\n+ 402 }\n+ 403\n+404 int numSubEntities ( int codim ) const\n+ 405 {\n+ 406 assert( (codim >= 0) && (codim <= dim) );\n+ 407 return numSubEntities_[ codim ];\n+ 408 }\n+ 409 };\n+ 410\n+ 411\n+ 412\n+ 413 // NumberingMap::Initialize\n+ 414 // ------------------------\n+ 415\n+ 416 template< int dim, template< int, int > class Numbering >\n+ 417 template< int codim >\n+ 418 struct NumberingMap< dim, Numbering >::Initialize\n+ 419 {\n+ 420 static const int numSubEntities = NumSubEntities< dim, codim >::value;\n+ 421\n+ 422 static void apply ( NumberingMap< dim, Numbering > &map )\n+ 423 {\n+ 424 map.numSubEntities_[ codim ] = numSubEntities;\n+ 425 map.dune2alberta_[ codim ] = new int[ numSubEntities ];\n+ 426 map.alberta2dune_[ codim ] = new int[ numSubEntities ];\n+ 427\n+ 428 for( int i = 0; i < numSubEntities; ++i )\n+ 429 {\n+ 430 const int j = Numbering< dim, codim >::apply( i );\n+ 431 map.dune2alberta_[ codim ][ i ] = j;\n+ 432 map.alberta2dune_[ codim ][ j ] = i;\n+ 433 }\n+ 434 }\n+ 435 };\n+ 436\n+ 437\n+ 438\n+ 439 // MapVertices\n+ 440 // -----------\n+ 441\n+ 442 template< int dim, int codim >\n+443 struct MapVertices;\n+ 444\n+ 445 template< int dim >\n+446 struct MapVertices< dim, 0 >\n+ 447 {\n+448 static int apply ( int subEntity, int vertex )\n+ 449 {\n+ 450 assert( subEntity == 0 );\n+ 451 assert( (vertex >= 0) && (vertex <= NumSubEntities<_dim,_dim_>::value) );\n+ 452 return vertex;\n+ 453 }\n+ 454 };\n+ 455\n+ 456 template<>\n+457 struct MapVertices< 2, 1 >\n+ 458 {\n+459 static int apply ( int subEntity, int vertex )\n+ 460 {\n+ 461 assert( (subEntity >= 0) && (subEntity < 3) );\n+ 462 assert( (vertex >= 0) && (vertex < 2) );\n+ 463 //static const int map[ 3 ][ 2 ] = { {1,2}, {2,0}, {0,1} };\n+ 464 static const int map[ 3 ][ 2 ] = { {1,2}, {0,2}, {0,1} };\n+ 465 return map[ subEntity ][ vertex ];\n+ 466 }\n+ 467 };\n+ 468\n+ 469 template<>\n+470 struct MapVertices< 3, 1 >\n+ 471 {\n+472 static int apply ( int subEntity, int vertex )\n+ 473 {\n+ 474 assert( (subEntity >= 0) && (subEntity < 4) );\n+ 475 assert( (vertex >= 0) && (vertex < 3) );\n+ 476 //static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,3,2}, {0,1,3}, {0,2,1} };\n+ 477 static const int map[ 4 ][ 3 ] = { {1,2,3}, {0,2,3}, {0,1,3}, {0,1,2} };\n+ 478 return map[ subEntity ][ vertex ];\n+ 479 }\n+ 480 };\n+ 481\n+ 482 template<>\n+483 struct MapVertices< 3, 2 >\n+ 484 {\n+485 static int apply ( int subEntity, int vertex )\n+ 486 {\n+ 487 assert( (subEntity >= 0) && (subEntity < 6) );\n+ 488 assert( (vertex >= 0) && (vertex < 2) );\n+ 489 static const int map[ 6 ][ 2 ] = { {0,1}, {0,2}, {0,3}, {1,2}, {1,3},\n+{2,3} };\n+ 490 return map[ subEntity ][ vertex ];\n+ 491 }\n+ 492 };\n+ 493\n+ 494 template< int dim >\n+495 struct MapVertices< dim, dim >\n+ 496 {\n+497 static int apply ( int subEntity, int vertex )\n+ 498 {\n+ 499 assert( (subEntity >= 0) && (subEntity < NumSubEntities<_dim,_1_>::value)\n+);\n+ 500 assert( vertex == 0 );\n+ 501 return subEntity;\n+ 502 }\n+ 503 };\n+ 504\n+ 505\n+ 506\n+ 507 // Twist\n+ 508 // -----\n+ 509\n+ 510 // ******************************************************************\n+ 511 // Meaning of the twist (same as in ALU)\n+ 512 // -------------------------------------\n+ 513 //\n+ 514 // Consider a fixed ordering of the vertices v_1, ... v_n of a face\n+ 515 // (here, we assume their indices to be increasing). Denote by k the\n+ 516 // local number of a vertex v within the element and by t the twist.\n+ 517 // Then, v = v_j, where j is computed by the following formula:\n+ 518 //\n+ 519 // / (2n + 1 - k + t) % n, if t < 0\n+ 520 // j = <\n+ 521 // \\ (k + t) % n, if t >= 0\n+ 522 //\n+ 523 // Note: We use the order of the 0-th vertex dof to assign the twist.\n+ 524 // This is ok for two reasons:\n+ 525 // - ALBERTA preserves the relative order of the dofs during\n+ 526 // dof compression.\n+ 527 // - ALBERTA enforces the first vertex dof admin to be periodic.\n+ 528 // ******************************************************************\n+ 529\n+ 530 template< int dim, int subdim >\n+531 struct Twist\n+ 532 {\n+533 static const int numSubEntities = NumSubEntities< dim, dim-subdim >::value;\n+ 534\n+535 static const int minTwist = 0;\n+536 static const int maxTwist = 0;\n+ 537\n+538 static int twist ( [[maybe_unused]] const Element *element,\n+ 539 [[maybe_unused]] int subEntity )\n+ 540 {\n+ 541 assert( (subEntity >= 0) && (subEntity < numSubEntities) );\n+ 542 return 0;\n+ 543 }\n+ 544 };\n+ 545\n+ 546 template< int dim >\n+547 struct Twist< dim, 1 >\n+ 548 {\n+549 static const int numSubEntities = NumSubEntities< dim, dim-1 >::value;\n+ 550\n+551 static const int minTwist = 0;\n+552 static const int maxTwist = 1;\n+ 553\n+554 static int twist ( const Element *element, int subEntity )\n+ 555 {\n+ 556 assert( (subEntity >= 0) && (subEntity < numSubEntities) );\n+ 557 const int numVertices = NumSubEntities<_1,_1_>::value;\n+ 558 int dof[ numVertices ];\n+ 559 for( int i = 0; i < numVertices; ++i )\n+ 560 {\n+ 561 const int j = MapVertices<_dim,_dim-1_>::apply( subEntity, i );\n+ 562 dof[ i ] = element->dof[ j ][ 0 ];\n+ 563 }\n+ 564 return (dof[ 0 ] < dof[ 1 ] ? 0 : 1);\n+ 565 }\n+ 566 };\n+ 567\n+ 568\n+ 569 template<>\n+570 struct Twist< 1, 1 >\n+ 571 {\n+572 static const int minTwist = 0;\n+573 static const int maxTwist = 0;\n+ 574\n+575 static int twist ( [[maybe_unused]] const Element *element,\n+ 576 [[maybe_unused]] int subEntity )\n+ 577 {\n+ 578 assert( subEntity == 0 );\n+ 579 return 0;\n+ 580 }\n+ 581 };\n+ 582\n+ 583\n+ 584 template< int dim >\n+585 struct Twist< dim, 2 >\n+ 586 {\n+587 static const int numSubEntities = NumSubEntities< dim, dim-2 >::value;\n+ 588\n+589 static const int minTwist = -3;\n+590 static const int maxTwist = 2;\n+ 591\n+592 static int twist ( const Element *element, int subEntity )\n+ 593 {\n+ 594 assert( (subEntity >= 0) && (subEntity < numSubEntities) );\n+ 595 const int numVertices = NumSubEntities<_2,_2_>::value;\n+ 596 int dof[ numVertices ];\n+ 597 for( int i = 0; i < numVertices; ++i )\n+ 598 {\n+ 599 const int j = MapVertices<_dim,_dim-2_>::apply( subEntity, i );\n+ 600 dof[ i ] = element->dof[ j ][ 0 ];\n+ 601 }\n+ 602\n+ 603 const int twist[ 8 ] = { -2, 1, 666, -1, 2, 666, -3, 0 };\n+ 604 const int k = int( dof[ 0 ] < dof[ 1 ] )\n+ 605 | (int( dof[ 0 ] < dof[ 2 ] ) << 1)\n+ 606 | (int( dof[ 1 ] < dof[ 2 ] ) << 2);\n+ 607 assert( twist[ k ] != 666 );\n+ 608 return twist[ k ];\n+ 609 }\n+ 610 };\n+ 611\n+ 612\n+ 613 template<>\n+614 struct Twist< 2, 2 >\n+ 615 {\n+616 static const int minTwist = 0;\n+617 static const int maxTwist = 0;\n+ 618\n+619 static int twist ( [[maybe_unused]] const Element *element,\n+ 620 [[maybe_unused]] int subEntity )\n+ 621 {\n+ 622 assert( subEntity == 0 );\n+ 623 return 0;\n+ 624 }\n+ 625 };\n+ 626\n+ 627\n+ 628\n+ 629 template< int dim >\n+630 inline int applyTwist ( int twist, int i )\n+ 631 {\n+ 632 const int numCorners = NumSubEntities<_dim,_dim_>::value;\n+ 633 return (twist < 0 ? (2*numCorners + 1 - i + twist) : i + twist) %\n+numCorners;\n+ 634 }\n+ 635\n+ 636 template< int dim >\n+637 inline int applyInverseTwist ( int twist, int i )\n+ 638 {\n+ 639 const int numCorners = NumSubEntities<_dim,_dim_>::value;\n+ 640 return (twist < 0 ? (2*numCorners + 1 - i + twist) : numCorners + i -\n+twist) % numCorners;\n+ 641 }\n+ 642\n+ 643 }\n+ 644\n+ 645}\n+ 646\n+ 647#endif // #if HAVE_ALBERTA\n+ 648\n+ 649#endif // #ifndef DUNE_ALBERTA_MISC_HH\n+albertaheader.hh\n+DIM_OF_WORLD\n+#define DIM_OF_WORLD\n+Definition: albertaheader.hh:23\n ALBERTA\n #define ALBERTA\n Definition: albertaheader.hh:29\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::Alberta::applyInverseTwist\n+int applyInverseTwist(int twist, int i)\n+Definition: misc.hh:637\n+Dune::Alberta::Mesh\n+ALBERTA MESH Mesh\n+Definition: misc.hh:53\n+Dune::Alberta::applyTwist\n+int applyTwist(int twist, int i)\n+Definition: misc.hh:630\n+Dune::Alberta::memFree\n+void memFree(Data *ptr, size_t size)\n+Definition: misc.hh:91\n+Dune::Alberta::GlobalMatrix\n+ALBERTA REAL_DD GlobalMatrix\n+Definition: misc.hh:51\n+Dune::Alberta::AffineTransformation\n+ALBERTA AFF_TRAFO AffineTransformation\n+Definition: misc.hh:52\n Dune::Alberta::LocalVector\n ALBERTA REAL_B LocalVector\n Definition: misc.hh:49\n Dune::Alberta::Element\n ALBERTA EL Element\n Definition: misc.hh:54\n+Dune::Alberta::BoundaryId\n+ALBERTA BNDRY_TYPE BoundaryId\n+Definition: misc.hh:61\n+Dune::Alberta::InteriorBoundary\n+static const int InteriorBoundary\n+Definition: misc.hh:59\n Dune::Alberta::Real\n ALBERTA REAL Real\n Definition: misc.hh:48\n-Dune::Alberta::MeshPointer\n-Definition: meshpointer.hh:40\n-Dune::Alberta::ElementInfo<_dimension_>\n-Dune::Alberta::ElementInfo::createFake\n-static ElementInfo createFake(const MeshPointer &mesh, const Element *element,\n-int level, int type=0)\n-Definition: elementinfo.hh:752\n-Dune::Alberta::ForEachInteriorSubChild\n-Definition: refinement.hh:31\n-Dune::Alberta::Patch\n-Definition: refinement.hh:40\n-Dune::Alberta::Patch::neighborIndex\n-int neighborIndex(int i, int neighbor) const\n-Definition: refinement.hh:139\n-Dune::Alberta::Patch::elementType\n-int elementType(int i) const\n-Definition: refinement.hh:125\n-Dune::Alberta::Patch::count\n-int count() const\n-Definition: refinement.hh:67\n-Dune::Alberta::Patch::elementInfo\n-ElementInfo elementInfo(int i, const LevelProvider &levelProvider) const\n-Definition: refinement.hh:105\n-Dune::Alberta::Patch::forEach\n-void forEach(Functor &functor) const\n-Definition: refinement.hh:80\n-Dune::Alberta::Patch::operator[]\n-Element * operator[](int i) const\n-Definition: refinement.hh:95\n-Dune::Alberta::Patch::forEachInteriorSubChild\n-void forEachInteriorSubChild(Functor &functor) const\n-Definition: refinement.hh:87\n-Dune::Alberta::Patch::dimension\n-static const int dimension\n-Definition: refinement.hh:47\n-Dune::Alberta::Patch::hasNeighbor\n-bool hasNeighbor(int i, int neighbor) const\n-Definition: refinement.hh:133\n-Dune::Alberta::Patch::Patch\n-Patch(ElementList *list, int count)\n-Definition: refinement.hh:58\n-Dune::Alberta::Patch::ElementInfo\n-Alberta::ElementInfo< dimension > ElementInfo\n-Definition: refinement.hh:49\n-Dune::Alberta::Patch::ElementList\n-ALBERTA RC_LIST_EL ElementList\n-Definition: refinement.hh:51\n-Dune::Alberta::ForEachInteriorSubChild<_dim,_0_>::apply\n-static void apply(Functor &functor, const Patch< dim > &patch)\n-Definition: refinement.hh:154\n-Dune::Alberta::ForEachInteriorSubChild<_dim,_dim_>::apply\n-static void apply(Functor &functor, const Patch< dim > &patch)\n-Definition: refinement.hh:169\n-Dune::Alberta::ForEachInteriorSubChild<_2,_1_>::apply\n-static void apply(Functor &functor, const Patch< 2 > &patch)\n-Definition: refinement.hh:179\n-Dune::Alberta::ForEachInteriorSubChild<_3,_1_>::apply\n-static void apply(Functor &functor, const Patch< 3 > &patch)\n-Definition: refinement.hh:202\n-Dune::Alberta::ForEachInteriorSubChild<_3,_2_>::apply\n-static void apply(Functor &functor, const Patch< 3 > &patch)\n-Definition: refinement.hh:249\n-Dune::Alberta::GeometryInFather\n-Definition: refinement.hh:292\n-Dune::Alberta::GeometryInFather<_1_>::coordinate\n-static const LocalVector & coordinate(int child, int, int i)\n-Definition: refinement.hh:302\n-Dune::Alberta::GeometryInFather<_2_>::coordinate\n-static const LocalVector & coordinate(int child, int, int i)\n-Definition: refinement.hh:319\n-Dune::Alberta::GeometryInFather<_3_>::coordinate\n-static const LocalVector & coordinate(int child, int orientation, int i)\n-Definition: refinement.hh:337\n+Dune::Alberta::meshRefined\n+static const int meshRefined\n+Definition: misc.hh:56\n+Dune::Alberta::memAlloc\n+Data * memAlloc(size_t size)\n+Definition: misc.hh:73\n+Dune::Alberta::memReAlloc\n+Data * memReAlloc(Data *ptr, size_t oldSize, size_t newSize)\n+Definition: misc.hh:85\n+Dune::Alberta::DirichletBoundary\n+static const int DirichletBoundary\n+Definition: misc.hh:60\n+Dune::Alberta::DofSpace\n+ALBERTA FE_SPACE DofSpace\n+Definition: misc.hh:65\n+Dune::Alberta::memCAlloc\n+Data * memCAlloc(size_t size)\n+Definition: misc.hh:79\n+Dune::Alberta::dimWorld\n+static const int dimWorld\n+Definition: misc.hh:46\n+Dune::Alberta::ElementType\n+U_CHAR ElementType\n+Definition: misc.hh:63\n+Dune::Alberta::meshCoarsened\n+static const int meshCoarsened\n+Definition: misc.hh:57\n+Dune::Alberta::GlobalVector\n+ALBERTA REAL_D GlobalVector\n+Definition: misc.hh:50\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n+Dune::AlbertaError\n+Definition: misc.hh:32\n+Dune::AlbertaIOError\n+Definition: misc.hh:36\n+Dune::Alberta::GlobalSpace\n+Definition: misc.hh:102\n+Dune::Alberta::GlobalSpace::identityMatrix\n+static const Matrix & identityMatrix()\n+Definition: misc.hh:131\n+Dune::Alberta::GlobalSpace::nullVector\n+static const Vector & nullVector()\n+Definition: misc.hh:136\n+Dune::Alberta::GlobalSpace::Matrix\n+GlobalMatrix Matrix\n+Definition: misc.hh:106\n+Dune::Alberta::GlobalSpace::Vector\n+GlobalVector Vector\n+Definition: misc.hh:107\n+Dune::Alberta::NumSubEntities\n+Definition: misc.hh:148\n+Dune::Alberta::CodimType\n+Definition: misc.hh:192\n+Dune::Alberta::FillFlags\n+Definition: misc.hh:231\n+Dune::Alberta::FillFlags::nothing\n+static const Flags nothing\n+Definition: misc.hh:234\n+Dune::Alberta::FillFlags::nonPeriodic\n+static const Flags nonPeriodic\n+Definition: misc.hh:248\n+Dune::Alberta::FillFlags::boundaryId\n+static const Flags boundaryId\n+Definition: misc.hh:246\n+Dune::Alberta::FillFlags::elementType\n+static const Flags elementType\n+Definition: misc.hh:244\n+Dune::Alberta::FillFlags::Flags\n+ALBERTA FLAGS Flags\n+Definition: misc.hh:232\n+Dune::Alberta::FillFlags::projection\n+static const Flags projection\n+Definition: misc.hh:242\n+Dune::Alberta::FillFlags::coords\n+static const Flags coords\n+Definition: misc.hh:236\n+Dune::Alberta::FillFlags::orientation\n+static const Flags orientation\n+Definition: misc.hh:240\n+Dune::Alberta::FillFlags::standard\n+static const Flags standard\n+Definition: misc.hh:256\n+Dune::Alberta::FillFlags::neighbor\n+static const Flags neighbor\n+Definition: misc.hh:238\n+Dune::Alberta::FillFlags::all\n+static const Flags all\n+Definition: misc.hh:250\n+Dune::Alberta::FillFlags::standardWithCoords\n+static const Flags standardWithCoords\n+Definition: misc.hh:253\n+Dune::Alberta::RefinementEdge\n+Definition: misc.hh:269\n+Dune::Alberta::RefinementEdge::value\n+static const int value\n+Definition: misc.hh:270\n+Dune::Alberta::Dune2AlbertaNumbering\n+Definition: misc.hh:286\n+Dune::Alberta::Dune2AlbertaNumbering::apply\n+static int apply(const int i)\n+Definition: misc.hh:287\n+Dune::Alberta::Dune2AlbertaNumbering<_3,_2_>::apply\n+static int apply(const int i)\n+Definition: misc.hh:299\n+Dune::Alberta::Generic2AlbertaNumbering\n+Definition: misc.hh:314\n+Dune::Alberta::Generic2AlbertaNumbering::apply\n+static int apply(const int i)\n+Definition: misc.hh:315\n+Dune::Alberta::Generic2AlbertaNumbering<_dim,_1_>::apply\n+static int apply(const int i)\n+Definition: misc.hh:325\n+Dune::Alberta::Generic2AlbertaNumbering<_1,_1_>::apply\n+static int apply(const int i)\n+Definition: misc.hh:335\n+Dune::Alberta::Generic2AlbertaNumbering<_3,_2_>::apply\n+static int apply(const int i)\n+Definition: misc.hh:347\n+Dune::Alberta::NumberingMap\n+Definition: misc.hh:362\n+Dune::Alberta::NumberingMap::alberta2dune\n+int alberta2dune(int codim, int i) const\n+Definition: misc.hh:397\n+Dune::Alberta::NumberingMap::numSubEntities\n+int numSubEntities(int codim) const\n+Definition: misc.hh:404\n+Dune::Alberta::NumberingMap::dune2alberta\n+int dune2alberta(int codim, int i) const\n+Definition: misc.hh:390\n+Dune::Alberta::NumberingMap::~NumberingMap\n+~NumberingMap()\n+Definition: misc.hh:381\n+Dune::Alberta::NumberingMap::NumberingMap\n+NumberingMap()\n+Definition: misc.hh:376\n+Dune::Alberta::MapVertices\n+Definition: misc.hh:443\n+Dune::Alberta::MapVertices<_dim,_0_>::apply\n+static int apply(int subEntity, int vertex)\n+Definition: misc.hh:448\n+Dune::Alberta::MapVertices<_2,_1_>::apply\n+static int apply(int subEntity, int vertex)\n+Definition: misc.hh:459\n+Dune::Alberta::MapVertices<_3,_1_>::apply\n+static int apply(int subEntity, int vertex)\n+Definition: misc.hh:472\n+Dune::Alberta::MapVertices<_3,_2_>::apply\n+static int apply(int subEntity, int vertex)\n+Definition: misc.hh:485\n+Dune::Alberta::MapVertices<_dim,_dim_>::apply\n+static int apply(int subEntity, int vertex)\n+Definition: misc.hh:497\n+Dune::Alberta::Twist\n+Definition: misc.hh:532\n+Dune::Alberta::Twist::maxTwist\n+static const int maxTwist\n+Definition: misc.hh:536\n+Dune::Alberta::Twist::minTwist\n+static const int minTwist\n+Definition: misc.hh:535\n+Dune::Alberta::Twist::twist\n+static int twist(const Element *element, int subEntity)\n+Definition: misc.hh:538\n+Dune::Alberta::Twist::numSubEntities\n+static const int numSubEntities\n+Definition: misc.hh:533\n+Dune::Alberta::Twist<_dim,_1_>::twist\n+static int twist(const Element *element, int subEntity)\n+Definition: misc.hh:554\n+Dune::Alberta::Twist<_1,_1_>::twist\n+static int twist(const Element *element, int subEntity)\n+Definition: misc.hh:575\n+Dune::Alberta::Twist<_dim,_2_>::twist\n+static int twist(const Element *element, int subEntity)\n+Definition: misc.hh:592\n+Dune::Alberta::Twist<_2,_2_>::twist\n+static int twist(const Element *element, int subEntity)\n+Definition: misc.hh:619\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00689.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00689.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: hierarchiciterator.hh File Reference\n+dune-grid: entity.cc File Reference\n \n \n \n \n \n \n \n@@ -63,35 +63,46 @@\n \n \n
    \n \n-
    hierarchiciterator.hh File Reference
    \n+Namespaces |\n+Macros
    \n+
    entity.cc File Reference
    \n \n
    \n-\n-

    Go to the source code of this file.

    \n \n-\n-\n-\n-

    \n-Classes

    class  Dune::AlbertaGridHierarchicIterator< GridImp >
     
    \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n

    \n+Macros

    #define DUNE_ALBERTA_ENTITY_CC
     
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DUNE_ALBERTA_ENTITY_CC

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DUNE_ALBERTA_ENTITY_CC
    \n+
    \n+\n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,22 +5,22 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-hierarchiciterator.hh File Reference\n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::AlbertaGridHierarchicIterator<_GridImp_>\n-\u00a0\n+Namespaces | Macros\n+entity.cc File Reference\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+ Macros\n+#define\u00a0DUNE_ALBERTA_ENTITY_CC\n+\u00a0\n+***** Macro Definition Documentation *****\n+***** \u25c6\u00a0DUNE_ALBERTA_ENTITY_CC *****\n+#define DUNE_ALBERTA_ENTITY_CC\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00695.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00695.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: coordcache.hh File Reference\n+dune-grid: algebra.hh File Reference\n \n \n \n \n \n \n \n@@ -63,41 +63,76 @@\n \n \n
    \n \n-
    coordcache.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    algebra.hh File Reference
    \n \n
    \n-
    #include <dune/grid/albertagrid/meshpointer.hh>
    \n-#include <dune/grid/albertagrid/dofadmin.hh>
    \n-#include <dune/grid/albertagrid/dofvector.hh>
    \n+
    #include <dune/common/fvector.hh>
    \n+#include <dune/common/fmatrix.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n-\n-\n-\n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::Alberta::CoordCache< dim >
     
    class  Dune::Alberta::CoordCache< dim >::LocalCaching
     
    struct  Dune::Alberta::CoordCache< dim >::Interpolation
     
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n

    \n+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)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,29 +5,78 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-coordcache.hh File Reference\n-#include \n-#include \n-#include \n+Namespaces | Functions\n+algebra.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n- Classes\n- class \u00a0Dune::Alberta::CoordCache<_dim_>\n-\u00a0\n- class \u00a0Dune::Alberta::CoordCache<_dim_>::LocalCaching\n-\u00a0\n-struct \u00a0Dune::Alberta::CoordCache<_dim_>::Interpolation\n-\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n+ Functions\n+template\n+static FieldVector< K, 3 >\u00a0Dune::Alberta::vectorProduct (const FieldVector< K,\n+ 3 > &u, const FieldVector< K, 3 > &v)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n+ 0, m > &matrix)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n+ 1, 1 > &matrix)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n+ 1, m > &matrix)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n+ 2, 2 > &matrix)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n+ 2, 3 > &matrix)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n+ 2, m > &matrix)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n+ 3, 3 > &matrix)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 0, m >\n+ &matrix, FieldMatrix< K, m, 0 > &inverse)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 1, 1 >\n+ &matrix, FieldMatrix< K, 1, 1 > &inverse)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 1, m >\n+ &matrix, FieldMatrix< K, m, 1 > &inverse)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 2, 2 >\n+ &matrix, FieldMatrix< K, 2, 2 > &inverse)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 2, m >\n+ &matrix, FieldMatrix< K, m, 2 > &inverse)\n+\u00a0\n+template\n+ static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 3, 3 >\n+ &matrix, FieldMatrix< K, 3, 3 > &inverse)\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00695_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: coordcache.hh Source File\n+dune-grid: algebra.hh Source File\n \n \n \n \n \n \n \n@@ -62,206 +62,169 @@\n \n \n
    \n
    \n-
    coordcache.hh
    \n+
    algebra.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_COORDCACHE_HH
    \n-
    6#define DUNE_ALBERTA_COORDCACHE_HH
    \n+
    5#ifndef DUNE_ALBERTA_ALGEBRA_HH
    \n+
    6#define DUNE_ALBERTA_ALGEBRA_HH
    \n
    7
    \n-\n-\n-\n-
    11
    \n-
    12#if HAVE_ALBERTA
    \n+
    8#include <dune/common/fvector.hh>
    \n+
    9#include <dune/common/fmatrix.hh>
    \n+
    10
    \n+
    11namespace Dune
    \n+
    12{
    \n
    13
    \n-
    14namespace Dune
    \n-
    15{
    \n+
    14 namespace Alberta
    \n+
    15 {
    \n
    16
    \n-
    17 namespace Alberta
    \n-
    18 {
    \n-
    19
    \n-
    20 // CoordCache
    \n-
    21 // ----------
    \n-
    22
    \n-
    23 template< int dim >
    \n-\n-
    25 {
    \n-\n-\n+
    17 template< class K >
    \n+
    18 inline static FieldVector< K, 3 >
    \n+
    19 vectorProduct ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v )
    \n+
    20 {
    \n+
    21 FieldVector< K, 3 > w;
    \n+
    22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ];
    \n+
    23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ];
    \n+
    24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ];
    \n+
    25 return w;
    \n+
    26 }
    \n+
    27
    \n
    28
    \n-
    29 class LocalCaching;
    \n-
    30 struct Interpolation;
    \n-
    31
    \n-
    32 public:
    \n-
    33 static const int dimension = dim;
    \n+
    29 template< class K, int m >
    \n+
    30 inline static K determinant ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix )
    \n+
    31 {
    \n+
    32 return K( 1 );
    \n+
    33 }
    \n
    34
    \n-\n-\n-\n-
    38
    \n-
    39 GlobalVector &operator() ( const Element *element, int vertex ) const
    \n-
    40 {
    \n-
    41 assert( !(!coords_) );
    \n-
    42 GlobalVector *array = (GlobalVector *)coords_;
    \n-
    43 return array[ dofAccess_( element, vertex ) ];
    \n-
    44 }
    \n-
    45
    \n-
    46 GlobalVector &operator() ( const ElementInfo &elementInfo, int vertex ) const
    \n-
    47 {
    \n-
    48 return (*this)( elementInfo.el(), vertex );
    \n-
    49 }
    \n+
    35 template< class K >
    \n+
    36 inline static K determinant ( const FieldMatrix< K, 1, 1 > &matrix )
    \n+
    37 {
    \n+
    38 return matrix[ 0 ][ 0 ];
    \n+
    39 }
    \n+
    40
    \n+
    41 template< class K, int m >
    \n+
    42 inline static K determinant ( const FieldMatrix< K, 1, m > &matrix )
    \n+
    43 {
    \n+
    44 using std::sqrt;
    \n+
    45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ];
    \n+
    46 for( int i = 1; i < m; ++i )
    \n+
    47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ];
    \n+
    48 return sqrt( sum );
    \n+
    49 }
    \n
    50
    \n-
    51 void create ( const DofNumbering &dofNumbering )
    \n-
    52 {
    \n-
    53 MeshPointer mesh = dofNumbering.mesh();
    \n-
    54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );
    \n-
    55
    \n-
    56 coords_.create( dofSpace, "Coordinate Cache" );
    \n-
    57 LocalCaching localCaching( coords_ );
    \n-\n-
    59 coords_.template setupInterpolation< Interpolation >();
    \n-
    60
    \n-
    61 dofAccess_ = DofAccess( dofSpace );
    \n-
    62 }
    \n-
    63
    \n-
    64 void release ()
    \n-
    65 {
    \n-
    66 coords_.release();
    \n-
    67 }
    \n-
    68
    \n-
    69 private:
    \n-
    70 CoordVectorPointer coords_;
    \n-
    71 DofAccess dofAccess_;
    \n-
    72 };
    \n-
    73
    \n-
    74
    \n-
    75
    \n-
    76 // CoordCache::LocalCaching
    \n-
    77 // ------------------------
    \n+
    51 template< class K >
    \n+
    52 inline static K determinant ( const FieldMatrix< K, 2, 2 > &matrix )
    \n+
    53 {
    \n+
    54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ][ 0 ];
    \n+
    55 }
    \n+
    56
    \n+
    57 template< class K >
    \n+
    58 inline static K determinant ( const FieldMatrix< K, 2, 3 > &matrix )
    \n+
    59 {
    \n+
    60 return vectorProduct( matrix[ 0 ], matrix[ 1 ] ).two_norm();
    \n+
    61 }
    \n+
    62
    \n+
    63 template< class K, int m >
    \n+
    64 inline static K determinant ( const FieldMatrix< K, 2, m > &matrix )
    \n+
    65 {
    \n+
    66 using std::sqrt;
    \n+
    67 const K tmpA = matrix[ 0 ].two_norm2();
    \n+
    68 const K tmpB = matrix[ 1 ].two_norm2();
    \n+
    69 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
    \n+
    70 return sqrt( tmpA * tmpB - tmpC * tmpC );
    \n+
    71 }
    \n+
    72
    \n+
    73 template< class K >
    \n+
    74 inline static K determinant ( const FieldMatrix< K, 3, 3 > &matrix )
    \n+
    75 {
    \n+
    76 return matrix[ 0 ] * vectorProduct( matrix[ 1 ], matrix[ 2 ] );
    \n+
    77 }
    \n
    78
    \n-
    79 template< int dim >
    \n-\n-
    81 {
    \n-
    82 CoordVectorPointer coords_;
    \n-
    83 DofAccess dofAccess_;
    \n-
    84
    \n-
    85 public:
    \n-
    86 explicit LocalCaching ( const CoordVectorPointer &coords )
    \n-
    87 : coords_( coords ),
    \n-
    88 dofAccess_( coords.dofSpace() )
    \n-
    89 {}
    \n-
    90
    \n-
    91 void operator() ( const ElementInfo &elementInfo ) const
    \n-
    92 {
    \n-
    93 GlobalVector *array = (GlobalVector *)coords_;
    \n-
    94 for( int i = 0; i < DofAccess::numSubEntities; ++i )
    \n-
    95 {
    \n-
    96 const GlobalVector &x = elementInfo.coordinate( i );
    \n-
    97 GlobalVector &y = array[ dofAccess_( elementInfo.el(), i ) ];
    \n-
    98 for( int i = 0; i < dimWorld; ++i )
    \n-
    99 y[ i ] = x[ i ];
    \n-
    100 }
    \n-
    101 }
    \n-
    102 };
    \n-
    103
    \n-
    104
    \n-
    105
    \n-
    106 // CoordCache::Interpolation
    \n-
    107 // -------------------------
    \n-
    108
    \n-
    109 template< int dim >
    \n-\n-
    111 {
    \n-
    112 static const int dimension = dim;
    \n-
    113
    \n-\n-
    115
    \n-
    116 static void
    \n-
    117 interpolateVector ( const CoordVectorPointer &dofVector, const Patch &patch )
    \n-
    118 {
    \n-
    119 DofAccess dofAccess( dofVector.dofSpace() );
    \n-
    120 GlobalVector *array = (GlobalVector *)dofVector;
    \n-
    121
    \n-
    122 const Element *element = patch[ 0 ];
    \n-
    123
    \n-
    124 // new vertex is always the last one
    \n-
    125 assert( element->child[ 0 ] != NULL );
    \n-
    126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension ) ];
    \n-
    127
    \n-
    128 if( element->new_coord != NULL )
    \n-
    129 {
    \n-
    130 for( int j = 0; j < dimWorld; ++j )
    \n-
    131 newCoord[ j ] = element->new_coord[ j ];
    \n-
    132 }
    \n-
    133 else
    \n-
    134 {
    \n-
    135 // new coordinate is the average of of old ones on the same edge
    \n-
    136 // refinement edge is always between vertices 0 and 1
    \n-
    137 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];
    \n-
    138 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];
    \n-
    139 for( int j = 0; j < dimWorld; ++j )
    \n-
    140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);
    \n-
    141 }
    \n-
    142 }
    \n-
    143 };
    \n-
    144
    \n-
    145 }
    \n-
    146
    \n-
    147}
    \n-
    148
    \n-
    149#endif // #if HAVE_ALBERTA
    \n-
    150
    \n-
    151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
    \n-\n-\n-
    provides a wrapper for ALBERTA's mesh structure
    \n+
    79
    \n+
    80 template< class K, int m >
    \n+
    81 inline static K invert ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix,
    \n+
    82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse )
    \n+
    83 {
    \n+
    84 return K( 1 );
    \n+
    85 }
    \n+
    86
    \n+
    87 template< class K >
    \n+
    88 inline static K invert ( const FieldMatrix< K, 1, 1 > &matrix,
    \n+
    89 FieldMatrix< K, 1, 1 > &inverse )
    \n+
    90 {
    \n+
    91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ];
    \n+
    92 return matrix[ 0 ][ 0 ];
    \n+
    93 }
    \n+
    94
    \n+
    95 template< class K, int m >
    \n+
    96 inline static K invert ( const FieldMatrix< K, 1, m > &matrix,
    \n+
    97 FieldMatrix< K, m, 1 > &inverse )
    \n+
    98 {
    \n+
    99 using std::sqrt;
    \n+
    100 K detSqr = matrix[ 0 ].two_norm2();
    \n+
    101 K invDetSqr = K( 1 ) / detSqr;
    \n+
    102 for( int i = 0; i < m; ++i )
    \n+
    103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ];
    \n+
    104 return sqrt( detSqr );
    \n+
    105 }
    \n+
    106
    \n+
    107 template< class K >
    \n+
    108 inline static K invert ( const FieldMatrix< K, 2, 2 > &matrix,
    \n+
    109 FieldMatrix< K, 2, 2 > &inverse )
    \n+
    110 {
    \n+
    111 K det = determinant( matrix );
    \n+
    112 K invDet = K( 1 ) / det;
    \n+
    113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ];
    \n+
    114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ];
    \n+
    115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ];
    \n+
    116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ];
    \n+
    117 return det;
    \n+
    118 }
    \n+
    119
    \n+
    120 template< class K, int m >
    \n+
    121 inline static K invert ( const FieldMatrix< K, 2, m > &matrix,
    \n+
    122 FieldMatrix< K, m, 2 > &inverse )
    \n+
    123 {
    \n+
    124 using std::sqrt;
    \n+
    125 const K tmpA = matrix[ 0 ].two_norm2();
    \n+
    126 const K tmpB = matrix[ 1 ].two_norm2();
    \n+
    127 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
    \n+
    128 const K detSqr = tmpA * tmpB - tmpC * tmpC;
    \n+
    129 const K invDetSqr = K( 1 ) / detSqr;
    \n+
    130 for( int i = 0; i < m; ++i )
    \n+
    131 {
    \n+
    132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix[ 1 ][ i ]);
    \n+
    133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix[ 0 ][ i ]);
    \n+
    134 }
    \n+
    135 return sqrt( detSqr );
    \n+
    136 }
    \n+
    137
    \n+
    138 template< class K >
    \n+
    139 inline static K invert ( const FieldMatrix< K, 3, 3 > &matrix,
    \n+
    140 FieldMatrix< K, 3, 3 > &inverse )
    \n+
    141 {
    \n+
    142 return FMatrixHelp::invertMatrix( matrix, inverse );
    \n+
    143 }
    \n+
    144 }
    \n+
    145
    \n+
    146}
    \n+
    147
    \n+
    148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    ALBERTA EL Element
    Definition: misc.hh:54
    \n-
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n-
    static const int dimWorld
    Definition: misc.hh:46
    \n-
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n-
    @ vertex
    Definition: common.hh:133
    \n-
    Definition: coordcache.hh:25
    \n-
    static const int dimension
    Definition: coordcache.hh:33
    \n-
    GlobalVector & operator()(const Element *element, int vertex) const
    Definition: coordcache.hh:39
    \n-
    Alberta::MeshPointer< dimension > MeshPointer
    Definition: coordcache.hh:36
    \n-
    void release()
    Definition: coordcache.hh:64
    \n-
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: coordcache.hh:35
    \n-
    HierarchyDofNumbering< dimension > DofNumbering
    Definition: coordcache.hh:37
    \n-
    void create(const DofNumbering &dofNumbering)
    Definition: coordcache.hh:51
    \n-
    Definition: coordcache.hh:81
    \n-
    LocalCaching(const CoordVectorPointer &coords)
    Definition: coordcache.hh:86
    \n-
    Definition: coordcache.hh:111
    \n-
    Alberta::Patch< dimension > Patch
    Definition: coordcache.hh:114
    \n-
    static void interpolateVector(const CoordVectorPointer &dofVector, const Patch &patch)
    Definition: coordcache.hh:117
    \n-\n-
    void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:370
    \n-\n-
    static const int numSubEntities
    Definition: dofadmin.hh:40
    \n-\n-
    const MeshPointer & mesh() const
    Definition: dofadmin.hh:158
    \n-
    const DofSpace * dofSpace(int codim) const
    Definition: dofadmin.hh:145
    \n-\n-
    void create(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:236
    \n-
    void release()
    Definition: dofvector.hh:254
    \n-
    const DofSpace * dofSpace() const
    Definition: dofvector.hh:223
    \n-\n-
    const GlobalVector & coordinate(int vertex) const
    Definition: elementinfo.hh:685
    \n-
    Element * el() const
    Definition: elementinfo.hh:737
    \n-
    Definition: misc.hh:231
    \n-
    Definition: refinement.hh:40
    \n+
    static K determinant(const FieldMatrix< K, 0, m > &matrix)
    Definition: algebra.hh:30
    \n+
    static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
    Definition: algebra.hh:81
    \n+
    static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
    Definition: algebra.hh:19
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,262 +5,180 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-coordcache.hh\n+algebra.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_COORDCACHE_HH\n- 6#define DUNE_ALBERTA_COORDCACHE_HH\n+ 5#ifndef DUNE_ALBERTA_ALGEBRA_HH\n+ 6#define DUNE_ALBERTA_ALGEBRA_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11\n- 12#if HAVE_ALBERTA\n+ 8#include \n+ 9#include \n+ 10\n+ 11namespace Dune\n+ 12{\n 13\n- 14namespace Dune\n- 15{\n+ 14 namespace Alberta\n+ 15 {\n 16\n- 17 namespace Alberta\n- 18 {\n- 19\n- 20 // CoordCache\n- 21 // ----------\n- 22\n- 23 template< int dim >\n-24 class CoordCache\n- 25 {\n- 26 typedef DofVectorPointer<_GlobalVector_> CoordVectorPointer;\n- 27 typedef Alberta::DofAccess<_dim,_dim_> DofAccess;\n+ 17 template< class K >\n+ 18 inline static FieldVector< K, 3 >\n+19 vectorProduct ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v )\n+ 20 {\n+ 21 FieldVector< K, 3 > w;\n+ 22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ];\n+ 23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ];\n+ 24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ];\n+ 25 return w;\n+ 26 }\n+ 27\n 28\n- 29 class LocalCaching;\n- 30 struct Interpolation;\n- 31\n- 32 public:\n-33 static const int dimension = dim;\n+ 29 template< class K, int m >\n+30 inline static K determinant ( [[maybe_unused]] const FieldMatrix< K, 0, m >\n+&matrix )\n+ 31 {\n+ 32 return K( 1 );\n+ 33 }\n 34\n-35 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n-36 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n-37 typedef HierarchyDofNumbering<_dimension_> DofNumbering;\n- 38\n-39 GlobalVector &operator()( const Element *element, int vertex ) const\n- 40 {\n- 41 assert( !(!coords_) );\n- 42 GlobalVector *array = (GlobalVector *)coords_;\n- 43 return array[ dofAccess_( element, vertex ) ];\n- 44 }\n- 45\n-46 GlobalVector &operator()( const ElementInfo &elementInfo, int vertex ) const\n- 47 {\n- 48 return (*this)( elementInfo.el(), vertex );\n+ 35 template< class K >\n+36 inline static K determinant ( const FieldMatrix< K, 1, 1 > &matrix )\n+ 37 {\n+ 38 return matrix[ 0 ][ 0 ];\n+ 39 }\n+ 40\n+ 41 template< class K, int m >\n+42 inline static K determinant ( const FieldMatrix< K, 1, m > &matrix )\n+ 43 {\n+ 44 using std::sqrt;\n+ 45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ];\n+ 46 for( int i = 1; i < m; ++i )\n+ 47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ];\n+ 48 return sqrt( sum );\n 49 }\n 50\n-51 void create ( const DofNumbering &dofNumbering )\n- 52 {\n- 53 MeshPointer mesh = dofNumbering.mesh();\n- 54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );\n- 55\n- 56 coords_.create( dofSpace, \"Coordinate Cache\" );\n- 57 LocalCaching localCaching( coords_ );\n- 58 mesh.hierarchicTraverse( localCaching, FillFlags<_dimension_>::coords );\n- 59 coords_.template setupInterpolation< Interpolation >();\n- 60\n- 61 dofAccess_ = DofAccess( dofSpace );\n- 62 }\n- 63\n-64 void release ()\n+ 51 template< class K >\n+52 inline static K determinant ( const FieldMatrix< K, 2, 2 > &matrix )\n+ 53 {\n+ 54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ]\n+[ 0 ];\n+ 55 }\n+ 56\n+ 57 template< class K >\n+58 inline static K determinant ( const FieldMatrix< K, 2, 3 > &matrix )\n+ 59 {\n+ 60 return vectorProduct( matrix[ 0 ], matrix[ 1 ] ).two_norm();\n+ 61 }\n+ 62\n+ 63 template< class K, int m >\n+64 inline static K determinant ( const FieldMatrix< K, 2, m > &matrix )\n 65 {\n- 66 coords_.release();\n- 67 }\n- 68\n- 69 private:\n- 70 CoordVectorPointer coords_;\n- 71 DofAccess dofAccess_;\n- 72 };\n- 73\n- 74\n- 75\n- 76 // CoordCache::LocalCaching\n- 77 // ------------------------\n+ 66 using std::sqrt;\n+ 67 const K tmpA = matrix[ 0 ].two_norm2();\n+ 68 const K tmpB = matrix[ 1 ].two_norm2();\n+ 69 const K tmpC = matrix[ 0 ] * matrix[ 1 ];\n+ 70 return sqrt( tmpA * tmpB - tmpC * tmpC );\n+ 71 }\n+ 72\n+ 73 template< class K >\n+74 inline static K determinant ( const FieldMatrix< K, 3, 3 > &matrix )\n+ 75 {\n+ 76 return matrix[ 0 ] * vectorProduct( matrix[ 1 ], matrix[ 2 ] );\n+ 77 }\n 78\n- 79 template< int dim >\n-80 class CoordCache< dim >::LocalCaching\n- 81 {\n- 82 CoordVectorPointer coords_;\n- 83 DofAccess dofAccess_;\n- 84\n- 85 public:\n-86 explicit LocalCaching ( const CoordVectorPointer &coords )\n- 87 : coords_( coords ),\n- 88 dofAccess_( coords.dofSpace() )\n- 89 {}\n- 90\n-91 void operator()( const ElementInfo &elementInfo ) const\n- 92 {\n- 93 GlobalVector *array = (GlobalVector *)coords_;\n- 94 for( int i = 0; i < DofAccess::numSubEntities; ++i )\n- 95 {\n- 96 const GlobalVector &x = elementInfo.coordinate( i );\n- 97 GlobalVector &y = array[ dofAccess_( elementInfo.el(), i ) ];\n- 98 for( int i = 0; i < dimWorld; ++i )\n- 99 y[ i ] = x[ i ];\n- 100 }\n- 101 }\n- 102 };\n- 103\n- 104\n- 105\n- 106 // CoordCache::Interpolation\n- 107 // -------------------------\n- 108\n- 109 template< int dim >\n-110 struct CoordCache< dim >::Interpolation\n- 111 {\n-112 static const int dimension = dim;\n- 113\n-114 typedef Alberta::Patch<_dimension_> Patch;\n- 115\n- 116 static void\n-117 interpolateVector ( const CoordVectorPointer &dofVector, const Patch &patch\n-)\n- 118 {\n- 119 DofAccess dofAccess( dofVector.dofSpace() );\n- 120 GlobalVector *array = (GlobalVector *)dofVector;\n- 121\n- 122 const Element *element = patch[ 0 ];\n- 123\n- 124 // new vertex is always the last one\n- 125 assert( element->child[ 0 ] != NULL );\n- 126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension\n-) ];\n- 127\n- 128 if( element->new_coord != NULL )\n- 129 {\n- 130 for( int j = 0; j < dimWorld; ++j )\n- 131 newCoord[ j ] = element->new_coord[ j ];\n- 132 }\n- 133 else\n- 134 {\n- 135 // new coordinate is the average of of old ones on the same edge\n- 136 // refinement edge is always between vertices 0 and 1\n- 137 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];\n- 138 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];\n- 139 for( int j = 0; j < dimWorld; ++j )\n- 140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);\n- 141 }\n- 142 }\n- 143 };\n- 144\n- 145 }\n- 146\n- 147}\n- 148\n- 149#endif // #if HAVE_ALBERTA\n- 150\n- 151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH\n-dofadmin.hh\n-dofvector.hh\n-meshpointer.hh\n-provides a wrapper for ALBERTA's mesh structure\n+ 79\n+ 80 template< class K, int m >\n+81 inline static K invert ( [[maybe_unused]] const FieldMatrix< K, 0, m >\n+&matrix,\n+ 82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse )\n+ 83 {\n+ 84 return K( 1 );\n+ 85 }\n+ 86\n+ 87 template< class K >\n+88 inline static K invert ( const FieldMatrix< K, 1, 1 > &matrix,\n+ 89 FieldMatrix< K, 1, 1 > &inverse )\n+ 90 {\n+ 91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ];\n+ 92 return matrix[ 0 ][ 0 ];\n+ 93 }\n+ 94\n+ 95 template< class K, int m >\n+96 inline static K invert ( const FieldMatrix< K, 1, m > &matrix,\n+ 97 FieldMatrix< K, m, 1 > &inverse )\n+ 98 {\n+ 99 using std::sqrt;\n+ 100 K detSqr = matrix[ 0 ].two_norm2();\n+ 101 K invDetSqr = K( 1 ) / detSqr;\n+ 102 for( int i = 0; i < m; ++i )\n+ 103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ];\n+ 104 return sqrt( detSqr );\n+ 105 }\n+ 106\n+ 107 template< class K >\n+108 inline static K invert ( const FieldMatrix< K, 2, 2 > &matrix,\n+ 109 FieldMatrix< K, 2, 2 > &inverse )\n+ 110 {\n+ 111 K det = determinant( matrix );\n+ 112 K invDet = K( 1 ) / det;\n+ 113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ];\n+ 114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ];\n+ 115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ];\n+ 116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ];\n+ 117 return det;\n+ 118 }\n+ 119\n+ 120 template< class K, int m >\n+121 inline static K invert ( const FieldMatrix< K, 2, m > &matrix,\n+ 122 FieldMatrix< K, m, 2 > &inverse )\n+ 123 {\n+ 124 using std::sqrt;\n+ 125 const K tmpA = matrix[ 0 ].two_norm2();\n+ 126 const K tmpB = matrix[ 1 ].two_norm2();\n+ 127 const K tmpC = matrix[ 0 ] * matrix[ 1 ];\n+ 128 const K detSqr = tmpA * tmpB - tmpC * tmpC;\n+ 129 const K invDetSqr = K( 1 ) / detSqr;\n+ 130 for( int i = 0; i < m; ++i )\n+ 131 {\n+ 132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix\n+[ 1 ][ i ]);\n+ 133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix\n+[ 0 ][ i ]);\n+ 134 }\n+ 135 return sqrt( detSqr );\n+ 136 }\n+ 137\n+ 138 template< class K >\n+139 inline static K invert ( const FieldMatrix< K, 3, 3 > &matrix,\n+ 140 FieldMatrix< K, 3, 3 > &inverse )\n+ 141 {\n+ 142 return FMatrixHelp::invertMatrix( matrix, inverse );\n+ 143 }\n+ 144 }\n+ 145\n+ 146}\n+ 147\n+ 148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::Element\n-ALBERTA EL Element\n-Definition: misc.hh:54\n-Dune::Alberta::DofSpace\n-ALBERTA FE_SPACE DofSpace\n-Definition: misc.hh:65\n-Dune::Alberta::dimWorld\n-static const int dimWorld\n-Definition: misc.hh:46\n-Dune::Alberta::GlobalVector\n-ALBERTA REAL_D GlobalVector\n-Definition: misc.hh:50\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n-Dune::Alberta::CoordCache\n-Definition: coordcache.hh:25\n-Dune::Alberta::CoordCache::dimension\n-static const int dimension\n-Definition: coordcache.hh:33\n-Dune::Alberta::CoordCache::operator()\n-GlobalVector & operator()(const Element *element, int vertex) const\n-Definition: coordcache.hh:39\n-Dune::Alberta::CoordCache::MeshPointer\n-Alberta::MeshPointer< dimension > MeshPointer\n-Definition: coordcache.hh:36\n-Dune::Alberta::CoordCache::release\n-void release()\n-Definition: coordcache.hh:64\n-Dune::Alberta::CoordCache::ElementInfo\n-Alberta::ElementInfo< dimension > ElementInfo\n-Definition: coordcache.hh:35\n-Dune::Alberta::CoordCache::DofNumbering\n-HierarchyDofNumbering< dimension > DofNumbering\n-Definition: coordcache.hh:37\n-Dune::Alberta::CoordCache::create\n-void create(const DofNumbering &dofNumbering)\n-Definition: coordcache.hh:51\n-Dune::Alberta::CoordCache::LocalCaching\n-Definition: coordcache.hh:81\n-Dune::Alberta::CoordCache::LocalCaching::LocalCaching\n-LocalCaching(const CoordVectorPointer &coords)\n-Definition: coordcache.hh:86\n-Dune::Alberta::CoordCache::Interpolation\n-Definition: coordcache.hh:111\n-Dune::Alberta::CoordCache::Interpolation::Patch\n-Alberta::Patch< dimension > Patch\n-Definition: coordcache.hh:114\n-Dune::Alberta::CoordCache::Interpolation::interpolateVector\n-static void interpolateVector(const CoordVectorPointer &dofVector, const Patch\n-&patch)\n-Definition: coordcache.hh:117\n-Dune::Alberta::MeshPointer<_dimension_>\n-Dune::Alberta::MeshPointer::hierarchicTraverse\n-void hierarchicTraverse(Functor &functor, typename FillFlags::Flags\n-fillFlags=FillFlags::standard) const\n-Definition: meshpointer.hh:370\n-Dune::Alberta::DofAccess<_dim,_dim_>\n-Dune::Alberta::DofAccess<_dim,_dim_>::numSubEntities\n-static const int numSubEntities\n-Definition: dofadmin.hh:40\n-Dune::Alberta::HierarchyDofNumbering<_dimension_>\n-Dune::Alberta::HierarchyDofNumbering::mesh\n-const MeshPointer & mesh() const\n-Definition: dofadmin.hh:158\n-Dune::Alberta::HierarchyDofNumbering::dofSpace\n-const DofSpace * dofSpace(int codim) const\n-Definition: dofadmin.hh:145\n-Dune::Alberta::DofVectorPointer<_GlobalVector_>\n-Dune::Alberta::DofVectorPointer::create\n-void create(const DofSpace *dofSpace, const std::string &name=\"\")\n-Definition: dofvector.hh:236\n-Dune::Alberta::DofVectorPointer::release\n-void release()\n-Definition: dofvector.hh:254\n-Dune::Alberta::DofVectorPointer::dofSpace\n-const DofSpace * dofSpace() const\n-Definition: dofvector.hh:223\n-Dune::Alberta::ElementInfo<_dimension_>\n-Dune::Alberta::ElementInfo::coordinate\n-const GlobalVector & coordinate(int vertex) const\n-Definition: elementinfo.hh:685\n-Dune::Alberta::ElementInfo::el\n-Element * el() const\n-Definition: elementinfo.hh:737\n-Dune::Alberta::FillFlags\n-Definition: misc.hh:231\n-Dune::Alberta::Patch\n-Definition: refinement.hh:40\n+Dune::Alberta::determinant\n+static K determinant(const FieldMatrix< K, 0, m > &matrix)\n+Definition: algebra.hh:30\n+Dune::Alberta::invert\n+static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 >\n+&inverse)\n+Definition: algebra.hh:81\n+Dune::Alberta::vectorProduct\n+static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const\n+FieldVector< K, 3 > &v)\n+Definition: algebra.hh:19\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00698.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00698.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: agrid.hh File Reference\n+dune-grid: albertareader.hh File Reference\n \n \n \n \n \n \n \n@@ -64,95 +64,36 @@\n \n \n \n
    \n \n-
    agrid.hh File Reference
    \n+Namespaces
    \n+
    albertareader.hh File Reference
    \n \n
    \n-\n-

    provides the AlbertaGrid class \n-More...

    \n-
    #include <cassert>
    \n-#include <cstddef>
    \n-#include <algorithm>
    \n-#include <iostream>
    \n-#include <fstream>
    \n-#include <memory>
    \n-#include <vector>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/common/fmatrix.hh>
    \n-#include <dune/common/stdstreams.hh>
    \n-#include <dune/common/parallel/communication.hh>
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n

    \n-Macros

    #define _ALBERTA_H_
     
    \n-

    Detailed Description

    \n-

    provides the AlbertaGrid class

    \n-
    Author
    Robert Kloefkorn and Martin Nolte
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ _ALBERTA_H_

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define _ALBERTA_H_
    \n-
    \n-\n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,67 +5,24 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces | Macros\n-agrid.hh File Reference\n-provides the AlbertaGrid class More...\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+Classes | Namespaces\n+albertareader.hh File Reference\n+#include \n #include \n #include \n-#include \n-#include \n-#include \"albertaheader.hh\"\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \"indexsets.hh\"\n-#include \"geometry.hh\"\n-#include \"entity.hh\"\n-#include \"hierarchiciterator.hh\"\n-#include \"treeiterator.hh\"\n-#include \"leveliterator.hh\"\n-#include \"leafiterator.hh\"\n-#include \"albertagrid.cc\"\n-#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::AlbertaGrid<_dim,_dimworld_>\n-\u00a0 [provides Dune::Grid] More...\n+class \u00a0Dune::AlbertaReader<_Grid_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n- Macros\n-#define\u00a0_ALBERTA_H_\n-\u00a0\n-***** Detailed Description *****\n-provides the AlbertaGrid class\n- Author\n- Robert Kloefkorn and Martin Nolte\n-***** Macro Definition Documentation *****\n-***** \u25c6\u00a0_ALBERTA_H_ *****\n-#define _ALBERTA_H_\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00698_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: agrid.hh Source File\n+dune-grid: albertareader.hh Source File\n \n \n \n \n \n \n \n@@ -62,810 +62,127 @@\n \n \n
    \n
    \n-
    agrid.hh
    \n+
    albertareader.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTAGRID_IMP_HH
    \n-
    6#define DUNE_ALBERTAGRID_IMP_HH
    \n+
    5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH
    \n+
    6#define DUNE_ALBERTA_ALBERTAREADER_HH
    \n
    7
    \n-
    13#if HAVE_ALBERTA || DOXYGEN
    \n+
    8#include <dune/geometry/type.hh>
    \n+
    9
    \n+\n+\n+
    12
    \n+\n
    14
    \n-
    15#include <cassert>
    \n-
    16#include <cstddef>
    \n-
    17
    \n-
    18#include <algorithm>
    \n-
    19#include <iostream>
    \n-
    20#include <fstream>
    \n-
    21#include <memory>
    \n-
    22#include <vector>
    \n-
    23
    \n-
    24// Dune includes
    \n-
    25#include <dune/common/fvector.hh>
    \n-
    26#include <dune/common/fmatrix.hh>
    \n-
    27#include <dune/common/stdstreams.hh>
    \n-
    28#include <dune/common/parallel/communication.hh>
    \n+
    15#if HAVE_ALBERTA
    \n+
    16
    \n+
    17namespace Dune
    \n+
    18{
    \n+
    19
    \n+
    20 template< class Grid >
    \n+\n+
    22 {
    \n+\n+
    24
    \n+
    25 public:
    \n+\n+
    27
    \n+
    28 typedef typename Grid::ctype ctype;
    \n
    29
    \n-\n-\n-\n-\n-
    34
    \n-
    35//- Local includes
    \n-
    36// some cpp defines and include of alberta.h
    \n-
    37#include "albertaheader.hh"
    \n+
    30 static const int dimension = Grid::dimension;
    \n+\n+
    32
    \n+
    33 private:
    \n+
    34 static_assert(dimensionworld == Alberta::dimWorld,
    \n+
    35 "AlbertaReader: world dimension must match ALBERTA's world dimension.");
    \n+
    36
    \n+\n
    38
    \n-\n-\n-\n-
    42
    \n-\n-\n-\n-\n-\n-\n-\n-
    50
    \n-
    51#include "indexsets.hh"
    \n-
    52#include "geometry.hh"
    \n-
    53#include "entity.hh"
    \n-
    54#include "hierarchiciterator.hh"
    \n-
    55#include "treeiterator.hh"
    \n-
    56#include "leveliterator.hh"
    \n-
    57#include "leafiterator.hh"
    \n-
    58
    \n-
    59namespace Dune
    \n-
    60{
    \n-
    61
    \n-
    62 // External Forward Declarations
    \n-
    63 // -----------------------------
    \n-
    64
    \n-
    65 template< class Grid >
    \n-
    66 struct DGFGridFactory;
    \n-
    67
    \n-
    68
    \n-
    69
    \n-
    70 // AlbertaGrid
    \n-
    71 // -----------
    \n-
    72
    \n-
    105 template< int dim, int dimworld = Alberta::dimWorld >
    \n-\n-\n-
    108 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >
    \n-
    109 {
    \n-\n-\n-\n-
    113 Base;
    \n-
    114
    \n-
    115 template< int, int, class > friend class AlbertaGridEntity;
    \n-
    116 template< class > friend class AlbertaLevelGridView;
    \n-
    117 template< class > friend class AlbertaLeafGridView;
    \n-
    118 template< int, class, bool > friend class AlbertaGridTreeIterator;
    \n-
    119 template< class > friend class AlbertaGridHierarchicIterator;
    \n-
    120
    \n-
    121 friend class GridFactory< This >;
    \n-
    122 friend struct DGFGridFactory< This >;
    \n-
    123
    \n-
    124 friend class AlbertaGridIntersectionBase< const This >;
    \n-
    125 friend class AlbertaGridLeafIntersection< const This >;
    \n-
    126
    \n-
    127 friend class AlbertaMarkerVector< dim, dimworld >;
    \n-
    128#if (__GNUC__ < 4) && !(defined __ICC)
    \n-
    129 // add additional friend decls for gcc 3.4
    \n-
    130 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<true>;
    \n-
    131 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities<false>;
    \n-
    132#endif
    \n-
    133 friend class AlbertaGridIndexSet< dim, dimworld >;
    \n-
    134 friend class AlbertaGridHierarchicIndexSet< dim, dimworld >;
    \n-
    135
    \n-
    136 template< class, class >
    \n-\n-
    138
    \n-
    139 public:
    \n-
    141 typedef AlbertaGridFamily< dim, dimworld > GridFamily;
    \n-
    142
    \n-
    143 typedef typename GridFamily::ctype ctype;
    \n-
    144
    \n-\n-\n-
    147
    \n-
    148 // the Traits
    \n-
    149 typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;
    \n-
    150
    \n-\n-\n-
    155
    \n-\n-
    158
    \n-\n-\n-
    163
    \n-\n-
    166
    \n-
    170 [[deprecated("Use Communication instead!")]]
    \n-\n-
    172
    \n-
    173 private:
    \n-
    175 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;
    \n-
    176
    \n-
    178 typedef AlbertaGridIdSet<dim,dimworld> IdSetImp;
    \n-
    179
    \n-
    181 struct AdaptationState
    \n-
    182 {
    \n-
    183 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };
    \n-
    184
    \n-
    185 private:
    \n-
    186 Phase phase_;
    \n-
    187 int coarsenMarked_;
    \n-
    188 int refineMarked_;
    \n-
    189
    \n-
    190 public:
    \n-
    191 AdaptationState ()
    \n-
    192 : phase_( ComputationPhase ),
    \n-
    193 coarsenMarked_( 0 ),
    \n-
    194 refineMarked_( 0 )
    \n-
    195 {}
    \n-
    196
    \n-
    197 void mark ( int count )
    \n-
    198 {
    \n-
    199 if( count < 0 )
    \n-
    200 ++coarsenMarked_;
    \n-
    201 if( count > 0 )
    \n-
    202 refineMarked_ += (2 << count);
    \n-
    203 }
    \n-
    204
    \n-
    205 void unmark ( int count )
    \n-
    206 {
    \n-
    207 if( count < 0 )
    \n-
    208 --coarsenMarked_;
    \n-
    209 if( count > 0 )
    \n-
    210 refineMarked_ -= (2 << count);
    \n-
    211 }
    \n-
    212
    \n-
    213 bool coarsen () const
    \n-
    214 {
    \n-
    215 return (coarsenMarked_ > 0);
    \n-
    216 }
    \n-
    217
    \n-
    218 int refineMarked () const
    \n-
    219 {
    \n-
    220 return refineMarked_;
    \n-
    221 }
    \n-
    222
    \n-
    223 void preAdapt ()
    \n-
    224 {
    \n-
    225 if( phase_ != ComputationPhase )
    \n-
    226 error( "preAdapt may only be called in computation phase." );
    \n-
    227 phase_ = PreAdaptationPhase;
    \n-
    228 }
    \n-
    229
    \n-
    230 void adapt ()
    \n-
    231 {
    \n-
    232 if( phase_ != PreAdaptationPhase )
    \n-
    233 error( "adapt may only be called in preadapdation phase." );
    \n-
    234 phase_ = PostAdaptationPhase;
    \n-
    235 }
    \n-
    236
    \n-
    237 void postAdapt ()
    \n-
    238 {
    \n-
    239 if( phase_ != PostAdaptationPhase )
    \n-
    240 error( "postAdapt may only be called in postadaptation phase." );
    \n-
    241 phase_ = ComputationPhase;
    \n-
    242
    \n-
    243 coarsenMarked_ = 0;
    \n-
    244 refineMarked_ = 0;
    \n-
    245 }
    \n-
    246
    \n-
    247 private:
    \n-
    248 void error ( const std::string &message )
    \n-
    249 {
    \n-
    250 DUNE_THROW( InvalidStateException, message );
    \n-
    251 }
    \n-
    252 };
    \n-
    253
    \n-
    254 template< class DataHandler >
    \n-
    255 struct AdaptationCallback;
    \n-
    256
    \n-
    257 // max number of allowed levels is 64
    \n-
    258 static const int MAXL = 64;
    \n-
    259
    \n-
    260 typedef Alberta::ElementInfo< dimension > ElementInfo;
    \n-
    261 typedef Alberta::MeshPointer< dimension > MeshPointer;
    \n-\n-
    263 typedef AlbertaGridLevelProvider< dimension > LevelProvider;
    \n-
    264
    \n-
    265 public:
    \n-
    266 AlbertaGrid ( const This & ) = delete;
    \n-
    267 This &operator= ( const This & ) = delete;
    \n-
    268
    \n-
    270 AlbertaGrid ();
    \n-
    271
    \n-\n-
    278 const std::shared_ptr< DuneBoundaryProjection< dimensionworld > > &projection
    \n-
    279 = std::shared_ptr< DuneBoundaryProjection< dimensionworld > >() );
    \n-
    280
    \n-
    281 template< class Proj, class Impl >
    \n-\n-
    283 const Alberta::ProjectionFactoryInterface< Proj, Impl > &projectionFactory );
    \n-
    284
    \n-
    289 AlbertaGrid ( const std::string &macroGridFileName );
    \n-
    290
    \n-
    292 ~AlbertaGrid ();
    \n-
    293
    \n-
    296 int maxLevel () const;
    \n-
    297
    \n-
    299 template<int cd, PartitionIteratorType pitype>
    \n-
    300 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
    \n-
    301 lbegin (int level) const;
    \n-
    302
    \n-
    304 template<int cd, PartitionIteratorType pitype>
    \n-
    305 typename Traits::template Codim<cd>::template Partition<pitype>::LevelIterator
    \n-
    306 lend (int level) const;
    \n-
    307
    \n-
    309 template< int codim >
    \n-
    310 typename Traits::template Codim< codim >::LevelIterator
    \n-
    311 lbegin ( int level ) const;
    \n-
    312
    \n-
    314 template< int codim >
    \n-
    315 typename Traits::template Codim< codim >::LevelIterator
    \n-
    316 lend ( int level ) const;
    \n-
    317
    \n-
    319 template< int codim, PartitionIteratorType pitype >
    \n-
    320 typename Traits
    \n-
    321 ::template Codim< codim >::template Partition< pitype >::LeafIterator
    \n-
    322 leafbegin () const;
    \n-
    323
    \n-
    325 template< int codim, PartitionIteratorType pitype >
    \n-
    326 typename Traits
    \n-
    327 ::template Codim< codim >::template Partition< pitype >::LeafIterator
    \n-
    328 leafend () const;
    \n-
    329
    \n-
    331 template< int codim >
    \n-
    332 typename Traits::template Codim< codim >::LeafIterator
    \n-
    333 leafbegin () const;
    \n-
    334
    \n-
    336 template< int codim >
    \n-
    337 typename Traits::template Codim< codim >::LeafIterator
    \n-
    338 leafend () const;
    \n-
    339
    \n-
    344 int size (int level, int codim) const;
    \n-
    345
    \n-
    347 int size (int level, GeometryType type) const;
    \n-
    348
    \n-
    350 int size (int codim) const;
    \n-
    351
    \n-
    353 int size (GeometryType type) const;
    \n-
    354
    \n-
    356 std::size_t numBoundarySegments () const
    \n-
    357 {
    \n-
    358 return numBoundarySegments_;
    \n-
    359 }
    \n-
    360
    \n-
    362 typename Traits::LevelGridView levelGridView ( int level ) const
    \n-
    363 {
    \n-
    364 typedef typename Traits::LevelGridView View;
    \n-
    365 typedef typename View::GridViewImp ViewImp;
    \n-
    366 return View( ViewImp( *this, level ) );
    \n-
    367 }
    \n-
    368
    \n-\n-
    371 {
    \n-
    372 typedef typename Traits::LeafGridView View;
    \n-
    373 typedef typename View::GridViewImp ViewImp;
    \n-
    374 return View( ViewImp( *this ) );
    \n-
    375 }
    \n-
    376
    \n-
    377 public:
    \n-
    378 //***************************************************************
    \n-
    379 // Interface for Adaptation
    \n-
    380 //***************************************************************
    \n-
    381 using Base::getMark;
    \n-
    382 using Base::mark;
    \n-
    383
    \n-
    385 int getMark ( const typename Traits::template Codim< 0 >::Entity &e ) const;
    \n-
    386
    \n-
    388 bool mark ( int refCount, const typename Traits::template Codim< 0 >::Entity &e );
    \n-
    389
    \n-
    391 void globalRefine ( int refCount );
    \n-
    392
    \n-
    393 template< class DataHandle >
    \n-
    394 void globalRefine ( int refCount, AdaptDataHandleInterface< This, DataHandle > &handle );
    \n-
    395
    \n-
    397 bool adapt ();
    \n-
    398
    \n-
    400 template< class DataHandle >
    \n-\n-
    402
    \n-
    404 bool preAdapt ();
    \n-
    405
    \n-
    407 void postAdapt();
    \n-
    408
    \n-
    411 const Communication &comm () const
    \n-
    412 {
    \n-
    413 return comm_;
    \n-
    414 }
    \n-
    415
    \n-
    416 static std::string typeName ()
    \n-
    417 {
    \n-
    418 std::ostringstream s;
    \n-
    419 s << "AlbertaGrid< " << dim << ", " << dimworld << " >";
    \n-
    420 return s.str();
    \n-
    421 }
    \n-
    422
    \n-
    424 template< class EntitySeed >
    \n-
    425 typename Traits::template Codim< EntitySeed::codimension >::Entity
    \n-
    426 entity ( const EntitySeed &seed ) const
    \n-
    427 {
    \n-
    428 typedef typename Traits::template Codim< EntitySeed::codimension >::EntityImpl EntityImpl;
    \n-
    429 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ), seed.impl().subEntity() );
    \n-
    430 }
    \n-
    431
    \n-
    432 //**********************************************************
    \n-
    433 // End of Interface Methods
    \n-
    434 //**********************************************************
    \n-
    436 bool writeGrid( const std::string &filename, ctype time ) const;
    \n-
    437
    \n-
    439 bool readGrid( const std::string &filename, ctype &time );
    \n-
    440
    \n-
    441 // return hierarchic index set
    \n-
    442 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_; }
    \n-
    443
    \n-
    445 const typename Traits :: LevelIndexSet & levelIndexSet (int level) const;
    \n-
    446
    \n-
    448 const typename Traits :: LeafIndexSet & leafIndexSet () const;
    \n-
    449
    \n-
    451 const GlobalIdSet &globalIdSet () const
    \n-
    452 {
    \n-
    453 return idSet_;
    \n-
    454 }
    \n-
    455
    \n-
    457 const LocalIdSet &localIdSet () const
    \n-
    458 {
    \n-
    459 return idSet_;
    \n-
    460 }
    \n-
    461
    \n-
    462 // access to mesh pointer, needed by some methods
    \n-
    463 ALBERTA MESH* getMesh () const
    \n-
    464 {
    \n-
    465 return mesh_;
    \n-
    466 };
    \n-
    467
    \n-
    468 const MeshPointer &meshPointer () const
    \n-
    469 {
    \n-
    470 return mesh_;
    \n-
    471 }
    \n-
    472
    \n-\n-
    474 {
    \n-
    475 return dofNumbering_;
    \n-
    476 }
    \n-
    477
    \n-\n-
    479 {
    \n-
    480 return levelProvider_;
    \n-
    481 }
    \n-
    482
    \n-
    483 int dune2alberta ( int codim, int i ) const
    \n-
    484 {
    \n-
    485 return numberingMap_.dune2alberta( codim, i );
    \n-
    486 }
    \n-
    487
    \n-
    488 int alberta2dune ( int codim, int i ) const
    \n-
    489 {
    \n-
    490 return numberingMap_.alberta2dune( codim, i );
    \n-
    491 }
    \n-
    492
    \n-
    493 int generic2alberta ( int codim, int i ) const
    \n-
    494 {
    \n-
    495 return genericNumberingMap_.dune2alberta( codim, i );
    \n-
    496 }
    \n-
    497
    \n-
    498 int alberta2generic ( int codim, int i ) const
    \n-
    499 {
    \n-
    500 return genericNumberingMap_.alberta2dune( codim, i );
    \n-
    501 }
    \n-
    502
    \n-
    503 private:
    \n-
    504 typedef std::vector<int> ArrayType;
    \n-
    505
    \n-
    506 void setup ();
    \n-
    507
    \n-
    508 // make the calculation of indexOnLevel and so on.
    \n-
    509 // extra method because of Reihenfolge
    \n-
    510 void calcExtras();
    \n-
    511
    \n-
    512 private:
    \n-
    513 // delete mesh and all vectors
    \n-
    514 void removeMesh();
    \n-
    515
    \n-
    516 //***********************************************************************
    \n-
    517 // MemoryManagement for Entitys and Geometrys
    \n-
    518 //**********************************************************************
    \n-\n-\n-
    521
    \n-
    522 public:
    \n-
    523 friend class AlbertaGridLeafIntersectionIterator< const This >;
    \n-
    524
    \n-
    525 template< int codim >
    \n-
    526 static int
    \n-
    527 getTwist ( const typename Traits::template Codim< codim >::Entity &entity )
    \n-
    528 {
    \n-
    529 return entity.impl().twist();
    \n-
    530 }
    \n-
    531
    \n-
    532 template< int codim >
    \n-
    533 static int
    \n-
    534 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int subEntity )
    \n-
    535 {
    \n-
    536 return entity.impl().template twist< codim >( subEntity );
    \n-
    537 }
    \n-
    538
    \n-
    539 static int
    \n-
    540 getTwistInInside ( const typename Traits::LeafIntersection &intersection )
    \n-
    541 {
    \n-
    542 return intersection.impl().twistInInside();
    \n-
    543 }
    \n-
    544
    \n-
    545 static int
    \n-
    546 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )
    \n-
    547 {
    \n-
    548 return intersection.impl().twistInOutside();
    \n-
    549 }
    \n-
    550
    \n-
    551 public:
    \n-
    552 // read global element number from elNumbers_
    \n-\n-
    554 getCoord ( const ElementInfo &elementInfo, int vertex ) const;
    \n-
    555
    \n-
    556 private:
    \n-
    557 // pointer to an Albert Mesh, which contains the data
    \n-
    558 MeshPointer mesh_;
    \n-
    559
    \n-
    560 // communication
    \n-
    561 Communication comm_;
    \n-
    562
    \n-
    563 // maximum level of the mesh
    \n-
    564 int maxlevel_;
    \n-
    565
    \n-
    566 // number of boundary segments within the macro grid
    \n-
    567 size_t numBoundarySegments_;
    \n-
    568
    \n-
    569 // map between ALBERTA and DUNE numbering
    \n-\n-\n-
    572
    \n-
    573 DofNumbering dofNumbering_;
    \n-
    574
    \n-
    575 LevelProvider levelProvider_;
    \n-
    576
    \n-
    577 // hierarchical numbering of AlbertaGrid, unique per codim
    \n-
    578 HierarchicIndexSet hIndexSet_;
    \n-
    579
    \n-
    580 // the id set of this grid
    \n-
    581 IdSetImp idSet_;
    \n-
    582
    \n-
    583 // the level index set, is generated from the HierarchicIndexSet
    \n-
    584 // is generated, when accessed
    \n-
    585 mutable std::vector< typename GridFamily::LevelIndexSetImp * > levelIndexVec_;
    \n-
    586
    \n-
    587 // the leaf index set, is generated from the HierarchicIndexSet
    \n-
    588 // is generated, when accessed
    \n-
    589 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;
    \n-
    590
    \n-
    591 SizeCache< This > sizeCache_;
    \n-
    592
    \n-
    593 typedef AlbertaMarkerVector< dim, dimworld > MarkerVector;
    \n-
    594
    \n-
    595 // needed for VertexIterator, mark on which element a vertex is treated
    \n-
    596 mutable MarkerVector leafMarkerVector_;
    \n-
    597
    \n-
    598 // needed for VertexIterator, mark on which element a vertex is treated
    \n-
    599 mutable std::vector< MarkerVector > levelMarkerVector_;
    \n-
    600
    \n-
    601#if DUNE_ALBERTA_CACHE_COORDINATES
    \n-\n-
    603#endif
    \n-
    604
    \n-
    605 // current state of adaptation
    \n-
    606 AdaptationState adaptationState_;
    \n-
    607 };
    \n-
    608
    \n-
    609} // namespace Dune
    \n-
    610
    \n-
    611#include "albertagrid.cc"
    \n-
    612
    \n-
    613// undef all dangerous defines
    \n-
    614#undef DIM
    \n-
    615#undef DIM_OF_WORLD
    \n-
    616
    \n-
    617#ifdef _ABS_NOT_DEFINED_
    \n-
    618#undef ABS
    \n-
    619#endif
    \n-
    620
    \n-
    621#ifdef _MIN_NOT_DEFINED_
    \n-
    622#undef MIN
    \n-
    623#endif
    \n-
    624
    \n-
    625#ifdef _MAX_NOT_DEFINED_
    \n-
    626#undef MAX
    \n-
    627#endif
    \n-
    628
    \n-
    629#ifdef obstack_chunk_alloc
    \n-
    630#undef obstack_chunk_alloc
    \n-
    631#endif
    \n-
    632#ifdef obstack_chunk_free
    \n-
    633#undef obstack_chunk_free
    \n-
    634#endif
    \n-\n-
    636
    \n-
    637// We use MEM_ALLOC, so undefine it here.
    \n-
    638#undef MEM_ALLOC
    \n-
    639
    \n-
    640// We use MEM_REALLOC, so undefine it here.
    \n-
    641#undef MEM_REALLOC
    \n-
    642
    \n-
    643// We use MEM_CALLOC, so undefine it here.
    \n-
    644#undef MEM_CALLOC
    \n-
    645
    \n-
    646// We use MEM_FREE, so undefine it here.
    \n-
    647#undef MEM_FREE
    \n-
    648
    \n-
    649// Macro ERROR may be defined by alberta_util.h. If so, undefine it.
    \n-
    650#ifdef ERROR
    \n-
    651#undef ERROR
    \n-
    652#endif // #ifdef ERROR
    \n-
    653
    \n-
    654// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.
    \n-
    655#ifdef ERROR_EXIT
    \n-
    656#undef ERROR_EXIT
    \n-
    657#endif // #ifdef ERROR_EXIT
    \n-
    658
    \n-
    659// Macro WARNING may be defined by alberta_util.h. If so, undefine it.
    \n-
    660#ifdef WARNING
    \n-
    661#undef WARNING
    \n-
    662#endif // #ifdef WARNING
    \n-
    663
    \n-
    664// Macro TEST may be defined by alberta_util.h. If so, undefine it.
    \n-
    665#ifdef TEST
    \n-
    666#undef TEST
    \n-
    667#endif // #ifdef TEST
    \n-
    668
    \n-
    669// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
    \n-
    670#ifdef TEST_EXIT
    \n-
    671#undef TEST_EXIT
    \n-
    672#endif // #ifdef TEST_EXIT
    \n-
    673
    \n-
    674// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.
    \n-
    675#ifdef DEBUG_TEST
    \n-
    676#undef DEBUG_TEST
    \n-
    677#endif // #ifdef DEBUG_TEST
    \n-
    678
    \n-
    679// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine it.
    \n-
    680#ifdef DEBUG_TEST_EXIT
    \n-
    681#undef DEBUG_TEST_EXIT
    \n-
    682#endif // #ifdef DEBUG_TEST_EXIT
    \n-
    683
    \n-
    684// Macro INFO may be defined by alberta_util.h. If so, undefine it.
    \n-
    685#ifdef INFO
    \n-
    686#undef INFO
    \n-
    687#endif // #ifdef INFO
    \n-
    688
    \n-
    689// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.
    \n-
    690#ifdef PRINT_INFO
    \n-
    691#undef PRINT_INFO
    \n-
    692#endif // #ifdef PRINT_INFO
    \n-
    693
    \n-
    694// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine it.
    \n-
    695#ifdef PRINT_INT_VEC
    \n-
    696#undef PRINT_INT_VEC
    \n-
    697#endif // #ifdef PRINT_INT_VEC
    \n-
    698
    \n-
    699// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine it.
    \n-
    700#ifdef PRINT_REAL_VEC
    \n-
    701#undef PRINT_REAL_VEC
    \n-
    702#endif // #ifdef PRINT_REAL_VEC
    \n-
    703
    \n-
    704// Macro WAIT may be defined by alberta_util.h. If so, undefine it.
    \n-
    705#ifdef WAIT
    \n-
    706#undef WAIT
    \n-
    707#endif // #ifdef WAIT
    \n-
    708
    \n-
    709// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.
    \n-
    710#ifdef WAIT_REALLY
    \n-
    711#undef WAIT_REALLY
    \n-
    712#endif // #ifdef WAIT_REALLY
    \n-
    713
    \n-
    714// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
    \n-
    715#ifdef GET_WORKSPACE
    \n-
    716#undef GET_WORKSPACE
    \n-
    717#endif // #ifdef GET_WORKSPACE
    \n-
    718
    \n-
    719// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine it.
    \n-
    720#ifdef FREE_WORKSPACE
    \n-
    721#undef FREE_WORKSPACE
    \n-
    722#endif // #ifdef FREE_WORKSPACE
    \n-
    723
    \n-
    724// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.
    \n-
    725#ifdef MAT_ALLOC
    \n-
    726#undef MAT_ALLOC
    \n-
    727#endif // #ifdef MAT_ALLOC
    \n-
    728
    \n-
    729// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.
    \n-
    730#ifdef MAT_FREE
    \n-
    731#undef MAT_FREE
    \n-
    732#endif // #ifdef MAT_FREE
    \n-
    733
    \n-
    734// Macro NAME may be defined by alberta_util.h. If so, undefine it.
    \n-
    735#ifdef NAME
    \n-
    736#undef NAME
    \n-
    737#endif // #ifdef NAME
    \n-
    738
    \n-
    739// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.
    \n-
    740#ifdef GET_STRUCT
    \n-
    741#undef GET_STRUCT
    \n-
    742#endif // #ifdef GET_STRUCT
    \n-
    743
    \n-
    744// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine it.
    \n-
    745#ifdef ADD_PARAMETER
    \n-
    746#undef ADD_PARAMETER
    \n-
    747#endif // #ifdef ADD_PARAMETER
    \n-
    748
    \n-
    749// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine it.
    \n-
    750#ifdef GET_PARAMETER
    \n-
    751#undef GET_PARAMETER
    \n-
    752#endif // #ifdef GET_PARAMETER
    \n-
    753
    \n-
    754#define _ALBERTA_H_
    \n-
    755
    \n-
    756#endif // HAVE_ALBERTA || DOXYGEN
    \n-
    757
    \n-
    758#endif
    \n-
    Provides size cache classes to implement the grids size method efficiently.
    \n-
    interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
    \n-\n-\n-\n-\n-
    Contains #undefs for all preprocessor macros defined by alberta.
    \n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-\n-\n-\n-\n+
    39 MacroData macroData_;
    \n+
    40
    \n+
    41 AlbertaReader ( const This & );
    \n+
    42 This &operator= ( const This & );
    \n+
    43
    \n+
    44 public:
    \n+\n+
    46 {}
    \n+
    47
    \n+
    48 void readGrid ( const std::string &fileName, GridFactory &factory )
    \n+
    49 {
    \n+
    50 // read ALBERTA macro triangulation
    \n+
    51 macroData_.read( fileName, false );
    \n+
    52
    \n+
    53 // insert all vertices into the factory
    \n+
    54 const int numVertices = macroData_.vertexCount();
    \n+
    55 for( int i = 0; i < numVertices; ++i )
    \n+
    56 {
    \n+
    57 FieldVector< ctype, dimensionworld > v;
    \n+
    58 const Alberta::GlobalVector &coords = macroData_.vertex( i );
    \n+
    59 for( int j = 0; j < dimensionworld; ++j )
    \n+
    60 v[ j ] = coords[ j ];
    \n+
    61 factory.insertVertex( v );
    \n+
    62 }
    \n+
    63
    \n+
    64 // insert all elements into the factory
    \n+
    65 std::vector< unsigned int > vertices( dimension+1 );
    \n+
    66 const int numElements = macroData_.elementCount();
    \n+
    67 for( int i = 0; i < numElements; ++i )
    \n+
    68 {
    \n+
    69 const typename MacroData::ElementId &id = macroData_.element( i );
    \n+
    70 for( int j = 0; j <= dimension; ++j )
    \n+
    71 vertices[ j ] = id[ j ];
    \n+
    72 factory.insertElement( GeometryTypes::simplex( dimension ), vertices );
    \n+
    73 }
    \n+
    74
    \n+
    75 // release ALBERTA macro data
    \n+
    76 macroData_.release();
    \n+
    77 }
    \n+
    78 };
    \n+
    79
    \n+
    80}
    \n+
    81
    \n+
    82#endif // #if HAVE_ALBERTA
    \n+
    83
    \n+
    84#endif
    \n+
    provides a wrapper for ALBERTA's macro_data structure
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n+
    static const int dimWorld
    Definition: misc.hh:46
    \n
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    @ vertex
    Definition: common.hh:133
    \n-
    Definition: dgfgridfactory.hh:38
    \n-
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n-
    bool readGrid(const std::string &filename, ctype &time)
    read Grid from file filename and store time of mesh in time
    Definition: albertagrid.cc:585
    \n-
    const DofNumbering & dofNumbering() const
    Definition: agrid.hh:473
    \n-
    int generic2alberta(int codim, int i) const
    Definition: agrid.hh:493
    \n-
    static std::string typeName()
    Definition: agrid.hh:416
    \n-
    Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafbegin() const
    return LeafIterator which points to first leaf entity
    \n-
    const HierarchicIndexSet & hierarchicIndexSet() const
    Definition: agrid.hh:442
    \n-
    Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend(int level) const
    one past the end on this level
    \n-
    static const int dimension
    Definition: agrid.hh:145
    \n-
    int dune2alberta(int codim, int i) const
    Definition: agrid.hh:483
    \n-
    Traits::Communication Communication
    type of communication
    Definition: agrid.hh:165
    \n-
    int maxLevel() const
    Definition: albertagrid.cc:483
    \n-
    AlbertaGrid()
    create an empty grid
    Definition: albertagrid.cc:42
    \n-
    Traits::template Codim< codim >::LevelIterator lbegin(int level) const
    Iterator to first entity of given codim on level.
    \n-
    const LevelProvider & levelProvider() const
    Definition: agrid.hh:478
    \n-
    static int getTwistInOutside(const typename Traits::LeafIntersection &intersection)
    Definition: agrid.hh:546
    \n-
    const Alberta::GlobalVector & getCoord(const ElementInfo &elementInfo, int vertex) const
    Definition: albertagrid.cc:471
    \n-
    Traits::template Codim< codim >::LevelIterator lend(int level) const
    one past the end on this level
    \n-
    Traits::LeafGridView leafGridView() const
    View for the leaf grid for All_Partition.
    Definition: agrid.hh:370
    \n-
    bool adapt()
    Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
    Definition: albertagrid.cc:415
    \n-
    static const int dimensionworld
    Definition: agrid.hh:146
    \n-
    static int getTwistInInside(const typename Traits::LeafIntersection &intersection)
    Definition: agrid.hh:540
    \n-
    void postAdapt()
    clean up some markers
    Definition: albertagrid.cc:356
    \n-
    Traits::template Codim< codim >::LeafIterator leafbegin() const
    return LeafIterator which points to first leaf entity
    \n-
    const LocalIdSet & localIdSet() const
    return local IdSet
    Definition: agrid.hh:457
    \n-
    std::size_t numBoundarySegments() const
    number of boundary segments within the macro grid
    Definition: agrid.hh:356
    \n-
    GridFamily::ctype ctype
    Definition: agrid.hh:143
    \n-
    AlbertaGrid(const This &)=delete
    \n-
    Communication CollectiveCommunication
    Definition: agrid.hh:171
    \n-
    Traits::template Codim< codim >::LeafIterator leafend() const
    return LeafIterator which points behind last leaf entity
    \n-
    const Traits::LevelIndexSet & levelIndexSet(int level) const
    return level index set for given level
    Definition: albertagrid.cc:520
    \n-
    int alberta2generic(int codim, int i) const
    Definition: agrid.hh:498
    \n-
    static int getTwist(const typename Traits::template Codim< codim >::Entity &entity)
    Definition: agrid.hh:527
    \n-
    const Communication & comm() const
    return reference to communication, if MPI found this is specialisation for MPI
    Definition: agrid.hh:411
    \n-
    ALBERTA MESH * getMesh() const
    Definition: agrid.hh:463
    \n-
    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
    \n-
    Traits::HierarchicIndexSet HierarchicIndexSet
    type of hierarchic index set
    Definition: agrid.hh:157
    \n-
    const Traits::LeafIndexSet & leafIndexSet() const
    return leaf index set
    Definition: albertagrid.cc:535
    \n-
    Traits::template Codim< codim >::template Partition< pitype >::LeafIterator leafend() const
    return LeafIterator which points behind last leaf entity
    \n-
    bool writeGrid(const std::string &filename, ctype time) const
    write Grid to file in Xdr
    Definition: albertagrid.cc:575
    \n-
    Traits::LevelGridView levelGridView(int level) const
    View for a grid level for All_Partition.
    Definition: agrid.hh:362
    \n-
    int alberta2dune(int codim, int i) const
    Definition: agrid.hh:488
    \n-
    This & operator=(const This &)=delete
    \n-
    AlbertaGridFamily< dim, dimworld >::Traits Traits
    Definition: agrid.hh:149
    \n-
    static int getTwist(const typename Traits::template Codim< 0 >::Entity &entity, int subEntity)
    Definition: agrid.hh:534
    \n-
    Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lbegin(int level) const
    Iterator to first entity of given codim on level.
    \n-
    const GlobalIdSet & globalIdSet() const
    return global IdSet
    Definition: agrid.hh:451
    \n-
    void globalRefine(int refCount)
    uses the interface, mark on entity and refineLocal
    Definition: albertagrid.cc:304
    \n-
    int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
    returns adaptation mark for given entity
    Definition: albertagrid.cc:408
    \n-
    Traits::template Codim< EntitySeed::codimension >::Entity entity(const EntitySeed &seed) const
    obtain Entity from EntitySeed.
    Definition: agrid.hh:426
    \n-
    ~AlbertaGrid()
    desctructor
    Definition: albertagrid.cc:196
    \n-
    bool preAdapt()
    returns true, if a least one element is marked for coarsening
    Definition: albertagrid.cc:348
    \n-
    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
    \n-
    const MeshPointer & meshPointer() const
    Definition: agrid.hh:468
    \n-
    Definition: coordcache.hh:25
    \n-
    Definition: albertagrid/datahandle.hh:27
    \n-
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n-
    Implementation & impl()
    access to the underlying implementation
    Definition: common/intersection.hh:178
    \n-\n-\n-\n-
    Definition: treeiterator.hh:189
    \n-
    Definition: hierarchiciterator.hh:29
    \n-
    Definition: albertagrid/intersection.hh:105
    \n-
    Definition: albertagrid/intersectioniterator.hh:27
    \n-
    Definition: albertagrid/entity.hh:46
    \n-
    Definition: albertagrid/indexsets.hh:42
    \n-
    hierarchic index set of AlbertaGrid
    Definition: albertagrid/indexsets.hh:534
    \n-
    Definition: albertagrid/indexsets.hh:335
    \n-
    Definition: albertagrid/gridfamily.hh:83
    \n-
    static const int dimension
    Definition: albertagrid/gridfamily.hh:88
    \n-
    static const int dimensionworld
    Definition: albertagrid/gridfamily.hh:89
    \n-
    AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp
    Definition: albertagrid/gridfamily.hh:92
    \n-
    Alberta::Real ctype
    Definition: albertagrid/gridfamily.hh:86
    \n-
    Definition: albertagrid/gridfamily.hh:98
    \n-
    IndexSet< GridImp, LeafIndexSetImp, int, std::array< GeometryType, 1 > > LeafIndexSet
    Definition: albertagrid/gridfamily.hh:143
    \n-
    IndexSet< GridImp, LevelIndexSetImp, int, std::array< GeometryType, 1 > > LevelIndexSet
    Definition: albertagrid/gridfamily.hh:142
    \n-
    Dune::Communication< No_Comm > Communication
    Definition: albertagrid/gridfamily.hh:148
    \n-
    Definition: albertagrid/gridview.hh:80
    \n-
    Definition: albertagrid/gridview.hh:299
    \n-
    Definition: albertagrid/intersection.hh:32
    \n-\n+
    Definition: albertareader.hh:22
    \n+
    Grid::ctype ctype
    Definition: albertareader.hh:28
    \n+
    static const int dimensionworld
    Definition: albertareader.hh:31
    \n+
    static const int dimension
    Definition: albertareader.hh:30
    \n+
    Dune::GridFactory< Grid > GridFactory
    Definition: albertareader.hh:26
    \n+
    AlbertaReader()
    Definition: albertareader.hh:45
    \n+
    void readGrid(const std::string &fileName, GridFactory &factory)
    Definition: albertareader.hh:48
    \n \n-\n-
    int alberta2dune(int codim, int i) const
    Definition: misc.hh:397
    \n-
    int dune2alberta(int codim, int i) const
    Definition: misc.hh:390
    \n-
    Definition: albertagrid/projection.hh:80
    \n-
    marker assigning subentities to one element containing them
    Definition: treeiterator.hh:35
    \n-
    Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
    Definition: adaptcallback.hh:33
    \n-
    Interface class for vertex projection at the boundary.
    Definition: boundaryprojection.hh:33
    \n-
    Implementation & impl()
    access to the underlying implementation
    Definition: common/entity.hh:80
    \n-
    Store a reference to an entity with a minimal memory footprint.
    Definition: common/entityseed.hh:26
    \n-
    Implementation & impl()
    access to the underlying implementation
    Definition: common/entityseed.hh:59
    \n-
    Definition: common/grid.hh:862
    \n-
    bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
    Marks an entity to be refined/coarsened in a subsequent adapt.
    Definition: common/grid.hh:915
    \n-
    int getMark(const typename Traits::template Codim< 0 >::Entity &e) const
    returns adaptation mark for given entity, i.e. here the default implementation returns 0.
    Definition: common/grid.hh:927
    \n-
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n-
    Id Set Interface.
    Definition: indexidset.hh:452
    \n-
    Definition: common/grid.hh:1107
    \n-
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:314
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    organizes the caching of sizes for one grid and one GeometryType
    Definition: sizecache.hh:33
    \n-\n-\n-\n-\n-\n-\n+
    int ElementId[numVertices]
    Definition: macrodata.hh:48
    \n+
    void release()
    release the macro data structure
    Definition: macrodata.hh:127
    \n+
    int elementCount() const
    Definition: macrodata.hh:68
    \n+
    GlobalVector & vertex(int i) const
    Definition: macrodata.hh:255
    \n+
    int vertexCount() const
    Definition: macrodata.hh:63
    \n+
    ElementId & element(int i) const
    Definition: macrodata.hh:246
    \n+
    void read(const std::string &filename, bool binary=false)
    Definition: macrodata.hh:413
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n+
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/grid.hh:390
    \n+
    ct ctype
    Define type used for coordinates in grid module.
    Definition: common/grid.hh:532
    \n+\n+
    virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
    Insert an element into the coarse grid.
    Definition: common/gridfactory.hh:346
    \n+
    virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
    Insert a vertex into the coarse grid.
    Definition: common/gridfactory.hh:335
    \n
    Provide a generic factory class for unstructured grids.
    \n-
    provides the GridFamily for AlbertaGrid
    \n-\n-\n-
    Implementation of the IntersectionIterator for AlbertaGrid.
    \n
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,1071 +5,177 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-agrid.hh\n+albertareader.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTAGRID_IMP_HH\n- 6#define DUNE_ALBERTAGRID_IMP_HH\n+ 5#ifndef DUNE_ALBERTA_ALBERTAREADER_HH\n+ 6#define DUNE_ALBERTA_ALBERTAREADER_HH\n 7\n- 13#if HAVE_ALBERTA || DOXYGEN\n+ 8#include \n+ 9\n+ 10#include \n+ 11#include \n+ 12\n+ 13#include \n 14\n- 15#include \n- 16#include \n- 17\n- 18#include \n- 19#include \n- 20#include \n- 21#include \n- 22#include \n- 23\n- 24// Dune includes\n- 25#include \n- 26#include \n- 27#include \n- 28#include \n+ 15#if HAVE_ALBERTA\n+ 16\n+ 17namespace Dune\n+ 18{\n+ 19\n+ 20 template< class Grid >\n+21 class AlbertaReader\n+ 22 {\n+ 23 typedef AlbertaReader<_Grid_> This;\n+ 24\n+ 25 public:\n+26 typedef Dune::GridFactory<_Grid_> GridFactory;\n+ 27\n+28 typedef typename Grid::ctype ctype;\n 29\n- 30#include \n- 31#include \n- 32#include \n- 33#include \n- 34\n- 35//- Local includes\n- 36// some cpp defines and include of alberta.h\n- 37#include \"albertaheader.hh\"\n+30 static const int dimension = Grid::dimension;\n+31 static const int dimensionworld = Grid::dimensionworld;\n+ 32\n+ 33 private:\n+ 34 static_assert(dimensionworld == Alberta::dimWorld,\n+ 35 \"AlbertaReader: world dimension must match ALBERTA's world dimension.\");\n+ 36\n+ 37 typedef Alberta::MacroData<_dimension_> MacroData;\n 38\n- 39#include \n- 40#include \n- 41#include \n- 42\n- 43#include \n- 44#include \n- 45#include \n- 46#include \n- 47#include \n- 48#include \n- 49#include \n- 50\n- 51#include \"indexsets.hh\"\n- 52#include \"geometry.hh\"\n- 53#include \"entity.hh\"\n- 54#include \"hierarchiciterator.hh\"\n- 55#include \"treeiterator.hh\"\n- 56#include \"leveliterator.hh\"\n- 57#include \"leafiterator.hh\"\n- 58\n-59namespace Dune\n- 60{\n- 61\n- 62 // External Forward Declarations\n- 63 // -----------------------------\n- 64\n- 65 template< class Grid >\n- 66 struct DGFGridFactory;\n- 67\n- 68\n- 69\n- 70 // AlbertaGrid\n- 71 // -----------\n- 72\n- 105 template< int dim, int dimworld = Alberta::dimWorld >\n-106 class AlbertaGrid\n- 107 : public GridDefaultImplementation\n- 108 < dim, dimworld, Alberta::Real, AlbertaGridFamily< dim, dimworld > >\n- 109 {\n- 110 typedef AlbertaGrid<_dim,_dimworld_> This;\n- 111 typedef GridDefaultImplementation\n- 112 < dim, dimworld, Alberta::Real, AlbertaGridFamily<_dim,_dimworld_> >\n- 113 Base;\n- 114\n-115 template< int, int, class > friend class AlbertaGridEntity;\n-116 template< class > friend class AlbertaLevelGridView;\n-117 template< class > friend class AlbertaLeafGridView;\n-118 template< int, class, bool > friend class AlbertaGridTreeIterator;\n-119 template< class > friend class AlbertaGridHierarchicIterator;\n- 120\n- 121 friend class GridFactory< This >;\n- 122 friend struct DGFGridFactory< This >;\n- 123\n- 124 friend class AlbertaGridIntersectionBase< const This >;\n- 125 friend class AlbertaGridLeafIntersection< const This >;\n- 126\n- 127 friend class AlbertaMarkerVector< dim, dimworld >;\n- 128#if (__GNUC__ < 4) && !(defined __ICC)\n- 129 // add additional friend decls for gcc 3.4\n- 130 friend struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities;\n- 131 friend struct AlbertaMarkerVector< dim, dimworld >::\n-MarkSubEntities;\n- 132#endif\n- 133 friend class AlbertaGridIndexSet< dim, dimworld >;\n- 134 friend class AlbertaGridHierarchicIndexSet< dim, dimworld >;\n- 135\n- 136 template< class, class >\n-137 friend class Alberta::AdaptRestrictProlongHandler;\n- 138\n- 139 public:\n-141 typedef AlbertaGridFamily< dim, dimworld > GridFamily;\n- 142\n-143 typedef typename GridFamily::ctype ctype;\n- 144\n-145 static const int dimension = GridFamily::dimension;\n-146 static const int dimensionworld = GridFamily::dimensionworld;\n- 147\n- 148 // the Traits\n-149 typedef typename AlbertaGridFamily< dim, dimworld >::Traits Traits;\n- 150\n-152 typedef typename Traits::LeafIndexSet LeafIndexSet;\n-154 typedef typename Traits::LevelIndexSet LevelIndexSet;\n- 155\n-157 typedef typename Traits::HierarchicIndexSet HierarchicIndexSet;\n- 158\n-160 typedef typename Traits::GlobalIdSet GlobalIdSet;\n-162 typedef typename Traits::LocalIdSet LocalIdSet;\n- 163\n-165 typedef typename Traits::Communication Communication;\n- 166\n- 170 [[deprecated(\"Use Communication instead!\")]]\n-171 typedef Communication CollectiveCommunication;\n- 172\n- 173 private:\n- 175 typedef typename Traits::template Codim<0>::LeafIterator LeafIterator;\n- 176\n- 178 typedef AlbertaGridIdSet IdSetImp;\n- 179\n- 181 struct AdaptationState\n- 182 {\n- 183 enum Phase { ComputationPhase, PreAdaptationPhase, PostAdaptationPhase };\n- 184\n- 185 private:\n- 186 Phase phase_;\n- 187 int coarsenMarked_;\n- 188 int refineMarked_;\n- 189\n- 190 public:\n- 191 AdaptationState ()\n- 192 : phase_( ComputationPhase ),\n- 193 coarsenMarked_( 0 ),\n- 194 refineMarked_( 0 )\n- 195 {}\n- 196\n- 197 void mark ( int count )\n- 198 {\n- 199 if( count < 0 )\n- 200 ++coarsenMarked_;\n- 201 if( count > 0 )\n- 202 refineMarked_ += (2 << count);\n- 203 }\n- 204\n- 205 void unmark ( int count )\n- 206 {\n- 207 if( count < 0 )\n- 208 --coarsenMarked_;\n- 209 if( count > 0 )\n- 210 refineMarked_ -= (2 << count);\n- 211 }\n- 212\n- 213 bool coarsen () const\n- 214 {\n- 215 return (coarsenMarked_ > 0);\n- 216 }\n- 217\n- 218 int refineMarked () const\n- 219 {\n- 220 return refineMarked_;\n- 221 }\n- 222\n- 223 void preAdapt ()\n- 224 {\n- 225 if( phase_ != ComputationPhase )\n- 226 error( \"preAdapt may only be called in computation phase.\" );\n- 227 phase_ = PreAdaptationPhase;\n- 228 }\n- 229\n- 230 void adapt ()\n- 231 {\n- 232 if( phase_ != PreAdaptationPhase )\n- 233 error( \"adapt may only be called in preadapdation phase.\" );\n- 234 phase_ = PostAdaptationPhase;\n- 235 }\n- 236\n- 237 void postAdapt ()\n- 238 {\n- 239 if( phase_ != PostAdaptationPhase )\n- 240 error( \"postAdapt may only be called in postadaptation phase.\" );\n- 241 phase_ = ComputationPhase;\n- 242\n- 243 coarsenMarked_ = 0;\n- 244 refineMarked_ = 0;\n- 245 }\n- 246\n- 247 private:\n- 248 void error ( const std::string &message )\n- 249 {\n- 250 DUNE_THROW( InvalidStateException, message );\n- 251 }\n- 252 };\n- 253\n- 254 template< class DataHandler >\n- 255 struct AdaptationCallback;\n- 256\n- 257 // max number of allowed levels is 64\n- 258 static const int MAXL = 64;\n- 259\n- 260 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n- 261 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n- 262 typedef Alberta::HierarchyDofNumbering<_dimension_> DofNumbering;\n- 263 typedef AlbertaGridLevelProvider<_dimension_> LevelProvider;\n- 264\n- 265 public:\n-266 AlbertaGrid ( const This & ) = delete;\n-267 This &operator=( const This & ) = delete;\n- 268\n- 270 AlbertaGrid ();\n- 271\n- 277 AlbertaGrid ( const Alberta::MacroData<_dimension_> ¯oData,\n- 278 const std::shared_ptr< DuneBoundaryProjection<_dimensionworld_> >\n-&projection\n- 279 = std::shared_ptr< DuneBoundaryProjection<_dimensionworld_> >() );\n- 280\n- 281 template< class Proj, class Impl >\n- 282 AlbertaGrid ( const Alberta::MacroData<_dimension_> ¯oData,\n- 283 const Alberta::ProjectionFactoryInterface<_Proj,_Impl_> &projectionFactory\n-);\n- 284\n- 289 AlbertaGrid ( const std::string ¯oGridFileName );\n- 290\n- 292 ~AlbertaGrid ();\n- 293\n- 296 int maxLevel () const;\n- 297\n- 299 template\n- 300 typename Traits::template Codim::template Partition::\n-LevelIterator\n-301 lbegin (int level) const;\n- 302\n- 304 template\n- 305 typename Traits::template Codim::template Partition::\n-LevelIterator\n-306 lend (int level) const;\n- 307\n- 309 template< int codim >\n- 310 typename Traits::template Codim< codim >::LevelIterator\n-311 lbegin ( int level ) const;\n- 312\n- 314 template< int codim >\n- 315 typename Traits::template Codim< codim >::LevelIterator\n-316 lend ( int level ) const;\n- 317\n- 319 template< int codim, PartitionIteratorType pitype >\n- 320 typename Traits\n- 321 ::template Codim< codim >::template Partition< pitype >::LeafIterator\n-322 leafbegin () const;\n- 323\n- 325 template< int codim, PartitionIteratorType pitype >\n- 326 typename Traits\n- 327 ::template Codim< codim >::template Partition< pitype >::LeafIterator\n-328 leafend () const;\n- 329\n- 331 template< int codim >\n- 332 typename Traits::template Codim< codim >::LeafIterator\n-333 leafbegin () const;\n- 334\n- 336 template< int codim >\n- 337 typename Traits::template Codim< codim >::LeafIterator\n-338 leafend () const;\n- 339\n- 344 int size (int level, int codim) const;\n- 345\n- 347 int size (int level, GeometryType type) const;\n- 348\n- 350 int size (int codim) const;\n- 351\n- 353 int size (GeometryType type) const;\n- 354\n-356 std::size_t numBoundarySegments () const\n- 357 {\n- 358 return numBoundarySegments_;\n- 359 }\n- 360\n-362 typename Traits::LevelGridView levelGridView ( int level ) const\n- 363 {\n- 364 typedef typename Traits::LevelGridView View;\n- 365 typedef typename View::GridViewImp ViewImp;\n- 366 return View( ViewImp( *this, level ) );\n- 367 }\n- 368\n-370 typename Traits::LeafGridView leafGridView () const\n- 371 {\n- 372 typedef typename Traits::LeafGridView View;\n- 373 typedef typename View::GridViewImp ViewImp;\n- 374 return View( ViewImp( *this ) );\n- 375 }\n- 376\n- 377 public:\n- 378 //***************************************************************\n- 379 // Interface for Adaptation\n- 380 //***************************************************************\n- 381 using Base::getMark;\n- 382 using Base::mark;\n- 383\n- 385 int getMark ( const typename Traits::template Codim< 0 >::Entity &e )\n-const;\n- 386\n- 388 bool mark ( int refCount, const typename Traits::template Codim< 0 >::\n-Entity &e );\n- 389\n- 391 void globalRefine ( int refCount );\n- 392\n- 393 template< class DataHandle >\n- 394 void globalRefine ( int refCount, AdaptDataHandleInterface<_This,\n-DataHandle_> &handle );\n- 395\n- 397 bool adapt ();\n- 398\n- 400 template< class DataHandle >\n- 401 bool adapt ( AdaptDataHandleInterface<_This,_DataHandle_> &handle );\n- 402\n- 404 bool preAdapt ();\n- 405\n- 407 void postAdapt();\n- 408\n-411 const Communication &comm () const\n- 412 {\n- 413 return comm_;\n- 414 }\n- 415\n-416 static std::string typeName ()\n- 417 {\n- 418 std::ostringstream s;\n- 419 s << \"AlbertaGrid< \" << dim << \", \" << dimworld << \" >\";\n- 420 return s.str();\n- 421 }\n- 422\n- 424 template< class EntitySeed >\n- 425 typename Traits::template Codim< EntitySeed::codimension >::Entity\n-426 entity ( const EntitySeed &seed ) const\n- 427 {\n- 428 typedef typename Traits::template Codim< EntitySeed::codimension >::\n-EntityImpl EntityImpl;\n- 429 return EntityImpl( *this, seed.impl().elementInfo( meshPointer() ),\n-seed.impl().subEntity() );\n- 430 }\n- 431\n- 432 //**********************************************************\n- 433 // End of Interface Methods\n- 434 //**********************************************************\n- 436 bool writeGrid( const std::string &filename, ctype time ) const;\n- 437\n- 439 bool readGrid( const std::string &filename, ctype &time );\n- 440\n- 441 // return hierarchic index set\n-442 const HierarchicIndexSet & hierarchicIndexSet () const { return hIndexSet_;\n-}\n- 443\n- 445 const typename Traits_::_LevelIndexSet & levelIndexSet (int level) const;\n- 446\n- 448 const typename Traits_::_LeafIndexSet & leafIndexSet () const;\n- 449\n-451 const GlobalIdSet &globalIdSet () const\n- 452 {\n- 453 return idSet_;\n- 454 }\n- 455\n-457 const LocalIdSet &localIdSet () const\n- 458 {\n- 459 return idSet_;\n- 460 }\n- 461\n- 462 // access to mesh pointer, needed by some methods\n-463 ALBERTA MESH* getMesh () const\n- 464 {\n- 465 return mesh_;\n- 466 };\n- 467\n-468 const MeshPointer &meshPointer () const\n- 469 {\n- 470 return mesh_;\n- 471 }\n- 472\n-473 const DofNumbering &dofNumbering () const\n- 474 {\n- 475 return dofNumbering_;\n- 476 }\n- 477\n-478 const LevelProvider &levelProvider () const\n- 479 {\n- 480 return levelProvider_;\n- 481 }\n- 482\n-483 int dune2alberta ( int codim, int i ) const\n- 484 {\n- 485 return numberingMap_.dune2alberta( codim, i );\n- 486 }\n- 487\n-488 int alberta2dune ( int codim, int i ) const\n- 489 {\n- 490 return numberingMap_.alberta2dune( codim, i );\n- 491 }\n- 492\n-493 int generic2alberta ( int codim, int i ) const\n- 494 {\n- 495 return genericNumberingMap_.dune2alberta( codim, i );\n- 496 }\n- 497\n-498 int alberta2generic ( int codim, int i ) const\n- 499 {\n- 500 return genericNumberingMap_.alberta2dune( codim, i );\n- 501 }\n- 502\n- 503 private:\n- 504 typedef std::vector ArrayType;\n- 505\n- 506 void setup ();\n- 507\n- 508 // make the calculation of indexOnLevel and so on.\n- 509 // extra method because of Reihenfolge\n- 510 void calcExtras();\n- 511\n- 512 private:\n- 513 // delete mesh and all vectors\n- 514 void removeMesh();\n- 515\n- 516 //***********************************************************************\n- 517 // MemoryManagement for Entitys and Geometrys\n- 518 //**********************************************************************\n- 519 typedef MakeableInterfaceObject<_typename_Traits::template_Codim<_0_>::\n-Entity >\n-520 EntityObject;\n- 521\n- 522 public:\n- 523 friend class AlbertaGridLeafIntersectionIterator< const This >;\n- 524\n- 525 template< int codim >\n- 526 static int\n-527 getTwist ( const typename Traits::template Codim< codim >::Entity &entity )\n- 528 {\n- 529 return entity.impl().twist();\n- 530 }\n- 531\n- 532 template< int codim >\n- 533 static int\n-534 getTwist ( const typename Traits::template Codim< 0 >::Entity &entity, int\n-subEntity )\n- 535 {\n- 536 return entity.impl().template twist< codim >( subEntity );\n- 537 }\n- 538\n- 539 static int\n-540 getTwistInInside ( const typename Traits::LeafIntersection &intersection )\n- 541 {\n- 542 return intersection.impl().twistInInside();\n- 543 }\n- 544\n- 545 static int\n-546 getTwistInOutside ( const typename Traits::LeafIntersection &intersection )\n- 547 {\n- 548 return intersection.impl().twistInOutside();\n- 549 }\n- 550\n- 551 public:\n- 552 // read global element number from elNumbers_\n- 553 const Alberta::GlobalVector &\n- 554 getCoord ( const ElementInfo &elementInfo, int vertex ) const;\n- 555\n- 556 private:\n- 557 // pointer to an Albert Mesh, which contains the data\n- 558 MeshPointer mesh_;\n- 559\n- 560 // communication\n- 561 Communication comm_;\n- 562\n- 563 // maximum level of the mesh\n- 564 int maxlevel_;\n- 565\n- 566 // number of boundary segments within the macro grid\n- 567 size_t numBoundarySegments_;\n- 568\n- 569 // map between ALBERTA and DUNE numbering\n- 570 Alberta::NumberingMap<_dimension,_Alberta::Dune2AlbertaNumbering_>\n-numberingMap_;\n- 571 Alberta::NumberingMap<_dimension,_Alberta::Generic2AlbertaNumbering_>\n-genericNumberingMap_;\n- 572\n- 573 DofNumbering dofNumbering_;\n- 574\n- 575 LevelProvider levelProvider_;\n- 576\n- 577 // hierarchical numbering of AlbertaGrid, unique per codim\n- 578 HierarchicIndexSet hIndexSet_;\n- 579\n- 580 // the id set of this grid\n- 581 IdSetImp idSet_;\n- 582\n- 583 // the level index set, is generated from the HierarchicIndexSet\n- 584 // is generated, when accessed\n- 585 mutable std::vector< typename GridFamily::LevelIndexSetImp * >\n-levelIndexVec_;\n- 586\n- 587 // the leaf index set, is generated from the HierarchicIndexSet\n- 588 // is generated, when accessed\n- 589 mutable typename GridFamily::LeafIndexSetImp* leafIndexSet_;\n- 590\n- 591 SizeCache<_This_> sizeCache_;\n- 592\n- 593 typedef AlbertaMarkerVector<_dim,_dimworld_> MarkerVector;\n- 594\n- 595 // needed for VertexIterator, mark on which element a vertex is treated\n- 596 mutable MarkerVector leafMarkerVector_;\n- 597\n- 598 // needed for VertexIterator, mark on which element a vertex is treated\n- 599 mutable std::vector< MarkerVector > levelMarkerVector_;\n- 600\n- 601#if DUNE_ALBERTA_CACHE_COORDINATES\n- 602 Alberta::CoordCache<_dimension_> coordCache_;\n- 603#endif\n- 604\n- 605 // current state of adaptation\n- 606 AdaptationState adaptationState_;\n- 607 };\n- 608\n- 609} // namespace Dune\n- 610\n- 611#include \"albertagrid.cc\"\n- 612\n- 613// undef all dangerous defines\n- 614#undef DIM\n- 615#undef DIM_OF_WORLD\n- 616\n- 617#ifdef _ABS_NOT_DEFINED_\n- 618#undef ABS\n- 619#endif\n- 620\n- 621#ifdef _MIN_NOT_DEFINED_\n- 622#undef MIN\n- 623#endif\n- 624\n- 625#ifdef _MAX_NOT_DEFINED_\n- 626#undef MAX\n- 627#endif\n- 628\n- 629#ifdef obstack_chunk_alloc\n- 630#undef obstack_chunk_alloc\n- 631#endif\n- 632#ifdef obstack_chunk_free\n- 633#undef obstack_chunk_free\n- 634#endif\n- 635#include \n- 636\n- 637// We use MEM_ALLOC, so undefine it here.\n- 638#undef MEM_ALLOC\n- 639\n- 640// We use MEM_REALLOC, so undefine it here.\n- 641#undef MEM_REALLOC\n- 642\n- 643// We use MEM_CALLOC, so undefine it here.\n- 644#undef MEM_CALLOC\n- 645\n- 646// We use MEM_FREE, so undefine it here.\n- 647#undef MEM_FREE\n- 648\n- 649// Macro ERROR may be defined by alberta_util.h. If so, undefine it.\n- 650#ifdef ERROR\n- 651#undef ERROR\n- 652#endif // #ifdef ERROR\n- 653\n- 654// Macro ERROR_EXIT may be defined by alberta_util.h. If so, undefine it.\n- 655#ifdef ERROR_EXIT\n- 656#undef ERROR_EXIT\n- 657#endif // #ifdef ERROR_EXIT\n- 658\n- 659// Macro WARNING may be defined by alberta_util.h. If so, undefine it.\n- 660#ifdef WARNING\n- 661#undef WARNING\n- 662#endif // #ifdef WARNING\n- 663\n- 664// Macro TEST may be defined by alberta_util.h. If so, undefine it.\n- 665#ifdef TEST\n- 666#undef TEST\n- 667#endif // #ifdef TEST\n- 668\n- 669// Macro TEST_EXIT may be defined by alberta_util.h. If so, undefine it.\n- 670#ifdef TEST_EXIT\n- 671#undef TEST_EXIT\n- 672#endif // #ifdef TEST_EXIT\n- 673\n- 674// Macro DEBUG_TEST may be defined by alberta_util.h. If so, undefine it.\n- 675#ifdef DEBUG_TEST\n- 676#undef DEBUG_TEST\n- 677#endif // #ifdef DEBUG_TEST\n- 678\n- 679// Macro DEBUG_TEST_EXIT may be defined by alberta_util.h. If so, undefine\n-it.\n- 680#ifdef DEBUG_TEST_EXIT\n- 681#undef DEBUG_TEST_EXIT\n- 682#endif // #ifdef DEBUG_TEST_EXIT\n- 683\n- 684// Macro INFO may be defined by alberta_util.h. If so, undefine it.\n- 685#ifdef INFO\n- 686#undef INFO\n- 687#endif // #ifdef INFO\n- 688\n- 689// Macro PRINT_INFO may be defined by alberta_util.h. If so, undefine it.\n- 690#ifdef PRINT_INFO\n- 691#undef PRINT_INFO\n- 692#endif // #ifdef PRINT_INFO\n- 693\n- 694// Macro PRINT_INT_VEC may be defined by alberta_util.h. If so, undefine\n-it.\n- 695#ifdef PRINT_INT_VEC\n- 696#undef PRINT_INT_VEC\n- 697#endif // #ifdef PRINT_INT_VEC\n- 698\n- 699// Macro PRINT_REAL_VEC may be defined by alberta_util.h. If so, undefine\n-it.\n- 700#ifdef PRINT_REAL_VEC\n- 701#undef PRINT_REAL_VEC\n- 702#endif // #ifdef PRINT_REAL_VEC\n- 703\n- 704// Macro WAIT may be defined by alberta_util.h. If so, undefine it.\n- 705#ifdef WAIT\n- 706#undef WAIT\n- 707#endif // #ifdef WAIT\n- 708\n- 709// Macro WAIT_REALLY may be defined by alberta_util.h. If so, undefine it.\n- 710#ifdef WAIT_REALLY\n- 711#undef WAIT_REALLY\n- 712#endif // #ifdef WAIT_REALLY\n- 713\n- 714// Macro GET_WORKSPACE may be defined by alberta_util.h. If so, undefine\n-it.\n- 715#ifdef GET_WORKSPACE\n- 716#undef GET_WORKSPACE\n- 717#endif // #ifdef GET_WORKSPACE\n- 718\n- 719// Macro FREE_WORKSPACE may be defined by alberta_util.h. If so, undefine\n-it.\n- 720#ifdef FREE_WORKSPACE\n- 721#undef FREE_WORKSPACE\n- 722#endif // #ifdef FREE_WORKSPACE\n- 723\n- 724// Macro MAT_ALLOC may be defined by alberta_util.h. If so, undefine it.\n- 725#ifdef MAT_ALLOC\n- 726#undef MAT_ALLOC\n- 727#endif // #ifdef MAT_ALLOC\n- 728\n- 729// Macro MAT_FREE may be defined by alberta_util.h. If so, undefine it.\n- 730#ifdef MAT_FREE\n- 731#undef MAT_FREE\n- 732#endif // #ifdef MAT_FREE\n- 733\n- 734// Macro NAME may be defined by alberta_util.h. If so, undefine it.\n- 735#ifdef NAME\n- 736#undef NAME\n- 737#endif // #ifdef NAME\n- 738\n- 739// Macro GET_STRUCT may be defined by alberta_util.h. If so, undefine it.\n- 740#ifdef GET_STRUCT\n- 741#undef GET_STRUCT\n- 742#endif // #ifdef GET_STRUCT\n- 743\n- 744// Macro ADD_PARAMETER may be defined by alberta_util.h. If so, undefine\n-it.\n- 745#ifdef ADD_PARAMETER\n- 746#undef ADD_PARAMETER\n- 747#endif // #ifdef ADD_PARAMETER\n- 748\n- 749// Macro GET_PARAMETER may be defined by alberta_util.h. If so, undefine\n-it.\n- 750#ifdef GET_PARAMETER\n- 751#undef GET_PARAMETER\n- 752#endif // #ifdef GET_PARAMETER\n- 753\n-754#define _ALBERTA_H_\n- 755\n- 756#endif // HAVE_ALBERTA || DOXYGEN\n- 757\n- 758#endif\n-sizecache.hh\n-Provides size cache classes to implement the grids size method efficiently.\n-adaptcallback.hh\n-interfaces and wrappers needed for the callback adaptation provided by\n-AlbertaGrid and dune-ALUGrid\n-albertagrid.cc\n-level.hh\n-misc.hh\n-treeiterator.hh\n-undefine-3.0.hh\n-Contains #undefs for all preprocessor macros defined by alberta.\n-albertaheader.hh\n-ALBERTA\n-#define ALBERTA\n-Definition: albertaheader.hh:29\n-leveliterator.hh\n-leafiterator.hh\n-hierarchiciterator.hh\n-coordcache.hh\n+ 39 MacroData macroData_;\n+ 40\n+ 41 AlbertaReader ( const This & );\n+ 42 This &operator= ( const This & );\n+ 43\n+ 44 public:\n+45 AlbertaReader ()\n+ 46 {}\n+ 47\n+48 void readGrid ( const std::string &fileName, GridFactory &factory )\n+ 49 {\n+ 50 // read ALBERTA macro triangulation\n+ 51 macroData_.read( fileName, false );\n+ 52\n+ 53 // insert all vertices into the factory\n+ 54 const int numVertices = macroData_.vertexCount();\n+ 55 for( int i = 0; i < numVertices; ++i )\n+ 56 {\n+ 57 FieldVector< ctype, dimensionworld > v;\n+ 58 const Alberta::GlobalVector &coords = macroData_.vertex( i );\n+ 59 for( int j = 0; j < dimensionworld; ++j )\n+ 60 v[ j ] = coords[ j ];\n+ 61 factory.insertVertex( v );\n+ 62 }\n+ 63\n+ 64 // insert all elements into the factory\n+ 65 std::vector< unsigned int > vertices( dimension+1 );\n+ 66 const int numElements = macroData_.elementCount();\n+ 67 for( int i = 0; i < numElements; ++i )\n+ 68 {\n+ 69 const typename MacroData::ElementId &id = macroData_.element( i );\n+ 70 for( int j = 0; j <= dimension; ++j )\n+ 71 vertices[ j ] = id[ j ];\n+ 72 factory.insertElement( GeometryTypes::simplex( dimension ), vertices );\n+ 73 }\n+ 74\n+ 75 // release ALBERTA macro data\n+ 76 macroData_.release();\n+ 77 }\n+ 78 };\n+ 79\n+ 80}\n+ 81\n+ 82#endif // #if HAVE_ALBERTA\n+ 83\n+ 84#endif\n+macrodata.hh\n+provides a wrapper for ALBERTA's macro_data structure\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::Real\n-ALBERTA REAL Real\n-Definition: misc.hh:48\n+Dune::Alberta::dimWorld\n+static const int dimWorld\n+Definition: misc.hh:46\n Dune::Alberta::GlobalVector\n ALBERTA REAL_D GlobalVector\n Definition: misc.hh:50\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n-Dune::DGFGridFactory\n-Definition: dgfgridfactory.hh:38\n-Dune::AlbertaGrid\n-[ provides Dune::Grid ]\n-Definition: agrid.hh:109\n-Dune::AlbertaGrid::readGrid\n-bool readGrid(const std::string &filename, ctype &time)\n-read Grid from file filename and store time of mesh in time\n-Definition: albertagrid.cc:585\n-Dune::AlbertaGrid::dofNumbering\n-const DofNumbering & dofNumbering() const\n-Definition: agrid.hh:473\n-Dune::AlbertaGrid::generic2alberta\n-int generic2alberta(int codim, int i) const\n-Definition: agrid.hh:493\n-Dune::AlbertaGrid::typeName\n-static std::string typeName()\n-Definition: agrid.hh:416\n-Dune::AlbertaGrid::leafbegin\n-Traits::template Codim< codim >::template Partition< pitype >::LeafIterator\n-leafbegin() const\n-return LeafIterator which points to first leaf entity\n-Dune::AlbertaGrid::hierarchicIndexSet\n-const HierarchicIndexSet & hierarchicIndexSet() const\n-Definition: agrid.hh:442\n-Dune::AlbertaGrid::lend\n-Traits::template Codim< cd >::template Partition< pitype >::LevelIterator lend\n-(int level) const\n-one past the end on this level\n-Dune::AlbertaGrid::dimension\n-static const int dimension\n-Definition: agrid.hh:145\n-Dune::AlbertaGrid::dune2alberta\n-int dune2alberta(int codim, int i) const\n-Definition: agrid.hh:483\n-Dune::AlbertaGrid::Communication\n-Traits::Communication Communication\n-type of communication\n-Definition: agrid.hh:165\n-Dune::AlbertaGrid::maxLevel\n-int maxLevel() const\n-Definition: albertagrid.cc:483\n-Dune::AlbertaGrid::AlbertaGrid\n-AlbertaGrid()\n-create an empty grid\n-Definition: albertagrid.cc:42\n-Dune::AlbertaGrid::lbegin\n-Traits::template Codim< codim >::LevelIterator lbegin(int level) const\n-Iterator to first entity of given codim on level.\n-Dune::AlbertaGrid::levelProvider\n-const LevelProvider & levelProvider() const\n-Definition: agrid.hh:478\n-Dune::AlbertaGrid::getTwistInOutside\n-static int getTwistInOutside(const typename Traits::LeafIntersection\n-&intersection)\n-Definition: agrid.hh:546\n-Dune::AlbertaGrid::getCoord\n-const Alberta::GlobalVector & getCoord(const ElementInfo &elementInfo, int\n-vertex) const\n-Definition: albertagrid.cc:471\n-Dune::AlbertaGrid::lend\n-Traits::template Codim< codim >::LevelIterator lend(int level) const\n-one past the end on this level\n-Dune::AlbertaGrid::leafGridView\n-Traits::LeafGridView leafGridView() const\n-View for the leaf grid for All_Partition.\n-Definition: agrid.hh:370\n-Dune::AlbertaGrid::adapt\n-bool adapt()\n-Refine all positive marked leaf entities, coarsen all negative marked entities\n-if possible.\n-Definition: albertagrid.cc:415\n-Dune::AlbertaGrid::dimensionworld\n+Dune::AlbertaReader\n+Definition: albertareader.hh:22\n+Dune::AlbertaReader::ctype\n+Grid::ctype ctype\n+Definition: albertareader.hh:28\n+Dune::AlbertaReader::dimensionworld\n static const int dimensionworld\n-Definition: agrid.hh:146\n-Dune::AlbertaGrid::getTwistInInside\n-static int getTwistInInside(const typename Traits::LeafIntersection\n-&intersection)\n-Definition: agrid.hh:540\n-Dune::AlbertaGrid::postAdapt\n-void postAdapt()\n-clean up some markers\n-Definition: albertagrid.cc:356\n-Dune::AlbertaGrid::leafbegin\n-Traits::template Codim< codim >::LeafIterator leafbegin() const\n-return LeafIterator which points to first leaf entity\n-Dune::AlbertaGrid::localIdSet\n-const LocalIdSet & localIdSet() const\n-return local IdSet\n-Definition: agrid.hh:457\n-Dune::AlbertaGrid::numBoundarySegments\n-std::size_t numBoundarySegments() const\n-number of boundary segments within the macro grid\n-Definition: agrid.hh:356\n-Dune::AlbertaGrid::ctype\n-GridFamily::ctype ctype\n-Definition: agrid.hh:143\n-Dune::AlbertaGrid::AlbertaGrid\n-AlbertaGrid(const This &)=delete\n-Dune::AlbertaGrid::CollectiveCommunication\n-Communication CollectiveCommunication\n-Definition: agrid.hh:171\n-Dune::AlbertaGrid::leafend\n-Traits::template Codim< codim >::LeafIterator leafend() const\n-return LeafIterator which points behind last leaf entity\n-Dune::AlbertaGrid::levelIndexSet\n-const Traits::LevelIndexSet & levelIndexSet(int level) const\n-return level index set for given level\n-Definition: albertagrid.cc:520\n-Dune::AlbertaGrid::alberta2generic\n-int alberta2generic(int codim, int i) const\n-Definition: agrid.hh:498\n-Dune::AlbertaGrid::getTwist\n-static int getTwist(const typename Traits::template Codim< codim >::Entity\n-&entity)\n-Definition: agrid.hh:527\n-Dune::AlbertaGrid::comm\n-const Communication & comm() const\n-return reference to communication, if MPI found this is specialisation for MPI\n-Definition: agrid.hh:411\n-Dune::AlbertaGrid::getMesh\n-ALBERTA MESH * getMesh() const\n-Definition: agrid.hh:463\n-Dune::AlbertaGrid::size\n-int size(int level, int codim) const\n-Number of grid entities per level and codim because lbegin and lend are none\n-const,...\n-Definition: albertagrid.cc:490\n-Dune::AlbertaGrid::HierarchicIndexSet\n-Traits::HierarchicIndexSet HierarchicIndexSet\n-type of hierarchic index set\n-Definition: agrid.hh:157\n-Dune::AlbertaGrid::leafIndexSet\n-const Traits::LeafIndexSet & leafIndexSet() const\n-return leaf index set\n-Definition: albertagrid.cc:535\n-Dune::AlbertaGrid::leafend\n-Traits::template Codim< codim >::template Partition< pitype >::LeafIterator\n-leafend() const\n-return LeafIterator which points behind last leaf entity\n-Dune::AlbertaGrid::writeGrid\n-bool writeGrid(const std::string &filename, ctype time) const\n-write Grid to file in Xdr\n-Definition: albertagrid.cc:575\n-Dune::AlbertaGrid::levelGridView\n-Traits::LevelGridView levelGridView(int level) const\n-View for a grid level for All_Partition.\n-Definition: agrid.hh:362\n-Dune::AlbertaGrid::alberta2dune\n-int alberta2dune(int codim, int i) const\n-Definition: agrid.hh:488\n-Dune::AlbertaGrid::operator=\n-This & operator=(const This &)=delete\n-Dune::AlbertaGrid::Traits\n-AlbertaGridFamily< dim, dimworld >::Traits Traits\n-Definition: agrid.hh:149\n-Dune::AlbertaGrid::getTwist\n-static int getTwist(const typename Traits::template Codim< 0 >::Entity &entity,\n-int subEntity)\n-Definition: agrid.hh:534\n-Dune::AlbertaGrid::lbegin\n-Traits::template Codim< cd >::template Partition< pitype >::LevelIterator\n-lbegin(int level) const\n-Iterator to first entity of given codim on level.\n-Dune::AlbertaGrid::globalIdSet\n-const GlobalIdSet & globalIdSet() const\n-return global IdSet\n-Definition: agrid.hh:451\n-Dune::AlbertaGrid::globalRefine\n-void globalRefine(int refCount)\n-uses the interface, mark on entity and refineLocal\n-Definition: albertagrid.cc:304\n-Dune::AlbertaGrid::getMark\n-int getMark(const typename Traits::template Codim< 0 >::Entity &e) const\n-returns adaptation mark for given entity\n-Definition: albertagrid.cc:408\n-Dune::AlbertaGrid::entity\n-Traits::template Codim< EntitySeed::codimension >::Entity entity(const\n-EntitySeed &seed) const\n-obtain Entity from EntitySeed.\n-Definition: agrid.hh:426\n-Dune::AlbertaGrid::~AlbertaGrid\n-~AlbertaGrid()\n-desctructor\n-Definition: albertagrid.cc:196\n-Dune::AlbertaGrid::preAdapt\n-bool preAdapt()\n-returns true, if a least one element is marked for coarsening\n-Definition: albertagrid.cc:348\n-Dune::AlbertaGrid::mark\n-bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)\n-Marks an entity to be refined/coarsened in a subsequent adapt.\n-Definition: albertagrid.cc:385\n-Dune::AlbertaGrid::meshPointer\n-const MeshPointer & meshPointer() const\n-Definition: agrid.hh:468\n-Dune::Alberta::CoordCache\n-Definition: coordcache.hh:25\n-Dune::Alberta::AdaptRestrictProlongHandler\n-Definition: albertagrid/datahandle.hh:27\n-Dune::Intersection\n-Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n-element or with the d...\n-Definition: common/intersection.hh:164\n-Dune::Intersection::impl\n-Implementation & impl()\n-access to the underlying implementation\n-Definition: common/intersection.hh:178\n-Dune::Alberta::MeshPointer<_dimension_>\n-Dune::Alberta::HierarchyDofNumbering<_dimension_>\n-Dune::Alberta::ElementInfo<_dimension_>\n-Dune::AlbertaGridTreeIterator\n-Definition: treeiterator.hh:189\n-Dune::AlbertaGridHierarchicIterator\n-Definition: hierarchiciterator.hh:29\n-Dune::AlbertaGridLeafIntersection\n-Definition: albertagrid/intersection.hh:105\n-Dune::AlbertaGridLeafIntersectionIterator\n-Definition: albertagrid/intersectioniterator.hh:27\n-Dune::AlbertaGridEntity\n-Definition: albertagrid/entity.hh:46\n-Dune::AlbertaGridHierarchicIndexSet\n-Definition: albertagrid/indexsets.hh:42\n-Dune::AlbertaGridIdSet\n-hierarchic index set of AlbertaGrid\n-Definition: albertagrid/indexsets.hh:534\n-Dune::AlbertaGridIndexSet\n-Definition: albertagrid/indexsets.hh:335\n-Dune::AlbertaGridFamily\n-Definition: albertagrid/gridfamily.hh:83\n-Dune::AlbertaGridFamily::dimension\n+Definition: albertareader.hh:31\n+Dune::AlbertaReader::dimension\n static const int dimension\n-Definition: albertagrid/gridfamily.hh:88\n-Dune::AlbertaGridFamily::dimensionworld\n-static const int dimensionworld\n-Definition: albertagrid/gridfamily.hh:89\n-Dune::AlbertaGridFamily::LeafIndexSetImp\n-AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp\n-Definition: albertagrid/gridfamily.hh:92\n-Dune::AlbertaGridFamily::ctype\n-Alberta::Real ctype\n-Definition: albertagrid/gridfamily.hh:86\n-Dune::AlbertaGridFamily::Traits\n-Definition: albertagrid/gridfamily.hh:98\n-Dune::AlbertaGridFamily::Traits::LeafIndexSet\n-IndexSet< GridImp, LeafIndexSetImp, int, std::array< GeometryType, 1 > >\n-LeafIndexSet\n-Definition: albertagrid/gridfamily.hh:143\n-Dune::AlbertaGridFamily::Traits::LevelIndexSet\n-IndexSet< GridImp, LevelIndexSetImp, int, std::array< GeometryType, 1 > >\n-LevelIndexSet\n-Definition: albertagrid/gridfamily.hh:142\n-Dune::AlbertaGridFamily::Traits::Communication\n-Dune::Communication< No_Comm > Communication\n-Definition: albertagrid/gridfamily.hh:148\n-Dune::AlbertaLevelGridView\n-Definition: albertagrid/gridview.hh:80\n-Dune::AlbertaLeafGridView\n-Definition: albertagrid/gridview.hh:299\n-Dune::AlbertaGridIntersectionBase\n-Definition: albertagrid/intersection.hh:32\n-Dune::AlbertaGridLevelProvider<_dimension_>\n+Definition: albertareader.hh:30\n+Dune::AlbertaReader::GridFactory\n+Dune::GridFactory< Grid > GridFactory\n+Definition: albertareader.hh:26\n+Dune::AlbertaReader::AlbertaReader\n+AlbertaReader()\n+Definition: albertareader.hh:45\n+Dune::AlbertaReader::readGrid\n+void readGrid(const std::string &fileName, GridFactory &factory)\n+Definition: albertareader.hh:48\n Dune::Alberta::MacroData<_dimension_>\n-Dune::Alberta::NumberingMap<_dimension,_Alberta::Dune2AlbertaNumbering_>\n-Dune::Alberta::NumberingMap::alberta2dune\n-int alberta2dune(int codim, int i) const\n-Definition: misc.hh:397\n-Dune::Alberta::NumberingMap::dune2alberta\n-int dune2alberta(int codim, int i) const\n-Definition: misc.hh:390\n-Dune::Alberta::ProjectionFactoryInterface\n-Definition: albertagrid/projection.hh:80\n-Dune::AlbertaMarkerVector\n-marker assigning subentities to one element containing them\n-Definition: treeiterator.hh:35\n-Dune::AdaptDataHandleInterface\n-Interface class for the Grid's adapt method where the parameter is a\n-AdaptDataHandleInterface.\n-Definition: adaptcallback.hh:33\n-Dune::DuneBoundaryProjection\n-Interface class for vertex projection at the boundary.\n-Definition: boundaryprojection.hh:33\n-Dune::Entity::impl\n-Implementation & impl()\n-access to the underlying implementation\n-Definition: common/entity.hh:80\n-Dune::EntitySeed\n-Store a reference to an entity with a minimal memory footprint.\n-Definition: common/entityseed.hh:26\n-Dune::EntitySeed::impl\n-Implementation & impl()\n-access to the underlying implementation\n-Definition: common/entityseed.hh:59\n-Dune::GridDefaultImplementation\n-Definition: common/grid.hh:862\n-Dune::GridDefaultImplementation<_dim,_dimworld,_Alberta::Real,\n-AlbertaGridFamily<_dim,_dimworld_>_>::mark\n-bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)\n-Marks an entity to be refined/coarsened in a subsequent adapt.\n-Definition: common/grid.hh:915\n-Dune::GridDefaultImplementation<_dim,_dimworld,_Alberta::Real,\n-AlbertaGridFamily<_dim,_dimworld_>_>::getMark\n-int getMark(const typename Traits::template Codim< 0 >::Entity &e) const\n-returns adaptation mark for given entity, i.e. here the default implementation\n-returns 0.\n-Definition: common/grid.hh:927\n-Dune::IndexSet\n-Index Set Interface base class.\n-Definition: indexidset.hh:78\n-Dune::IdSet\n-Id Set Interface.\n-Definition: indexidset.hh:452\n-Dune::MakeableInterfaceObject\n-Definition: common/grid.hh:1107\n-Dune::GridFactory\n-Provide a generic factory class for unstructured grids.\n-Definition: common/gridfactory.hh:314\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::SizeCache\n-organizes the caching of sizes for one grid and one GeometryType\n-Definition: sizecache.hh:33\n-backuprestore.hh\n-capabilities.hh\n-datahandle.hh\n-entity.hh\n-entityseed.hh\n-geometry.hh\n+Dune::Alberta::MacroData<_dimension_>::ElementId\n+int ElementId[numVertices]\n+Definition: macrodata.hh:48\n+Dune::Alberta::MacroData::release\n+void release()\n+release the macro data structure\n+Definition: macrodata.hh:127\n+Dune::Alberta::MacroData::elementCount\n+int elementCount() const\n+Definition: macrodata.hh:68\n+Dune::Alberta::MacroData::vertex\n+GlobalVector & vertex(int i) const\n+Definition: macrodata.hh:255\n+Dune::Alberta::MacroData::vertexCount\n+int vertexCount() const\n+Definition: macrodata.hh:63\n+Dune::Alberta::MacroData::element\n+ElementId & element(int i) const\n+Definition: macrodata.hh:246\n+Dune::Alberta::MacroData::read\n+void read(const std::string &filename, bool binary=false)\n+Definition: macrodata.hh:413\n+Dune::Grid::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/grid.hh:387\n+Dune::Grid::dimensionworld\n+static constexpr int dimensionworld\n+The dimension of the world the grid lives in.\n+Definition: common/grid.hh:390\n+Dune::Grid::ctype\n+ct ctype\n+Define type used for coordinates in grid module.\n+Definition: common/grid.hh:532\n+Dune::GridFactory<_Grid_>\n+Dune::GridFactory::insertElement\n+virtual void insertElement(const GeometryType &type, const std::vector<\n+unsigned int > &vertices)\n+Insert an element into the coarse grid.\n+Definition: common/gridfactory.hh:346\n+Dune::GridFactory::insertVertex\n+virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)\n+Insert a vertex into the coarse grid.\n+Definition: common/gridfactory.hh:335\n gridfactory.hh\n Provide a generic factory class for unstructured grids.\n-gridfamily.hh\n-provides the GridFamily for AlbertaGrid\n-indexsets.hh\n-intersection.hh\n-intersectioniterator.hh\n-Implementation of the IntersectionIterator for AlbertaGrid.\n grid.hh\n Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00701.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00701.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: geometry.cc File Reference\n+dune-grid: macrodata.cc File Reference\n \n \n \n \n \n \n \n@@ -63,57 +63,38 @@\n \n \n
    \n \n-
    geometry.cc File Reference
    \n+Namespaces
    \n+
    macrodata.cc File Reference
    \n \n
    \n-
    #include <dune/grid/albertagrid/algebra.hh>
    \n-#include <dune/grid/albertagrid/geometry.hh>
    \n-#include <dune/grid/albertagrid/refinement.hh>
    \n+\n+

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

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

    \n-Classes

    struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::GeoInFatherCoordReader< Grid >
     
    struct  Dune::AlbertaGridLocalGeometryProvider< Grid >::FaceCoordReader< Grid >
     
    \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n+\n+\n

    \n-Macros

    #define DUNE_ALBERTA_GEOMETRY_CC
     
    namespace  Dune::Alberta
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DUNE_ALBERTA_GEOMETRY_CC

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define DUNE_ALBERTA_GEOMETRY_CC
    \n-
    \n-\n-
    \n-
    \n-
    \n+

    Detailed Description

    \n+

    provides a wrapper for ALBERTA's macro_data structure

    \n+
    Author
    Martin Nolte
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,32 +5,28 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces | Macros\n-geometry.cc File Reference\n-#include \n-#include \n-#include \n- Classes\n-struct \u00a0Dune::AlbertaGridLocalGeometryProvider<_Grid_>::\n- GeoInFatherCoordReader<_Grid_>\n-\u00a0\n-struct \u00a0Dune::AlbertaGridLocalGeometryProvider<_Grid_>::FaceCoordReader<_Grid\n- >\n-\u00a0\n+Namespaces\n+macrodata.cc File Reference\n+provides a wrapper for ALBERTA's macro_data structure More...\n+#include \n+#include \n+#include \n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n- Macros\n-#define\u00a0DUNE_ALBERTA_GEOMETRY_CC\n+namespace \u00a0Dune::Alberta\n \u00a0\n-***** Macro Definition Documentation *****\n-***** \u25c6\u00a0DUNE_ALBERTA_GEOMETRY_CC *****\n-#define DUNE_ALBERTA_GEOMETRY_CC\n+***** Detailed Description *****\n+provides a wrapper for ALBERTA's macro_data structure\n+ Author\n+ Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00704.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00704.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: macrodata.cc File Reference\n+dune-grid: albertaheader.hh File Reference\n \n \n \n \n \n \n \n@@ -63,38 +63,122 @@\n \n \n
    \n \n-
    macrodata.cc File Reference
    \n+Macros
    \n+
    albertaheader.hh File Reference
    \n \n
    \n-\n-

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

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

    Go to the source code of this file.

    \n+

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n

    \n+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_
     
    \n-

    Detailed Description

    \n-

    provides a wrapper for ALBERTA's macro_data structure

    \n-
    Author
    Martin Nolte
    \n-
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ _ABS_NOT_DEFINED_

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define _ABS_NOT_DEFINED_
    \n+
    \n+\n+
    \n+
    \n+\n+

    ◆ _MAX_NOT_DEFINED_

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define _MAX_NOT_DEFINED_
    \n+
    \n+\n+
    \n+
    \n+\n+

    ◆ _MIN_NOT_DEFINED_

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define _MIN_NOT_DEFINED_
    \n+
    \n+\n+
    \n+
    \n+\n+

    ◆ ALBERTA

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define ALBERTA   ::
    \n+
    \n+\n+
    \n+
    \n+\n+

    ◆ ALBERTA_DEBUG

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define ALBERTA_DEBUG   0
    \n+
    \n+\n+
    \n+
    \n+\n+

    ◆ DIM_OF_WORLD

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DIM_OF_WORLD   ALBERTA_DIM
    \n+
    \n+\n+
    \n+
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,28 +5,40 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Namespaces\n-macrodata.cc File Reference\n-provides a wrapper for ALBERTA's macro_data structure More...\n-#include \n-#include \n-#include \n-#include \n-#include \n- Namespaces\n-namespace \u00a0Dune\n-\u00a0 Include standard header files.\n-\u00a0\n-namespace \u00a0Dune::Alberta\n-\u00a0\n-***** Detailed Description *****\n-provides a wrapper for ALBERTA's macro_data structure\n- Author\n- Martin Nolte\n+Macros\n+albertaheader.hh File Reference\n+#include \n+Go_to_the_source_code_of_this_file.\n+ Macros\n+#define\u00a0DIM_OF_WORLD\u00a0\u00a0\u00a0ALBERTA_DIM\n+\u00a0\n+#define\u00a0ALBERTA\u00a0\u00a0\u00a0::\n+\u00a0\n+#define\u00a0ALBERTA_DEBUG\u00a0\u00a0\u00a00\n+\u00a0\n+#define\u00a0_MAX_NOT_DEFINED_\n+\u00a0\n+#define\u00a0_MIN_NOT_DEFINED_\n+\u00a0\n+#define\u00a0_ABS_NOT_DEFINED_\n+\u00a0\n+***** Macro Definition Documentation *****\n+***** \u25c6\u00a0_ABS_NOT_DEFINED_ *****\n+#define _ABS_NOT_DEFINED_\n+***** \u25c6\u00a0_MAX_NOT_DEFINED_ *****\n+#define _MAX_NOT_DEFINED_\n+***** \u25c6\u00a0_MIN_NOT_DEFINED_ *****\n+#define _MIN_NOT_DEFINED_\n+***** \u25c6\u00a0ALBERTA *****\n+#define ALBERTA\u00a0\u00a0\u00a0::\n+***** \u25c6\u00a0ALBERTA_DEBUG *****\n+#define ALBERTA_DEBUG\u00a0\u00a0\u00a00\n+***** \u25c6\u00a0DIM_OF_WORLD *****\n+#define DIM_OF_WORLD\u00a0\u00a0\u00a0ALBERTA_DIM\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00707.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00707.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: geometryreference.hh File Reference\n+dune-grid: treeiterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,41 +65,41 @@\n
  • dune
  • grid
  • albertagrid
  • \n \n \n
    \n \n-
    geometryreference.hh File Reference
    \n+
    treeiterator.hh File Reference
    \n
    \n
    \n-\n-

    Wrapper and interface classes for element geometries. \n-More...

    \n-
    #include <dune/common/typetraits.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/geometry.hh>
    \n+
    #include <utility>
    \n+#include <dune/common/hybridutilities.hh>
    \n+#include <dune/common/typetraits.hh>
    \n+#include <dune/grid/albertagrid/elementinfo.hh>
    \n+#include <dune/grid/albertagrid/meshpointer.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n+\n \n-\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-

    Detailed Description

    \n-

    Wrapper and interface classes for element geometries.

    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,27 +6,30 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n Classes | Namespaces\n-geometryreference.hh File Reference\n-Wrapper and interface classes for element geometries. More...\n+treeiterator.hh File Reference\n+#include \n+#include \n #include \n-#include \n-#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::GeometryReference<_Implementation_>\n+ class \u00a0Dune::AlbertaMarkerVector<_dim,_dimworld_>\n+\u00a0 marker assigning subentities to one element containing them More...\n \u00a0\n-class \u00a0Dune::LocalGeometryReference<_mydim,_cdim,_Grid_>\n+struct \u00a0Dune::AlbertaMarkerVector<_dim,_dimworld_>::MarkSubEntities<_bool_>::\n+ Codim<_codim_>\n+\u00a0\n+ class \u00a0Dune::AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Wrapper and interface classes for element geometries.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00707_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: geometryreference.hh Source File\n+dune-grid: treeiterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,203 +62,586 @@\n \n \n \n
    \n-
    geometryreference.hh
    \n+
    treeiterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
    \n-
    6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
    \n-
    7
    \n+
    5
    \n+
    6#ifndef DUNE_ALBERTA_TREEITERATOR_HH
    \n+
    7#define DUNE_ALBERTA_TREEITERATOR_HH
    \n+
    8
    \n+
    9#include <utility>
    \n+
    10
    \n+
    11#include <dune/common/hybridutilities.hh>
    \n
    12#include <dune/common/typetraits.hh>
    \n
    13
    \n-
    14#include <dune/geometry/type.hh>
    \n-
    15
    \n-\n-
    17
    \n-
    18namespace Dune
    \n-
    19{
    \n-
    20
    \n-
    21 // GeometryReference
    \n-
    22 // -----------------
    \n-
    23
    \n-
    24 template< class Implementation >
    \n-\n-
    26 {
    \n-\n-
    28
    \n-
    29 public:
    \n-
    30 static const int mydimension = Implementation::mydimension;
    \n-
    31 static const int coorddimension = Implementation::coorddimension;
    \n-
    32
    \n-
    33 typedef typename Implementation::ctype ctype;
    \n-
    34
    \n-
    35 typedef typename Implementation::LocalCoordinate LocalCoordinate;
    \n-
    36 typedef typename Implementation::GlobalCoordinate GlobalCoordinate;
    \n+\n+\n+
    16
    \n+
    17#if HAVE_ALBERTA
    \n+
    18
    \n+
    19namespace Dune
    \n+
    20{
    \n+
    21
    \n+
    22 // AlbertaMarkerVector
    \n+
    23 // -------------------
    \n+
    24
    \n+
    33 template< int dim, int dimworld >
    \n+\n+
    35 {
    \n+\n
    37
    \n-
    38 typedef typename Implementation::JacobianInverseTransposed JacobianInverseTransposed;
    \n-
    39 typedef typename Implementation::JacobianTransposed JacobianTransposed;
    \n-
    40
    \n-
    41 private:
    \n-
    42
    \n-
    43 template<class Implementation_T>
    \n-
    44 using JacobianInverseOfImplementation = decltype(typename Implementation_T::JacobianInverse{std::declval<Implementation_T>().jacobianInverse(std::declval<LocalCoordinate>())});
    \n-
    45
    \n-
    46 using JacobianInverseDefault = decltype(transpose(std::declval<JacobianInverseTransposed>()));
    \n-
    47
    \n-
    48 template<class Implementation_T>
    \n-
    49 using JacobianOfImplementation = decltype(typename Implementation_T::Jacobian{std::declval<Implementation_T>().jacobian(std::declval<LocalCoordinate>())});
    \n-
    50
    \n-
    51 using JacobianDefault = decltype(transpose(std::declval<JacobianTransposed>()));
    \n-
    52
    \n-
    53
    \n-
    54 template <class I = Implementation>
    \n-
    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")]]
    \n-
    56 auto deprecatedDefaultJacobian ( const LocalCoordinate& local ) const {
    \n-
    57 return transpose(jacobianTransposed(local));
    \n-
    58 }
    \n-
    59
    \n-
    60 template <class I = Implementation>
    \n-
    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")]]
    \n-
    62 auto deprecatedDefaultJacobianInverse ( const LocalCoordinate& local ) const {
    \n-
    63 return transpose(jacobianInverseTransposed(local));
    \n-
    64 }
    \n-
    65
    \n-
    66 public:
    \n+\n+
    39
    \n+
    40 //friend class AlbertaGrid< dim, dimworld >;
    \n+
    41
    \n+
    42 static const int dimension = Grid::dimension;
    \n+
    43
    \n+\n+\n+
    46
    \n+
    47 template< bool >
    \n+
    48 struct NoMarkSubEntities;
    \n+
    49 template< bool >
    \n+
    50 struct MarkSubEntities;
    \n+
    51
    \n+
    52 public:
    \n+
    54 explicit AlbertaMarkerVector ( const DofNumbering &dofNumbering )
    \n+
    55 : dofNumbering_( dofNumbering )
    \n+
    56 {
    \n+
    57 for( int codim = 0; codim <= dimension; ++codim )
    \n+
    58 marker_[ codim ] = 0;
    \n+
    59 }
    \n+
    60
    \n+
    61 AlbertaMarkerVector ( const This &other )
    \n+
    62 : dofNumbering_( other.dofNumbering_ )
    \n+
    63 {
    \n+
    64 for( int codim = 0; codim <= dimension; ++codim )
    \n+
    65 marker_[ codim ] = 0;
    \n+
    66 }
    \n
    67
    \n-
    68 using Jacobian = Std::detected_or_t<JacobianDefault, JacobianOfImplementation, Implementation>;
    \n-
    69 using JacobianInverse = Std::detected_or_t<JacobianInverseDefault, JacobianInverseOfImplementation, Implementation>;
    \n-
    70
    \n-
    71 explicit GeometryReference ( const Implementation &impl )
    \n-
    72 : impl_( &impl )
    \n-
    73 {}
    \n-
    74
    \n-
    75 GeometryType type () const { return impl().type(); }
    \n-
    76
    \n-
    77 bool affine() const { return impl().affine(); }
    \n-
    78
    \n-
    79 int corners () const { return impl().corners(); }
    \n-
    80 GlobalCoordinate corner ( int i ) const { return impl().corner( i ); }
    \n-
    81 GlobalCoordinate center () const { return impl().center(); }
    \n-
    82
    \n-\n-
    84 {
    \n-
    85 return impl().global( local );
    \n-
    86 }
    \n-
    87
    \n-\n-
    89 {
    \n-
    90 return impl().local( global );
    \n-
    91 }
    \n-
    92
    \n-\n-
    94 {
    \n-
    95 return impl().integrationElement( local );
    \n-
    96 }
    \n-
    97
    \n-
    98 ctype volume () const { return impl().volume(); }
    \n+\n+
    69 {
    \n+
    70 clear();
    \n+
    71 }
    \n+
    72
    \n+
    73 private:
    \n+
    74 This &operator= ( const This & );
    \n+
    75
    \n+
    76 public:
    \n+
    78 template< int codim >
    \n+
    79 bool subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const;
    \n+
    80
    \n+
    81 template< int firstCodim, class Iterator >
    \n+
    82 void markSubEntities ( const Iterator &begin, const Iterator &end );
    \n+
    83
    \n+
    84 void clear ()
    \n+
    85 {
    \n+
    86 for( int codim = 0; codim <= dimension; ++codim )
    \n+
    87 {
    \n+
    88 if( marker_[ codim ] != 0 )
    \n+
    89 delete[] marker_[ codim ];
    \n+
    90 marker_[ codim ] = 0;
    \n+
    91 }
    \n+
    92 }
    \n+
    93
    \n+
    95 bool up2Date () const
    \n+
    96 {
    \n+
    97 return (marker_[ dimension ] != 0);
    \n+
    98 }
    \n
    99
    \n-\n-
    101 {
    \n-
    102 return impl().jacobianTransposed( local );
    \n-
    103 }
    \n-
    104
    \n-\n-
    106 {
    \n-
    107 return impl().jacobianInverseTransposed( local );
    \n-
    108 }
    \n+
    101 void print ( std::ostream &out = std::cout ) const;
    \n+
    102
    \n+
    103 private:
    \n+
    104 const DofNumbering &dofNumbering_;
    \n+
    105 int *marker_[ dimension+1 ];
    \n+
    106 };
    \n+
    107
    \n+
    108
    \n
    109
    \n-
    110 Jacobian jacobian ( const LocalCoordinate& local ) const
    \n-
    111 {
    \n-
    112 if constexpr(Std::is_detected_v<JacobianOfImplementation, Implementation>)
    \n-
    113 return impl().jacobian(local);
    \n-
    114 else
    \n-
    115 return deprecatedDefaultJacobian(local);
    \n-
    116 }
    \n-
    117
    \n-\n-
    119 {
    \n-
    120 if constexpr(Std::is_detected_v<JacobianInverseOfImplementation, Implementation>)
    \n-
    121 return impl().jacobianInverse(local);
    \n-
    122 else
    \n-
    123 return deprecatedDefaultJacobianInverse(local);
    \n-
    124 }
    \n+
    110 // AlbertaMarkerVector::NoMarkSubEntities
    \n+
    111 // --------------------------------------
    \n+
    112
    \n+
    113 template< int dim, int dimworld >
    \n+
    114 template< bool >
    \n+
    115 struct AlbertaMarkerVector< dim, dimworld >::NoMarkSubEntities
    \n+
    116 {
    \n+
    117 template< int firstCodim, class Iterator >
    \n+
    118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering,
    \n+
    119 [[maybe_unused]] int *(&marker)[ dimension + 1 ],
    \n+
    120 [[maybe_unused]] const Iterator &begin,
    \n+
    121 [[maybe_unused]] const Iterator &end )
    \n+
    122 {}
    \n+
    123 };
    \n+
    124
    \n
    125
    \n-
    126 const Implementation &impl () const { return *impl_; }
    \n-
    127
    \n-
    128 private:
    \n-
    129 const Implementation *impl_;
    \n-
    130 };
    \n-
    131
    \n-
    132
    \n-
    133 // LocalGeometryReference
    \n-
    134 // -----------------------
    \n-
    135
    \n-
    136 template< int mydim, int cdim, class Grid >
    \n-\n-
    138 : public GeometryReference< typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl >
    \n-
    139 {
    \n-
    140 typedef typename std::remove_const< Grid >::type::Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl Implementation;
    \n-
    141
    \n-
    142 public:
    \n-
    143 LocalGeometryReference ( const Implementation &impl )
    \n-
    144 : GeometryReference< Implementation >( impl )
    \n-
    145 {}
    \n-
    146 };
    \n-
    147
    \n-
    148
    \n-
    149
    \n-
    150 // Definitions of GeometryReference
    \n-
    151 // --------------------------------
    \n-
    152
    \n-
    153 template< class Implementation >
    \n-\n+
    126
    \n+
    127 // AlbertaMarkerVector::MarkSubEntities
    \n+
    128 // ------------------------------------
    \n+
    129
    \n+
    130 template< int dim, int dimworld >
    \n+
    131 template< bool >
    \n+
    132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities
    \n+
    133 {
    \n+
    134 template< int codim >
    \n+
    135 struct Codim
    \n+
    136 {
    \n+
    137 static const int numSubEntities = Alberta::NumSubEntities< dimension, codim >::value;
    \n+
    138
    \n+\n+
    140
    \n+
    141 static void apply ( const DofNumbering &dofNumbering,
    \n+
    142 int *(&marker)[ dimension + 1 ],
    \n+
    143 const ElementInfo &elementInfo )
    \n+
    144 {
    \n+
    145 int *array = marker[ codim ];
    \n+
    146
    \n+
    147 const int index = dofNumbering( elementInfo, 0, 0 );
    \n+
    148 for( int i = 0; i < numSubEntities; ++i )
    \n+
    149 {
    \n+
    150 int &mark = array[ dofNumbering( elementInfo, codim, i ) ];
    \n+
    151 mark = std::max( index, mark );
    \n+
    152 }
    \n+
    153 }
    \n+
    154 };
    \n
    155
    \n-
    156 template< class Implementation >
    \n-\n-
    158
    \n-
    159} // namespace Dune
    \n-
    160
    \n-
    161#endif // #ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH
    \n+
    156 template< int firstCodim, class Iterator >
    \n+
    157 static void mark ( const DofNumbering &dofNumbering, int *(&marker)[ dimension + 1 ],
    \n+
    158 const Iterator &begin, const Iterator &end )
    \n+
    159 {
    \n+
    160 for( int codim = firstCodim; codim <= dimension; ++codim )
    \n+
    161 {
    \n+
    162 const int size = dofNumbering.size( codim );
    \n+
    163 marker[ codim ] = new int[ size ];
    \n+
    164
    \n+
    165 int *array = marker[ codim ];
    \n+
    166 for( int i = 0; i < size; ++i )
    \n+
    167 array[ i ] = -1;
    \n+
    168 }
    \n+
    169
    \n+
    170 for( Iterator it = begin; it != end; ++it )
    \n+
    171 {
    \n+
    172 const ElementInfo &elementInfo = it->impl().elementInfo();
    \n+
    173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{},
    \n+
    174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker, elementInfo ); } );
    \n+
    175 }
    \n+
    176 }
    \n+
    177 };
    \n+
    178
    \n+
    179
    \n+
    180
    \n+
    181 // AlbertaGridTreeIterator
    \n+
    182 // -----------------------
    \n+
    183
    \n+
    187 template< int codim, class GridImp, bool leafIterator >
    \n+\n+
    189 {
    \n+\n+
    191
    \n+
    192 public:
    \n+
    193 static const int dimension = GridImp::dimension;
    \n+
    194 static const int codimension = codim;
    \n+
    195 static const int dimensionworld = GridImp::dimensionworld;
    \n+
    196
    \n+
    197 private:
    \n+
    198 friend class AlbertaGrid< dimension, dimensionworld >;
    \n+
    199
    \n+
    200 static const int numSubEntities
    \n+\n+
    202
    \n+
    203 public:
    \n+\n+
    205 typedef typename MeshPointer::MacroIterator MacroIterator;
    \n+
    206
    \n+
    207 typedef typename GridImp::template Codim< codim >::Entity Entity;
    \n+\n+\n+
    210 typedef typename EntityImp::ElementInfo ElementInfo;
    \n+
    211
    \n+\n+
    213
    \n+\n+
    215
    \n+\n+
    218
    \n+
    220 This &operator= ( const This &other );
    \n+
    221
    \n+
    223 AlbertaGridTreeIterator ( const GridImp &grid, int travLevel );
    \n+
    224
    \n+\n+
    227 const MarkerVector *marker,
    \n+
    228 int travLevel );
    \n+
    229
    \n+
    231 bool equals ( const This &other ) const
    \n+
    232 {
    \n+
    233 return entity_.impl().equals( other.entity_.impl() );
    \n+
    234 }
    \n+
    235
    \n+\n+
    238 {
    \n+
    239 return entity_;
    \n+
    240 }
    \n+
    241
    \n+
    243 int level () const
    \n+
    244 {
    \n+
    245 return entity_.impl().level();
    \n+
    246 }
    \n+
    247
    \n+
    249 void increment();
    \n+
    250
    \n+
    251 protected:
    \n+
    253 const GridImp &grid () const
    \n+
    254 {
    \n+
    255 return entity_.impl().grid();
    \n+
    256 }
    \n+
    257
    \n+
    258 private:
    \n+
    259 void nextElement ( ElementInfo &elementInfo );
    \n+
    260 void nextElementStop (ElementInfo &elementInfo );
    \n+
    261 bool stopAtElement ( const ElementInfo &elementInfo ) const;
    \n+
    262
    \n+
    263 void goNext ( ElementInfo &elementInfo );
    \n+
    264 void goNext ( const std::integral_constant< int, 0 > cdVariable,
    \n+
    265 ElementInfo &elementInfo );
    \n+
    266 void goNext ( const std::integral_constant< int, 1 > cdVariable,
    \n+
    267 ElementInfo &elementInfo );
    \n+
    268 template< int cd >
    \n+
    269 void goNext ( const std::integral_constant< int, cd > cdVariable,
    \n+
    270 ElementInfo &elementInfo );
    \n+
    271
    \n+
    272 mutable Entity entity_;
    \n+
    273
    \n+
    275 int level_;
    \n+
    276
    \n+
    278 int subEntity_;
    \n+
    279
    \n+
    280 MacroIterator macroIterator_;
    \n+
    281
    \n+
    282 // knows on which element a point,edge,face is viewed
    \n+
    283 const MarkerVector *marker_;
    \n+
    284 };
    \n+
    285
    \n+
    286
    \n+
    287
    \n+
    288 // Implementation of AlbertaMarkerVector
    \n+
    289 // -------------------------------------
    \n+
    290
    \n+
    291 template< int dim, int dimworld >
    \n+
    292 template< int codim >
    \n+\n+
    294 ::subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const
    \n+
    295 {
    \n+
    296 assert( marker_[ codim ] != 0 );
    \n+
    297
    \n+
    298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity );
    \n+
    299 const int markIndex = marker_[ codim ][ subIndex ];
    \n+
    300 assert( (markIndex >= 0) );
    \n+
    301
    \n+
    302 const int index = dofNumbering_( elementInfo, 0, 0 );
    \n+
    303 return (markIndex == index);
    \n+
    304 }
    \n+
    305
    \n+
    306
    \n+
    307 template< int dim, int dimworld >
    \n+
    308 template< int firstCodim, class Iterator >
    \n+\n+
    310 ::markSubEntities ( const Iterator &begin, const Iterator &end )
    \n+
    311 {
    \n+
    312 clear();
    \n+
    313 std::conditional< (firstCodim <= dimension), MarkSubEntities<true>, NoMarkSubEntities<false> >::type
    \n+
    314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin, end );
    \n+
    315 }
    \n+
    316
    \n+
    317
    \n+
    318 template< int dim, int dimworld >
    \n+
    319 inline void AlbertaMarkerVector< dim, dimworld >::print ( std::ostream &out ) const
    \n+
    320 {
    \n+
    321 for( int codim = 1; codim <= dimension; ++codim )
    \n+
    322 {
    \n+
    323 int *marker = marker_[ codim ];
    \n+
    324 if( marker != 0 )
    \n+
    325 {
    \n+
    326 const int size = dofNumbering_.size( codim );
    \n+
    327 out << std::endl;
    \n+
    328 out << "Codimension " << codim << " (" << size << " entries)" << std::endl;
    \n+
    329 for( int i = 0; i < size; ++i )
    \n+
    330 out << "subentity " << i << " visited on Element " << marker[ i ] << std::endl;
    \n+
    331 }
    \n+
    332 }
    \n+
    333 }
    \n+
    334
    \n+
    335
    \n+
    336
    \n+
    337 // Implementation of AlbertaGridTreeIterator
    \n+
    338 // -----------------------------------------
    \n+
    339
    \n+
    340 template< int codim, class GridImp, bool leafIterator >
    \n+\n+\n+
    343 : entity_(),
    \n+
    344 level_( -1 ),
    \n+
    345 subEntity_( -1 ),
    \n+
    346 macroIterator_(),
    \n+
    347 marker_( NULL )
    \n+
    348 {}
    \n+
    349
    \n+
    350 template< int codim, class GridImp, bool leafIterator >
    \n+\n+
    352 ::AlbertaGridTreeIterator ( const GridImp &grid,
    \n+
    353 const MarkerVector *marker,
    \n+
    354 int travLevel )
    \n+
    355 : entity_( EntityImp( grid ) ),
    \n+
    356 level_( travLevel ),
    \n+
    357 subEntity_( (codim == 0 ? 0 : -1) ),
    \n+
    358 macroIterator_( grid.meshPointer().begin() ),
    \n+
    359 marker_( marker )
    \n+
    360 {
    \n+
    361 ElementInfo elementInfo = *macroIterator_;
    \n+
    362 nextElementStop( elementInfo );
    \n+
    363 if( codim > 0 )
    \n+
    364 goNext( elementInfo );
    \n+
    365 // it is ok to set the invalid ElementInfo
    \n+
    366 entity_.impl().setElement( elementInfo, subEntity_ );
    \n+
    367 }
    \n+
    368
    \n+
    369
    \n+
    370 // Make LevelIterator with point to element from previous iterations
    \n+
    371 template< int codim, class GridImp, bool leafIterator >
    \n+\n+
    373 ::AlbertaGridTreeIterator ( const GridImp &grid,
    \n+
    374 int travLevel )
    \n+
    375 : entity_( EntityImp( grid ) ),
    \n+
    376 level_( travLevel ),
    \n+
    377 subEntity_( -1 ),
    \n+
    378 macroIterator_( grid.meshPointer().end() ),
    \n+
    379 marker_( 0 )
    \n+
    380 {}
    \n+
    381
    \n+
    382
    \n+
    383 // Make LevelIterator with point to element from previous iterations
    \n+
    384 template< int codim, class GridImp, bool leafIterator >
    \n+\n+\n+
    387 : entity_( other.entity_ ),
    \n+
    388 level_( other.level_ ),
    \n+
    389 subEntity_( other.subEntity_ ),
    \n+
    390 macroIterator_( other.macroIterator_ ),
    \n+
    391 marker_( other.marker_ )
    \n+
    392 {}
    \n+
    393
    \n+
    394
    \n+
    395 // Make LevelIterator with point to element from previous iterations
    \n+
    396 template< int codim, class GridImp, bool leafIterator >
    \n+\n+\n+
    399 {
    \n+
    400 entity_ = other.entity_;
    \n+
    401 level_ = other.level_;
    \n+
    402 subEntity_ = other.subEntity_;
    \n+
    403 macroIterator_ = other.macroIterator_;
    \n+
    404 marker_ = other.marker_;
    \n+
    405
    \n+
    406 return *this;
    \n+
    407 }
    \n+
    408
    \n+
    409
    \n+
    410 template< int codim, class GridImp, bool leafIterator >
    \n+\n+
    412 {
    \n+
    413 ElementInfo elementInfo = entity_.impl().elementInfo_;
    \n+
    414 goNext ( elementInfo );
    \n+
    415 // it is ok to set the invalid ElementInfo
    \n+
    416 entity_.impl().setElement( elementInfo, subEntity_ );
    \n+
    417 }
    \n+
    418
    \n+
    419
    \n+
    420 template< int codim, class GridImp, bool leafIterator >
    \n+\n+
    422 ::nextElement ( ElementInfo &elementInfo )
    \n+
    423 {
    \n+
    424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) )
    \n+
    425 {
    \n+
    426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) )
    \n+
    427 elementInfo = elementInfo.father();
    \n+
    428 if( elementInfo.level() == 0 )
    \n+
    429 {
    \n+
    430 ++macroIterator_;
    \n+
    431 elementInfo = *macroIterator_;
    \n+
    432 }
    \n+
    433 else
    \n+
    434 elementInfo = elementInfo.father().child( 1 );
    \n+
    435 }
    \n+
    436 else
    \n+
    437 elementInfo = elementInfo.child( 0 );
    \n+
    438 }
    \n+
    439
    \n+
    440
    \n+
    441 template< int codim, class GridImp, bool leafIterator >
    \n+
    442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n+
    443 ::nextElementStop ( ElementInfo &elementInfo )
    \n+
    444 {
    \n+
    445 while( !(!elementInfo || stopAtElement( elementInfo )) )
    \n+
    446 nextElement( elementInfo );
    \n+
    447 }
    \n+
    448
    \n+
    449
    \n+
    450 template< int codim, class GridImp, bool leafIterator >
    \n+
    451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n+
    452 ::stopAtElement ( const ElementInfo &elementInfo ) const
    \n+
    453 {
    \n+
    454 if( !elementInfo )
    \n+
    455 return true;
    \n+
    456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level()));
    \n+
    457 }
    \n+
    458
    \n+
    459
    \n+
    460 template< int codim, class GridImp, bool leafIterator >
    \n+
    461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n+
    462 ::goNext ( ElementInfo &elementInfo )
    \n+
    463 {
    \n+
    464 std::integral_constant< int, codim > codimVariable;
    \n+
    465 goNext( codimVariable, elementInfo );
    \n+
    466 }
    \n+
    467
    \n+
    468 template< int codim, class GridImp, bool leafIterator >
    \n+
    469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n+
    470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */,
    \n+
    471 ElementInfo &elementInfo )
    \n+
    472 {
    \n+
    473 assert( stopAtElement( elementInfo ) );
    \n+
    474
    \n+
    475 nextElement( elementInfo );
    \n+
    476 nextElementStop( elementInfo );
    \n+
    477 }
    \n+
    478
    \n+
    479 template< int codim, class GridImp, bool leafIterator >
    \n+
    480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n+
    481 ::goNext ( const std::integral_constant< int, 1 > cdVariable,
    \n+
    482 ElementInfo &elementInfo )
    \n+
    483 {
    \n+
    484 assert( stopAtElement( elementInfo ) );
    \n+
    485
    \n+
    486 ++subEntity_;
    \n+
    487 if( subEntity_ >= numSubEntities )
    \n+
    488 {
    \n+
    489 subEntity_ = 0;
    \n+
    490 nextElement( elementInfo );
    \n+
    491 nextElementStop( elementInfo );
    \n+
    492 if( !elementInfo )
    \n+
    493 return;
    \n+
    494 }
    \n+
    495
    \n+
    496 if( leafIterator )
    \n+
    497 {
    \n+
    498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ : subEntity_);
    \n+
    499
    \n+
    500 const ALBERTA EL *neighbor = elementInfo.elInfo().neigh[ face ];
    \n+
    501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) )
    \n+
    502 {
    \n+
    503 // face is reached from element with largest number
    \n+
    504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 );
    \n+
    505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 );
    \n+
    506 if( elIndex < nbIndex )
    \n+
    507 goNext( cdVariable, elementInfo );
    \n+
    508 }
    \n+
    509 // uncomment this assertion only if codimension 1 entities are marked
    \n+
    510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) );
    \n+
    511 }
    \n+
    512 else
    \n+
    513 {
    \n+
    514 assert( marker_ != 0 );
    \n+
    515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ ) )
    \n+
    516 goNext( cdVariable, elementInfo );
    \n+
    517 }
    \n+
    518 }
    \n+
    519
    \n+
    520 template< int codim, class GridImp, bool leafIterator >
    \n+
    521 template< int cd >
    \n+
    522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >
    \n+
    523 ::goNext ( const std::integral_constant< int, cd > cdVariable,
    \n+
    524 ElementInfo &elementInfo )
    \n+
    525 {
    \n+
    526 assert( stopAtElement( elementInfo ) );
    \n+
    527
    \n+
    528 ++subEntity_;
    \n+
    529 if( subEntity_ >= numSubEntities )
    \n+
    530 {
    \n+
    531 subEntity_ = 0;
    \n+
    532 nextElement( elementInfo );
    \n+
    533 nextElementStop( elementInfo );
    \n+
    534 if( !elementInfo )
    \n+
    535 return;
    \n+
    536 }
    \n+
    537
    \n+
    538 assert( marker_ != 0 );
    \n+
    539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ ) )
    \n+
    540 goNext( cdVariable, elementInfo );
    \n+
    541 }
    \n+
    542
    \n+
    543}
    \n+
    544
    \n+
    545#endif // #if HAVE_ALBERTA
    \n+
    546
    \n+
    547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's mesh structure
    \n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Definition: geometryreference.hh:26
    \n-
    static const int mydimension
    Definition: geometryreference.hh:30
    \n-
    ctype integrationElement(const LocalCoordinate &local) const
    Definition: geometryreference.hh:93
    \n-
    ctype volume() const
    Definition: geometryreference.hh:98
    \n-
    const Implementation & impl() const
    Definition: geometryreference.hh:126
    \n-
    JacobianInverse jacobianInverse(const LocalCoordinate &local) const
    Definition: geometryreference.hh:118
    \n-
    GlobalCoordinate center() const
    Definition: geometryreference.hh:81
    \n-
    Implementation::JacobianTransposed JacobianTransposed
    Definition: geometryreference.hh:39
    \n-
    GeometryReference(const Implementation &impl)
    Definition: geometryreference.hh:71
    \n-
    Std::detected_or_t< JacobianInverseDefault, JacobianInverseOfImplementation, Implementation > JacobianInverse
    Definition: geometryreference.hh:69
    \n-
    Implementation::GlobalCoordinate GlobalCoordinate
    Definition: geometryreference.hh:36
    \n-
    static const int coorddimension
    Definition: geometryreference.hh:31
    \n-
    bool affine() const
    Definition: geometryreference.hh:77
    \n-
    GlobalCoordinate corner(int i) const
    Definition: geometryreference.hh:80
    \n-
    JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate &local) const
    Definition: geometryreference.hh:105
    \n-
    JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const
    Definition: geometryreference.hh:100
    \n-
    int corners() const
    Definition: geometryreference.hh:79
    \n-
    Implementation::LocalCoordinate LocalCoordinate
    Definition: geometryreference.hh:35
    \n-
    GlobalCoordinate global(const LocalCoordinate &local) const
    Definition: geometryreference.hh:83
    \n-
    Std::detected_or_t< JacobianDefault, JacobianOfImplementation, Implementation > Jacobian
    Definition: geometryreference.hh:68
    \n-
    Implementation::ctype ctype
    Definition: geometryreference.hh:33
    \n-
    Implementation::JacobianInverseTransposed JacobianInverseTransposed
    Definition: geometryreference.hh:38
    \n-
    Jacobian jacobian(const LocalCoordinate &local) const
    Definition: geometryreference.hh:110
    \n-
    GeometryType type() const
    Definition: geometryreference.hh:75
    \n-
    Definition: geometryreference.hh:139
    \n-
    LocalGeometryReference(const Implementation &impl)
    Definition: geometryreference.hh:143
    \n-
    Wrapper and interface classes for element geometries.
    \n+
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n+\n+
    static const int dimension
    Definition: agrid.hh:145
    \n+\n+\n+
    int size(int codim) const
    Definition: dofadmin.hh:163
    \n+\n+
    Definition: treeiterator.hh:189
    \n+
    bool equals(const This &other) const
    equality
    Definition: treeiterator.hh:231
    \n+
    MakeableInterfaceObject< Entity > EntityObject
    Definition: treeiterator.hh:208
    \n+
    Alberta::MeshPointer< dimension > MeshPointer
    Definition: treeiterator.hh:204
    \n+
    AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int travLevel)
    Constructor making begin iterator.
    Definition: treeiterator.hh:352
    \n+
    AlbertaGridTreeIterator(const GridImp &grid, int travLevel)
    Constructor making end iterator.
    Definition: treeiterator.hh:373
    \n+
    EntityObject::ImplementationType EntityImp
    Definition: treeiterator.hh:209
    \n+
    static const int codimension
    Definition: treeiterator.hh:194
    \n+
    MeshPointer::MacroIterator MacroIterator
    Definition: treeiterator.hh:205
    \n+
    This & operator=(const This &other)
    Constructor making end iterator.
    Definition: treeiterator.hh:398
    \n+
    Entity & dereference() const
    dereferencing
    Definition: treeiterator.hh:237
    \n+
    AlbertaMarkerVector< dimension, dimensionworld > MarkerVector
    Definition: treeiterator.hh:212
    \n+
    GridImp::template Codim< codim >::Entity Entity
    Definition: treeiterator.hh:207
    \n+
    int level() const
    ask for level of entities
    Definition: treeiterator.hh:243
    \n+
    static const int dimensionworld
    Definition: treeiterator.hh:195
    \n+
    AlbertaGridTreeIterator()
    Definition: treeiterator.hh:342
    \n+
    void increment()
    increment
    Definition: treeiterator.hh:411
    \n+
    const GridImp & grid() const
    obtain a reference to the grid
    Definition: treeiterator.hh:253
    \n+
    static const int dimension
    Definition: treeiterator.hh:193
    \n+
    AlbertaGridTreeIterator(const This &other)
    Constructor making end iterator.
    Definition: treeiterator.hh:386
    \n+
    EntityImp::ElementInfo ElementInfo
    Definition: treeiterator.hh:210
    \n+
    Definition: misc.hh:148
    \n+
    marker assigning subentities to one element containing them
    Definition: treeiterator.hh:35
    \n+
    AlbertaMarkerVector(const DofNumbering &dofNumbering)
    create AlbertaMarkerVector with empty vectors
    Definition: treeiterator.hh:54
    \n+
    bool up2Date() const
    return true if marking is up to date
    Definition: treeiterator.hh:95
    \n+
    bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const
    visit subentity on this element?
    Definition: treeiterator.hh:294
    \n+
    void markSubEntities(const Iterator &begin, const Iterator &end)
    Definition: treeiterator.hh:310
    \n+
    ~AlbertaMarkerVector()
    Definition: treeiterator.hh:68
    \n+
    void clear()
    Definition: treeiterator.hh:84
    \n+
    AlbertaMarkerVector(const This &other)
    Definition: treeiterator.hh:61
    \n+
    void print(std::ostream &out=std::cout) const
    print for debugin' only
    Definition: treeiterator.hh:319
    \n+\n+
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: treeiterator.hh:139
    \n+
    static void apply(const DofNumbering &dofNumbering, int *(&marker)[dimension+1], const ElementInfo &elementInfo)
    Definition: treeiterator.hh:141
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+\n+
    InterfaceType::Implementation ImplementationType
    Definition: common/grid.hh:1108
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,279 +5,695 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-geometryreference.hh\n+treeiterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH\n- 6#define DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH\n- 7\n+ 5\n+ 6#ifndef DUNE_ALBERTA_TREEITERATOR_HH\n+ 7#define DUNE_ALBERTA_TREEITERATOR_HH\n+ 8\n+ 9#include \n+ 10\n+ 11#include \n 12#include \n 13\n- 14#include \n- 15\n- 16#include \n- 17\n- 18namespace Dune\n- 19{\n- 20\n- 21 // GeometryReference\n- 22 // -----------------\n- 23\n- 24 template< class Implementation >\n-25 class GeometryReference\n- 26 {\n- 27 typedef GeometryReference<_Implementation_> This;\n- 28\n- 29 public:\n-30 static const int mydimension = Implementation::mydimension;\n-31 static const int coorddimension = Implementation::coorddimension;\n- 32\n-33 typedef typename Implementation::ctype ctype;\n- 34\n-35 typedef typename Implementation::LocalCoordinate LocalCoordinate;\n-36 typedef typename Implementation::GlobalCoordinate GlobalCoordinate;\n+ 14#include \n+ 15#include \n+ 16\n+ 17#if HAVE_ALBERTA\n+ 18\n+ 19namespace Dune\n+ 20{\n+ 21\n+ 22 // AlbertaMarkerVector\n+ 23 // -------------------\n+ 24\n+ 33 template< int dim, int dimworld >\n+34 class AlbertaMarkerVector\n+ 35 {\n+ 36 typedef AlbertaMarkerVector<_dim,_dimworld_> This;\n 37\n-38 typedef typename Implementation::JacobianInverseTransposed\n-JacobianInverseTransposed;\n-39 typedef typename Implementation::JacobianTransposed JacobianTransposed;\n- 40\n- 41 private:\n- 42\n- 43 template\n- 44 using JacobianInverseOfImplementation = decltype(typename\n-Implementation_T::JacobianInverse{std::declval\n-().jacobianInverse(std::declval())});\n- 45\n- 46 using JacobianInverseDefault = decltype(transpose(std::\n-declval()));\n- 47\n- 48 template\n- 49 using JacobianOfImplementation = decltype(typename Implementation_T::\n-Jacobian{std::declval().jacobian(std::\n-declval())});\n- 50\n- 51 using JacobianDefault = decltype(transpose(std::declval\n-()));\n- 52\n- 53\n- 54 template \n- 55 [[deprecated(\"Geometry implementatons are required to provide a jacobian\n-(local) method. The default implementation is deprecated and will be removed\n-after release 2.9\")]]\n- 56 auto deprecatedDefaultJacobian ( const LocalCoordinate& local ) const {\n- 57 return transpose(jacobianTransposed(local));\n- 58 }\n- 59\n- 60 template \n- 61 [[deprecated(\"Geometry implementatons are required to provide a\n-jacobianInverse(local) method. The default implementation is deprecated and\n-will be removed after release 2.9\")]]\n- 62 auto deprecatedDefaultJacobianInverse ( const LocalCoordinate& local )\n-const {\n- 63 return transpose(jacobianInverseTransposed(local));\n- 64 }\n- 65\n- 66 public:\n+ 38 typedef AlbertaGrid<_dim,_dimworld_> Grid;\n+ 39\n+ 40 //friend class AlbertaGrid< dim, dimworld >;\n+ 41\n+ 42 static const int dimension = Grid::dimension;\n+ 43\n+ 44 typedef Alberta::HierarchyDofNumbering<_dimension_> DofNumbering;\n+ 45 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n+ 46\n+ 47 template< bool >\n+ 48 struct NoMarkSubEntities;\n+ 49 template< bool >\n+ 50 struct MarkSubEntities;\n+ 51\n+ 52 public:\n+54 explicit AlbertaMarkerVector ( const DofNumbering &dofNumbering )\n+ 55 : dofNumbering_( dofNumbering )\n+ 56 {\n+ 57 for( int codim = 0; codim <= dimension; ++codim )\n+ 58 marker_[ codim ] = 0;\n+ 59 }\n+ 60\n+61 AlbertaMarkerVector ( const This &other )\n+ 62 : dofNumbering_( other.dofNumbering_ )\n+ 63 {\n+ 64 for( int codim = 0; codim <= dimension; ++codim )\n+ 65 marker_[ codim ] = 0;\n+ 66 }\n 67\n-68 using Jacobian = Std::detected_or_t;\n-69 using JacobianInverse = Std::detected_or_t;\n- 70\n-71 explicit GeometryReference ( const Implementation &impl )\n- 72 : impl_( &impl )\n- 73 {}\n- 74\n-75 GeometryType type () const { return impl().type(); }\n- 76\n-77 bool affine() const { return impl().affine(); }\n- 78\n-79 int corners () const { return impl().corners(); }\n-80 GlobalCoordinate corner ( int i ) const { return impl().corner( i ); }\n-81 GlobalCoordinate center () const { return impl().center(); }\n- 82\n-83 GlobalCoordinate global ( const LocalCoordinate &local ) const\n- 84 {\n- 85 return impl().global( local );\n- 86 }\n- 87\n-88 LocalCoordinate local ( const GlobalCoordinate &global ) const\n- 89 {\n- 90 return impl().local( global );\n+68 ~AlbertaMarkerVector ()\n+ 69 {\n+ 70 clear();\n+ 71 }\n+ 72\n+ 73 private:\n+ 74 This &operator= ( const This & );\n+ 75\n+ 76 public:\n+ 78 template< int codim >\n+79 bool subEntityOnElement ( const ElementInfo &elementInfo, int subEntity )\n+const;\n+ 80\n+ 81 template< int firstCodim, class Iterator >\n+82 void markSubEntities ( const Iterator &begin, const Iterator &end );\n+ 83\n+84 void clear ()\n+ 85 {\n+ 86 for( int codim = 0; codim <= dimension; ++codim )\n+ 87 {\n+ 88 if( marker_[ codim ] != 0 )\n+ 89 delete[] marker_[ codim ];\n+ 90 marker_[ codim ] = 0;\n 91 }\n- 92\n-93 ctype integrationElement ( const LocalCoordinate &local ) const\n- 94 {\n- 95 return impl().integrationElement( local );\n- 96 }\n- 97\n-98 ctype volume () const { return impl().volume(); }\n+ 92 }\n+ 93\n+95 bool up2Date () const\n+ 96 {\n+ 97 return (marker_[ dimension ] != 0);\n+ 98 }\n 99\n-100 JacobianTransposed jacobianTransposed ( const LocalCoordinate &local )\n-const\n- 101 {\n- 102 return impl().jacobianTransposed( local );\n- 103 }\n- 104\n-105 JacobianInverseTransposed jacobianInverseTransposed ( const LocalCoordinate\n-&local ) const\n- 106 {\n- 107 return impl().jacobianInverseTransposed( local );\n- 108 }\n+101 void print ( std::ostream &out = std::cout ) const;\n+ 102\n+ 103 private:\n+ 104 const DofNumbering &dofNumbering_;\n+ 105 int *marker_[ dimension+1 ];\n+ 106 };\n+ 107\n+ 108\n 109\n-110 Jacobian jacobian ( const LocalCoordinate& local ) const\n- 111 {\n- 112 if constexpr(Std::is_detected_v)\n- 113 return impl().jacobian(local);\n- 114 else\n- 115 return deprecatedDefaultJacobian(local);\n- 116 }\n- 117\n-118 JacobianInverse jacobianInverse ( const LocalCoordinate &local ) const\n- 119 {\n- 120 if constexpr(Std::is_detected_v)\n- 121 return impl().jacobianInverse(local);\n- 122 else\n- 123 return deprecatedDefaultJacobianInverse(local);\n- 124 }\n+ 110 // AlbertaMarkerVector::NoMarkSubEntities\n+ 111 // --------------------------------------\n+ 112\n+ 113 template< int dim, int dimworld >\n+ 114 template< bool >\n+ 115 struct AlbertaMarkerVector< dim, dimworld >::NoMarkSubEntities\n+ 116 {\n+ 117 template< int firstCodim, class Iterator >\n+ 118 static void mark ( [[maybe_unused]] const DofNumbering & dofNumbering,\n+ 119 [[maybe_unused]] int *(&marker)[ dimension + 1 ],\n+ 120 [[maybe_unused]] const Iterator &begin,\n+ 121 [[maybe_unused]] const Iterator &end )\n+ 122 {}\n+ 123 };\n+ 124\n 125\n-126 const Implementation &impl () const { return *impl_; }\n- 127\n- 128 private:\n- 129 const Implementation *impl_;\n- 130 };\n- 131\n- 132\n- 133 // LocalGeometryReference\n- 134 // -----------------------\n- 135\n- 136 template< int mydim, int cdim, class Grid >\n-137 class LocalGeometryReference\n- 138 : public GeometryReference< typename std::remove_const< Grid >::type::\n-Traits::template Codim< std::remove_const< Grid >::type::dimension - mydim >::\n-LocalGeometryImpl >\n- 139 {\n- 140 typedef typename std::remove_const< Grid >::type::Traits::template Codim<\n-std::remove_const< Grid >::type::dimension - mydim >::LocalGeometryImpl\n-Implementation;\n- 141\n- 142 public:\n-143 LocalGeometryReference ( const Implementation &impl )\n- 144 : GeometryReference< Implementation >( impl )\n- 145 {}\n- 146 };\n- 147\n- 148\n- 149\n- 150 // Definitions of GeometryReference\n- 151 // --------------------------------\n- 152\n- 153 template< class Implementation >\n- 154 const int GeometryReference<_Implementation_>::mydimension;\n+ 126\n+ 127 // AlbertaMarkerVector::MarkSubEntities\n+ 128 // ------------------------------------\n+ 129\n+ 130 template< int dim, int dimworld >\n+ 131 template< bool >\n+ 132 struct AlbertaMarkerVector< dim, dimworld >::MarkSubEntities\n+ 133 {\n+ 134 template< int codim >\n+135 struct Codim\n+ 136 {\n+137 static const int numSubEntities = Alberta::NumSubEntities<_dimension,_codim\n+>::value;\n+ 138\n+139 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n+ 140\n+141 static void apply ( const DofNumbering &dofNumbering,\n+ 142 int *(&marker)[ dimension + 1 ],\n+ 143 const ElementInfo &elementInfo )\n+ 144 {\n+ 145 int *array = marker[ codim ];\n+ 146\n+ 147 const int index = dofNumbering( elementInfo, 0, 0 );\n+ 148 for( int i = 0; i < numSubEntities; ++i )\n+ 149 {\n+ 150 int &mark = array[ dofNumbering( elementInfo, codim, i ) ];\n+ 151 mark = std::max( index, mark );\n+ 152 }\n+ 153 }\n+ 154 };\n 155\n- 156 template< class Implementation >\n- 157 const int GeometryReference<_Implementation_>::coorddimension;\n- 158\n- 159} // namespace Dune\n- 160\n- 161#endif // #ifndef DUNE_GRID_ALBERTAGRID_GEOMETRYREFERENCE_HH\n+ 156 template< int firstCodim, class Iterator >\n+ 157 static void mark ( const DofNumbering &dofNumbering, int *(&marker)\n+[ dimension + 1 ],\n+ 158 const Iterator &begin, const Iterator &end )\n+ 159 {\n+ 160 for( int codim = firstCodim; codim <= dimension; ++codim )\n+ 161 {\n+ 162 const int size = dofNumbering.size( codim );\n+ 163 marker[ codim ] = new int[ size ];\n+ 164\n+ 165 int *array = marker[ codim ];\n+ 166 for( int i = 0; i < size; ++i )\n+ 167 array[ i ] = -1;\n+ 168 }\n+ 169\n+ 170 for( Iterator it = begin; it != end; ++it )\n+ 171 {\n+ 172 const ElementInfo &elementInfo = it->impl().elementInfo();\n+ 173 Hybrid::forEach( std::make_index_sequence< dimension+1-firstCodim >{},\n+ 174 [ & ]( auto i ){ Codim< i+firstCodim >::apply( dofNumbering, marker,\n+elementInfo ); } );\n+ 175 }\n+ 176 }\n+ 177 };\n+ 178\n+ 179\n+ 180\n+ 181 // AlbertaGridTreeIterator\n+ 182 // -----------------------\n+ 183\n+ 187 template< int codim, class GridImp, bool leafIterator >\n+188 class AlbertaGridTreeIterator\n+ 189 {\n+ 190 typedef AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_> This;\n+ 191\n+ 192 public:\n+193 static const int dimension = GridImp::dimension;\n+194 static const int codimension = codim;\n+195 static const int dimensionworld = GridImp::dimensionworld;\n+ 196\n+ 197 private:\n+ 198 friend class AlbertaGrid< dimension, dimensionworld >;\n+ 199\n+ 200 static const int numSubEntities\n+ 201 = Alberta::NumSubEntities<_dimension,_codimension_>::value;\n+ 202\n+ 203 public:\n+204 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n+205 typedef typename MeshPointer::MacroIterator MacroIterator;\n+ 206\n+207 typedef typename GridImp::template Codim< codim >::Entity Entity;\n+208 typedef MakeableInterfaceObject<_Entity_> EntityObject;\n+209 typedef typename EntityObject::ImplementationType EntityImp;\n+210 typedef typename EntityImp::ElementInfo ElementInfo;\n+ 211\n+212 typedef AlbertaMarkerVector<_dimension,_dimensionworld_> MarkerVector;\n+ 213\n+214 AlbertaGridTreeIterator ();\n+ 215\n+217 AlbertaGridTreeIterator ( const This &other );\n+ 218\n+220 This &operator=( const This &other );\n+ 221\n+223 AlbertaGridTreeIterator ( const GridImp &grid, int travLevel );\n+ 224\n+226 AlbertaGridTreeIterator ( const GridImp &grid,\n+ 227 const MarkerVector *marker,\n+ 228 int travLevel );\n+ 229\n+231 bool equals ( const This &other ) const\n+ 232 {\n+ 233 return entity_.impl().equals( other.entity_.impl() );\n+ 234 }\n+ 235\n+237 Entity &dereference () const\n+ 238 {\n+ 239 return entity_;\n+ 240 }\n+ 241\n+243 int level () const\n+ 244 {\n+ 245 return entity_.impl().level();\n+ 246 }\n+ 247\n+249 void increment();\n+ 250\n+ 251 protected:\n+253 const GridImp &grid () const\n+ 254 {\n+ 255 return entity_.impl().grid();\n+ 256 }\n+ 257\n+ 258 private:\n+ 259 void nextElement ( ElementInfo &elementInfo );\n+ 260 void nextElementStop (ElementInfo &elementInfo );\n+ 261 bool stopAtElement ( const ElementInfo &elementInfo ) const;\n+ 262\n+ 263 void goNext ( ElementInfo &elementInfo );\n+ 264 void goNext ( const std::integral_constant< int, 0 > cdVariable,\n+ 265 ElementInfo &elementInfo );\n+ 266 void goNext ( const std::integral_constant< int, 1 > cdVariable,\n+ 267 ElementInfo &elementInfo );\n+ 268 template< int cd >\n+ 269 void goNext ( const std::integral_constant< int, cd > cdVariable,\n+ 270 ElementInfo &elementInfo );\n+ 271\n+ 272 mutable Entity entity_;\n+ 273\n+ 275 int level_;\n+ 276\n+ 278 int subEntity_;\n+ 279\n+ 280 MacroIterator macroIterator_;\n+ 281\n+ 282 // knows on which element a point,edge,face is viewed\n+ 283 const MarkerVector *marker_;\n+ 284 };\n+ 285\n+ 286\n+ 287\n+ 288 // Implementation of AlbertaMarkerVector\n+ 289 // -------------------------------------\n+ 290\n+ 291 template< int dim, int dimworld >\n+ 292 template< int codim >\n+ 293 inline bool AlbertaMarkerVector<_dim,_dimworld_>\n+294::subEntityOnElement ( const ElementInfo &elementInfo, int subEntity ) const\n+ 295 {\n+ 296 assert( marker_[ codim ] != 0 );\n+ 297\n+ 298 const int subIndex = dofNumbering_( elementInfo, codim, subEntity );\n+ 299 const int markIndex = marker_[ codim ][ subIndex ];\n+ 300 assert( (markIndex >= 0) );\n+ 301\n+ 302 const int index = dofNumbering_( elementInfo, 0, 0 );\n+ 303 return (markIndex == index);\n+ 304 }\n+ 305\n+ 306\n+ 307 template< int dim, int dimworld >\n+ 308 template< int firstCodim, class Iterator >\n+ 309 inline void AlbertaMarkerVector<_dim,_dimworld_>\n+310::markSubEntities ( const Iterator &begin, const Iterator &end )\n+ 311 {\n+ 312 clear();\n+ 313 std::conditional< (firstCodim <= dimension), MarkSubEntities,\n+NoMarkSubEntities >::type\n+ 314 ::template mark< firstCodim, Iterator >( dofNumbering_, marker_, begin,\n+end );\n+ 315 }\n+ 316\n+ 317\n+ 318 template< int dim, int dimworld >\n+319 inline void AlbertaMarkerVector<_dim,_dimworld_>::print ( std::ostream &out\n+) const\n+ 320 {\n+ 321 for( int codim = 1; codim <= dimension; ++codim )\n+ 322 {\n+ 323 int *marker = marker_[ codim ];\n+ 324 if( marker != 0 )\n+ 325 {\n+ 326 const int size = dofNumbering_.size( codim );\n+ 327 out << std::endl;\n+ 328 out << \"Codimension \" << codim << \" (\" << size << \" entries)\" << std::\n+endl;\n+ 329 for( int i = 0; i < size; ++i )\n+ 330 out << \"subentity \" << i << \" visited on Element \" << marker[ i ] << std::\n+endl;\n+ 331 }\n+ 332 }\n+ 333 }\n+ 334\n+ 335\n+ 336\n+ 337 // Implementation of AlbertaGridTreeIterator\n+ 338 // -----------------------------------------\n+ 339\n+ 340 template< int codim, class GridImp, bool leafIterator >\n+ 341 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n+342::AlbertaGridTreeIterator ()\n+ 343 : entity_(),\n+ 344 level_( -1 ),\n+ 345 subEntity_( -1 ),\n+ 346 macroIterator_(),\n+ 347 marker_( NULL )\n+ 348 {}\n+ 349\n+ 350 template< int codim, class GridImp, bool leafIterator >\n+ 351 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n+352::AlbertaGridTreeIterator ( const GridImp &grid,\n+ 353 const MarkerVector *marker,\n+ 354 int travLevel )\n+ 355 : entity_( EntityImp( grid ) ),\n+ 356 level_( travLevel ),\n+ 357 subEntity_( (codim == 0 ? 0 : -1) ),\n+ 358 macroIterator_( grid.meshPointer().begin() ),\n+ 359 marker_( marker )\n+ 360 {\n+ 361 ElementInfo elementInfo = *macroIterator_;\n+ 362 nextElementStop( elementInfo );\n+ 363 if( codim > 0 )\n+ 364 goNext( elementInfo );\n+ 365 // it is ok to set the invalid ElementInfo\n+ 366 entity_.impl().setElement( elementInfo, subEntity_ );\n+ 367 }\n+ 368\n+ 369\n+ 370 // Make LevelIterator with point to element from previous iterations\n+ 371 template< int codim, class GridImp, bool leafIterator >\n+ 372 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n+373::AlbertaGridTreeIterator ( const GridImp &grid,\n+ 374 int travLevel )\n+ 375 : entity_( EntityImp( grid ) ),\n+ 376 level_( travLevel ),\n+ 377 subEntity_( -1 ),\n+ 378 macroIterator_( grid.meshPointer().end() ),\n+ 379 marker_( 0 )\n+ 380 {}\n+ 381\n+ 382\n+ 383 // Make LevelIterator with point to element from previous iterations\n+ 384 template< int codim, class GridImp, bool leafIterator >\n+ 385 inline AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n+386::AlbertaGridTreeIterator( const This &other )\n+ 387 : entity_( other.entity_ ),\n+ 388 level_( other.level_ ),\n+ 389 subEntity_( other.subEntity_ ),\n+ 390 macroIterator_( other.macroIterator_ ),\n+ 391 marker_( other.marker_ )\n+ 392 {}\n+ 393\n+ 394\n+ 395 // Make LevelIterator with point to element from previous iterations\n+ 396 template< int codim, class GridImp, bool leafIterator >\n+ 397 inline typename AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>::\n+This &\n+398 AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>::operator=( const\n+This &other )\n+ 399 {\n+ 400 entity_ = other.entity_;\n+ 401 level_ = other.level_;\n+ 402 subEntity_ = other.subEntity_;\n+ 403 macroIterator_ = other.macroIterator_;\n+ 404 marker_ = other.marker_;\n+ 405\n+ 406 return *this;\n+ 407 }\n+ 408\n+ 409\n+ 410 template< int codim, class GridImp, bool leafIterator >\n+411 inline void AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>::\n+increment ()\n+ 412 {\n+ 413 ElementInfo elementInfo = entity_.impl().elementInfo_;\n+ 414 goNext ( elementInfo );\n+ 415 // it is ok to set the invalid ElementInfo\n+ 416 entity_.impl().setElement( elementInfo, subEntity_ );\n+ 417 }\n+ 418\n+ 419\n+ 420 template< int codim, class GridImp, bool leafIterator >\n+ 421 inline void AlbertaGridTreeIterator<_codim,_GridImp,_leafIterator_>\n+ 422::nextElement ( ElementInfo &elementInfo )\n+ 423 {\n+ 424 if( elementInfo.isLeaf() || (elementInfo.level() >= level_) )\n+ 425 {\n+ 426 while( (elementInfo.level() > 0) && (elementInfo.indexInFather() == 1) )\n+ 427 elementInfo = elementInfo.father();\n+ 428 if( elementInfo.level() == 0 )\n+ 429 {\n+ 430 ++macroIterator_;\n+ 431 elementInfo = *macroIterator_;\n+ 432 }\n+ 433 else\n+ 434 elementInfo = elementInfo.father().child( 1 );\n+ 435 }\n+ 436 else\n+ 437 elementInfo = elementInfo.child( 0 );\n+ 438 }\n+ 439\n+ 440\n+ 441 template< int codim, class GridImp, bool leafIterator >\n+ 442 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n+ 443 ::nextElementStop ( ElementInfo &elementInfo )\n+ 444 {\n+ 445 while( !(!elementInfo || stopAtElement( elementInfo )) )\n+ 446 nextElement( elementInfo );\n+ 447 }\n+ 448\n+ 449\n+ 450 template< int codim, class GridImp, bool leafIterator >\n+ 451 inline bool AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n+ 452 ::stopAtElement ( const ElementInfo &elementInfo ) const\n+ 453 {\n+ 454 if( !elementInfo )\n+ 455 return true;\n+ 456 return (leafIterator ? elementInfo.isLeaf() : (level_ == elementInfo.level\n+()));\n+ 457 }\n+ 458\n+ 459\n+ 460 template< int codim, class GridImp, bool leafIterator >\n+ 461 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n+ 462 ::goNext ( ElementInfo &elementInfo )\n+ 463 {\n+ 464 std::integral_constant< int, codim > codimVariable;\n+ 465 goNext( codimVariable, elementInfo );\n+ 466 }\n+ 467\n+ 468 template< int codim, class GridImp, bool leafIterator >\n+ 469 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n+ 470 ::goNext ( const std::integral_constant< int, 0 > /* cdVariable */,\n+ 471 ElementInfo &elementInfo )\n+ 472 {\n+ 473 assert( stopAtElement( elementInfo ) );\n+ 474\n+ 475 nextElement( elementInfo );\n+ 476 nextElementStop( elementInfo );\n+ 477 }\n+ 478\n+ 479 template< int codim, class GridImp, bool leafIterator >\n+ 480 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n+ 481 ::goNext ( const std::integral_constant< int, 1 > cdVariable,\n+ 482 ElementInfo &elementInfo )\n+ 483 {\n+ 484 assert( stopAtElement( elementInfo ) );\n+ 485\n+ 486 ++subEntity_;\n+ 487 if( subEntity_ >= numSubEntities )\n+ 488 {\n+ 489 subEntity_ = 0;\n+ 490 nextElement( elementInfo );\n+ 491 nextElementStop( elementInfo );\n+ 492 if( !elementInfo )\n+ 493 return;\n+ 494 }\n+ 495\n+ 496 if( leafIterator )\n+ 497 {\n+ 498 const int face = (dimension == 1 ? (numSubEntities-1)-subEntity_ :\n+subEntity_);\n+ 499\n+ 500 const ALBERTA EL *neighbor = elementInfo.elInfo().neigh[ face ];\n+ 501 if( (neighbor != NULL) && !elementInfo.isBoundary( face ) )\n+ 502 {\n+ 503 // face is reached from element with largest number\n+ 504 const int elIndex = grid().dofNumbering() ( elementInfo, 0, 0 );\n+ 505 const int nbIndex = grid().dofNumbering() ( neighbor, 0, 0 );\n+ 506 if( elIndex < nbIndex )\n+ 507 goNext( cdVariable, elementInfo );\n+ 508 }\n+ 509 // uncomment this assertion only if codimension 1 entities are marked\n+ 510 // assert( marker_->template subEntityOnElement< 1 >( elementInfo,\n+subEntity_ ) );\n+ 511 }\n+ 512 else\n+ 513 {\n+ 514 assert( marker_ != 0 );\n+ 515 if( !marker_->template subEntityOnElement< 1 >( elementInfo, subEntity_ )\n+)\n+ 516 goNext( cdVariable, elementInfo );\n+ 517 }\n+ 518 }\n+ 519\n+ 520 template< int codim, class GridImp, bool leafIterator >\n+ 521 template< int cd >\n+ 522 inline void AlbertaGridTreeIterator< codim, GridImp, leafIterator >\n+ 523 ::goNext ( const std::integral_constant< int, cd > cdVariable,\n+ 524 ElementInfo &elementInfo )\n+ 525 {\n+ 526 assert( stopAtElement( elementInfo ) );\n+ 527\n+ 528 ++subEntity_;\n+ 529 if( subEntity_ >= numSubEntities )\n+ 530 {\n+ 531 subEntity_ = 0;\n+ 532 nextElement( elementInfo );\n+ 533 nextElementStop( elementInfo );\n+ 534 if( !elementInfo )\n+ 535 return;\n+ 536 }\n+ 537\n+ 538 assert( marker_ != 0 );\n+ 539 if( !marker_->template subEntityOnElement< cd >( elementInfo, subEntity_ )\n+)\n+ 540 goNext( cdVariable, elementInfo );\n+ 541 }\n+ 542\n+ 543}\n+ 544\n+ 545#endif // #if HAVE_ALBERTA\n+ 546\n+ 547#endif // #ifndef DUNE_ALBERTA_TREEITERATOR_HH\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n+meshpointer.hh\n+provides a wrapper for ALBERTA's mesh structure\n+ALBERTA\n+#define ALBERTA\n+Definition: albertaheader.hh:29\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::GeometryReference\n-Definition: geometryreference.hh:26\n-Dune::GeometryReference::mydimension\n-static const int mydimension\n-Definition: geometryreference.hh:30\n-Dune::GeometryReference::integrationElement\n-ctype integrationElement(const LocalCoordinate &local) const\n-Definition: geometryreference.hh:93\n-Dune::GeometryReference::volume\n-ctype volume() const\n-Definition: geometryreference.hh:98\n-Dune::GeometryReference::impl\n-const Implementation & impl() const\n-Definition: geometryreference.hh:126\n-Dune::GeometryReference::jacobianInverse\n-JacobianInverse jacobianInverse(const LocalCoordinate &local) const\n-Definition: geometryreference.hh:118\n-Dune::GeometryReference::center\n-GlobalCoordinate center() const\n-Definition: geometryreference.hh:81\n-Dune::GeometryReference::JacobianTransposed\n-Implementation::JacobianTransposed JacobianTransposed\n-Definition: geometryreference.hh:39\n-Dune::GeometryReference::GeometryReference\n-GeometryReference(const Implementation &impl)\n-Definition: geometryreference.hh:71\n-Dune::GeometryReference::JacobianInverse\n-Std::detected_or_t< JacobianInverseDefault, JacobianInverseOfImplementation,\n-Implementation > JacobianInverse\n-Definition: geometryreference.hh:69\n-Dune::GeometryReference::GlobalCoordinate\n-Implementation::GlobalCoordinate GlobalCoordinate\n-Definition: geometryreference.hh:36\n-Dune::GeometryReference::coorddimension\n-static const int coorddimension\n-Definition: geometryreference.hh:31\n-Dune::GeometryReference::affine\n-bool affine() const\n-Definition: geometryreference.hh:77\n-Dune::GeometryReference::corner\n-GlobalCoordinate corner(int i) const\n-Definition: geometryreference.hh:80\n-Dune::GeometryReference::jacobianInverseTransposed\n-JacobianInverseTransposed jacobianInverseTransposed(const LocalCoordinate\n-&local) const\n-Definition: geometryreference.hh:105\n-Dune::GeometryReference::jacobianTransposed\n-JacobianTransposed jacobianTransposed(const LocalCoordinate &local) const\n-Definition: geometryreference.hh:100\n-Dune::GeometryReference::corners\n-int corners() const\n-Definition: geometryreference.hh:79\n-Dune::GeometryReference::LocalCoordinate\n-Implementation::LocalCoordinate LocalCoordinate\n-Definition: geometryreference.hh:35\n-Dune::GeometryReference::global\n-GlobalCoordinate global(const LocalCoordinate &local) const\n-Definition: geometryreference.hh:83\n-Dune::GeometryReference::Jacobian\n-Std::detected_or_t< JacobianDefault, JacobianOfImplementation, Implementation >\n-Jacobian\n-Definition: geometryreference.hh:68\n-Dune::GeometryReference::ctype\n-Implementation::ctype ctype\n-Definition: geometryreference.hh:33\n-Dune::GeometryReference::JacobianInverseTransposed\n-Implementation::JacobianInverseTransposed JacobianInverseTransposed\n-Definition: geometryreference.hh:38\n-Dune::GeometryReference::jacobian\n-Jacobian jacobian(const LocalCoordinate &local) const\n-Definition: geometryreference.hh:110\n-Dune::GeometryReference::type\n-GeometryType type() const\n-Definition: geometryreference.hh:75\n-Dune::LocalGeometryReference\n-Definition: geometryreference.hh:139\n-Dune::LocalGeometryReference::LocalGeometryReference\n-LocalGeometryReference(const Implementation &impl)\n-Definition: geometryreference.hh:143\n-geometry.hh\n-Wrapper and interface classes for element geometries.\n+Dune::Alberta::max\n+int max(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:337\n+Dune::AlbertaGrid<_dim,_dimworld_>\n+Dune::AlbertaGrid<_dim,_dimworld_>::dimension\n+static const int dimension\n+Definition: agrid.hh:145\n+Dune::Alberta::MeshPointer<_dimension_>\n+Dune::Alberta::HierarchyDofNumbering<_dimension_>\n+Dune::Alberta::HierarchyDofNumbering::size\n+int size(int codim) const\n+Definition: dofadmin.hh:163\n+Dune::Alberta::ElementInfo<_dimension_>\n+Dune::AlbertaGridTreeIterator\n+Definition: treeiterator.hh:189\n+Dune::AlbertaGridTreeIterator::equals\n+bool equals(const This &other) const\n+equality\n+Definition: treeiterator.hh:231\n+Dune::AlbertaGridTreeIterator::EntityObject\n+MakeableInterfaceObject< Entity > EntityObject\n+Definition: treeiterator.hh:208\n+Dune::AlbertaGridTreeIterator::MeshPointer\n+Alberta::MeshPointer< dimension > MeshPointer\n+Definition: treeiterator.hh:204\n+Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n+AlbertaGridTreeIterator(const GridImp &grid, const MarkerVector *marker, int\n+travLevel)\n+Constructor making begin iterator.\n+Definition: treeiterator.hh:352\n+Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n+AlbertaGridTreeIterator(const GridImp &grid, int travLevel)\n+Constructor making end iterator.\n+Definition: treeiterator.hh:373\n+Dune::AlbertaGridTreeIterator::EntityImp\n+EntityObject::ImplementationType EntityImp\n+Definition: treeiterator.hh:209\n+Dune::AlbertaGridTreeIterator::codimension\n+static const int codimension\n+Definition: treeiterator.hh:194\n+Dune::AlbertaGridTreeIterator::MacroIterator\n+MeshPointer::MacroIterator MacroIterator\n+Definition: treeiterator.hh:205\n+Dune::AlbertaGridTreeIterator::operator=\n+This & operator=(const This &other)\n+Constructor making end iterator.\n+Definition: treeiterator.hh:398\n+Dune::AlbertaGridTreeIterator::dereference\n+Entity & dereference() const\n+dereferencing\n+Definition: treeiterator.hh:237\n+Dune::AlbertaGridTreeIterator::MarkerVector\n+AlbertaMarkerVector< dimension, dimensionworld > MarkerVector\n+Definition: treeiterator.hh:212\n+Dune::AlbertaGridTreeIterator::Entity\n+GridImp::template Codim< codim >::Entity Entity\n+Definition: treeiterator.hh:207\n+Dune::AlbertaGridTreeIterator::level\n+int level() const\n+ask for level of entities\n+Definition: treeiterator.hh:243\n+Dune::AlbertaGridTreeIterator::dimensionworld\n+static const int dimensionworld\n+Definition: treeiterator.hh:195\n+Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n+AlbertaGridTreeIterator()\n+Definition: treeiterator.hh:342\n+Dune::AlbertaGridTreeIterator::increment\n+void increment()\n+increment\n+Definition: treeiterator.hh:411\n+Dune::AlbertaGridTreeIterator::grid\n+const GridImp & grid() const\n+obtain a reference to the grid\n+Definition: treeiterator.hh:253\n+Dune::AlbertaGridTreeIterator::dimension\n+static const int dimension\n+Definition: treeiterator.hh:193\n+Dune::AlbertaGridTreeIterator::AlbertaGridTreeIterator\n+AlbertaGridTreeIterator(const This &other)\n+Constructor making end iterator.\n+Definition: treeiterator.hh:386\n+Dune::AlbertaGridTreeIterator::ElementInfo\n+EntityImp::ElementInfo ElementInfo\n+Definition: treeiterator.hh:210\n+Dune::Alberta::NumSubEntities\n+Definition: misc.hh:148\n+Dune::AlbertaMarkerVector\n+marker assigning subentities to one element containing them\n+Definition: treeiterator.hh:35\n+Dune::AlbertaMarkerVector::AlbertaMarkerVector\n+AlbertaMarkerVector(const DofNumbering &dofNumbering)\n+create AlbertaMarkerVector with empty vectors\n+Definition: treeiterator.hh:54\n+Dune::AlbertaMarkerVector::up2Date\n+bool up2Date() const\n+return true if marking is up to date\n+Definition: treeiterator.hh:95\n+Dune::AlbertaMarkerVector::subEntityOnElement\n+bool subEntityOnElement(const ElementInfo &elementInfo, int subEntity) const\n+visit subentity on this element?\n+Definition: treeiterator.hh:294\n+Dune::AlbertaMarkerVector::markSubEntities\n+void markSubEntities(const Iterator &begin, const Iterator &end)\n+Definition: treeiterator.hh:310\n+Dune::AlbertaMarkerVector::~AlbertaMarkerVector\n+~AlbertaMarkerVector()\n+Definition: treeiterator.hh:68\n+Dune::AlbertaMarkerVector::clear\n+void clear()\n+Definition: treeiterator.hh:84\n+Dune::AlbertaMarkerVector::AlbertaMarkerVector\n+AlbertaMarkerVector(const This &other)\n+Definition: treeiterator.hh:61\n+Dune::AlbertaMarkerVector::print\n+void print(std::ostream &out=std::cout) const\n+print for debugin' only\n+Definition: treeiterator.hh:319\n+Dune::AlbertaMarkerVector::MarkSubEntities::Codim\n+Definition: treeiterator.hh:136\n+Dune::AlbertaMarkerVector::MarkSubEntities::Codim::ElementInfo\n+Alberta::ElementInfo< dimension > ElementInfo\n+Definition: treeiterator.hh:139\n+Dune::AlbertaMarkerVector::MarkSubEntities::Codim::apply\n+static void apply(const DofNumbering &dofNumbering, int *(&marker)\n+[dimension+1], const ElementInfo &elementInfo)\n+Definition: treeiterator.hh:141\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::MakeableInterfaceObject<_Entity_>\n+Dune::MakeableInterfaceObject<_Entity_>::ImplementationType\n+InterfaceType::Implementation ImplementationType\n+Definition: common/grid.hh:1108\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00710.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00710.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: meshpointer.cc File Reference\n+dune-grid: indexsets.cc File Reference\n \n \n \n \n \n \n \n@@ -64,27 +64,26 @@\n \n \n \n
    \n \n-
    meshpointer.cc File Reference
    \n+
    indexsets.cc File Reference
    \n
    \n
    \n \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,19 +6,18 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n Namespaces\n-meshpointer.cc File Reference\n+indexsets.cc File Reference\n #include \n-#include \n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::Alberta\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00713.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00713.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: meshpointer.hh File Reference\n+dune-grid: elementinfo.cc File Reference\n \n \n \n \n \n \n \n@@ -63,48 +63,35 @@\n \n \n
    \n \n-
    meshpointer.hh File Reference
    \n+
    elementinfo.cc File Reference
    \n
    \n
    \n \n-

    provides a wrapper for ALBERTA's mesh structure \n+

    provides a wrapper for ALBERTA's el_info structure \n More...

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

    Go to the source code of this file.

    \n-\n-\n-\n-\n-\n-\n-

    \n-Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n

    Detailed Description

    \n-

    provides a wrapper for ALBERTA's mesh structure

    \n+

    provides a wrapper for ALBERTA's el_info structure

    \n
    Author
    Martin Nolte
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,35 +5,26 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Classes | Namespaces\n-meshpointer.hh File Reference\n-provides a wrapper for ALBERTA's mesh structure More...\n-#include \n-#include \n-#include \n+Namespaces\n+elementinfo.cc File Reference\n+provides a wrapper for ALBERTA's el_info structure More...\n+#include \n #include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::Alberta::MeshPointer<_dim_>\n-\u00a0\n-class \u00a0Dune::Alberta::MeshPointer<_dim_>::MacroIterator\n-\u00a0\n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n ***** Detailed Description *****\n-provides a wrapper for ALBERTA's mesh structure\n+provides a wrapper for ALBERTA's el_info structure\n Author\n Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00716.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00716.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: elementinfo.hh File Reference\n+dune-grid: leafiterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,50 +65,35 @@\n
  • dune
  • grid
  • albertagrid
  • \n
    \n \n
    \n \n-
    elementinfo.hh File Reference
    \n+
    leafiterator.hh File Reference
    \n
    \n
    \n-\n-

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

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

    Go to the source code of this file.

    \n \n \n-\n-\n-\n+\n \n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::Alberta::ElementInfo< dim >
     
    struct  Dune::Alberta::ElementInfo< dim >::Instance
    class  Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >
     
    class  Dune::Alberta::ElementInfo< dim >::Stack
     
    struct  Dune::Alberta::ElementInfo< dim >::Seed
    class  Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >
     
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n-

    Detailed Description

    \n-

    provides a wrapper for ALBERTA's el_info structure

    \n-
    Author
    Martin Nolte
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,37 +6,23 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n Classes | Namespaces\n-elementinfo.hh File Reference\n-provides a wrapper for ALBERTA's el_info structure More...\n-#include \n-#include \n-#include \n-#include \n-#include \n+leafiterator.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::Alberta::ElementInfo<_dim_>\n+class \u00a0Dune::AlbertaGridLeafIterator<_codim,_pitype,_GridImp_>\n \u00a0\n-struct \u00a0Dune::Alberta::ElementInfo<_dim_>::Instance\n-\u00a0\n- class \u00a0Dune::Alberta::ElementInfo<_dim_>::Stack\n-\u00a0\n-struct \u00a0Dune::Alberta::ElementInfo<_dim_>::Seed\n+class \u00a0Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::Alberta\n-\u00a0\n-***** Detailed Description *****\n-provides a wrapper for ALBERTA's el_info structure\n- Author\n- Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00716_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: elementinfo.hh Source File\n+dune-grid: leafiterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,1023 +62,126 @@\n \n \n \n
    \n-
    elementinfo.hh
    \n+
    leafiterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH
    \n-
    6#define DUNE_ALBERTA_ELEMENTINFO_HH
    \n+
    5#ifndef DUNE_ALBERTA_LEAFITERATOR_HH
    \n+
    6#define DUNE_ALBERTA_LEAFITERATOR_HH
    \n
    7
    \n-
    13#include <cassert>
    \n-
    14#include <vector>
    \n-
    15#include <utility>
    \n+\n+
    9
    \n+\n+
    11
    \n+
    12#if HAVE_ALBERTA
    \n+
    13
    \n+
    14namespace Dune
    \n+
    15{
    \n
    16
    \n-\n-\n+
    17 // AlbertaGridLeafIterator
    \n+
    18 // -----------------------
    \n
    19
    \n-
    20#if HAVE_ALBERTA
    \n-
    21
    \n-
    22namespace Dune
    \n-
    23{
    \n-
    24
    \n-
    25 namespace Alberta
    \n-
    26 {
    \n-
    27
    \n-
    28 // External Forward Declarations
    \n-
    29 // -----------------------------
    \n+
    20 template< int codim, PartitionIteratorType pitype, class GridImp >
    \n+\n+
    22 : public AlbertaGridTreeIterator< codim, GridImp, true >
    \n+
    23 {
    \n+\n+\n+
    26
    \n+
    27 public:
    \n+
    28 typedef typename Base::Entity Entity;
    \n+\n
    30
    \n-
    31 template< int dim >
    \n-
    32 class MeshPointer;
    \n+\n+
    32 {}
    \n
    33
    \n-
    34 struct BasicNodeProjection;
    \n-
    35
    \n-
    36
    \n-
    37
    \n-
    38 // ElementInfo
    \n-
    39 // -----------
    \n-
    40
    \n-
    41 template< int dim >
    \n-\n-
    43 {
    \n-
    44 struct Instance;
    \n-
    45 class Stack;
    \n-
    46
    \n-
    47 template< int >
    \n-
    48 struct Library;
    \n-
    49
    \n-
    50 typedef Instance *InstancePtr;
    \n-
    51
    \n-
    52 public:
    \n-
    53 static const int dimension = dim;
    \n-
    54
    \n-\n-\n-
    57
    \n-\n-\n-\n-
    61
    \n-
    62 static const int maxNeighbors = N_NEIGH_MAX;
    \n-
    63
    \n-
    64 static const int maxLevelNeighbors = Library< dimWorld >::maxLevelNeighbors;
    \n-
    65
    \n-
    66#if !DUNE_ALBERTA_CACHE_COORDINATES
    \n-\n-
    68#endif
    \n-
    69
    \n-
    70 struct Seed;
    \n-
    71
    \n-
    72 private:
    \n-
    73 explicit ElementInfo ( const InstancePtr &instance );
    \n-
    74
    \n-
    75 public:
    \n-\n-\n-
    78 typename FillFlags::Flags fillFlags = FillFlags::standard );
    \n-
    79 ElementInfo ( const MeshPointer &mesh, const Seed &seed,
    \n-
    80 typename FillFlags::Flags fillFlags = FillFlags::standard );
    \n-
    81 ElementInfo ( const ElementInfo &other );
    \n-\n-
    83
    \n-\n-
    85
    \n-\n-\n+
    35 AlbertaGridLeafIterator ( const GridImp &grid, int level )
    \n+
    36 : Base( grid, level )
    \n+
    37 {}
    \n+
    38
    \n+
    40 AlbertaGridLeafIterator ( const GridImp &grid,
    \n+
    41 const MarkerVector *vec,
    \n+
    42 int level )
    \n+
    43 : Base( grid, vec, level )
    \n+
    44 {}
    \n+
    45
    \n+
    47 void increment ()
    \n+
    48 {
    \n+\n+
    50 }
    \n+
    51 };
    \n+
    52
    \n+
    53
    \n+
    54 template< int codim, class GridImp >
    \n+\n+
    56 : public AlbertaGridTreeIterator< codim, GridImp, true >
    \n+
    57 {
    \n+\n+\n+
    60
    \n+
    61 public:
    \n+
    62 typedef typename Base::Entity Entity;
    \n+\n+
    64
    \n+\n+
    66 {}
    \n+
    67
    \n+
    69 AlbertaGridLeafIterator ( const GridImp &grid, int level )
    \n+
    70 : Base( grid, level )
    \n+
    71 {}
    \n+
    72
    \n+
    74 AlbertaGridLeafIterator ( const GridImp &grid,
    \n+
    75 const MarkerVector *,
    \n+
    76 int level )
    \n+
    77 : Base( grid, level )
    \n+
    78 {}
    \n+
    79
    \n+
    81 void increment ()
    \n+
    82 {
    \n+\n+
    84 }
    \n+
    85 };
    \n+
    86
    \n+
    87}
    \n
    88
    \n-
    89 explicit operator bool () const { return (instance_ != null()); }
    \n+
    89#endif // #if HAVE_ALBERTA
    \n
    90
    \n-
    91 bool operator== ( const ElementInfo &other ) const;
    \n-
    92 bool operator!= ( const ElementInfo &other ) const;
    \n-
    93
    \n-
    94 const MacroElement &macroElement () const;
    \n-\n-
    96 int indexInFather () const;
    \n-
    97 ElementInfo child ( int i ) const;
    \n-
    98 bool isLeaf () const;
    \n-
    99
    \n-
    100 Seed seed () const;
    \n-
    101
    \n-\n-
    103
    \n-
    104 bool mightVanish () const;
    \n-
    105
    \n-
    106 int level () const;
    \n-
    107 // see ALBERTA documentation for definition of element type
    \n-
    108 // values are 0, 1, 2
    \n-
    109 int type () const;
    \n-
    110
    \n-
    111 int getMark () const;
    \n-
    112 void setMark ( int refCount ) const;
    \n-
    113
    \n-
    114 bool hasLeafNeighbor ( const int face ) const;
    \n-
    115 ElementInfo leafNeighbor ( const int face ) const;
    \n-
    116
    \n-
    117 /* obtain all level neighbors of a face
    \n-
    118 *
    \n-
    119 * param[in] face face for which the neighbors are desired
    \n-
    120 * param[out] neighbor array storing the neighbors
    \n-
    121 * param[out] faceInNeighbor array storing the faces in neighbor
    \n-
    122 * (-1, if this neighbor does not exist)
    \n-
    123 *
    \n-
    124 * returns (potential) number of neighbors (i.e., the number of valid
    \n-
    125 * entries in the output arrays
    \n-
    126 */
    \n-
    127 int levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const;
    \n-
    128
    \n-
    129 template< int codim >
    \n-
    130 int twist ( int subEntity ) const;
    \n-
    131 int twistInNeighbor ( int face ) const;
    \n-
    132 bool isBoundary ( int face ) const;
    \n-
    133 int boundaryId ( int face ) const;
    \n-\n-\n-
    136
    \n-
    137 bool hasCoordinates () const;
    \n-
    138 const GlobalVector &coordinate ( int vertex ) const;
    \n-
    139#if !DUNE_ALBERTA_CACHE_COORDINATES
    \n-\n-
    141 {
    \n-
    142 return GeometryCache( instance_->geometryCache, instance_->elInfo );
    \n-
    143 }
    \n-
    144#endif
    \n-
    145
    \n-
    146 template< class Functor >
    \n-
    147 void hierarchicTraverse ( Functor &functor ) const;
    \n-
    148
    \n-
    149 template< class Functor >
    \n-
    150 void leafTraverse ( Functor &functor ) const;
    \n-
    151
    \n-
    152 const Element *element () const;
    \n-
    153 const Element *neighbor ( int face ) const;
    \n-
    154 Element *el () const;
    \n-
    155 ALBERTA EL_INFO &elInfo () const;
    \n-
    156
    \n-
    157 static ElementInfo
    \n-\n-
    159 const Element *element, int level, int type = 0 );
    \n-
    160 static ElementInfo createFake ( const ALBERTA EL_INFO &elInfo );
    \n-
    161
    \n-
    162 private:
    \n-
    163 static bool isLeaf ( Element *element );
    \n-
    164 static bool mightVanish ( Element *element, int depth );
    \n-
    165
    \n-
    166 static void fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo );
    \n-
    167 static void fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo );
    \n-
    168
    \n-
    169 void addReference () const;
    \n-
    170 void removeReference () const;
    \n-
    171
    \n-
    172 static InstancePtr null ();
    \n-
    173 static Stack &stack ();
    \n-
    174
    \n-
    175 InstancePtr instance_;
    \n-
    176 };
    \n-
    177
    \n-
    178
    \n-
    179
    \n-
    180 // ElementInfo::Instance
    \n-
    181 // ---------------------
    \n-
    182
    \n-
    183 template< int dim >
    \n-
    184 struct ElementInfo< dim >::Instance
    \n-
    185 {
    \n-\n-
    187 unsigned int refCount;
    \n-
    188
    \n-\n-
    190 {
    \n-
    191 return parent_;
    \n-
    192 }
    \n-
    193
    \n-
    194 private:
    \n-
    195 InstancePtr parent_;
    \n-
    196
    \n-
    197#if !DUNE_ALBERTA_CACHE_COORDINATES
    \n-
    198 public:
    \n-\n-
    200#endif
    \n-
    201 };
    \n-
    202
    \n-
    203
    \n-
    204
    \n-
    205 // ElementInfo::Stack
    \n-
    206 // ------------------
    \n-
    207
    \n-
    208 template< int dim >
    \n-
    209 class ElementInfo< dim >::Stack
    \n-
    210 {
    \n-
    211 InstancePtr top_;
    \n-
    212 Instance null_;
    \n-
    213
    \n-
    214 public:
    \n-
    215 Stack ();
    \n-
    216 ~Stack ();
    \n-
    217
    \n-
    218 InstancePtr allocate ();
    \n-
    219 void release ( InstancePtr &p );
    \n-
    220 InstancePtr null ();
    \n-
    221 };
    \n-
    222
    \n-
    223
    \n-
    224
    \n-
    225 // ElementInfo::Library
    \n-
    226 // --------------------
    \n-
    227
    \n-
    228 template< int dim >
    \n-
    229 template< int >
    \n-
    230 struct ElementInfo< dim >::Library
    \n-
    231 {
    \n-\n-
    233
    \n-
    234 static const int maxLevelNeighbors = (1 << (dim-1));
    \n-
    235
    \n-
    236 static int
    \n-
    237 leafNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
    \n-
    238
    \n-
    239 static int
    \n-
    240 levelNeighbors ( const ElementInfo &element, const int face,
    \n-
    241 ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] );
    \n-
    242
    \n-
    243 private:
    \n-
    244 static int
    \n-
    245 macroNeighbor ( const ElementInfo &element, const int face, ElementInfo &neighbor );
    \n-
    246 };
    \n-
    247
    \n-
    248
    \n-
    249
    \n-
    250 // ElementInfo::Seed
    \n-
    251 // -----------------
    \n-
    252
    \n-
    253 template< int dim >
    \n-
    254 struct ElementInfo< dim >::Seed
    \n-
    255 {
    \n-\n-
    257 : macroIndex_( -1 ), level_( 0 ), path_( 0 )
    \n-
    258 {}
    \n-
    259
    \n-
    260 Seed ( const int macroIndex, const int level, const unsigned long path )
    \n-
    261 : macroIndex_( macroIndex ), level_( level ), path_( path )
    \n-
    262 {}
    \n-
    263
    \n-
    264 bool operator== ( const Seed &other ) const
    \n-
    265 {
    \n-
    266 return (macroIndex() == other.macroIndex()) && (level() == other.level()) && (path() == other.path());
    \n-
    267 }
    \n-
    268
    \n-
    269 bool operator< ( const Seed &other ) const
    \n-
    270 {
    \n-
    271 const bool ml = (macroIndex() < other.macroIndex());
    \n-
    272 const bool me = (macroIndex() == other.macroIndex());
    \n-
    273 const bool ll = (level() < other.level());
    \n-
    274 const bool le = (level() == other.level());
    \n-
    275 const bool pl = (path() < other.path());
    \n-
    276 return ml | (me & (ll | (le & pl)));
    \n-
    277 }
    \n-
    278
    \n-
    279 bool operator!= ( const Seed &other ) const { return !(*this == other); }
    \n-
    280 bool operator<= ( const Seed &other ) const { return !(other < *this); }
    \n-
    281 bool operator> ( const Seed &other ) const { return (other < *this); }
    \n-
    282 bool operator>= ( const Seed &other ) const { return !(*this < other); }
    \n-
    283
    \n-
    284 bool isValid ( ) const { return macroIndex_ != -1; }
    \n-
    285
    \n-
    286 int macroIndex () const { return macroIndex_; }
    \n-
    287 int level () const { return level_; }
    \n-
    288 unsigned long path () const { return path_; }
    \n-
    289
    \n-
    290 private:
    \n-
    291 int macroIndex_;
    \n-
    292 int level_;
    \n-
    293 unsigned long path_;
    \n-
    294 };
    \n-
    295
    \n-
    296
    \n-
    297
    \n-
    298 // Implementation of ElementInfo
    \n-
    299 // -----------------------------
    \n-
    300
    \n-
    301 template< int dim >
    \n-
    302 inline ElementInfo< dim >::ElementInfo ( const InstancePtr &instance )
    \n-
    303 : instance_( instance )
    \n-
    304 {
    \n-
    305 addReference();
    \n-
    306 }
    \n-
    307
    \n-
    308
    \n-
    309 template< int dim >
    \n-\n-
    311 : instance_( null() )
    \n-
    312 {
    \n-
    313 addReference();
    \n-
    314 }
    \n-
    315
    \n-
    316
    \n-
    317 template< int dim >
    \n-
    318 inline ElementInfo< dim >
    \n-
    319 ::ElementInfo ( const MeshPointer &mesh, const MacroElement &macroElement,
    \n-
    320 typename FillFlags::Flags fillFlags )
    \n-
    321 {
    \n-
    322 instance_ = stack().allocate();
    \n-
    323 instance_->parent() = null();
    \n-
    324 ++(instance_->parent()->refCount);
    \n-
    325
    \n-
    326 addReference();
    \n-
    327
    \n-
    328 elInfo().fill_flag = fillFlags;
    \n-
    329
    \n-
    330 // Alberta fills opp_vertex only if there is a neighbor
    \n-
    331 for( int k = 0; k < maxNeighbors; ++k )
    \n-
    332 elInfo().opp_vertex[ k ] = -1;
    \n-
    333
    \n-
    334 fill( mesh, &macroElement, elInfo() );
    \n-
    335 }
    \n-
    336
    \n-
    337
    \n-
    338 template< int dim >
    \n-
    339 inline ElementInfo< dim >
    \n-
    340 ::ElementInfo ( const MeshPointer &mesh, const Seed &seed,
    \n-
    341 typename FillFlags::Flags fillFlags )
    \n-
    342 {
    \n-
    343 instance_ = stack().allocate();
    \n-
    344 instance_->parent() = null();
    \n-
    345 ++(instance_->parent()->refCount);
    \n-
    346
    \n-
    347 addReference();
    \n-
    348
    \n-
    349 // fill in macro element info
    \n-
    350 elInfo().fill_flag = fillFlags;
    \n-
    351
    \n-
    352 // Alberta fills opp_vertex only if there is a neighbor
    \n-
    353 for( int k = 0; k < maxNeighbors; ++k )
    \n-
    354 elInfo().opp_vertex[ k ] = -1;
    \n-
    355
    \n-
    356 fill( mesh, ((Mesh *)mesh)->macro_els + seed.macroIndex(), elInfo() );
    \n-
    357
    \n-
    358 // traverse the seed's path
    \n-
    359 unsigned long path = seed.path();
    \n-
    360 for( int i = 0; i < seed.level(); ++i )
    \n-
    361 {
    \n-
    362 InstancePtr child = stack().allocate();
    \n-
    363 child->parent() = instance_;
    \n-
    364
    \n-
    365 // Alberta fills opp_vertex only if there is a neighbor
    \n-
    366 for( int k = 0; k < maxNeighbors; ++k )
    \n-
    367 child->elInfo.opp_vertex[ k ] = -2;
    \n-
    368
    \n-
    369 fill( path & 1, elInfo(), child->elInfo );
    \n-
    370
    \n-
    371 instance_ = child;
    \n-
    372 addReference();
    \n-
    373
    \n-
    374 path = path >> 1;
    \n-
    375 }
    \n-
    376
    \n-
    377 assert( this->seed() == seed );
    \n-
    378 }
    \n-
    379
    \n-
    380
    \n-
    381 template< int dim >
    \n-\n-
    383 : instance_( other.instance_ )
    \n-
    384 {
    \n-
    385 addReference();
    \n-
    386 }
    \n-
    387
    \n-
    388 template< int dim >
    \n-\n-
    390 : instance_( NULL )
    \n-
    391 {
    \n-
    392 using std::swap;
    \n-
    393 swap( instance_, other.instance_ );
    \n-
    394 }
    \n-
    395
    \n-
    396 template< int dim >
    \n-\n-
    398 {
    \n-
    399 removeReference();
    \n-
    400 }
    \n-
    401
    \n-
    402
    \n-
    403 template< int dim >
    \n-
    404 inline ElementInfo< dim > &
    \n-\n-
    406 {
    \n-
    407 other.addReference();
    \n-
    408 removeReference();
    \n-
    409 instance_ = other.instance_;
    \n-
    410 return *this;
    \n-
    411 }
    \n-
    412
    \n-
    413 template< int dim >
    \n-
    414 inline ElementInfo< dim > &
    \n-\n-
    416 {
    \n-
    417 using std::swap;
    \n-
    418 swap( instance_, other.instance_ );
    \n-
    419 return *this;
    \n-
    420 }
    \n-
    421
    \n-
    422 template< int dim >
    \n-
    423 inline bool
    \n-\n-
    425 {
    \n-
    426 return (instance_->elInfo.el == other.instance_->elInfo.el);
    \n-
    427 }
    \n-
    428
    \n-
    429
    \n-
    430 template< int dim >
    \n-
    431 inline bool
    \n-\n-
    433 {
    \n-
    434 return (instance_->elInfo.el != other.instance_->elInfo.el);
    \n-
    435 }
    \n-
    436
    \n-
    437
    \n-
    438 template< int dim >
    \n-
    439 inline const typename ElementInfo< dim >::MacroElement &
    \n-\n-
    441 {
    \n-
    442 assert( !!(*this) );
    \n-
    443 assert( elInfo().macro_el != NULL );
    \n-
    444 return static_cast< const MacroElement & >( *(elInfo().macro_el) );
    \n-
    445 }
    \n-
    446
    \n-
    447
    \n-
    448 template< int dim >
    \n-\n-
    450 {
    \n-
    451 assert( !!(*this) );
    \n-
    452 return ElementInfo< dim >( instance_->parent() );
    \n-
    453 }
    \n-
    454
    \n-
    455
    \n-
    456 template< int dim >
    \n-\n-
    458 {
    \n-
    459 const Element *element = elInfo().el;
    \n-
    460 const Element *father = elInfo().parent->el;
    \n-
    461 assert( father != NULL );
    \n-
    462
    \n-
    463 const int index = (father->child[ 0 ] == element ? 0 : 1);
    \n-
    464 assert( father->child[ index ] == element );
    \n-
    465 return index;
    \n-
    466 }
    \n-
    467
    \n-
    468
    \n-
    469 template< int dim >
    \n-\n-
    471 {
    \n-
    472 assert( !isLeaf() );
    \n-
    473
    \n-
    474 InstancePtr child = stack().allocate();
    \n-
    475 child->parent() = instance_;
    \n-
    476 addReference();
    \n-
    477
    \n-
    478 // Alberta fills opp_vertex only if there is a neighbor
    \n-
    479 for( int k = 0; k < maxNeighbors; ++k )
    \n-
    480 child->elInfo.opp_vertex[ k ] = -2;
    \n-
    481
    \n-
    482 fill( i, elInfo(), child->elInfo );
    \n-
    483 return ElementInfo< dim >( child );
    \n-
    484 }
    \n-
    485
    \n-
    486
    \n-
    487 template< int dim >
    \n-
    488 inline bool ElementInfo< dim >::isLeaf () const
    \n-
    489 {
    \n-
    490 assert( !(*this) == false );
    \n-
    491 return isLeaf( el() );
    \n-
    492 }
    \n-
    493
    \n-
    494
    \n-
    495 template< int dim >
    \n-\n-
    497 {
    \n-
    498 assert( !!(*this) );
    \n-
    499
    \n-
    500 int level = 0;
    \n-
    501 unsigned long path = 0;
    \n-
    502 for( InstancePtr p = instance_; p->parent() != null(); p = p->parent() )
    \n-
    503 {
    \n-
    504 const Element *element = p->elInfo.el;
    \n-
    505 const Element *father = p->parent()->elInfo.el;
    \n-
    506 const unsigned long child = static_cast< unsigned long >( father->child[ 1 ] == element );
    \n-
    507 path = (path << 1) | child;
    \n-
    508 ++level;
    \n-
    509 }
    \n-
    510
    \n-
    511 if( level != elInfo().level )
    \n-
    512 DUNE_THROW( NotImplemented, "Seed for fake elements not implemented." );
    \n-
    513
    \n-
    514 return Seed( macroElement().index, level, path );
    \n-
    515 }
    \n-
    516
    \n-
    517
    \n-
    518 template< int dim >
    \n-\n-
    520 {
    \n-
    521 return MeshPointer( elInfo().mesh );
    \n-
    522 }
    \n-
    523
    \n-
    524
    \n-
    525 template< int dim >
    \n-\n-
    527 {
    \n-
    528 return mightVanish( el(), 0 );
    \n-
    529 }
    \n-
    530
    \n-
    531
    \n-
    532 template< int dim >
    \n-
    533 inline int ElementInfo< dim >::level () const
    \n-
    534 {
    \n-
    535 return elInfo().level;
    \n-
    536 }
    \n-
    537
    \n-
    538
    \n-
    539 template< int dim >
    \n-
    540 inline int ElementInfo< dim >::type () const
    \n-
    541 {
    \n-
    542 return 0;
    \n-
    543 }
    \n-
    544
    \n-
    545
    \n-
    546 template<>
    \n-
    547 inline int ElementInfo< 3 >::type () const
    \n-
    548 {
    \n-
    549 return instance_->elInfo.el_type;
    \n-
    550 }
    \n-
    551
    \n-
    552
    \n-
    553 template< int dim >
    \n-
    554 inline int ElementInfo< dim >::getMark () const
    \n-
    555 {
    \n-
    556 return el()->mark;
    \n-
    557 }
    \n-
    558
    \n-
    559
    \n-
    560 template< int dim >
    \n-
    561 inline void ElementInfo< dim >::setMark ( int refCount ) const
    \n-
    562 {
    \n-
    563 assert( isLeaf() );
    \n-
    564 assert( (refCount >= -128) && (refCount < 127) );
    \n-
    565 el()->mark = refCount;
    \n-
    566 }
    \n-
    567
    \n-
    568
    \n-
    569 template< int dim >
    \n-
    570 inline bool ElementInfo< dim >::hasLeafNeighbor ( const int face ) const
    \n-
    571 {
    \n-
    572 assert( !!(*this) );
    \n-
    573 assert( (face >= 0) && (face < maxNeighbors) );
    \n-
    574
    \n-
    575 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n-
    576 const int macroFace = elInfo().macro_wall[ face ];
    \n-
    577 if( macroFace >= 0 )
    \n-
    578 return (macroElement().neighbor( macroFace ) != NULL);
    \n-
    579 else
    \n-
    580 return true;
    \n-
    581 }
    \n-
    582
    \n-
    583
    \n-
    584 template< int dim >
    \n-\n-
    586 {
    \n-
    587 assert( (face >= 0) && (face < numFaces) );
    \n-
    588 ElementInfo neighbor;
    \n-
    589 Library< dimWorld >::leafNeighbor( *this, face, neighbor );
    \n-
    590 return neighbor;
    \n-
    591 }
    \n-
    592
    \n-
    593
    \n-
    594 template< int dim >
    \n-
    595 inline int ElementInfo< dim >
    \n-
    596 ::levelNeighbors ( const int face, ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const
    \n-
    597 {
    \n-
    598 assert( (face >= 0) && (face < numFaces) );
    \n-
    599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor, faceInNeighbor );
    \n-
    600 }
    \n-
    601
    \n-
    602
    \n-
    603 template< int dim >
    \n-
    604 template< int codim >
    \n-
    605 inline int ElementInfo< dim >::twist ( int subEntity ) const
    \n-
    606 {
    \n-
    607 return Twist< dim, dim-codim >::twist( element(), subEntity );
    \n-
    608 }
    \n-
    609
    \n-
    610
    \n-
    611 template< int dim >
    \n-
    612 inline int ElementInfo< dim >::twistInNeighbor ( const int face ) const
    \n-
    613 {
    \n-
    614 assert( neighbor( face ) != NULL );
    \n-
    615 return Twist< dim, dim-1 >::twist( neighbor( face ), elInfo().opp_vertex[ face ] );
    \n-
    616 }
    \n-
    617
    \n-
    618
    \n-
    619 template< int dim >
    \n-
    620 inline bool ElementInfo< dim >::isBoundary ( int face ) const
    \n-
    621 {
    \n-
    622 assert( !!(*this) );
    \n-
    623 assert( (face >= 0) && (face < maxNeighbors) );
    \n-
    624
    \n-
    625 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n-
    626 const int macroFace = elInfo().macro_wall[ face ];
    \n-
    627 if( macroFace >= 0 )
    \n-
    628 return macroElement().isBoundary( macroFace );
    \n-
    629 else
    \n-
    630 return false;
    \n-
    631 }
    \n-
    632
    \n-
    633
    \n-
    634 template< int dim >
    \n-
    635 inline int ElementInfo< dim >::boundaryId ( int face ) const
    \n-
    636 {
    \n-
    637 assert( !!(*this) );
    \n-
    638 assert( (face >= 0) && (face < N_WALLS_MAX) );
    \n-
    639
    \n-
    640 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n-
    641 const int macroFace = elInfo().macro_wall[ face ];
    \n-
    642 const int id = macroElement().boundaryId( macroFace );
    \n-
    643 // this assertion is only allowed, if FILL_BOUND is set
    \n-
    644 // assert( id == elInfo().wall_bound[ face ] );
    \n-
    645 return id;
    \n-
    646 }
    \n-
    647
    \n-
    648
    \n-
    649 template< int dim >
    \n-
    650 inline AffineTransformation *
    \n-\n-
    652 {
    \n-
    653 assert( !!(*this) );
    \n-
    654 assert( (face >= 0) && (face < N_WALLS_MAX) );
    \n-
    655
    \n-
    656 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n-
    657 const int macroFace = elInfo().macro_wall[ face ];
    \n-
    658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]);
    \n-
    659 }
    \n-
    660
    \n-
    661
    \n-
    662 template< int dim >
    \n-
    663 inline BasicNodeProjection *
    \n-\n-
    665 {
    \n-
    666 assert( !!(*this) );
    \n-
    667 assert( (face >= 0) && (face < N_WALLS_MAX) );
    \n-
    668
    \n-
    669 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );
    \n-
    670 const int macroFace = elInfo().macro_wall[ face ];
    \n-
    671 if( macroFace >= 0 )
    \n-
    672 return static_cast< BasicNodeProjection * >( macroElement().projection[ macroFace+1 ] );
    \n-
    673 else
    \n-
    674 return 0;
    \n-
    675 }
    \n-
    676
    \n-
    677
    \n-
    678 template< int dim >
    \n-\n-
    680 {
    \n-
    681 return ((elInfo().fill_flag & FillFlags::coords) != 0);
    \n-
    682 }
    \n-
    683
    \n-
    684 template< int dim >
    \n-\n-
    686 {
    \n-
    687 assert( hasCoordinates() );
    \n-
    688 assert( (vertex >= 0) && (vertex < numVertices) );
    \n-
    689 return elInfo().coord[ vertex ];
    \n-
    690 }
    \n-
    691
    \n-
    692
    \n-
    693 template< int dim >
    \n-
    694 template< class Functor >
    \n-
    695 inline void ElementInfo< dim >::hierarchicTraverse ( Functor &functor ) const
    \n-
    696 {
    \n-
    697 functor( *this );
    \n-
    698 if( !isLeaf() )
    \n-
    699 {
    \n-
    700 child( 0 ).hierarchicTraverse( functor );
    \n-
    701 child( 1 ).hierarchicTraverse( functor );
    \n-
    702 }
    \n-
    703 }
    \n-
    704
    \n-
    705
    \n-
    706 template< int dim >
    \n-
    707 template< class Functor >
    \n-
    708 inline void ElementInfo< dim >::leafTraverse ( Functor &functor ) const
    \n-
    709 {
    \n-
    710 if( !isLeaf() )
    \n-
    711 {
    \n-
    712 child( 0 ).leafTraverse( functor );
    \n-
    713 child( 1 ).leafTraverse( functor );
    \n-
    714 }
    \n-
    715 else
    \n-
    716 functor( *this );
    \n-
    717 }
    \n-
    718
    \n-
    719
    \n-
    720 template< int dim >
    \n-\n-
    722 {
    \n-
    723 return elInfo().el;
    \n-
    724 }
    \n-
    725
    \n-
    726
    \n-
    727 template< int dim >
    \n-
    728 inline const Element *ElementInfo< dim >::neighbor ( int face ) const
    \n-
    729 {
    \n-
    730 assert( (face >= 0) && (face < numFaces) );
    \n-
    731 assert( (elInfo().fill_flag & FillFlags::neighbor) != 0 );
    \n-
    732 return elInfo().neigh[ face ];
    \n-
    733 }
    \n-
    734
    \n-
    735
    \n-
    736 template< int dim >
    \n-\n-
    738 {
    \n-
    739 return elInfo().el;
    \n-
    740 }
    \n-
    741
    \n-
    742
    \n-
    743 template< int dim >
    \n-
    744 inline ALBERTA EL_INFO &ElementInfo< dim >::elInfo () const
    \n-
    745 {
    \n-
    746 return (instance_->elInfo);
    \n-
    747 }
    \n-
    748
    \n-
    749
    \n-
    750 template< int dim >
    \n-
    751 inline ElementInfo< dim >
    \n-\n-
    753 const Element *element, int level, int type )
    \n-
    754 {
    \n-
    755 InstancePtr instance = stack().allocate();
    \n-
    756 instance->parent() = null();
    \n-
    757 ++(instance->parent()->refCount);
    \n-
    758
    \n-
    759 instance->elInfo.mesh = mesh;
    \n-
    760 instance->elInfo.macro_el = NULL;
    \n-
    761 instance->elInfo.el = const_cast< Element * >( element );
    \n-
    762 instance->elInfo.parent = NULL;
    \n-
    763 instance->elInfo.fill_flag = FillFlags::nothing;
    \n-
    764 instance->elInfo.level = level;
    \n-
    765 instance->elInfo.el_type = type;
    \n-
    766
    \n-
    767 return ElementInfo< dim >( instance );
    \n-
    768 }
    \n-
    769
    \n-
    770
    \n-
    771 template< int dim >
    \n-
    772 inline ElementInfo< dim >
    \n-
    773 ElementInfo< dim >::createFake ( const ALBERTA EL_INFO &elInfo )
    \n-
    774 {
    \n-
    775 InstancePtr instance = stack().allocate();
    \n-
    776 instance->parent() = null();
    \n-
    777 ++(instance->parent()->refCount);
    \n-
    778
    \n-
    779 instance->elInfo = elInfo;
    \n-
    780 return ElementInfo< dim >( instance );
    \n-
    781 }
    \n-
    782
    \n-
    783
    \n-
    784 template< int dim >
    \n-
    785 inline bool ElementInfo< dim >::isLeaf ( Element *element )
    \n-
    786 {
    \n-
    787 return IS_LEAF_EL( element );
    \n-
    788 }
    \n-
    789
    \n-
    790
    \n-
    791 template< int dim >
    \n-
    792 inline bool ElementInfo< dim >::mightVanish ( Alberta::Element *element, int depth )
    \n-
    793 {
    \n-
    794 if( isLeaf( element ) )
    \n-
    795 return (element->mark < depth);
    \n-
    796 else
    \n-
    797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish( element->child[ 1 ], depth-1 ));
    \n-
    798 }
    \n-
    799
    \n-
    800
    \n-
    801 template< int dim >
    \n-
    802 inline void ElementInfo< dim >
    \n-
    803 ::fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo )
    \n-
    804 {
    \n-
    805 ALBERTA fill_macro_info( mesh, mel, &elInfo );
    \n-
    806 }
    \n-
    807
    \n-
    808 template< int dim >
    \n-
    809 inline void ElementInfo< dim >
    \n-
    810 ::fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO &elInfo )
    \n-
    811 {
    \n-
    812 ALBERTA fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo );
    \n-
    813 }
    \n-
    814
    \n-
    815
    \n-
    816 template< int dim >
    \n-
    817 inline void ElementInfo< dim >::addReference () const
    \n-
    818 {
    \n-
    819 ++(instance_->refCount);
    \n-
    820 }
    \n-
    821
    \n-
    822
    \n-
    823 template< int dim >
    \n-
    824 inline void ElementInfo< dim >::removeReference () const
    \n-
    825 {
    \n-
    826 // short-circuit for rvalues that have been drained as argument to a move operation
    \n-
    827 if ( !instance_ )
    \n-
    828 return;
    \n-
    829 // this loop breaks when instance becomes null()
    \n-
    830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; )
    \n-
    831 {
    \n-
    832 const InstancePtr parent = instance->parent();
    \n-
    833 stack().release( instance );
    \n-
    834 instance = parent;
    \n-
    835 }
    \n-
    836 }
    \n-
    837
    \n-
    838
    \n-
    839 template< int dim >
    \n-
    840 inline typename ElementInfo< dim >::InstancePtr
    \n-
    841 ElementInfo< dim >::null ()
    \n-
    842 {
    \n-
    843 return stack().null();
    \n-
    844 }
    \n-
    845
    \n-
    846
    \n-
    847 template< int dim >
    \n-
    848 inline typename ElementInfo< dim >::Stack &
    \n-
    849 ElementInfo< dim >::stack ()
    \n-
    850 {
    \n-
    851 static Stack s;
    \n-
    852 return s;
    \n-
    853 }
    \n-
    854
    \n-
    855
    \n-
    856
    \n-
    857 // Implementation of ElementInfo::Stack
    \n-
    858 // ------------------------------------
    \n-
    859
    \n-
    860 template< int dim >
    \n-\n-
    862 : top_( 0 )
    \n-
    863 {
    \n-
    864 null_.elInfo.el = NULL;
    \n-
    865 null_.refCount = 1;
    \n-
    866 null_.parent() = 0;
    \n-
    867 }
    \n-
    868
    \n-
    869
    \n-
    870 template< int dim >
    \n-\n-
    872 {
    \n-
    873 while( top_ != 0 )
    \n-
    874 {
    \n-
    875 InstancePtr p = top_;
    \n-
    876 top_ = p->parent();
    \n-
    877 delete p;
    \n-
    878 }
    \n-
    879 }
    \n-
    880
    \n-
    881
    \n-
    882 template< int dim >
    \n-
    883 inline typename ElementInfo< dim >::InstancePtr
    \n-\n-
    885 {
    \n-
    886 InstancePtr p = top_;
    \n-
    887 if( p != 0 )
    \n-
    888 top_ = p->parent();
    \n-
    889 else
    \n-
    890 p = new Instance;
    \n-
    891 p->refCount = 0;
    \n-
    892 return p;
    \n-
    893 }
    \n-
    894
    \n-
    895
    \n-
    896 template< int dim >
    \n-\n-
    898 {
    \n-
    899 assert( (p != null()) && (p->refCount == 0) );
    \n-
    900 p->parent() = top_;
    \n-
    901 top_ = p;
    \n-
    902 }
    \n-
    903
    \n-
    904
    \n-
    905 template< int dim >
    \n-
    906 inline typename ElementInfo< dim >::InstancePtr
    \n-\n-
    908 {
    \n-
    909 return &null_;
    \n-
    910 }
    \n-
    911
    \n-
    912 } // namespace Alberta
    \n-
    913
    \n-
    914} // namespace Dune
    \n-
    915
    \n-
    916#endif // #if HAVE_ALBERTA
    \n-
    917
    \n-
    918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH
    \n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-\n-\n-
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n+
    91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH
    \n+\n+\n+
    @ Ghost_Partition
    only ghost entities
    Definition: gridenums.hh:142
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    ALBERTA MESH Mesh
    Definition: misc.hh:53
    \n-
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n-
    ALBERTA EL Element
    Definition: misc.hh:54
    \n-
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n-
    @ vertex
    Definition: common.hh:133
    \n-\n-
    Definition: elementinfo.hh:43
    \n-
    ElementInfo leafNeighbor(const int face) const
    Definition: elementinfo.hh:585
    \n-
    bool isLeaf() const
    Definition: elementinfo.hh:488
    \n-
    static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
    Definition: elementinfo.hh:752
    \n-
    ElementInfo child(int i) const
    Definition: elementinfo.hh:470
    \n-
    int level() const
    Definition: elementinfo.hh:533
    \n-
    bool mightVanish() const
    Definition: elementinfo.hh:526
    \n-
    static const int numFaces
    Definition: elementinfo.hh:56
    \n-
    int twist(int subEntity) const
    Definition: elementinfo.hh:605
    \n-
    int twistInNeighbor(int face) const
    Definition: elementinfo.hh:612
    \n-
    Alberta::MacroElement< dimension > MacroElement
    Definition: elementinfo.hh:58
    \n-
    BasicNodeProjection * boundaryProjection(int face) const
    Definition: elementinfo.hh:664
    \n-
    const MacroElement & macroElement() const
    Definition: elementinfo.hh:440
    \n-
    static const int maxLevelNeighbors
    Definition: elementinfo.hh:64
    \n-
    ElementInfo father() const
    Definition: elementinfo.hh:449
    \n-
    ElementInfo(const ElementInfo &other)
    Definition: elementinfo.hh:382
    \n-
    GeometryCacheProxy< dim > GeometryCache
    Definition: elementinfo.hh:67
    \n-
    ElementInfo & operator=(const ElementInfo &other)
    Definition: elementinfo.hh:405
    \n-
    bool hasLeafNeighbor(const int face) const
    Definition: elementinfo.hh:570
    \n-
    bool operator==(const ElementInfo &other) const
    Definition: elementinfo.hh:424
    \n-
    static const int dimension
    Definition: elementinfo.hh:53
    \n-
    void hierarchicTraverse(Functor &functor) const
    Definition: elementinfo.hh:695
    \n-
    int type() const
    Definition: elementinfo.hh:540
    \n-
    static const int maxNeighbors
    Definition: elementinfo.hh:62
    \n-
    void setMark(int refCount) const
    Definition: elementinfo.hh:561
    \n-
    ~ElementInfo()
    Definition: elementinfo.hh:397
    \n-
    const GlobalVector & coordinate(int vertex) const
    Definition: elementinfo.hh:685
    \n-
    static const int numVertices
    Definition: elementinfo.hh:55
    \n-
    int getMark() const
    Definition: elementinfo.hh:554
    \n-
    void leafTraverse(Functor &functor) const
    Definition: elementinfo.hh:708
    \n-
    Alberta::MeshPointer< dimension > MeshPointer
    Definition: elementinfo.hh:59
    \n-
    const Element * neighbor(int face) const
    Definition: elementinfo.hh:728
    \n-
    static ElementInfo createFake(const ALBERTA EL_INFO &elInfo)
    Definition: elementinfo.hh:773
    \n-
    ElementInfo()
    Definition: elementinfo.hh:310
    \n-
    int boundaryId(int face) const
    Definition: elementinfo.hh:635
    \n-
    bool operator!=(const ElementInfo &other) const
    Definition: elementinfo.hh:432
    \n-
    Alberta::FillFlags< dimension > FillFlags
    Definition: elementinfo.hh:60
    \n-
    ElementInfo(const MeshPointer &mesh, const MacroElement &macroElement, typename FillFlags::Flags fillFlags=FillFlags::standard)
    Definition: elementinfo.hh:319
    \n-
    AffineTransformation * transformation(int face) const
    Definition: elementinfo.hh:651
    \n-
    bool isBoundary(int face) const
    Definition: elementinfo.hh:620
    \n-
    int indexInFather() const
    Definition: elementinfo.hh:457
    \n-
    Seed seed() const
    Definition: elementinfo.hh:496
    \n-
    Element * el() const
    Definition: elementinfo.hh:737
    \n-
    const Element * element() const
    Definition: elementinfo.hh:721
    \n-
    ALBERTA EL_INFO & elInfo() const
    Definition: elementinfo.hh:744
    \n-
    MeshPointer mesh() const
    Definition: elementinfo.hh:519
    \n-
    GeometryCache geometryCache() const
    Definition: elementinfo.hh:140
    \n-
    bool hasCoordinates() const
    Definition: elementinfo.hh:679
    \n-
    int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors], int(&faceInNeighbor)[maxLevelNeighbors]) const
    Definition: elementinfo.hh:596
    \n-
    ElementInfo(ElementInfo &&other)
    Definition: elementinfo.hh:389
    \n-
    ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags::Flags fillFlags=FillFlags::standard)
    Definition: elementinfo.hh:340
    \n-
    Definition: elementinfo.hh:185
    \n-
    InstancePtr & parent()
    Definition: elementinfo.hh:189
    \n-
    Alberta::GeometryCache< dim > geometryCache
    Definition: elementinfo.hh:199
    \n-
    ALBERTA EL_INFO elInfo
    Definition: elementinfo.hh:186
    \n-
    unsigned int refCount
    Definition: elementinfo.hh:187
    \n-
    Definition: elementinfo.hh:210
    \n-
    InstancePtr null()
    Definition: elementinfo.hh:907
    \n-
    ~Stack()
    Definition: elementinfo.hh:871
    \n-
    void release(InstancePtr &p)
    Definition: elementinfo.hh:897
    \n-
    Stack()
    Definition: elementinfo.hh:861
    \n-
    InstancePtr allocate()
    Definition: elementinfo.hh:884
    \n-
    Definition: elementinfo.hh:255
    \n-
    Seed(const int macroIndex, const int level, const unsigned long path)
    Definition: elementinfo.hh:260
    \n-
    Seed()
    Definition: elementinfo.hh:256
    \n-
    int level() const
    Definition: elementinfo.hh:287
    \n-
    bool isValid() const
    Definition: elementinfo.hh:284
    \n-
    unsigned long path() const
    Definition: elementinfo.hh:288
    \n-
    int macroIndex() const
    Definition: elementinfo.hh:286
    \n-
    Definition: geometrycache.hh:24
    \n-
    Definition: geometrycache.hh:91
    \n-
    Definition: macroelement.hh:24
    \n-
    Definition: misc.hh:148
    \n-
    Definition: misc.hh:231
    \n-
    static const Flags nothing
    Definition: misc.hh:234
    \n-
    static const Flags boundaryId
    Definition: misc.hh:246
    \n-
    ALBERTA FLAGS Flags
    Definition: misc.hh:232
    \n-
    static const Flags coords
    Definition: misc.hh:236
    \n-
    static const Flags standard
    Definition: misc.hh:256
    \n-
    static const Flags neighbor
    Definition: misc.hh:238
    \n-
    static int twist(const Element *element, int subEntity)
    Definition: misc.hh:538
    \n-
    Definition: albertagrid/projection.hh:208
    \n+
    Definition: treeiterator.hh:189
    \n+
    GridImp::template Codim< codim >::Entity Entity
    Definition: treeiterator.hh:207
    \n+
    int level() const
    ask for level of entities
    Definition: treeiterator.hh:243
    \n+
    void increment()
    increment
    Definition: treeiterator.hh:411
    \n+
    const GridImp & grid() const
    obtain a reference to the grid
    Definition: treeiterator.hh:253
    \n+
    Definition: leafiterator.hh:23
    \n+
    Base::Entity Entity
    Definition: leafiterator.hh:28
    \n+
    AlbertaGridLeafIterator(const GridImp &grid, int level)
    Constructor making end iterator.
    Definition: leafiterator.hh:35
    \n+
    Base::MarkerVector MarkerVector
    Definition: leafiterator.hh:29
    \n+
    AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int level)
    Constructor making begin iterator.
    Definition: leafiterator.hh:40
    \n+
    AlbertaGridLeafIterator()
    Definition: leafiterator.hh:31
    \n+
    void increment()
    increment the iterator
    Definition: leafiterator.hh:47
    \n+\n+
    Base::Entity Entity
    Definition: leafiterator.hh:62
    \n+
    void increment()
    increment the iterator
    Definition: leafiterator.hh:81
    \n+
    AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level)
    Constructor making begin iterator (which is the end iterator in this case)
    Definition: leafiterator.hh:74
    \n+\n+
    Base::MarkerVector MarkerVector
    Definition: leafiterator.hh:63
    \n+
    AlbertaGridLeafIterator(const GridImp &grid, int level)
    Constructor making end iterator.
    Definition: leafiterator.hh:69
    \n+
    marker assigning subentities to one element containing them
    Definition: treeiterator.hh:35
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,1216 +5,177 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-elementinfo.hh\n+leafiterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_ELEMENTINFO_HH\n- 6#define DUNE_ALBERTA_ELEMENTINFO_HH\n+ 5#ifndef DUNE_ALBERTA_LEAFITERATOR_HH\n+ 6#define DUNE_ALBERTA_LEAFITERATOR_HH\n 7\n- 13#include \n- 14#include \n- 15#include \n+ 8#include \n+ 9\n+ 10#include \n+ 11\n+ 12#if HAVE_ALBERTA\n+ 13\n+ 14namespace Dune\n+ 15{\n 16\n- 17#include \n- 18#include \n+ 17 // AlbertaGridLeafIterator\n+ 18 // -----------------------\n 19\n- 20#if HAVE_ALBERTA\n- 21\n- 22namespace Dune\n- 23{\n- 24\n- 25 namespace Alberta\n- 26 {\n- 27\n- 28 // External Forward Declarations\n- 29 // -----------------------------\n+ 20 template< int codim, PartitionIteratorType pitype, class GridImp >\n+21 class AlbertaGridLeafIterator\n+ 22 : public AlbertaGridTreeIterator< codim, GridImp, true >\n+ 23 {\n+ 24 typedef AlbertaGridLeafIterator<_codim,_pitype,_GridImp_> This;\n+ 25 typedef AlbertaGridTreeIterator<_codim,_GridImp,_true_> Base;\n+ 26\n+ 27 public:\n+28 typedef typename Base::Entity Entity;\n+29 typedef typename Base::MarkerVector MarkerVector;\n 30\n- 31 template< int dim >\n- 32 class MeshPointer;\n+31 AlbertaGridLeafIterator ()\n+ 32 {}\n 33\n- 34 struct BasicNodeProjection;\n- 35\n- 36\n- 37\n- 38 // ElementInfo\n- 39 // -----------\n- 40\n- 41 template< int dim >\n-42 class ElementInfo\n- 43 {\n- 44 struct Instance;\n- 45 class Stack;\n- 46\n- 47 template< int >\n- 48 struct Library;\n- 49\n- 50 typedef Instance *InstancePtr;\n- 51\n- 52 public:\n-53 static const int dimension = dim;\n- 54\n-55 static const int numVertices = NumSubEntities<_dimension,_dimension_>::\n-value;\n-56 static const int numFaces = NumSubEntities<_dimension,_1_>::value;\n- 57\n-58 typedef Alberta::MacroElement<_dimension_> MacroElement;\n-59 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n-60 typedef Alberta::FillFlags<_dimension_> FillFlags;\n- 61\n-62 static const int maxNeighbors = N_NEIGH_MAX;\n- 63\n-64 static const int maxLevelNeighbors = Library< dimWorld >::maxLevelNeighbors;\n- 65\n- 66#if !DUNE_ALBERTA_CACHE_COORDINATES\n-67 typedef GeometryCacheProxy<_dim_> GeometryCache;\n- 68#endif\n- 69\n- 70 struct Seed;\n- 71\n- 72 private:\n- 73 explicit ElementInfo ( const InstancePtr &instance );\n- 74\n- 75 public:\n-76 ElementInfo ();\n-77 ElementInfo ( const MeshPointer &mesh, const MacroElement ¯oElement,\n- 78 typename FillFlags::Flags fillFlags = FillFlags::standard );\n-79 ElementInfo ( const MeshPointer &mesh, const Seed &seed,\n- 80 typename FillFlags::Flags fillFlags = FillFlags::standard );\n-81 ElementInfo ( const ElementInfo &other );\n-82 ElementInfo ( ElementInfo&& other );\n- 83\n-84 ~ElementInfo ();\n- 85\n-86 ElementInfo &operator=( const ElementInfo &other );\n-87 ElementInfo &operator=( ElementInfo &&other );\n+35 AlbertaGridLeafIterator ( const GridImp &grid, int level )\n+ 36 : Base( grid, level )\n+ 37 {}\n+ 38\n+40 AlbertaGridLeafIterator ( const GridImp &grid,\n+ 41 const MarkerVector *vec,\n+ 42 int level )\n+ 43 : Base( grid, vec, level )\n+ 44 {}\n+ 45\n+47 void increment ()\n+ 48 {\n+ 49 Base::increment();\n+ 50 }\n+ 51 };\n+ 52\n+ 53\n+ 54 template< int codim, class GridImp >\n+55 class AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >\n+ 56 : public AlbertaGridTreeIterator< codim, GridImp, true >\n+ 57 {\n+ 58 typedef AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_> This;\n+ 59 typedef AlbertaGridTreeIterator<_codim,_GridImp,_true_> Base;\n+ 60\n+ 61 public:\n+62 typedef typename Base::Entity Entity;\n+63 typedef typename Base::MarkerVector MarkerVector;\n+ 64\n+65 AlbertaGridLeafIterator ()\n+ 66 {}\n+ 67\n+69 AlbertaGridLeafIterator ( const GridImp &grid, int level )\n+ 70 : Base( grid, level )\n+ 71 {}\n+ 72\n+74 AlbertaGridLeafIterator ( const GridImp &grid,\n+ 75 const MarkerVector *,\n+ 76 int level )\n+ 77 : Base( grid, level )\n+ 78 {}\n+ 79\n+81 void increment ()\n+ 82 {\n+ 83 Base::increment();\n+ 84 }\n+ 85 };\n+ 86\n+ 87}\n 88\n-89 explicit operator bool () const { return (instance_ != null()); }\n+ 89#endif // #if HAVE_ALBERTA\n 90\n-91 bool operator==( const ElementInfo &other ) const;\n-92 bool operator!=( const ElementInfo &other ) const;\n- 93\n-94 const MacroElement ¯oElement () const;\n-95 ElementInfo father () const;\n-96 int indexInFather () const;\n-97 ElementInfo child ( int i ) const;\n-98 bool isLeaf () const;\n- 99\n-100 Seed seed () const;\n- 101\n-102 MeshPointer mesh () const;\n- 103\n-104 bool mightVanish () const;\n- 105\n-106 int level () const;\n- 107 // see ALBERTA documentation for definition of element type\n- 108 // values are 0, 1, 2\n-109 int type () const;\n- 110\n-111 int getMark () const;\n-112 void setMark ( int refCount ) const;\n- 113\n-114 bool hasLeafNeighbor ( const int face ) const;\n-115 ElementInfo leafNeighbor ( const int face ) const;\n- 116\n- 117 /* obtain all level neighbors of a face\n- 118 *\n- 119 * param[in] face face for which the neighbors are desired\n- 120 * param[out] neighbor array storing the neighbors\n- 121 * param[out] faceInNeighbor array storing the faces in neighbor\n- 122 * (-1, if this neighbor does not exist)\n- 123 *\n- 124 * returns (potential) number of neighbors (i.e., the number of valid\n- 125 * entries in the output arrays\n- 126 */\n-127 int levelNeighbors ( const int face, ElementInfo (&neighbor)\n-[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const;\n- 128\n- 129 template< int codim >\n-130 int twist ( int subEntity ) const;\n-131 int twistInNeighbor ( int face ) const;\n-132 bool isBoundary ( int face ) const;\n-133 int boundaryId ( int face ) const;\n-134 AffineTransformation *transformation ( int face ) const;\n-135 BasicNodeProjection *boundaryProjection ( int face ) const;\n- 136\n-137 bool hasCoordinates () const;\n-138 const GlobalVector &coordinate ( int vertex ) const;\n- 139#if !DUNE_ALBERTA_CACHE_COORDINATES\n-140 GeometryCache geometryCache () const\n- 141 {\n- 142 return GeometryCache( instance_->geometryCache, instance_->elInfo );\n- 143 }\n- 144#endif\n- 145\n- 146 template< class Functor >\n-147 void hierarchicTraverse ( Functor &functor ) const;\n- 148\n- 149 template< class Functor >\n-150 void leafTraverse ( Functor &functor ) const;\n- 151\n-152 const Element *element () const;\n-153 const Element *neighbor ( int face ) const;\n-154 Element *el () const;\n-155 ALBERTA EL_INFO &elInfo () const;\n- 156\n- 157 static ElementInfo\n-158 createFake ( const MeshPointer &mesh,\n- 159 const Element *element, int level, int type = 0 );\n-160 static ElementInfo createFake ( const ALBERTA EL_INFO &elInfo );\n- 161\n- 162 private:\n- 163 static bool isLeaf ( Element *element );\n- 164 static bool mightVanish ( Element *element, int depth );\n- 165\n- 166 static void fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA\n-EL_INFO &elInfo );\n- 167 static void fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA\n-EL_INFO &elInfo );\n- 168\n- 169 void addReference () const;\n- 170 void removeReference () const;\n- 171\n- 172 static InstancePtr null ();\n- 173 static Stack &stack ();\n- 174\n- 175 InstancePtr instance_;\n- 176 };\n- 177\n- 178\n- 179\n- 180 // ElementInfo::Instance\n- 181 // ---------------------\n- 182\n- 183 template< int dim >\n-184 struct ElementInfo< dim >::Instance\n- 185 {\n-186 ALBERTA EL_INFO elInfo;\n-187 unsigned int refCount;\n- 188\n-189 InstancePtr &parent ()\n- 190 {\n- 191 return parent_;\n- 192 }\n- 193\n- 194 private:\n- 195 InstancePtr parent_;\n- 196\n- 197#if !DUNE_ALBERTA_CACHE_COORDINATES\n- 198 public:\n-199 Alberta::GeometryCache<_dim_> geometryCache;\n- 200#endif\n- 201 };\n- 202\n- 203\n- 204\n- 205 // ElementInfo::Stack\n- 206 // ------------------\n- 207\n- 208 template< int dim >\n-209 class ElementInfo< dim >::Stack\n- 210 {\n- 211 InstancePtr top_;\n- 212 Instance null_;\n- 213\n- 214 public:\n-215 Stack ();\n-216 ~Stack ();\n- 217\n-218 InstancePtr allocate ();\n-219 void release ( InstancePtr &p );\n-220 InstancePtr null ();\n- 221 };\n- 222\n- 223\n- 224\n- 225 // ElementInfo::Library\n- 226 // --------------------\n- 227\n- 228 template< int dim >\n- 229 template< int >\n- 230 struct ElementInfo< dim >::Library\n- 231 {\n- 232 typedef Alberta::ElementInfo<_dim_> ElementInfo;\n- 233\n- 234 static const int maxLevelNeighbors = (1 << (dim-1));\n- 235\n- 236 static int\n- 237 leafNeighbor ( const ElementInfo &element, const int face, ElementInfo\n-&neighbor );\n- 238\n- 239 static int\n- 240 levelNeighbors ( const ElementInfo &element, const int face,\n- 241 ElementInfo (&neighbor)[ maxLevelNeighbors ], int (&faceInNeighbor)\n-[ maxLevelNeighbors ] );\n- 242\n- 243 private:\n- 244 static int\n- 245 macroNeighbor ( const ElementInfo &element, const int face, ElementInfo\n-&neighbor );\n- 246 };\n- 247\n- 248\n- 249\n- 250 // ElementInfo::Seed\n- 251 // -----------------\n- 252\n- 253 template< int dim >\n-254 struct ElementInfo< dim >::Seed\n- 255 {\n-256 Seed ()\n- 257 : macroIndex_( -1 ), level_( 0 ), path_( 0 )\n- 258 {}\n- 259\n-260 Seed ( const int macroIndex, const int level, const unsigned long path )\n- 261 : macroIndex_( macroIndex ), level_( level ), path_( path )\n- 262 {}\n- 263\n-264 bool operator==( const Seed &other ) const\n- 265 {\n- 266 return (macroIndex() == other.macroIndex()) && (level() == other.level())\n-&& (path() == other.path());\n- 267 }\n- 268\n-269 bool operator< ( const Seed &other ) const\n- 270 {\n- 271 const bool ml = (macroIndex() < other.macroIndex());\n- 272 const bool me = (macroIndex() == other.macroIndex());\n- 273 const bool ll = (level() < other.level());\n- 274 const bool le = (level() == other.level());\n- 275 const bool pl = (path() < other.path());\n- 276 return ml | (me & (ll | (le & pl)));\n- 277 }\n- 278\n-279 bool operator!=( const Seed &other ) const { return !(*this == other); }\n-280 bool operator<= ( const Seed &other ) const { return !(other < *this); }\n-281 bool operator> ( const Seed &other ) const { return (other < *this); }\n-282 bool operator>= ( const Seed &other ) const { return !(*this < other); }\n- 283\n-284 bool isValid ( ) const { return macroIndex_ != -1; }\n- 285\n-286 int macroIndex () const { return macroIndex_; }\n-287 int level () const { return level_; }\n-288 unsigned long path () const { return path_; }\n- 289\n- 290 private:\n- 291 int macroIndex_;\n- 292 int level_;\n- 293 unsigned long path_;\n- 294 };\n- 295\n- 296\n- 297\n- 298 // Implementation of ElementInfo\n- 299 // -----------------------------\n- 300\n- 301 template< int dim >\n- 302 inline ElementInfo<_dim_>::ElementInfo ( const InstancePtr &instance )\n- 303 : instance_( instance )\n- 304 {\n- 305 addReference();\n- 306 }\n- 307\n- 308\n- 309 template< int dim >\n-310 inline ElementInfo<_dim_>::ElementInfo ()\n- 311 : instance_( null() )\n- 312 {\n- 313 addReference();\n- 314 }\n- 315\n- 316\n- 317 template< int dim >\n- 318 inline ElementInfo<_dim_>\n-319::ElementInfo ( const MeshPointer &mesh, const MacroElement ¯oElement,\n- 320 typename FillFlags::Flags fillFlags )\n- 321 {\n- 322 instance_ = stack().allocate();\n- 323 instance_->parent() = null();\n- 324 ++(instance_->parent()->refCount);\n- 325\n- 326 addReference();\n- 327\n- 328 elInfo().fill_flag = fillFlags;\n- 329\n- 330 // Alberta fills opp_vertex only if there is a neighbor\n- 331 for( int k = 0; k < maxNeighbors; ++k )\n- 332 elInfo().opp_vertex[ k ] = -1;\n- 333\n- 334 fill( mesh, ¯oElement, elInfo() );\n- 335 }\n- 336\n- 337\n- 338 template< int dim >\n- 339 inline ElementInfo<_dim_>\n-340::ElementInfo ( const MeshPointer &mesh, const Seed &seed,\n- 341 typename FillFlags::Flags fillFlags )\n- 342 {\n- 343 instance_ = stack().allocate();\n- 344 instance_->parent() = null();\n- 345 ++(instance_->parent()->refCount);\n- 346\n- 347 addReference();\n- 348\n- 349 // fill in macro element info\n- 350 elInfo().fill_flag = fillFlags;\n- 351\n- 352 // Alberta fills opp_vertex only if there is a neighbor\n- 353 for( int k = 0; k < maxNeighbors; ++k )\n- 354 elInfo().opp_vertex[ k ] = -1;\n- 355\n- 356 fill( mesh, ((Mesh *)mesh)->macro_els + seed.macroIndex(), elInfo() );\n- 357\n- 358 // traverse the seed's path\n- 359 unsigned long path = seed.path();\n- 360 for( int i = 0; i < seed.level(); ++i )\n- 361 {\n- 362 InstancePtr child = stack().allocate();\n- 363 child->parent() = instance_;\n- 364\n- 365 // Alberta fills opp_vertex only if there is a neighbor\n- 366 for( int k = 0; k < maxNeighbors; ++k )\n- 367 child->elInfo.opp_vertex[ k ] = -2;\n- 368\n- 369 fill( path & 1, elInfo(), child->elInfo );\n- 370\n- 371 instance_ = child;\n- 372 addReference();\n- 373\n- 374 path = path >> 1;\n- 375 }\n- 376\n- 377 assert( this->seed() == seed );\n- 378 }\n- 379\n- 380\n- 381 template< int dim >\n-382 inline ElementInfo<_dim_>::ElementInfo ( const ElementInfo &other )\n- 383 : instance_( other.instance_ )\n- 384 {\n- 385 addReference();\n- 386 }\n- 387\n- 388 template< int dim >\n-389 inline ElementInfo<_dim_>::ElementInfo ( ElementInfo &&other )\n- 390 : instance_( NULL )\n- 391 {\n- 392 using std::swap;\n- 393 swap( instance_, other.instance_ );\n- 394 }\n- 395\n- 396 template< int dim >\n-397 inline ElementInfo<_dim_>::~ElementInfo ()\n- 398 {\n- 399 removeReference();\n- 400 }\n- 401\n- 402\n- 403 template< int dim >\n- 404 inline ElementInfo<_dim_> &\n-405 ElementInfo<_dim_>::operator=( const ElementInfo<_dim_> &other )\n- 406 {\n- 407 other.addReference();\n- 408 removeReference();\n- 409 instance_ = other.instance_;\n- 410 return *this;\n- 411 }\n- 412\n- 413 template< int dim >\n- 414 inline ElementInfo<_dim_> &\n-415 ElementInfo<_dim_>::operator=( ElementInfo<_dim_> &&other )\n- 416 {\n- 417 using std::swap;\n- 418 swap( instance_, other.instance_ );\n- 419 return *this;\n- 420 }\n- 421\n- 422 template< int dim >\n- 423 inline bool\n-424 ElementInfo<_dim_>::operator==( const ElementInfo<_dim_> &other ) const\n- 425 {\n- 426 return (instance_->elInfo.el == other.instance_->elInfo.el);\n- 427 }\n- 428\n- 429\n- 430 template< int dim >\n- 431 inline bool\n-432 ElementInfo<_dim_>::operator!=( const ElementInfo<_dim_> &other ) const\n- 433 {\n- 434 return (instance_->elInfo.el != other.instance_->elInfo.el);\n- 435 }\n- 436\n- 437\n- 438 template< int dim >\n- 439 inline const typename ElementInfo<_dim_>::MacroElement &\n-440 ElementInfo<_dim_>::macroElement () const\n- 441 {\n- 442 assert( !!(*this) );\n- 443 assert( elInfo().macro_el != NULL );\n- 444 return static_cast< const MacroElement & >( *(elInfo().macro_el) );\n- 445 }\n- 446\n- 447\n- 448 template< int dim >\n-449 inline ElementInfo<_dim_> ElementInfo<_dim_>::father () const\n- 450 {\n- 451 assert( !!(*this) );\n- 452 return ElementInfo<_dim_>( instance_->parent() );\n- 453 }\n- 454\n- 455\n- 456 template< int dim >\n-457 inline int ElementInfo<_dim_>::indexInFather () const\n- 458 {\n- 459 const Element *element = elInfo().el;\n- 460 const Element *father = elInfo().parent->el;\n- 461 assert( father != NULL );\n- 462\n- 463 const int index = (father->child[ 0 ] == element ? 0 : 1);\n- 464 assert( father->child[ index ] == element );\n- 465 return index;\n- 466 }\n- 467\n- 468\n- 469 template< int dim >\n-470 inline ElementInfo<_dim_> ElementInfo<_dim_>::child ( int i ) const\n- 471 {\n- 472 assert( !isLeaf() );\n- 473\n- 474 InstancePtr child = stack().allocate();\n- 475 child->parent() = instance_;\n- 476 addReference();\n- 477\n- 478 // Alberta fills opp_vertex only if there is a neighbor\n- 479 for( int k = 0; k < maxNeighbors; ++k )\n- 480 child->elInfo.opp_vertex[ k ] = -2;\n- 481\n- 482 fill( i, elInfo(), child->elInfo );\n- 483 return ElementInfo<_dim_>( child );\n- 484 }\n- 485\n- 486\n- 487 template< int dim >\n-488 inline bool ElementInfo<_dim_>::isLeaf () const\n- 489 {\n- 490 assert( !(*this) == false );\n- 491 return isLeaf( el() );\n- 492 }\n- 493\n- 494\n- 495 template< int dim >\n-496 inline typename ElementInfo<_dim_>::Seed ElementInfo<_dim_>::seed () const\n- 497 {\n- 498 assert( !!(*this) );\n- 499\n- 500 int level = 0;\n- 501 unsigned long path = 0;\n- 502 for( InstancePtr p = instance_; p->parent() != null(); p = p->parent() )\n- 503 {\n- 504 const Element *element = p->elInfo.el;\n- 505 const Element *father = p->parent()->elInfo.el;\n- 506 const unsigned long child = static_cast< unsigned long >( father->child[ 1\n-] == element );\n- 507 path = (path << 1) | child;\n- 508 ++level;\n- 509 }\n- 510\n- 511 if( level != elInfo().level )\n- 512 DUNE_THROW( NotImplemented, \"Seed for fake elements not implemented.\" );\n- 513\n- 514 return Seed( macroElement().index, level, path );\n- 515 }\n- 516\n- 517\n- 518 template< int dim >\n-519 inline typename ElementInfo<_dim_>::MeshPointer ElementInfo<_dim_>::mesh ()\n-const\n- 520 {\n- 521 return MeshPointer( elInfo().mesh );\n- 522 }\n- 523\n- 524\n- 525 template< int dim >\n-526 inline bool ElementInfo<_dim_>::mightVanish () const\n- 527 {\n- 528 return mightVanish( el(), 0 );\n- 529 }\n- 530\n- 531\n- 532 template< int dim >\n-533 inline int ElementInfo<_dim_>::level () const\n- 534 {\n- 535 return elInfo().level;\n- 536 }\n- 537\n- 538\n- 539 template< int dim >\n-540 inline int ElementInfo<_dim_>::type () const\n- 541 {\n- 542 return 0;\n- 543 }\n- 544\n- 545\n- 546 template<>\n-547 inline int ElementInfo<_3_>::type () const\n- 548 {\n- 549 return instance_->elInfo.el_type;\n- 550 }\n- 551\n- 552\n- 553 template< int dim >\n-554 inline int ElementInfo<_dim_>::getMark () const\n- 555 {\n- 556 return el()->mark;\n- 557 }\n- 558\n- 559\n- 560 template< int dim >\n-561 inline void ElementInfo<_dim_>::setMark ( int refCount ) const\n- 562 {\n- 563 assert( isLeaf() );\n- 564 assert( (refCount >= -128) && (refCount < 127) );\n- 565 el()->mark = refCount;\n- 566 }\n- 567\n- 568\n- 569 template< int dim >\n-570 inline bool ElementInfo<_dim_>::hasLeafNeighbor ( const int face ) const\n- 571 {\n- 572 assert( !!(*this) );\n- 573 assert( (face >= 0) && (face < maxNeighbors) );\n- 574\n- 575 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n- 576 const int macroFace = elInfo().macro_wall[ face ];\n- 577 if( macroFace >= 0 )\n- 578 return (macroElement().neighbor( macroFace ) != NULL);\n- 579 else\n- 580 return true;\n- 581 }\n- 582\n- 583\n- 584 template< int dim >\n-585 inline ElementInfo<_dim_> ElementInfo<_dim_>::leafNeighbor ( const int face\n-) const\n- 586 {\n- 587 assert( (face >= 0) && (face < numFaces) );\n- 588 ElementInfo neighbor;\n- 589 Library< dimWorld >::leafNeighbor( *this, face, neighbor );\n- 590 return neighbor;\n- 591 }\n- 592\n- 593\n- 594 template< int dim >\n- 595 inline int ElementInfo<_dim_>\n-596::levelNeighbors ( const int face, ElementInfo (&neighbor)\n-[ maxLevelNeighbors ], int (&faceInNeighbor)[ maxLevelNeighbors ] ) const\n- 597 {\n- 598 assert( (face >= 0) && (face < numFaces) );\n- 599 return Library< dimWorld >::levelNeighbors( *this, face, neighbor,\n-faceInNeighbor );\n- 600 }\n- 601\n- 602\n- 603 template< int dim >\n- 604 template< int codim >\n-605 inline int ElementInfo<_dim_>::twist ( int subEntity ) const\n- 606 {\n- 607 return Twist<_dim,_dim-codim_>::twist( element(), subEntity );\n- 608 }\n- 609\n- 610\n- 611 template< int dim >\n-612 inline int ElementInfo<_dim_>::twistInNeighbor ( const int face ) const\n- 613 {\n- 614 assert( neighbor( face ) != NULL );\n- 615 return Twist<_dim,_dim-1_>::twist( neighbor( face ), elInfo().opp_vertex\n-[ face ] );\n- 616 }\n- 617\n- 618\n- 619 template< int dim >\n-620 inline bool ElementInfo<_dim_>::isBoundary ( int face ) const\n- 621 {\n- 622 assert( !!(*this) );\n- 623 assert( (face >= 0) && (face < maxNeighbors) );\n- 624\n- 625 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n- 626 const int macroFace = elInfo().macro_wall[ face ];\n- 627 if( macroFace >= 0 )\n- 628 return macroElement().isBoundary( macroFace );\n- 629 else\n- 630 return false;\n- 631 }\n- 632\n- 633\n- 634 template< int dim >\n-635 inline int ElementInfo<_dim_>::boundaryId ( int face ) const\n- 636 {\n- 637 assert( !!(*this) );\n- 638 assert( (face >= 0) && (face < N_WALLS_MAX) );\n- 639\n- 640 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n- 641 const int macroFace = elInfo().macro_wall[ face ];\n- 642 const int id = macroElement().boundaryId( macroFace );\n- 643 // this assertion is only allowed, if FILL_BOUND is set\n- 644 // assert( id == elInfo().wall_bound[ face ] );\n- 645 return id;\n- 646 }\n- 647\n- 648\n- 649 template< int dim >\n- 650 inline AffineTransformation *\n-651 ElementInfo<_dim_>::transformation ( int face ) const\n- 652 {\n- 653 assert( !!(*this) );\n- 654 assert( (face >= 0) && (face < N_WALLS_MAX) );\n- 655\n- 656 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n- 657 const int macroFace = elInfo().macro_wall[ face ];\n- 658 return (macroFace < 0 ? NULL : macroElement().wall_trafo[ macroFace ]);\n- 659 }\n- 660\n- 661\n- 662 template< int dim >\n- 663 inline BasicNodeProjection *\n-664 ElementInfo<_dim_>::boundaryProjection ( int face ) const\n- 665 {\n- 666 assert( !!(*this) );\n- 667 assert( (face >= 0) && (face < N_WALLS_MAX) );\n- 668\n- 669 assert( (elInfo().fill_flag & FillFlags::boundaryId) != 0 );\n- 670 const int macroFace = elInfo().macro_wall[ face ];\n- 671 if( macroFace >= 0 )\n- 672 return static_cast< BasicNodeProjection * >( macroElement().projection\n-[ macroFace+1 ] );\n- 673 else\n- 674 return 0;\n- 675 }\n- 676\n- 677\n- 678 template< int dim >\n-679 inline bool ElementInfo<_dim_>::hasCoordinates () const\n- 680 {\n- 681 return ((elInfo().fill_flag & FillFlags::coords) != 0);\n- 682 }\n- 683\n- 684 template< int dim >\n-685 inline const GlobalVector &ElementInfo<_dim_>::coordinate ( int vertex )\n-const\n- 686 {\n- 687 assert( hasCoordinates() );\n- 688 assert( (vertex >= 0) && (vertex < numVertices) );\n- 689 return elInfo().coord[ vertex ];\n- 690 }\n- 691\n- 692\n- 693 template< int dim >\n- 694 template< class Functor >\n-695 inline void ElementInfo<_dim_>::hierarchicTraverse ( Functor &functor )\n-const\n- 696 {\n- 697 functor( *this );\n- 698 if( !isLeaf() )\n- 699 {\n- 700 child( 0 ).hierarchicTraverse( functor );\n- 701 child( 1 ).hierarchicTraverse( functor );\n- 702 }\n- 703 }\n- 704\n- 705\n- 706 template< int dim >\n- 707 template< class Functor >\n-708 inline void ElementInfo<_dim_>::leafTraverse ( Functor &functor ) const\n- 709 {\n- 710 if( !isLeaf() )\n- 711 {\n- 712 child( 0 ).leafTraverse( functor );\n- 713 child( 1 ).leafTraverse( functor );\n- 714 }\n- 715 else\n- 716 functor( *this );\n- 717 }\n- 718\n- 719\n- 720 template< int dim >\n-721 inline const Element *ElementInfo<_dim_>::element () const\n- 722 {\n- 723 return elInfo().el;\n- 724 }\n- 725\n- 726\n- 727 template< int dim >\n-728 inline const Element *ElementInfo<_dim_>::neighbor ( int face ) const\n- 729 {\n- 730 assert( (face >= 0) && (face < numFaces) );\n- 731 assert( (elInfo().fill_flag & FillFlags::neighbor) != 0 );\n- 732 return elInfo().neigh[ face ];\n- 733 }\n- 734\n- 735\n- 736 template< int dim >\n-737 inline Element *ElementInfo<_dim_>::el () const\n- 738 {\n- 739 return elInfo().el;\n- 740 }\n- 741\n- 742\n- 743 template< int dim >\n-744 inline ALBERTA EL_INFO &ElementInfo<_dim_>::elInfo () const\n- 745 {\n- 746 return (instance_->elInfo);\n- 747 }\n- 748\n- 749\n- 750 template< int dim >\n- 751 inline ElementInfo<_dim_>\n-752 ElementInfo<_dim_>::createFake ( const MeshPointer &mesh,\n- 753 const Element *element, int level, int type )\n- 754 {\n- 755 InstancePtr instance = stack().allocate();\n- 756 instance->parent() = null();\n- 757 ++(instance->parent()->refCount);\n- 758\n- 759 instance->elInfo.mesh = mesh;\n- 760 instance->elInfo.macro_el = NULL;\n- 761 instance->elInfo.el = const_cast< Element * >( element );\n- 762 instance->elInfo.parent = NULL;\n- 763 instance->elInfo.fill_flag = FillFlags::nothing;\n- 764 instance->elInfo.level = level;\n- 765 instance->elInfo.el_type = type;\n- 766\n- 767 return ElementInfo<_dim_>( instance );\n- 768 }\n- 769\n- 770\n- 771 template< int dim >\n- 772 inline ElementInfo<_dim_>\n-773 ElementInfo<_dim_>::createFake ( const ALBERTA EL_INFO &elInfo )\n- 774 {\n- 775 InstancePtr instance = stack().allocate();\n- 776 instance->parent() = null();\n- 777 ++(instance->parent()->refCount);\n- 778\n- 779 instance->elInfo = elInfo;\n- 780 return ElementInfo<_dim_>( instance );\n- 781 }\n- 782\n- 783\n- 784 template< int dim >\n- 785 inline bool ElementInfo<_dim_>::isLeaf ( Element *element )\n- 786 {\n- 787 return IS_LEAF_EL( element );\n- 788 }\n- 789\n- 790\n- 791 template< int dim >\n- 792 inline bool ElementInfo<_dim_>::mightVanish ( Alberta::Element *element,\n-int depth )\n- 793 {\n- 794 if( isLeaf( element ) )\n- 795 return (element->mark < depth);\n- 796 else\n- 797 return (mightVanish( element->child[ 0 ], depth-1 ) && mightVanish\n-( element->child[ 1 ], depth-1 ));\n- 798 }\n- 799\n- 800\n- 801 template< int dim >\n- 802 inline void ElementInfo< dim >\n- 803 ::fill ( Mesh *mesh, const ALBERTA MACRO_EL *mel, ALBERTA EL_INFO &elInfo\n-)\n- 804 {\n- 805 ALBERTA fill_macro_info( mesh, mel, &elInfo );\n- 806 }\n- 807\n- 808 template< int dim >\n- 809 inline void ElementInfo< dim >\n- 810 ::fill ( int ichild, const ALBERTA EL_INFO &parentInfo, ALBERTA EL_INFO\n-&elInfo )\n- 811 {\n- 812 ALBERTA fill_elinfo( ichild, FILL_ANY, &parentInfo, &elInfo );\n- 813 }\n- 814\n- 815\n- 816 template< int dim >\n- 817 inline void ElementInfo< dim >::addReference () const\n- 818 {\n- 819 ++(instance_->refCount);\n- 820 }\n- 821\n- 822\n- 823 template< int dim >\n- 824 inline void ElementInfo< dim >::removeReference () const\n- 825 {\n- 826 // short-circuit for rvalues that have been drained as argument to a move\n-operation\n- 827 if ( !instance_ )\n- 828 return;\n- 829 // this loop breaks when instance becomes null()\n- 830 for( InstancePtr instance = instance_; --(instance->refCount) == 0; )\n- 831 {\n- 832 const InstancePtr parent = instance->parent();\n- 833 stack().release( instance );\n- 834 instance = parent;\n- 835 }\n- 836 }\n- 837\n- 838\n- 839 template< int dim >\n- 840 inline typename ElementInfo< dim >::InstancePtr\n- 841 ElementInfo< dim >::null ()\n- 842 {\n- 843 return stack().null();\n- 844 }\n- 845\n- 846\n- 847 template< int dim >\n- 848 inline typename ElementInfo< dim >::Stack &\n- 849 ElementInfo< dim >::stack ()\n- 850 {\n- 851 static Stack s;\n- 852 return s;\n- 853 }\n- 854\n- 855\n- 856\n- 857 // Implementation of ElementInfo::Stack\n- 858 // ------------------------------------\n- 859\n- 860 template< int dim >\n-861 inline ElementInfo<_dim_>::Stack::Stack ()\n- 862 : top_( 0 )\n- 863 {\n- 864 null_.elInfo.el = NULL;\n- 865 null_.refCount = 1;\n- 866 null_.parent() = 0;\n- 867 }\n- 868\n- 869\n- 870 template< int dim >\n-871 inline ElementInfo<_dim_>::Stack::~Stack ()\n- 872 {\n- 873 while( top_ != 0 )\n- 874 {\n- 875 InstancePtr p = top_;\n- 876 top_ = p->parent();\n- 877 delete p;\n- 878 }\n- 879 }\n- 880\n- 881\n- 882 template< int dim >\n- 883 inline typename ElementInfo<_dim_>::InstancePtr\n-884 ElementInfo<_dim_>::Stack::allocate ()\n- 885 {\n- 886 InstancePtr p = top_;\n- 887 if( p != 0 )\n- 888 top_ = p->parent();\n- 889 else\n- 890 p = new Instance;\n- 891 p->refCount = 0;\n- 892 return p;\n- 893 }\n- 894\n- 895\n- 896 template< int dim >\n-897 inline void ElementInfo<_dim_>::Stack::release ( InstancePtr &p )\n- 898 {\n- 899 assert( (p != null()) && (p->refCount == 0) );\n- 900 p->parent() = top_;\n- 901 top_ = p;\n- 902 }\n- 903\n- 904\n- 905 template< int dim >\n- 906 inline typename ElementInfo<_dim_>::InstancePtr\n-907 ElementInfo<_dim_>::Stack::null ()\n- 908 {\n- 909 return &null_;\n- 910 }\n- 911\n- 912 } // namespace Alberta\n- 913\n- 914} // namespace Dune\n- 915\n- 916#endif // #if HAVE_ALBERTA\n- 917\n- 918#endif // #ifndef DUNE_ALBERTA_ELEMENTINFO_HH\n-ALBERTA\n-#define ALBERTA\n-Definition: albertaheader.hh:29\n-macroelement.hh\n-geometrycache.hh\n-std::swap\n-void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n-> &b)\n-Definition: utility/persistentcontainer.hh:83\n+ 91#endif // #ifndef DUNE_ALBERTA_LEAFITERATOR_HH\n+entityiterator.hh\n+treeiterator.hh\n+Dune::Ghost_Partition\n+@ Ghost_Partition\n+only ghost entities\n+Definition: gridenums.hh:142\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::Mesh\n-ALBERTA MESH Mesh\n-Definition: misc.hh:53\n-Dune::Alberta::AffineTransformation\n-ALBERTA AFF_TRAFO AffineTransformation\n-Definition: misc.hh:52\n-Dune::Alberta::Element\n-ALBERTA EL Element\n-Definition: misc.hh:54\n-Dune::Alberta::GlobalVector\n-ALBERTA REAL_D GlobalVector\n-Definition: misc.hh:50\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n-Dune::Alberta::MeshPointer<_dimension_>\n-Dune::Alberta::ElementInfo\n-Definition: elementinfo.hh:43\n-Dune::Alberta::ElementInfo::leafNeighbor\n-ElementInfo leafNeighbor(const int face) const\n-Definition: elementinfo.hh:585\n-Dune::Alberta::ElementInfo::isLeaf\n-bool isLeaf() const\n-Definition: elementinfo.hh:488\n-Dune::Alberta::ElementInfo::createFake\n-static ElementInfo createFake(const MeshPointer &mesh, const Element *element,\n-int level, int type=0)\n-Definition: elementinfo.hh:752\n-Dune::Alberta::ElementInfo::child\n-ElementInfo child(int i) const\n-Definition: elementinfo.hh:470\n-Dune::Alberta::ElementInfo::level\n+Dune::AlbertaGridTreeIterator\n+Definition: treeiterator.hh:189\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_true_>::Entity\n+GridImp::template Codim< codim >::Entity Entity\n+Definition: treeiterator.hh:207\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_true_>::level\n int level() const\n-Definition: elementinfo.hh:533\n-Dune::Alberta::ElementInfo::mightVanish\n-bool mightVanish() const\n-Definition: elementinfo.hh:526\n-Dune::Alberta::ElementInfo::numFaces\n-static const int numFaces\n-Definition: elementinfo.hh:56\n-Dune::Alberta::ElementInfo::twist\n-int twist(int subEntity) const\n-Definition: elementinfo.hh:605\n-Dune::Alberta::ElementInfo::twistInNeighbor\n-int twistInNeighbor(int face) const\n-Definition: elementinfo.hh:612\n-Dune::Alberta::ElementInfo::MacroElement\n-Alberta::MacroElement< dimension > MacroElement\n-Definition: elementinfo.hh:58\n-Dune::Alberta::ElementInfo::boundaryProjection\n-BasicNodeProjection * boundaryProjection(int face) const\n-Definition: elementinfo.hh:664\n-Dune::Alberta::ElementInfo::macroElement\n-const MacroElement & macroElement() const\n-Definition: elementinfo.hh:440\n-Dune::Alberta::ElementInfo::maxLevelNeighbors\n-static const int maxLevelNeighbors\n-Definition: elementinfo.hh:64\n-Dune::Alberta::ElementInfo::father\n-ElementInfo father() const\n-Definition: elementinfo.hh:449\n-Dune::Alberta::ElementInfo::ElementInfo\n-ElementInfo(const ElementInfo &other)\n-Definition: elementinfo.hh:382\n-Dune::Alberta::ElementInfo::GeometryCache\n-GeometryCacheProxy< dim > GeometryCache\n-Definition: elementinfo.hh:67\n-Dune::Alberta::ElementInfo::operator=\n-ElementInfo & operator=(const ElementInfo &other)\n-Definition: elementinfo.hh:405\n-Dune::Alberta::ElementInfo::hasLeafNeighbor\n-bool hasLeafNeighbor(const int face) const\n-Definition: elementinfo.hh:570\n-Dune::Alberta::ElementInfo::operator==\n-bool operator==(const ElementInfo &other) const\n-Definition: elementinfo.hh:424\n-Dune::Alberta::ElementInfo::dimension\n-static const int dimension\n-Definition: elementinfo.hh:53\n-Dune::Alberta::ElementInfo::hierarchicTraverse\n-void hierarchicTraverse(Functor &functor) const\n-Definition: elementinfo.hh:695\n-Dune::Alberta::ElementInfo::type\n-int type() const\n-Definition: elementinfo.hh:540\n-Dune::Alberta::ElementInfo::maxNeighbors\n-static const int maxNeighbors\n-Definition: elementinfo.hh:62\n-Dune::Alberta::ElementInfo::setMark\n-void setMark(int refCount) const\n-Definition: elementinfo.hh:561\n-Dune::Alberta::ElementInfo::~ElementInfo\n-~ElementInfo()\n-Definition: elementinfo.hh:397\n-Dune::Alberta::ElementInfo::coordinate\n-const GlobalVector & coordinate(int vertex) const\n-Definition: elementinfo.hh:685\n-Dune::Alberta::ElementInfo::numVertices\n-static const int numVertices\n-Definition: elementinfo.hh:55\n-Dune::Alberta::ElementInfo::getMark\n-int getMark() const\n-Definition: elementinfo.hh:554\n-Dune::Alberta::ElementInfo::leafTraverse\n-void leafTraverse(Functor &functor) const\n-Definition: elementinfo.hh:708\n-Dune::Alberta::ElementInfo::MeshPointer\n-Alberta::MeshPointer< dimension > MeshPointer\n-Definition: elementinfo.hh:59\n-Dune::Alberta::ElementInfo::neighbor\n-const Element * neighbor(int face) const\n-Definition: elementinfo.hh:728\n-Dune::Alberta::ElementInfo::createFake\n-static ElementInfo createFake(const ALBERTA EL_INFO &elInfo)\n-Definition: elementinfo.hh:773\n-Dune::Alberta::ElementInfo::ElementInfo\n-ElementInfo()\n-Definition: elementinfo.hh:310\n-Dune::Alberta::ElementInfo::boundaryId\n-int boundaryId(int face) const\n-Definition: elementinfo.hh:635\n-Dune::Alberta::ElementInfo::operator!=\n-bool operator!=(const ElementInfo &other) const\n-Definition: elementinfo.hh:432\n-Dune::Alberta::ElementInfo::FillFlags\n-Alberta::FillFlags< dimension > FillFlags\n-Definition: elementinfo.hh:60\n-Dune::Alberta::ElementInfo::ElementInfo\n-ElementInfo(const MeshPointer &mesh, const MacroElement ¯oElement, typename\n-FillFlags::Flags fillFlags=FillFlags::standard)\n-Definition: elementinfo.hh:319\n-Dune::Alberta::ElementInfo::transformation\n-AffineTransformation * transformation(int face) const\n-Definition: elementinfo.hh:651\n-Dune::Alberta::ElementInfo::isBoundary\n-bool isBoundary(int face) const\n-Definition: elementinfo.hh:620\n-Dune::Alberta::ElementInfo::indexInFather\n-int indexInFather() const\n-Definition: elementinfo.hh:457\n-Dune::Alberta::ElementInfo::seed\n-Seed seed() const\n-Definition: elementinfo.hh:496\n-Dune::Alberta::ElementInfo::el\n-Element * el() const\n-Definition: elementinfo.hh:737\n-Dune::Alberta::ElementInfo::element\n-const Element * element() const\n-Definition: elementinfo.hh:721\n-Dune::Alberta::ElementInfo::elInfo\n-ALBERTA EL_INFO & elInfo() const\n-Definition: elementinfo.hh:744\n-Dune::Alberta::ElementInfo::mesh\n-MeshPointer mesh() const\n-Definition: elementinfo.hh:519\n-Dune::Alberta::ElementInfo::geometryCache\n-GeometryCache geometryCache() const\n-Definition: elementinfo.hh:140\n-Dune::Alberta::ElementInfo::hasCoordinates\n-bool hasCoordinates() const\n-Definition: elementinfo.hh:679\n-Dune::Alberta::ElementInfo::levelNeighbors\n-int levelNeighbors(const int face, ElementInfo(&neighbor)[maxLevelNeighbors],\n-int(&faceInNeighbor)[maxLevelNeighbors]) const\n-Definition: elementinfo.hh:596\n-Dune::Alberta::ElementInfo::ElementInfo\n-ElementInfo(ElementInfo &&other)\n-Definition: elementinfo.hh:389\n-Dune::Alberta::ElementInfo::ElementInfo\n-ElementInfo(const MeshPointer &mesh, const Seed &seed, typename FillFlags::\n-Flags fillFlags=FillFlags::standard)\n-Definition: elementinfo.hh:340\n-Dune::Alberta::ElementInfo::Instance\n-Definition: elementinfo.hh:185\n-Dune::Alberta::ElementInfo::Instance::parent\n-InstancePtr & parent()\n-Definition: elementinfo.hh:189\n-Dune::Alberta::ElementInfo::Instance::geometryCache\n-Alberta::GeometryCache< dim > geometryCache\n-Definition: elementinfo.hh:199\n-Dune::Alberta::ElementInfo::Instance::elInfo\n-ALBERTA EL_INFO elInfo\n-Definition: elementinfo.hh:186\n-Dune::Alberta::ElementInfo::Instance::refCount\n-unsigned int refCount\n-Definition: elementinfo.hh:187\n-Dune::Alberta::ElementInfo::Stack\n-Definition: elementinfo.hh:210\n-Dune::Alberta::ElementInfo::Stack::null\n-InstancePtr null()\n-Definition: elementinfo.hh:907\n-Dune::Alberta::ElementInfo::Stack::~Stack\n-~Stack()\n-Definition: elementinfo.hh:871\n-Dune::Alberta::ElementInfo::Stack::release\n-void release(InstancePtr &p)\n-Definition: elementinfo.hh:897\n-Dune::Alberta::ElementInfo::Stack::Stack\n-Stack()\n-Definition: elementinfo.hh:861\n-Dune::Alberta::ElementInfo::Stack::allocate\n-InstancePtr allocate()\n-Definition: elementinfo.hh:884\n-Dune::Alberta::ElementInfo::Seed\n-Definition: elementinfo.hh:255\n-Dune::Alberta::ElementInfo::Seed::Seed\n-Seed(const int macroIndex, const int level, const unsigned long path)\n-Definition: elementinfo.hh:260\n-Dune::Alberta::ElementInfo::Seed::Seed\n-Seed()\n-Definition: elementinfo.hh:256\n-Dune::Alberta::ElementInfo::Seed::level\n-int level() const\n-Definition: elementinfo.hh:287\n-Dune::Alberta::ElementInfo::Seed::isValid\n-bool isValid() const\n-Definition: elementinfo.hh:284\n-Dune::Alberta::ElementInfo::Seed::path\n-unsigned long path() const\n-Definition: elementinfo.hh:288\n-Dune::Alberta::ElementInfo::Seed::macroIndex\n-int macroIndex() const\n-Definition: elementinfo.hh:286\n-Dune::Alberta::GeometryCache\n-Definition: geometrycache.hh:24\n-Dune::Alberta::GeometryCacheProxy\n-Definition: geometrycache.hh:91\n-Dune::Alberta::MacroElement\n-Definition: macroelement.hh:24\n-Dune::Alberta::NumSubEntities\n-Definition: misc.hh:148\n-Dune::Alberta::FillFlags\n-Definition: misc.hh:231\n-Dune::Alberta::FillFlags::nothing\n-static const Flags nothing\n-Definition: misc.hh:234\n-Dune::Alberta::FillFlags::boundaryId\n-static const Flags boundaryId\n-Definition: misc.hh:246\n-Dune::Alberta::FillFlags::Flags\n-ALBERTA FLAGS Flags\n-Definition: misc.hh:232\n-Dune::Alberta::FillFlags::coords\n-static const Flags coords\n-Definition: misc.hh:236\n-Dune::Alberta::FillFlags::standard\n-static const Flags standard\n-Definition: misc.hh:256\n-Dune::Alberta::FillFlags::neighbor\n-static const Flags neighbor\n-Definition: misc.hh:238\n-Dune::Alberta::Twist::twist\n-static int twist(const Element *element, int subEntity)\n-Definition: misc.hh:538\n-Dune::Alberta::BasicNodeProjection\n-Definition: albertagrid/projection.hh:208\n+ask for level of entities\n+Definition: treeiterator.hh:243\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_true_>::increment\n+void increment()\n+increment\n+Definition: treeiterator.hh:411\n+Dune::AlbertaGridTreeIterator<_codim,_GridImp,_true_>::grid\n+const GridImp & grid() const\n+obtain a reference to the grid\n+Definition: treeiterator.hh:253\n+Dune::AlbertaGridLeafIterator\n+Definition: leafiterator.hh:23\n+Dune::AlbertaGridLeafIterator::Entity\n+Base::Entity Entity\n+Definition: leafiterator.hh:28\n+Dune::AlbertaGridLeafIterator::AlbertaGridLeafIterator\n+AlbertaGridLeafIterator(const GridImp &grid, int level)\n+Constructor making end iterator.\n+Definition: leafiterator.hh:35\n+Dune::AlbertaGridLeafIterator::MarkerVector\n+Base::MarkerVector MarkerVector\n+Definition: leafiterator.hh:29\n+Dune::AlbertaGridLeafIterator::AlbertaGridLeafIterator\n+AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *vec, int\n+level)\n+Constructor making begin iterator.\n+Definition: leafiterator.hh:40\n+Dune::AlbertaGridLeafIterator::AlbertaGridLeafIterator\n+AlbertaGridLeafIterator()\n+Definition: leafiterator.hh:31\n+Dune::AlbertaGridLeafIterator::increment\n+void increment()\n+increment the iterator\n+Definition: leafiterator.hh:47\n+Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>\n+Definition: leafiterator.hh:57\n+Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>::Entity\n+Base::Entity Entity\n+Definition: leafiterator.hh:62\n+Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>::increment\n+void increment()\n+increment the iterator\n+Definition: leafiterator.hh:81\n+Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>::\n+AlbertaGridLeafIterator\n+AlbertaGridLeafIterator(const GridImp &grid, const MarkerVector *, int level)\n+Constructor making begin iterator (which is the end iterator in this case)\n+Definition: leafiterator.hh:74\n+Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>::\n+AlbertaGridLeafIterator\n+AlbertaGridLeafIterator()\n+Definition: leafiterator.hh:65\n+Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>::MarkerVector\n+Base::MarkerVector MarkerVector\n+Definition: leafiterator.hh:63\n+Dune::AlbertaGridLeafIterator<_codim,_Ghost_Partition,_GridImp_>::\n+AlbertaGridLeafIterator\n+AlbertaGridLeafIterator(const GridImp &grid, int level)\n+Constructor making end iterator.\n+Definition: leafiterator.hh:69\n+Dune::AlbertaMarkerVector\n+marker assigning subentities to one element containing them\n+Definition: treeiterator.hh:35\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00719.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00719.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: algebra.hh File Reference\n+dune-grid: meshpointer.cc File Reference\n \n \n \n \n \n \n \n@@ -63,76 +63,28 @@\n \n \n
    \n \n-
    algebra.hh File Reference
    \n+Namespaces
    \n+
    meshpointer.cc File Reference
    \n \n
    \n-
    #include <dune/common/fvector.hh>
    \n-#include <dune/common/fmatrix.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-\n+
    #include <config.h>
    \n+#include <dune/grid/albertagrid/meshpointer.hh>
    \n+
    \n \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Alberta
     
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n

    \n-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)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,78 +5,20 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-Namespaces | Functions\n-algebra.hh File Reference\n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n+Namespaces\n+meshpointer.cc File Reference\n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::Alberta\n \u00a0\n- Functions\n-template\n-static FieldVector< K, 3 >\u00a0Dune::Alberta::vectorProduct (const FieldVector< K,\n- 3 > &u, const FieldVector< K, 3 > &v)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n- 0, m > &matrix)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n- 1, 1 > &matrix)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n- 1, m > &matrix)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n- 2, 2 > &matrix)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n- 2, 3 > &matrix)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n- 2, m > &matrix)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::determinant (const FieldMatrix< K,\n- 3, 3 > &matrix)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 0, m >\n- &matrix, FieldMatrix< K, m, 0 > &inverse)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 1, 1 >\n- &matrix, FieldMatrix< K, 1, 1 > &inverse)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 1, m >\n- &matrix, FieldMatrix< K, m, 1 > &inverse)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 2, 2 >\n- &matrix, FieldMatrix< K, 2, 2 > &inverse)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 2, m >\n- &matrix, FieldMatrix< K, m, 2 > &inverse)\n-\u00a0\n-template\n- static K\u00a0Dune::Alberta::invert (const FieldMatrix< K, 3, 3 >\n- &matrix, FieldMatrix< K, 3, 3 > &inverse)\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00722.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00722.html", "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • \n \n \n
    \n
    albertagrid.hh File Reference
    \n
    \n
    \n-\n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00722_source.html", "unified_diff": "@@ -71,20 +71,20 @@\n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTAGRID_HH
    \n
    6#define DUNE_ALBERTAGRID_HH
    \n-\n+\n \n \n \n
    11#endif
    \n-
    provides the AlbertaGrid class
    \n+
    provides the AlbertaGrid class
    \n
    specialization of the generic GridFactory for AlbertaGrid
    \n \n
    specialization of the generic StructuredGridFactory for AlbertaGrid
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00728.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00728.html", "unified_diff": "@@ -77,21 +77,21 @@\n More...

    \n \n

    Go to the source code of this file.

    \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00728_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00728_source.html", "unified_diff": "@@ -81,21 +81,21 @@\n
    14
    \n
    15#include <dune/common/parallel/communication.hh>
    \n \n \n
    18
    \n
    19// The components of the IdentityGrid interface
    \n \n-\n-\n-\n-\n+\n+\n+\n+\n \n-\n-\n+\n+\n
    28
    \n
    29namespace Dune
    \n
    30{
    \n
    31 // Forward declaration
    \n
    32 template <class HostGrid>
    \n
    33 class IdentityGrid;
    \n
    34
    \n@@ -471,22 +471,22 @@\n \n
    500 };
    \n
    501 } // end namespace Capabilities
    \n
    502
    \n
    503} // namespace Dune
    \n
    504
    \n
    505#endif // DUNE_GRID_IDENTITYGRID_HH
    \n-
    The IdentityGridLevelIterator class.
    \n-
    The IdentityGridEntity class.
    \n-
    The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.
    \n-
    The index and id sets for the IdentityGrid class.
    \n+
    The IdentityGridEntity class.
    \n+
    The IdentityGridLevelIterator class.
    \n+
    The index and id sets for the IdentityGrid class.
    \n+
    The IdentityGridHierarchicIterator class.
    \n+
    The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.
    \n
    The IdentityGridGeometry class and its specializations.
    \n
    The IdentityGridLeafIterator class.
    \n-
    The IdentityGridHierarchicIterator class.
    \n-
    The IdentityGridEntitySeed class.
    \n+
    The IdentityGridEntitySeed class.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Specialize with 'true' for all codims that a grid implements entities for. (default=false)
    Definition: common/capabilities.hh:58
    \n
    static const bool v
    Definition: common/capabilities.hh:59
    \n
    specialize with 'true' for all codims that a grid provides an iterator for (default=hasEntity<codim>:...
    Definition: common/capabilities.hh:74
    \n
    static const bool v
    Definition: common/capabilities.hh:75
    \n
    specialize with 'true' for all codims that a grid can communicate data on (default=false)
    Definition: common/capabilities.hh:97
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -437,29 +437,29 @@\n 499 static const bool v = isLeafwiseConforming::v;\n 500 };\n 501 } // end namespace Capabilities\n 502\n 503} // namespace Dune\n 504\n 505#endif // DUNE_GRID_IDENTITYGRID_HH\n-identitygridleveliterator.hh\n-The IdentityGridLevelIterator class.\n identitygridentity.hh\n The IdentityGridEntity class.\n+identitygridleveliterator.hh\n+The IdentityGridLevelIterator class.\n+identitygridindexsets.hh\n+The index and id sets for the IdentityGrid class.\n+identitygridhierarchiciterator.hh\n+The IdentityGridHierarchicIterator class.\n identitygridintersectioniterator.hh\n The IdentityGridLeafIntersectionIterator and\n IdentityGridLevelIntersectionIterator classes.\n-identitygridindexsets.hh\n-The index and id sets for the IdentityGrid class.\n identitygridgeometry.hh\n The IdentityGridGeometry class and its specializations.\n identitygridleafiterator.hh\n The IdentityGridLeafIterator class.\n-identitygridhierarchiciterator.hh\n-The IdentityGridHierarchicIterator class.\n identitygridentityseed.hh\n The IdentityGridEntitySeed class.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::VTK::GeometryType\n GeometryType\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00731.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00731.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridleveliterator.hh File Reference\n+dune-grid: identitygridentity.hh File Reference\n \n \n \n \n \n \n \n@@ -65,38 +65,41 @@\n
  • dune
  • grid
  • identitygrid
  • \n \n \n
    \n \n-
    identitygridleveliterator.hh File Reference
    \n+
    identitygridentity.hh File Reference
    \n
    \n
    \n \n-

    The IdentityGridLevelIterator class. \n+

    The IdentityGridEntity class. \n More...

    \n-

    \n Classes

    struct  Dune::IdentityGridFamily< dim, HostGrid >
     
    \n \n-\n-\n+\n+\n+\n+\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The IdentityGridLevelIterator class.

    \n+

    The IdentityGridEntity class.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,25 +6,27 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n Classes | Namespaces\n-identitygridleveliterator.hh File Reference\n-The IdentityGridLevelIterator class. More...\n-#include \n+identitygridentity.hh File Reference\n+The IdentityGridEntity class. More...\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdentityGridLevelIterator<_codim,_pitype,_GridImp_>\n-\u00a0 Iterator over all entities of a given codimension and level of a grid.\n- More...\n+class \u00a0Dune::IdentityGridEntity<_codim,_dim,_GridImp_>\n+\u00a0 The implementation of entities in a IdentityGrid. More...\n+\u00a0\n+class \u00a0Dune::IdentityGridEntity<_0,_dim,_GridImp_>\n+\u00a0 Specialization for codim-0-entities. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The IdentityGridLevelIterator class.\n+The IdentityGridEntity class.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00731_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00731_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridleveliterator.hh Source File\n+dune-grid: identitygridentity.hh Source File\n \n \n \n \n \n \n \n@@ -62,85 +62,458 @@\n \n \n
    \n
    \n-
    identitygridleveliterator.hh
    \n+
    identitygridentity.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH
    \n-
    6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
    \n+
    5#ifndef DUNE_IDENTITYGRIDENTITY_HH
    \n+
    6#define DUNE_IDENTITYGRIDENTITY_HH
    \n
    7
    \n-\n-
    9
    \n+\n+
    13
    \n
    14namespace Dune {
    \n
    15
    \n-
    19 template<int codim, PartitionIteratorType pitype, class GridImp>
    \n-\n-
    21 {
    \n-
    22
    \n-
    23 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::template Partition<pitype>::LevelIterator HostGridLevelIterator;
    \n+
    16
    \n+
    17 // Forward declarations
    \n+
    18
    \n+
    19 template<int codim, int dim, class GridImp>
    \n+
    20 class IdentityGridEntity;
    \n+
    21
    \n+
    22 template<int codim, PartitionIteratorType pitype, class GridImp>
    \n+
    23 class IdentityGridLevelIterator;
    \n
    24
    \n-
    25 public:
    \n-
    26
    \n-
    27 constexpr static int codimension = codim;
    \n-
    28
    \n-
    29 typedef typename GridImp::template Codim<codim>::Entity Entity;
    \n+
    25 template<class GridImp>
    \n+
    26 class IdentityGridLevelIntersectionIterator;
    \n+
    27
    \n+
    28 template<class GridImp>
    \n+
    29 class IdentityGridLeafIntersectionIterator;
    \n
    30
    \n-
    32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)
    \n-
    33 : identityGrid_(identityGrid),
    \n-
    34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template begin<codim,pitype>())
    \n-
    35 {}
    \n-
    36
    \n-
    37
    \n-
    43 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, [[maybe_unused]] bool endDummy)
    \n-
    44 : identityGrid_(identityGrid),
    \n-
    45 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template end<codim,pitype>())
    \n-
    46 {}
    \n-
    47
    \n-
    48
    \n-
    50 void increment() {
    \n-
    51 ++hostLevelIterator_;
    \n-
    52 }
    \n-
    53
    \n-\n-
    56 return Entity{{identityGrid_,*hostLevelIterator_}};
    \n-
    57 }
    \n-
    58
    \n-
    60 bool equals(const IdentityGridLevelIterator& i) const {
    \n-
    61 return hostLevelIterator_ == i.hostLevelIterator_;
    \n-
    62 }
    \n-
    63
    \n-
    64 private:
    \n-
    65 const GridImp* identityGrid_;
    \n-
    66
    \n-
    67 HostGridLevelIterator hostLevelIterator_;
    \n-
    68 };
    \n-
    69
    \n+
    31 template<class GridImp>
    \n+
    32 class IdentityGridHierarchicIterator;
    \n+
    33
    \n+
    34
    \n+
    35 // External forward declarations
    \n+
    36 template< class Grid >
    \n+
    37 struct HostGridAccess;
    \n+
    38
    \n+
    39
    \n+
    40 //**********************************************************************
    \n+
    41 //
    \n+
    42 // --IdentityGridEntity
    \n+
    43 // --Entity
    \n+
    44 //
    \n+
    52 template<int codim, int dim, class GridImp>
    \n+\n+
    54 public EntityDefaultImplementation <codim,dim,GridImp,IdentityGridEntity>
    \n+
    55 {
    \n+
    56
    \n+
    57 template <class GridImp_>
    \n+\n+
    59
    \n+
    60 template <class GridImp_>
    \n+\n+
    62
    \n+
    63 template <class GridImp_>
    \n+\n+
    65
    \n+
    66 template <class GridImp_>
    \n+\n+
    68
    \n+
    69 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n
    70
    \n-
    71} // namespace Dune
    \n-
    72
    \n-
    73#endif
    \n-\n-
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n+
    71
    \n+
    72 private:
    \n+
    73
    \n+
    74 typedef typename GridImp::ctype ctype;
    \n+
    75
    \n+
    76 // The codimension of this entity wrt the host grid
    \n+
    77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension + codim;
    \n+
    78
    \n+
    79 // equivalent entity in the host grid
    \n+
    80 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
    \n+
    81
    \n+
    82
    \n+
    83 public:
    \n+
    84
    \n+
    85 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
    \n+
    86
    \n+
    88 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
    \n+
    89
    \n+\n+
    91 : identityGrid_(nullptr)
    \n+
    92 {}
    \n+
    93
    \n+
    94 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
    \n+
    95 : hostEntity_(hostEntity)
    \n+
    96 , identityGrid_(identityGrid)
    \n+
    97 {}
    \n+
    98
    \n+
    99 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
    \n+
    100 : hostEntity_(std::move(hostEntity))
    \n+
    101 , identityGrid_(identityGrid)
    \n+
    102 {}
    \n+
    103
    \n+\n+
    106 : hostEntity_(original.hostEntity_)
    \n+
    107 , identityGrid_(original.identityGrid_)
    \n+
    108 {}
    \n+
    109
    \n+\n+
    111 : hostEntity_(std::move(original.hostEntity_))
    \n+
    112 , identityGrid_(original.identityGrid_)
    \n+
    113 {}
    \n+
    114
    \n+\n+
    117 {
    \n+
    118 if (this != &original)
    \n+
    119 {
    \n+
    120 identityGrid_ = original.identityGrid_;
    \n+
    121 hostEntity_ = original.hostEntity_;
    \n+
    122 }
    \n+
    123 return *this;
    \n+
    124 }
    \n+
    125
    \n+\n+
    128 {
    \n+
    129 if (this != &original)
    \n+
    130 {
    \n+
    131 identityGrid_ = original.identityGrid_;
    \n+
    132 hostEntity_ = std::move(original.hostEntity_);
    \n+
    133 }
    \n+
    134 return *this;
    \n+
    135 }
    \n+
    136
    \n+
    137 bool equals(const IdentityGridEntity& other) const
    \n+
    138 {
    \n+
    139 return hostEntity_ == other.hostEntity_;
    \n+
    140 }
    \n+
    141
    \n+
    143 bool hasFather () const {
    \n+
    144 return hostEntity_.hasFather();
    \n+
    145 }
    \n+
    146
    \n+\n+
    149 {
    \n+
    150 return EntitySeed(hostEntity_);
    \n+
    151 }
    \n+
    152
    \n+
    154 int level () const {
    \n+
    155 return hostEntity_.level();
    \n+
    156 }
    \n+
    157
    \n+
    158
    \n+\n+
    162 return hostEntity_.partitionType();
    \n+
    163 }
    \n+
    164
    \n+
    167 unsigned int subEntities (unsigned int cc) const
    \n+
    168 {
    \n+
    169 return hostEntity_.subEntities(cc);
    \n+
    170 }
    \n+
    171
    \n+\n+
    174 {
    \n+
    175 return Geometry( hostEntity_.geometry() );
    \n+
    176 }
    \n+
    177
    \n+
    178
    \n+
    179 HostGridEntity hostEntity_;
    \n+
    180
    \n+
    181 private:
    \n+
    182
    \n+
    183 const GridImp* identityGrid_;
    \n+
    184
    \n+
    185 };
    \n+
    186
    \n+
    187
    \n+
    188
    \n+
    189
    \n+
    190 //***********************
    \n+
    191 //
    \n+
    192 // --IdentityGridEntity
    \n+
    193 //
    \n+
    194 //***********************
    \n+
    202 template<int dim, class GridImp>
    \n+
    203 class IdentityGridEntity<0,dim,GridImp> :
    \n+
    204 public EntityDefaultImplementation<0,dim,GridImp, IdentityGridEntity>
    \n+
    205 {
    \n+
    206 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n+
    207
    \n+
    208 public:
    \n+
    209
    \n+
    210 // The codimension of this entitypointer wrt the host grid
    \n+
    211 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension;
    \n+
    212
    \n+
    213 // equivalent entity in the host grid
    \n+
    214 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
    \n+
    215
    \n+
    216 typedef typename GridImp::template Codim<0>::Geometry Geometry;
    \n+
    217
    \n+
    218 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
    \n+
    219
    \n+\n+
    222
    \n+\n+
    225
    \n+\n+
    228
    \n+
    230 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
    \n+
    231
    \n+
    232
    \n+
    233
    \n+\n+
    235 : identityGrid_(nullptr)
    \n+
    236 {}
    \n+
    237
    \n+
    238 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
    \n+
    239 : hostEntity_(hostEntity)
    \n+
    240 , identityGrid_(identityGrid)
    \n+
    241 {}
    \n+
    242
    \n+
    243 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
    \n+
    244 : hostEntity_(std::move(hostEntity))
    \n+
    245 , identityGrid_(identityGrid)
    \n+
    246 {}
    \n+
    247
    \n+\n+
    250 : hostEntity_(original.hostEntity_)
    \n+
    251 , identityGrid_(original.identityGrid_)
    \n+
    252 {}
    \n+
    253
    \n+\n+
    255 : hostEntity_(std::move(original.hostEntity_))
    \n+
    256 , identityGrid_(original.identityGrid_)
    \n+
    257 {}
    \n+
    258
    \n+\n+
    261 {
    \n+
    262 if (this != &original)
    \n+
    263 {
    \n+
    264 identityGrid_ = original.identityGrid_;
    \n+
    265 hostEntity_ = original.hostEntity_;
    \n+
    266 }
    \n+
    267 return *this;
    \n+
    268 }
    \n+
    269
    \n+\n+
    272 {
    \n+
    273 if (this != &original)
    \n+
    274 {
    \n+
    275 identityGrid_ = original.identityGrid_;
    \n+
    276 hostEntity_ = std::move(original.hostEntity_);
    \n+
    277 }
    \n+
    278 return *this;
    \n+
    279 }
    \n+
    280
    \n+
    281 bool equals(const IdentityGridEntity& other) const
    \n+
    282 {
    \n+
    283 return hostEntity_ == other.hostEntity_;
    \n+
    284 }
    \n+
    285
    \n+
    287 bool hasFather () const {
    \n+
    288 return hostEntity_.hasFather();
    \n+
    289 }
    \n+
    290
    \n+\n+
    293 {
    \n+
    294 return EntitySeed(hostEntity_);
    \n+
    295 }
    \n+
    296
    \n+
    298 int level () const
    \n+
    299 {
    \n+
    300 return hostEntity_.level();
    \n+
    301 }
    \n+
    302
    \n+
    303
    \n+\n+
    306 return hostEntity_.partitionType();
    \n+
    307 }
    \n+
    308
    \n+
    309
    \n+\n+
    312 {
    \n+
    313 return Geometry( hostEntity_.geometry() );
    \n+
    314 }
    \n+
    315
    \n+
    316
    \n+
    319 unsigned int subEntities (unsigned int codim) const
    \n+
    320 {
    \n+
    321 return hostEntity_.subEntities(codim);
    \n+
    322 }
    \n+
    323
    \n+
    324
    \n+
    328 template<int cc>
    \n+
    329 typename GridImp::template Codim<cc>::Entity subEntity (int i) const {
    \n+
    330 return IdentityGridEntity<cc,dim,GridImp>(identityGrid_, hostEntity_.template subEntity<cc>(i));
    \n+
    331 }
    \n+
    332
    \n+
    333
    \n+\n+\n+
    337 identityGrid_,
    \n+
    338 identityGrid_->getHostGrid().levelGridView(level()).ibegin(hostEntity_));
    \n+
    339 }
    \n+
    340
    \n+
    341
    \n+\n+\n+
    345 identityGrid_,
    \n+
    346 identityGrid_->getHostGrid().levelGridView(level()).iend(hostEntity_));
    \n+
    347 }
    \n+
    348
    \n+
    349
    \n+\n+\n+
    353 identityGrid_,
    \n+
    354 identityGrid_->getHostGrid().leafGridView().ibegin(hostEntity_));
    \n+
    355 }
    \n+
    356
    \n+
    357
    \n+\n+\n+
    361 identityGrid_,
    \n+
    362 identityGrid_->getHostGrid().leafGridView().iend(hostEntity_));
    \n+
    363 }
    \n+
    364
    \n+
    365
    \n+
    367 bool isLeaf() const {
    \n+
    368 return hostEntity_.isLeaf();
    \n+
    369 }
    \n+
    370
    \n+
    371
    \n+
    374 typename GridImp::template Codim<0>::Entity father () const {
    \n+
    375 return IdentityGridEntity(identityGrid_, hostEntity_.father());
    \n+
    376 }
    \n+
    377
    \n+
    378
    \n+\n+
    389 {
    \n+
    390 return LocalGeometry( hostEntity_.geometryInFather() );
    \n+
    391 }
    \n+
    392
    \n+
    393
    \n+\n+
    399 {
    \n+
    400 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel);
    \n+
    401 }
    \n+
    402
    \n+
    403
    \n+\n+
    406 {
    \n+
    407 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel, true);
    \n+
    408 }
    \n+
    409
    \n+
    410
    \n+
    412 bool wasRefined () const
    \n+
    413 {
    \n+
    414 if (identityGrid_->adaptationStep!=GridImp::adaptDone)
    \n+
    415 return false;
    \n+
    416
    \n+
    417 int level = this->level();
    \n+
    418 int index = identityGrid_->levelIndexSet(level).index(*this);
    \n+
    419 return identityGrid_->refinementMark_[level][index];
    \n+
    420 }
    \n+
    421
    \n+
    422
    \n+
    424 bool mightBeCoarsened () const
    \n+
    425 {
    \n+
    426 return true;
    \n+
    427 }
    \n+
    428
    \n+
    429
    \n+
    430 // /////////////////////////////////////////
    \n+
    431 // Internal stuff
    \n+
    432 // /////////////////////////////////////////
    \n+
    433
    \n+
    434
    \n+\n+
    436 const GridImp* identityGrid_;
    \n+
    437
    \n+
    438 private:
    \n+
    439
    \n+
    440 typedef typename GridImp::ctype ctype;
    \n+
    441
    \n+
    442 }; // end of IdentityGridEntity codim = 0
    \n+
    443
    \n+
    444
    \n+
    445} // namespace Dune
    \n+
    446
    \n+
    447
    \n+
    448#endif
    \n+
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n+
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Iterator over all entities of a given codimension and level of a grid.
    Definition: identitygridleveliterator.hh:21
    \n-
    void increment()
    prefix increment
    Definition: identitygridleveliterator.hh:50
    \n-
    GridImp::template Codim< codim >::Entity Entity
    Definition: identitygridleveliterator.hh:29
    \n-
    IdentityGridLevelIterator(const GridImp *identityGrid, int level)
    Constructor.
    Definition: identitygridleveliterator.hh:32
    \n-
    IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool endDummy)
    Constructor which create the end iterator.
    Definition: identitygridleveliterator.hh:43
    \n-
    static constexpr int codimension
    Definition: identitygridleveliterator.hh:27
    \n-
    bool equals(const IdentityGridLevelIterator &i) const
    equality
    Definition: identitygridleveliterator.hh:60
    \n-
    Entity dereference() const
    dereferencing
    Definition: identitygridleveliterator.hh:55
    \n+
    Default Implementations for EntityImp.
    Definition: common/entity.hh:542
    \n+
    GeometryType type() const
    Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
    Definition: common/entity.hh:576
    \n+
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n+
    The implementation of entities in a IdentityGrid.
    Definition: identitygridentity.hh:55
    \n+
    IdentityGridEntity()
    Definition: identitygridentity.hh:90
    \n+
    IdentityGridEntity & operator=(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:127
    \n+
    IdentityGridEntity(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:110
    \n+
    bool equals(const IdentityGridEntity &other) const
    Definition: identitygridentity.hh:137
    \n+
    HostGridEntity hostEntity_
    Definition: identitygridentity.hh:179
    \n+
    GridImp::template Codim< codim >::EntitySeed EntitySeed
    The type of the EntitySeed interface class.
    Definition: identitygridentity.hh:88
    \n+
    EntitySeed seed() const
    Create EntitySeed.
    Definition: identitygridentity.hh:148
    \n+
    IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
    Definition: identitygridentity.hh:94
    \n+
    Geometry geometry() const
    geometry of this entity
    Definition: identitygridentity.hh:173
    \n+
    PartitionType partitionType() const
    The partition type for parallel computing.
    Definition: identitygridentity.hh:161
    \n+
    unsigned int subEntities(unsigned int cc) const
    Return the number of subEntities of codimension codim.
    Definition: identitygridentity.hh:167
    \n+
    IdentityGridEntity(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:105
    \n+
    IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
    Definition: identitygridentity.hh:99
    \n+
    bool hasFather() const
    returns true if father entity exists
    Definition: identitygridentity.hh:143
    \n+
    GridImp::template Codim< codim >::Geometry Geometry
    Definition: identitygridentity.hh:85
    \n+
    IdentityGridEntity & operator=(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:116
    \n+
    int level() const
    level of this element
    Definition: identitygridentity.hh:154
    \n+
    Definition: identitygridintersectioniterator.hh:84
    \n+
    Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
    Definition: identitygridintersectioniterator.hh:29
    \n+
    Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
    Definition: identitygridhierarchiciterator.hh:26
    \n+
    unsigned int subEntities(unsigned int codim) const
    Return the number of subEntities of codimension codim.
    Definition: identitygridentity.hh:319
    \n+
    IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
    Definition: identitygridentity.hh:243
    \n+
    bool isLeaf() const
    returns true if Entity has NO children
    Definition: identitygridentity.hh:367
    \n+
    IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
    Inter-level access to son elements on higher levels<=maxlevel. This is provided for sparsely stored n...
    Definition: identitygridentity.hh:398
    \n+
    GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
    Definition: identitygridentity.hh:218
    \n+
    GridImp::template Codim< 0 >::EntitySeed EntitySeed
    The type of the EntitySeed interface class.
    Definition: identitygridentity.hh:230
    \n+
    EntitySeed seed() const
    Create EntitySeed.
    Definition: identitygridentity.hh:292
    \n+
    IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const
    First level intersection.
    Definition: identitygridentity.hh:335
    \n+
    IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
    Definition: identitygridentity.hh:238
    \n+
    int level() const
    Level of this element.
    Definition: identitygridentity.hh:298
    \n+
    IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const
    First leaf intersection.
    Definition: identitygridentity.hh:351
    \n+
    HostGridEntity hostEntity_
    Definition: identitygridentity.hh:435
    \n+
    IdentityGridEntity & operator=(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:260
    \n+
    Geometry geometry() const
    Geometry of this entity.
    Definition: identitygridentity.hh:311
    \n+
    IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const
    Reference to one past the last neighbor.
    Definition: identitygridentity.hh:343
    \n+
    IdentityGridEntity(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:249
    \n+
    IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const
    Returns iterator to one past the last son.
    Definition: identitygridentity.hh:405
    \n+
    IdentityGridLeafIntersectionIterator< GridImp > ileafend() const
    Reference to one past the last leaf intersection.
    Definition: identitygridentity.hh:359
    \n+
    bool wasRefined() const
    Definition: identitygridentity.hh:412
    \n+
    IdentityGridEntity & operator=(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:271
    \n+
    bool hasFather() const
    returns true if father entity exists
    Definition: identitygridentity.hh:287
    \n+
    GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity HostGridEntity
    Definition: identitygridentity.hh:214
    \n+
    GridImp::template Codim< 0 >::Entity father() const
    Definition: identitygridentity.hh:374
    \n+
    bool mightBeCoarsened() const
    Definition: identitygridentity.hh:424
    \n+
    LocalGeometry geometryInFather() const
    Location of this element relative to the reference element element of the father. This is sufficient ...
    Definition: identitygridentity.hh:388
    \n+
    const GridImp * identityGrid_
    Definition: identitygridentity.hh:436
    \n+
    GridImp::template Codim< cc >::Entity subEntity(int i) const
    Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
    Definition: identitygridentity.hh:329
    \n+
    IdentityGridEntity(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:254
    \n+
    GridImp::template Codim< 0 >::Geometry Geometry
    Definition: identitygridentity.hh:216
    \n+
    bool equals(const IdentityGridEntity &other) const
    Definition: identitygridentity.hh:281
    \n+
    PartitionType partitionType() const
    The partition type for parallel computing.
    Definition: identitygridentity.hh:305
    \n+
    Definition: identitygridindexsets.hh:26
    \n+
    Definition: identitygridindexsets.hh:103
    \n+
    Definition: identitygridindexsets.hh:199
    \n+
    Definition: identitygridindexsets.hh:251
    \n+
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,113 +5,622 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n-identitygridleveliterator.hh\n+identitygridentity.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH\n- 6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH\n+ 5#ifndef DUNE_IDENTITYGRIDENTITY_HH\n+ 6#define DUNE_IDENTITYGRIDENTITY_HH\n 7\n- 8#include \n- 9\n+ 12#include \n+ 13\n 14namespace Dune {\n 15\n- 19 template\n-20 class IdentityGridLevelIterator\n- 21 {\n- 22\n- 23 typedef typename GridImp::HostGridType::Traits::template Codim::\n-template Partition::LevelIterator HostGridLevelIterator;\n+ 16\n+ 17 // Forward declarations\n+ 18\n+ 19 template\n+ 20 class IdentityGridEntity;\n+ 21\n+ 22 template\n+ 23 class IdentityGridLevelIterator;\n 24\n- 25 public:\n- 26\n-27 constexpr static int codimension = codim;\n- 28\n-29 typedef typename GridImp::template Codim::Entity Entity;\n+ 25 template\n+ 26 class IdentityGridLevelIntersectionIterator;\n+ 27\n+ 28 template\n+ 29 class IdentityGridLeafIntersectionIterator;\n 30\n-32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)\n- 33 : identityGrid_(identityGrid),\n- 34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template\n-begin())\n- 35 {}\n- 36\n- 37\n-43 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, [\n-[maybe_unused]] bool endDummy)\n- 44 : identityGrid_(identityGrid),\n- 45 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template\n-end())\n- 46 {}\n- 47\n- 48\n-50 void increment() {\n- 51 ++hostLevelIterator_;\n- 52 }\n- 53\n-55 Entity dereference() const {\n- 56 return Entity{{identityGrid_,*hostLevelIterator_}};\n- 57 }\n- 58\n-60 bool equals(const IdentityGridLevelIterator& i) const {\n- 61 return hostLevelIterator_ == i.hostLevelIterator_;\n- 62 }\n- 63\n- 64 private:\n- 65 const GridImp* identityGrid_;\n- 66\n- 67 HostGridLevelIterator hostLevelIterator_;\n- 68 };\n- 69\n+ 31 template\n+ 32 class IdentityGridHierarchicIterator;\n+ 33\n+ 34\n+ 35 // External forward declarations\n+ 36 template< class Grid >\n+ 37 struct HostGridAccess;\n+ 38\n+ 39\n+ 40 //**********************************************************************\n+ 41 //\n+ 42 // --IdentityGridEntity\n+ 43 // --Entity\n+ 44 //\n+ 52 template\n+53 class IdentityGridEntity :\n+ 54 public EntityDefaultImplementation \n+ 55 {\n+ 56\n+ 57 template \n+58 friend class IdentityGridLevelIndexSet;\n+ 59\n+ 60 template \n+61 friend class IdentityGridLeafIndexSet;\n+ 62\n+ 63 template \n+64 friend class IdentityGridLocalIdSet;\n+ 65\n+ 66 template \n+67 friend class IdentityGridGlobalIdSet;\n+ 68\n+ 69 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n+>;\n 70\n- 71} // namespace Dune\n- 72\n- 73#endif\n-gridenums.hh\n-Dune::levelGridView\n-Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid<\n-dim, dimworld, ct, GridFamily > &grid, int level)\n-level grid view for the given grid and level.\n-Definition: common/grid.hh:802\n+ 71\n+ 72 private:\n+ 73\n+ 74 typedef typename GridImp::ctype ctype;\n+ 75\n+ 76 // The codimension of this entity wrt the host grid\n+ 77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension -\n+GridImp::dimension + codim;\n+ 78\n+ 79 // equivalent entity in the host grid\n+ 80 typedef typename GridImp::HostGridType::Traits::template\n+Codim::Entity HostGridEntity;\n+ 81\n+ 82\n+ 83 public:\n+ 84\n+85 typedef typename GridImp::template Codim::Geometry Geometry;\n+ 86\n+88 typedef typename GridImp::template Codim::EntitySeed EntitySeed;\n+ 89\n+90 IdentityGridEntity()\n+ 91 : identityGrid_(nullptr)\n+ 92 {}\n+ 93\n+94 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity&\n+hostEntity)\n+ 95 : hostEntity_(hostEntity)\n+ 96 , identityGrid_(identityGrid)\n+ 97 {}\n+ 98\n+99 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)\n+ 100 : hostEntity_(std::move(hostEntity))\n+ 101 , identityGrid_(identityGrid)\n+ 102 {}\n+ 103\n+105 IdentityGridEntity(const IdentityGridEntity& original)\n+ 106 : hostEntity_(original.hostEntity_)\n+ 107 , identityGrid_(original.identityGrid_)\n+ 108 {}\n+ 109\n+110 IdentityGridEntity(IdentityGridEntity&& original)\n+ 111 : hostEntity_(std::move(original.hostEntity_))\n+ 112 , identityGrid_(original.identityGrid_)\n+ 113 {}\n+ 114\n+116 IdentityGridEntity& operator=(const IdentityGridEntity& original)\n+ 117 {\n+ 118 if (this != &original)\n+ 119 {\n+ 120 identityGrid_ = original.identityGrid_;\n+ 121 hostEntity_ = original.hostEntity_;\n+ 122 }\n+ 123 return *this;\n+ 124 }\n+ 125\n+127 IdentityGridEntity& operator=(IdentityGridEntity&& original)\n+ 128 {\n+ 129 if (this != &original)\n+ 130 {\n+ 131 identityGrid_ = original.identityGrid_;\n+ 132 hostEntity_ = std::move(original.hostEntity_);\n+ 133 }\n+ 134 return *this;\n+ 135 }\n+ 136\n+137 bool equals(const IdentityGridEntity& other) const\n+ 138 {\n+ 139 return hostEntity_ == other.hostEntity_;\n+ 140 }\n+ 141\n+143 bool hasFather () const {\n+ 144 return hostEntity_.hasFather();\n+ 145 }\n+ 146\n+148 EntitySeed seed () const\n+ 149 {\n+ 150 return EntitySeed(hostEntity_);\n+ 151 }\n+ 152\n+154 int level () const {\n+ 155 return hostEntity_.level();\n+ 156 }\n+ 157\n+ 158\n+161 PartitionType partitionType () const {\n+ 162 return hostEntity_.partitionType();\n+ 163 }\n+ 164\n+167 unsigned int subEntities (unsigned int cc) const\n+ 168 {\n+ 169 return hostEntity_.subEntities(cc);\n+ 170 }\n+ 171\n+173 Geometry geometry () const\n+ 174 {\n+ 175 return Geometry( hostEntity_.geometry() );\n+ 176 }\n+ 177\n+ 178\n+179 HostGridEntity hostEntity_;\n+ 180\n+ 181 private:\n+ 182\n+183 const GridImp* identityGrid_;\n+ 184\n+ 185 };\n+ 186\n+ 187\n+ 188\n+ 189\n+ 190 //***********************\n+ 191 //\n+ 192 // --IdentityGridEntity\n+ 193 //\n+ 194 //***********************\n+ 202 template\n+203 class IdentityGridEntity<0,dim,GridImp> :\n+ 204 public EntityDefaultImplementation<0,dim,GridImp, IdentityGridEntity>\n+ 205 {\n+ 206 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n+>;\n+ 207\n+ 208 public:\n+ 209\n+ 210 // The codimension of this entitypointer wrt the host grid\n+211 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension -\n+GridImp::dimension;\n+ 212\n+ 213 // equivalent entity in the host grid\n+214 typedef typename GridImp::HostGridType::Traits::template\n+Codim::Entity HostGridEntity;\n+ 215\n+216 typedef typename GridImp::template Codim<0>::Geometry Geometry;\n+ 217\n+218 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;\n+ 219\n+221 typedef IdentityGridLevelIntersectionIterator\n+LevelIntersectionIterator;\n+ 222\n+224 typedef IdentityGridLeafIntersectionIterator\n+LeafIntersectionIterator;\n+ 225\n+227 typedef IdentityGridHierarchicIterator HierarchicIterator;\n+ 228\n+230 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;\n+ 231\n+ 232\n+ 233\n+234 IdentityGridEntity()\n+ 235 : identityGrid_(nullptr)\n+ 236 {}\n+ 237\n+238 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity&\n+hostEntity)\n+ 239 : hostEntity_(hostEntity)\n+ 240 , identityGrid_(identityGrid)\n+ 241 {}\n+ 242\n+243 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&&\n+hostEntity)\n+ 244 : hostEntity_(std::move(hostEntity))\n+ 245 , identityGrid_(identityGrid)\n+ 246 {}\n+ 247\n+249 IdentityGridEntity(const IdentityGridEntity& original)\n+ 250 : hostEntity_(original.hostEntity_)\n+ 251 , identityGrid_(original.identityGrid_)\n+ 252 {}\n+ 253\n+254 IdentityGridEntity(IdentityGridEntity&& original)\n+ 255 : hostEntity_(std::move(original.hostEntity_))\n+ 256 , identityGrid_(original.identityGrid_)\n+ 257 {}\n+ 258\n+260 IdentityGridEntity& operator=(const IdentityGridEntity& original)\n+ 261 {\n+ 262 if (this != &original)\n+ 263 {\n+ 264 identityGrid_ = original.identityGrid_;\n+ 265 hostEntity_ = original.hostEntity_;\n+ 266 }\n+ 267 return *this;\n+ 268 }\n+ 269\n+271 IdentityGridEntity& operator=(IdentityGridEntity&& original)\n+ 272 {\n+ 273 if (this != &original)\n+ 274 {\n+ 275 identityGrid_ = original.identityGrid_;\n+ 276 hostEntity_ = std::move(original.hostEntity_);\n+ 277 }\n+ 278 return *this;\n+ 279 }\n+ 280\n+281 bool equals(const IdentityGridEntity& other) const\n+ 282 {\n+ 283 return hostEntity_ == other.hostEntity_;\n+ 284 }\n+ 285\n+287 bool hasFather () const {\n+ 288 return hostEntity_.hasFather();\n+ 289 }\n+ 290\n+292 EntitySeed seed () const\n+ 293 {\n+ 294 return EntitySeed(hostEntity_);\n+ 295 }\n+ 296\n+298 int level () const\n+ 299 {\n+ 300 return hostEntity_.level();\n+ 301 }\n+ 302\n+ 303\n+305 PartitionType partitionType () const {\n+ 306 return hostEntity_.partitionType();\n+ 307 }\n+ 308\n+ 309\n+311 Geometry geometry () const\n+ 312 {\n+ 313 return Geometry( hostEntity_.geometry() );\n+ 314 }\n+ 315\n+ 316\n+319 unsigned int subEntities (unsigned int codim) const\n+ 320 {\n+ 321 return hostEntity_.subEntities(codim);\n+ 322 }\n+ 323\n+ 324\n+ 328 template\n+329 typename GridImp::template Codim::Entity subEntity (int i) const {\n+ 330 return IdentityGridEntity(identityGrid_,\n+hostEntity_.template subEntity(i));\n+ 331 }\n+ 332\n+ 333\n+335 IdentityGridLevelIntersectionIterator ilevelbegin () const {\n+ 336 return IdentityGridLevelIntersectionIterator(\n+ 337 identityGrid_,\n+ 338 identityGrid_->getHostGrid().levelGridView(level()).ibegin(hostEntity_));\n+ 339 }\n+ 340\n+ 341\n+343 IdentityGridLevelIntersectionIterator ilevelend () const {\n+ 344 return IdentityGridLevelIntersectionIterator(\n+ 345 identityGrid_,\n+ 346 identityGrid_->getHostGrid().levelGridView(level()).iend(hostEntity_));\n+ 347 }\n+ 348\n+ 349\n+351 IdentityGridLeafIntersectionIterator ileafbegin () const {\n+ 352 return IdentityGridLeafIntersectionIterator(\n+ 353 identityGrid_,\n+ 354 identityGrid_->getHostGrid().leafGridView().ibegin(hostEntity_));\n+ 355 }\n+ 356\n+ 357\n+359 IdentityGridLeafIntersectionIterator ileafend () const {\n+ 360 return IdentityGridLeafIntersectionIterator(\n+ 361 identityGrid_,\n+ 362 identityGrid_->getHostGrid().leafGridView().iend(hostEntity_));\n+ 363 }\n+ 364\n+ 365\n+367 bool isLeaf() const {\n+ 368 return hostEntity_.isLeaf();\n+ 369 }\n+ 370\n+ 371\n+374 typename GridImp::template Codim<0>::Entity father () const {\n+ 375 return IdentityGridEntity(identityGrid_, hostEntity_.father());\n+ 376 }\n+ 377\n+ 378\n+388 LocalGeometry geometryInFather () const\n+ 389 {\n+ 390 return LocalGeometry( hostEntity_.geometryInFather() );\n+ 391 }\n+ 392\n+ 393\n+398 IdentityGridHierarchicIterator hbegin (int maxLevel) const\n+ 399 {\n+ 400 return IdentityGridHierarchicIterator(identityGrid_, *this,\n+maxLevel);\n+ 401 }\n+ 402\n+ 403\n+405 IdentityGridHierarchicIterator hend (int maxLevel) const\n+ 406 {\n+ 407 return IdentityGridHierarchicIterator(identityGrid_, *this,\n+maxLevel, true);\n+ 408 }\n+ 409\n+ 410\n+412 bool wasRefined () const\n+ 413 {\n+ 414 if (identityGrid_->adaptationStep!=GridImp::adaptDone)\n+ 415 return false;\n+ 416\n+ 417 int level = this->level();\n+ 418 int index = identityGrid_->levelIndexSet(level).index(*this);\n+ 419 return identityGrid_->refinementMark_[level][index];\n+ 420 }\n+ 421\n+ 422\n+424 bool mightBeCoarsened () const\n+ 425 {\n+ 426 return true;\n+ 427 }\n+ 428\n+ 429\n+ 430 // /////////////////////////////////////////\n+ 431 // Internal stuff\n+ 432 // /////////////////////////////////////////\n+ 433\n+ 434\n+435 HostGridEntity hostEntity_;\n+436 const GridImp* identityGrid_;\n+ 437\n+ 438 private:\n+ 439\n+ 440 typedef typename GridImp::ctype ctype;\n+ 441\n+ 442 }; // end of IdentityGridEntity codim = 0\n+ 443\n+ 444\n+ 445} // namespace Dune\n+ 446\n+ 447\n+ 448#endif\n+Dune::PartitionType\n+PartitionType\n+Attributes used in the generic overlap model.\n+Definition: gridenums.hh:30\n+std\n+STL namespace.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::IdentityGridLevelIterator\n-Iterator over all entities of a given codimension and level of a grid.\n-Definition: identitygridleveliterator.hh:21\n-Dune::IdentityGridLevelIterator::increment\n-void increment()\n-prefix increment\n-Definition: identitygridleveliterator.hh:50\n-Dune::IdentityGridLevelIterator::Entity\n-GridImp::template Codim< codim >::Entity Entity\n-Definition: identitygridleveliterator.hh:29\n-Dune::IdentityGridLevelIterator::IdentityGridLevelIterator\n-IdentityGridLevelIterator(const GridImp *identityGrid, int level)\n-Constructor.\n-Definition: identitygridleveliterator.hh:32\n-Dune::IdentityGridLevelIterator::IdentityGridLevelIterator\n-IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool\n-endDummy)\n-Constructor which create the end iterator.\n-Definition: identitygridleveliterator.hh:43\n-Dune::IdentityGridLevelIterator::codimension\n-static constexpr int codimension\n-Definition: identitygridleveliterator.hh:27\n-Dune::IdentityGridLevelIterator::equals\n-bool equals(const IdentityGridLevelIterator &i) const\n-equality\n-Definition: identitygridleveliterator.hh:60\n-Dune::IdentityGridLevelIterator::dereference\n-Entity dereference() const\n-dereferencing\n-Definition: identitygridleveliterator.hh:55\n+Dune::EntityDefaultImplementation\n+Default Implementations for EntityImp.\n+Definition: common/entity.hh:542\n+Dune::EntityDefaultImplementation<_codim,_dim,_GridImp,_IdentityGridEntity_>::\n+type\n+GeometryType type() const\n+Return the name of the reference element. The type can be used to access the\n+Dune::ReferenceElement.\n+Definition: common/entity.hh:576\n+Dune::HostGridAccess\n+provides access to host grid objects from GeometryGrid\n+Definition: identitygrid.hh:37\n+Dune::IdentityGridEntity\n+The implementation of entities in a IdentityGrid.\n+Definition: identitygridentity.hh:55\n+Dune::IdentityGridEntity::IdentityGridEntity\n+IdentityGridEntity()\n+Definition: identitygridentity.hh:90\n+Dune::IdentityGridEntity::operator=\n+IdentityGridEntity & operator=(IdentityGridEntity &&original)\n+Definition: identitygridentity.hh:127\n+Dune::IdentityGridEntity::IdentityGridEntity\n+IdentityGridEntity(IdentityGridEntity &&original)\n+Definition: identitygridentity.hh:110\n+Dune::IdentityGridEntity::equals\n+bool equals(const IdentityGridEntity &other) const\n+Definition: identitygridentity.hh:137\n+Dune::IdentityGridEntity::hostEntity_\n+HostGridEntity hostEntity_\n+Definition: identitygridentity.hh:179\n+Dune::IdentityGridEntity::EntitySeed\n+GridImp::template Codim< codim >::EntitySeed EntitySeed\n+The type of the EntitySeed interface class.\n+Definition: identitygridentity.hh:88\n+Dune::IdentityGridEntity::seed\n+EntitySeed seed() const\n+Create EntitySeed.\n+Definition: identitygridentity.hh:148\n+Dune::IdentityGridEntity::IdentityGridEntity\n+IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity\n+&hostEntity)\n+Definition: identitygridentity.hh:94\n+Dune::IdentityGridEntity::geometry\n+Geometry geometry() const\n+geometry of this entity\n+Definition: identitygridentity.hh:173\n+Dune::IdentityGridEntity::partitionType\n+PartitionType partitionType() const\n+The partition type for parallel computing.\n+Definition: identitygridentity.hh:161\n+Dune::IdentityGridEntity::subEntities\n+unsigned int subEntities(unsigned int cc) const\n+Return the number of subEntities of codimension codim.\n+Definition: identitygridentity.hh:167\n+Dune::IdentityGridEntity::IdentityGridEntity\n+IdentityGridEntity(const IdentityGridEntity &original)\n+Definition: identitygridentity.hh:105\n+Dune::IdentityGridEntity::IdentityGridEntity\n+IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)\n+Definition: identitygridentity.hh:99\n+Dune::IdentityGridEntity::hasFather\n+bool hasFather() const\n+returns true if father entity exists\n+Definition: identitygridentity.hh:143\n+Dune::IdentityGridEntity::Geometry\n+GridImp::template Codim< codim >::Geometry Geometry\n+Definition: identitygridentity.hh:85\n+Dune::IdentityGridEntity::operator=\n+IdentityGridEntity & operator=(const IdentityGridEntity &original)\n+Definition: identitygridentity.hh:116\n+Dune::IdentityGridEntity::level\n+int level() const\n+level of this element\n+Definition: identitygridentity.hh:154\n+Dune::IdentityGridLevelIntersectionIterator\n+Definition: identitygridintersectioniterator.hh:84\n+Dune::IdentityGridLeafIntersectionIterator\n+Iterator over all element neighborsMesh entities of codimension 0 (\"elements\")\n+allow to visit all nei...\n+Definition: identitygridintersectioniterator.hh:29\n+Dune::IdentityGridHierarchicIterator\n+Iterator over the descendants of an entity.Mesh entities of codimension 0\n+(\"elements\") allow to visit...\n+Definition: identitygridhierarchiciterator.hh:26\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::subEntities\n+unsigned int subEntities(unsigned int codim) const\n+Return the number of subEntities of codimension codim.\n+Definition: identitygridentity.hh:319\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n+IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)\n+Definition: identitygridentity.hh:243\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::isLeaf\n+bool isLeaf() const\n+returns true if Entity has NO children\n+Definition: identitygridentity.hh:367\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hbegin\n+IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const\n+Inter-level access to son elements on higher levels<=maxlevel. This is provided\n+for sparsely stored n...\n+Definition: identitygridentity.hh:398\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::LocalGeometry\n+GridImp::template Codim< 0 >::LocalGeometry LocalGeometry\n+Definition: identitygridentity.hh:218\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::EntitySeed\n+GridImp::template Codim< 0 >::EntitySeed EntitySeed\n+The type of the EntitySeed interface class.\n+Definition: identitygridentity.hh:230\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::seed\n+EntitySeed seed() const\n+Create EntitySeed.\n+Definition: identitygridentity.hh:292\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ilevelbegin\n+IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const\n+First level intersection.\n+Definition: identitygridentity.hh:335\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n+IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity\n+&hostEntity)\n+Definition: identitygridentity.hh:238\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::level\n+int level() const\n+Level of this element.\n+Definition: identitygridentity.hh:298\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ileafbegin\n+IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const\n+First leaf intersection.\n+Definition: identitygridentity.hh:351\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hostEntity_\n+HostGridEntity hostEntity_\n+Definition: identitygridentity.hh:435\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::operator=\n+IdentityGridEntity & operator=(const IdentityGridEntity &original)\n+Definition: identitygridentity.hh:260\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::geometry\n+Geometry geometry() const\n+Geometry of this entity.\n+Definition: identitygridentity.hh:311\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ilevelend\n+IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const\n+Reference to one past the last neighbor.\n+Definition: identitygridentity.hh:343\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n+IdentityGridEntity(const IdentityGridEntity &original)\n+Definition: identitygridentity.hh:249\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hend\n+IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const\n+Returns iterator to one past the last son.\n+Definition: identitygridentity.hh:405\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ileafend\n+IdentityGridLeafIntersectionIterator< GridImp > ileafend() const\n+Reference to one past the last leaf intersection.\n+Definition: identitygridentity.hh:359\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::wasRefined\n+bool wasRefined() const\n+Definition: identitygridentity.hh:412\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::operator=\n+IdentityGridEntity & operator=(IdentityGridEntity &&original)\n+Definition: identitygridentity.hh:271\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hasFather\n+bool hasFather() const\n+returns true if father entity exists\n+Definition: identitygridentity.hh:287\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::HostGridEntity\n+GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity\n+HostGridEntity\n+Definition: identitygridentity.hh:214\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::father\n+GridImp::template Codim< 0 >::Entity father() const\n+Definition: identitygridentity.hh:374\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::mightBeCoarsened\n+bool mightBeCoarsened() const\n+Definition: identitygridentity.hh:424\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::geometryInFather\n+LocalGeometry geometryInFather() const\n+Location of this element relative to the reference element element of the\n+father. This is sufficient ...\n+Definition: identitygridentity.hh:388\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::identityGrid_\n+const GridImp * identityGrid_\n+Definition: identitygridentity.hh:436\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::subEntity\n+GridImp::template Codim< cc >::Entity subEntity(int i) const\n+Provide access to sub entity i of given codimension. Entities are numbered 0\n+... subEntities(cc)-1.\n+Definition: identitygridentity.hh:329\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n+IdentityGridEntity(IdentityGridEntity &&original)\n+Definition: identitygridentity.hh:254\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::Geometry\n+GridImp::template Codim< 0 >::Geometry Geometry\n+Definition: identitygridentity.hh:216\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::equals\n+bool equals(const IdentityGridEntity &other) const\n+Definition: identitygridentity.hh:281\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>::partitionType\n+PartitionType partitionType() const\n+The partition type for parallel computing.\n+Definition: identitygridentity.hh:305\n+Dune::IdentityGridLevelIndexSet\n+Definition: identitygridindexsets.hh:26\n+Dune::IdentityGridLeafIndexSet\n+Definition: identitygridindexsets.hh:103\n+Dune::IdentityGridGlobalIdSet\n+Definition: identitygridindexsets.hh:199\n+Dune::IdentityGridLocalIdSet\n+Definition: identitygridindexsets.hh:251\n+grid.hh\n+Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00734.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00734.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridentity.hh File Reference\n+dune-grid: identitygridleveliterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,41 +65,38 @@\n
  • dune
  • grid
  • identitygrid
  • \n \n \n
    \n \n-
    identitygridentity.hh File Reference
    \n+
    identitygridleveliterator.hh File Reference
    \n
    \n
    \n \n-

    The IdentityGridEntity class. \n+

    The IdentityGridLevelIterator class. \n More...

    \n-
    #include <dune/grid/common/grid.hh>
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The IdentityGridEntity class.

    \n+

    The IdentityGridLevelIterator class.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,27 +6,25 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n Classes | Namespaces\n-identitygridentity.hh File Reference\n-The IdentityGridEntity class. More...\n-#include \n+identitygridleveliterator.hh File Reference\n+The IdentityGridLevelIterator class. More...\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdentityGridEntity<_codim,_dim,_GridImp_>\n-\u00a0 The implementation of entities in a IdentityGrid. More...\n-\u00a0\n-class \u00a0Dune::IdentityGridEntity<_0,_dim,_GridImp_>\n-\u00a0 Specialization for codim-0-entities. More...\n+class \u00a0Dune::IdentityGridLevelIterator<_codim,_pitype,_GridImp_>\n+\u00a0 Iterator over all entities of a given codimension and level of a grid.\n+ More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The IdentityGridEntity class.\n+The IdentityGridLevelIterator class.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00734_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridentity.hh Source File\n+dune-grid: identitygridleveliterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,458 +62,85 @@\n \n \n
    \n
    \n-
    identitygridentity.hh
    \n+
    identitygridleveliterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IDENTITYGRIDENTITY_HH
    \n-
    6#define DUNE_IDENTITYGRIDENTITY_HH
    \n+
    5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH
    \n+
    6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH
    \n
    7
    \n-\n-
    13
    \n+\n+
    9
    \n
    14namespace Dune {
    \n
    15
    \n-
    16
    \n-
    17 // Forward declarations
    \n-
    18
    \n-
    19 template<int codim, int dim, class GridImp>
    \n-
    20 class IdentityGridEntity;
    \n-
    21
    \n-
    22 template<int codim, PartitionIteratorType pitype, class GridImp>
    \n-
    23 class IdentityGridLevelIterator;
    \n+
    19 template<int codim, PartitionIteratorType pitype, class GridImp>
    \n+\n+
    21 {
    \n+
    22
    \n+
    23 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::template Partition<pitype>::LevelIterator HostGridLevelIterator;
    \n
    24
    \n-
    25 template<class GridImp>
    \n-
    26 class IdentityGridLevelIntersectionIterator;
    \n-
    27
    \n-
    28 template<class GridImp>
    \n-
    29 class IdentityGridLeafIntersectionIterator;
    \n+
    25 public:
    \n+
    26
    \n+
    27 constexpr static int codimension = codim;
    \n+
    28
    \n+
    29 typedef typename GridImp::template Codim<codim>::Entity Entity;
    \n
    30
    \n-
    31 template<class GridImp>
    \n-
    32 class IdentityGridHierarchicIterator;
    \n-
    33
    \n-
    34
    \n-
    35 // External forward declarations
    \n-
    36 template< class Grid >
    \n-
    37 struct HostGridAccess;
    \n-
    38
    \n-
    39
    \n-
    40 //**********************************************************************
    \n-
    41 //
    \n-
    42 // --IdentityGridEntity
    \n-
    43 // --Entity
    \n-
    44 //
    \n-
    52 template<int codim, int dim, class GridImp>
    \n-\n-
    54 public EntityDefaultImplementation <codim,dim,GridImp,IdentityGridEntity>
    \n-
    55 {
    \n-
    56
    \n-
    57 template <class GridImp_>
    \n-\n-
    59
    \n-
    60 template <class GridImp_>
    \n-\n-
    62
    \n-
    63 template <class GridImp_>
    \n-\n-
    65
    \n-
    66 template <class GridImp_>
    \n-\n-
    68
    \n-
    69 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n+
    32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)
    \n+
    33 : identityGrid_(identityGrid),
    \n+
    34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template begin<codim,pitype>())
    \n+
    35 {}
    \n+
    36
    \n+
    37
    \n+
    43 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, [[maybe_unused]] bool endDummy)
    \n+
    44 : identityGrid_(identityGrid),
    \n+
    45 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template end<codim,pitype>())
    \n+
    46 {}
    \n+
    47
    \n+
    48
    \n+
    50 void increment() {
    \n+
    51 ++hostLevelIterator_;
    \n+
    52 }
    \n+
    53
    \n+\n+
    56 return Entity{{identityGrid_,*hostLevelIterator_}};
    \n+
    57 }
    \n+
    58
    \n+
    60 bool equals(const IdentityGridLevelIterator& i) const {
    \n+
    61 return hostLevelIterator_ == i.hostLevelIterator_;
    \n+
    62 }
    \n+
    63
    \n+
    64 private:
    \n+
    65 const GridImp* identityGrid_;
    \n+
    66
    \n+
    67 HostGridLevelIterator hostLevelIterator_;
    \n+
    68 };
    \n+
    69
    \n
    70
    \n-
    71
    \n-
    72 private:
    \n-
    73
    \n-
    74 typedef typename GridImp::ctype ctype;
    \n-
    75
    \n-
    76 // The codimension of this entity wrt the host grid
    \n-
    77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension + codim;
    \n-
    78
    \n-
    79 // equivalent entity in the host grid
    \n-
    80 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
    \n-
    81
    \n-
    82
    \n-
    83 public:
    \n-
    84
    \n-
    85 typedef typename GridImp::template Codim<codim>::Geometry Geometry;
    \n-
    86
    \n-
    88 typedef typename GridImp::template Codim<codim>::EntitySeed EntitySeed;
    \n-
    89
    \n-\n-
    91 : identityGrid_(nullptr)
    \n-
    92 {}
    \n-
    93
    \n-
    94 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
    \n-
    95 : hostEntity_(hostEntity)
    \n-
    96 , identityGrid_(identityGrid)
    \n-
    97 {}
    \n-
    98
    \n-
    99 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
    \n-
    100 : hostEntity_(std::move(hostEntity))
    \n-
    101 , identityGrid_(identityGrid)
    \n-
    102 {}
    \n-
    103
    \n-\n-
    106 : hostEntity_(original.hostEntity_)
    \n-
    107 , identityGrid_(original.identityGrid_)
    \n-
    108 {}
    \n-
    109
    \n-\n-
    111 : hostEntity_(std::move(original.hostEntity_))
    \n-
    112 , identityGrid_(original.identityGrid_)
    \n-
    113 {}
    \n-
    114
    \n-\n-
    117 {
    \n-
    118 if (this != &original)
    \n-
    119 {
    \n-
    120 identityGrid_ = original.identityGrid_;
    \n-
    121 hostEntity_ = original.hostEntity_;
    \n-
    122 }
    \n-
    123 return *this;
    \n-
    124 }
    \n-
    125
    \n-\n-
    128 {
    \n-
    129 if (this != &original)
    \n-
    130 {
    \n-
    131 identityGrid_ = original.identityGrid_;
    \n-
    132 hostEntity_ = std::move(original.hostEntity_);
    \n-
    133 }
    \n-
    134 return *this;
    \n-
    135 }
    \n-
    136
    \n-
    137 bool equals(const IdentityGridEntity& other) const
    \n-
    138 {
    \n-
    139 return hostEntity_ == other.hostEntity_;
    \n-
    140 }
    \n-
    141
    \n-
    143 bool hasFather () const {
    \n-
    144 return hostEntity_.hasFather();
    \n-
    145 }
    \n-
    146
    \n-\n-
    149 {
    \n-
    150 return EntitySeed(hostEntity_);
    \n-
    151 }
    \n-
    152
    \n-
    154 int level () const {
    \n-
    155 return hostEntity_.level();
    \n-
    156 }
    \n-
    157
    \n-
    158
    \n-\n-
    162 return hostEntity_.partitionType();
    \n-
    163 }
    \n-
    164
    \n-
    167 unsigned int subEntities (unsigned int cc) const
    \n-
    168 {
    \n-
    169 return hostEntity_.subEntities(cc);
    \n-
    170 }
    \n-
    171
    \n-\n-
    174 {
    \n-
    175 return Geometry( hostEntity_.geometry() );
    \n-
    176 }
    \n-
    177
    \n-
    178
    \n-
    179 HostGridEntity hostEntity_;
    \n-
    180
    \n-
    181 private:
    \n-
    182
    \n-
    183 const GridImp* identityGrid_;
    \n-
    184
    \n-
    185 };
    \n-
    186
    \n-
    187
    \n-
    188
    \n-
    189
    \n-
    190 //***********************
    \n-
    191 //
    \n-
    192 // --IdentityGridEntity
    \n-
    193 //
    \n-
    194 //***********************
    \n-
    202 template<int dim, class GridImp>
    \n-
    203 class IdentityGridEntity<0,dim,GridImp> :
    \n-
    204 public EntityDefaultImplementation<0,dim,GridImp, IdentityGridEntity>
    \n-
    205 {
    \n-
    206 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n-
    207
    \n-
    208 public:
    \n-
    209
    \n-
    210 // The codimension of this entitypointer wrt the host grid
    \n-
    211 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension - GridImp::dimension;
    \n-
    212
    \n-
    213 // equivalent entity in the host grid
    \n-
    214 typedef typename GridImp::HostGridType::Traits::template Codim<CodimInHostGrid>::Entity HostGridEntity;
    \n-
    215
    \n-
    216 typedef typename GridImp::template Codim<0>::Geometry Geometry;
    \n-
    217
    \n-
    218 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;
    \n-
    219
    \n-\n-
    222
    \n-\n-
    225
    \n-\n-
    228
    \n-
    230 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;
    \n-
    231
    \n-
    232
    \n-
    233
    \n-\n-
    235 : identityGrid_(nullptr)
    \n-
    236 {}
    \n-
    237
    \n-
    238 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity& hostEntity)
    \n-
    239 : hostEntity_(hostEntity)
    \n-
    240 , identityGrid_(identityGrid)
    \n-
    241 {}
    \n-
    242
    \n-
    243 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)
    \n-
    244 : hostEntity_(std::move(hostEntity))
    \n-
    245 , identityGrid_(identityGrid)
    \n-
    246 {}
    \n-
    247
    \n-\n-
    250 : hostEntity_(original.hostEntity_)
    \n-
    251 , identityGrid_(original.identityGrid_)
    \n-
    252 {}
    \n-
    253
    \n-\n-
    255 : hostEntity_(std::move(original.hostEntity_))
    \n-
    256 , identityGrid_(original.identityGrid_)
    \n-
    257 {}
    \n-
    258
    \n-\n-
    261 {
    \n-
    262 if (this != &original)
    \n-
    263 {
    \n-
    264 identityGrid_ = original.identityGrid_;
    \n-
    265 hostEntity_ = original.hostEntity_;
    \n-
    266 }
    \n-
    267 return *this;
    \n-
    268 }
    \n-
    269
    \n-\n-
    272 {
    \n-
    273 if (this != &original)
    \n-
    274 {
    \n-
    275 identityGrid_ = original.identityGrid_;
    \n-
    276 hostEntity_ = std::move(original.hostEntity_);
    \n-
    277 }
    \n-
    278 return *this;
    \n-
    279 }
    \n-
    280
    \n-
    281 bool equals(const IdentityGridEntity& other) const
    \n-
    282 {
    \n-
    283 return hostEntity_ == other.hostEntity_;
    \n-
    284 }
    \n-
    285
    \n-
    287 bool hasFather () const {
    \n-
    288 return hostEntity_.hasFather();
    \n-
    289 }
    \n-
    290
    \n-\n-
    293 {
    \n-
    294 return EntitySeed(hostEntity_);
    \n-
    295 }
    \n-
    296
    \n-
    298 int level () const
    \n-
    299 {
    \n-
    300 return hostEntity_.level();
    \n-
    301 }
    \n-
    302
    \n-
    303
    \n-\n-
    306 return hostEntity_.partitionType();
    \n-
    307 }
    \n-
    308
    \n-
    309
    \n-\n-
    312 {
    \n-
    313 return Geometry( hostEntity_.geometry() );
    \n-
    314 }
    \n-
    315
    \n-
    316
    \n-
    319 unsigned int subEntities (unsigned int codim) const
    \n-
    320 {
    \n-
    321 return hostEntity_.subEntities(codim);
    \n-
    322 }
    \n-
    323
    \n-
    324
    \n-
    328 template<int cc>
    \n-
    329 typename GridImp::template Codim<cc>::Entity subEntity (int i) const {
    \n-
    330 return IdentityGridEntity<cc,dim,GridImp>(identityGrid_, hostEntity_.template subEntity<cc>(i));
    \n-
    331 }
    \n-
    332
    \n-
    333
    \n-\n-\n-
    337 identityGrid_,
    \n-
    338 identityGrid_->getHostGrid().levelGridView(level()).ibegin(hostEntity_));
    \n-
    339 }
    \n-
    340
    \n-
    341
    \n-\n-\n-
    345 identityGrid_,
    \n-
    346 identityGrid_->getHostGrid().levelGridView(level()).iend(hostEntity_));
    \n-
    347 }
    \n-
    348
    \n-
    349
    \n-\n-\n-
    353 identityGrid_,
    \n-
    354 identityGrid_->getHostGrid().leafGridView().ibegin(hostEntity_));
    \n-
    355 }
    \n-
    356
    \n-
    357
    \n-\n-\n-
    361 identityGrid_,
    \n-
    362 identityGrid_->getHostGrid().leafGridView().iend(hostEntity_));
    \n-
    363 }
    \n-
    364
    \n-
    365
    \n-
    367 bool isLeaf() const {
    \n-
    368 return hostEntity_.isLeaf();
    \n-
    369 }
    \n-
    370
    \n-
    371
    \n-
    374 typename GridImp::template Codim<0>::Entity father () const {
    \n-
    375 return IdentityGridEntity(identityGrid_, hostEntity_.father());
    \n-
    376 }
    \n-
    377
    \n-
    378
    \n-\n-
    389 {
    \n-
    390 return LocalGeometry( hostEntity_.geometryInFather() );
    \n-
    391 }
    \n-
    392
    \n-
    393
    \n-\n-
    399 {
    \n-
    400 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel);
    \n-
    401 }
    \n-
    402
    \n-
    403
    \n-\n-
    406 {
    \n-
    407 return IdentityGridHierarchicIterator<const GridImp>(identityGrid_, *this, maxLevel, true);
    \n-
    408 }
    \n-
    409
    \n-
    410
    \n-
    412 bool wasRefined () const
    \n-
    413 {
    \n-
    414 if (identityGrid_->adaptationStep!=GridImp::adaptDone)
    \n-
    415 return false;
    \n-
    416
    \n-
    417 int level = this->level();
    \n-
    418 int index = identityGrid_->levelIndexSet(level).index(*this);
    \n-
    419 return identityGrid_->refinementMark_[level][index];
    \n-
    420 }
    \n-
    421
    \n-
    422
    \n-
    424 bool mightBeCoarsened () const
    \n-
    425 {
    \n-
    426 return true;
    \n-
    427 }
    \n-
    428
    \n-
    429
    \n-
    430 // /////////////////////////////////////////
    \n-
    431 // Internal stuff
    \n-
    432 // /////////////////////////////////////////
    \n-
    433
    \n-
    434
    \n-\n-
    436 const GridImp* identityGrid_;
    \n-
    437
    \n-
    438 private:
    \n-
    439
    \n-
    440 typedef typename GridImp::ctype ctype;
    \n-
    441
    \n-
    442 }; // end of IdentityGridEntity codim = 0
    \n-
    443
    \n-
    444
    \n-
    445} // namespace Dune
    \n-
    446
    \n-
    447
    \n-
    448#endif
    \n-
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n-
    STL namespace.
    \n+
    71} // namespace Dune
    \n+
    72
    \n+
    73#endif
    \n+\n+
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Default Implementations for EntityImp.
    Definition: common/entity.hh:542
    \n-
    GeometryType type() const
    Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
    Definition: common/entity.hh:576
    \n-
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n-
    The implementation of entities in a IdentityGrid.
    Definition: identitygridentity.hh:55
    \n-
    IdentityGridEntity()
    Definition: identitygridentity.hh:90
    \n-
    IdentityGridEntity & operator=(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:127
    \n-
    IdentityGridEntity(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:110
    \n-
    bool equals(const IdentityGridEntity &other) const
    Definition: identitygridentity.hh:137
    \n-
    HostGridEntity hostEntity_
    Definition: identitygridentity.hh:179
    \n-
    GridImp::template Codim< codim >::EntitySeed EntitySeed
    The type of the EntitySeed interface class.
    Definition: identitygridentity.hh:88
    \n-
    EntitySeed seed() const
    Create EntitySeed.
    Definition: identitygridentity.hh:148
    \n-
    IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
    Definition: identitygridentity.hh:94
    \n-
    Geometry geometry() const
    geometry of this entity
    Definition: identitygridentity.hh:173
    \n-
    PartitionType partitionType() const
    The partition type for parallel computing.
    Definition: identitygridentity.hh:161
    \n-
    unsigned int subEntities(unsigned int cc) const
    Return the number of subEntities of codimension codim.
    Definition: identitygridentity.hh:167
    \n-
    IdentityGridEntity(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:105
    \n-
    IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
    Definition: identitygridentity.hh:99
    \n-
    bool hasFather() const
    returns true if father entity exists
    Definition: identitygridentity.hh:143
    \n-
    GridImp::template Codim< codim >::Geometry Geometry
    Definition: identitygridentity.hh:85
    \n-
    IdentityGridEntity & operator=(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:116
    \n-
    int level() const
    level of this element
    Definition: identitygridentity.hh:154
    \n-
    Definition: identitygridintersectioniterator.hh:84
    \n-
    Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
    Definition: identitygridintersectioniterator.hh:29
    \n-
    Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
    Definition: identitygridhierarchiciterator.hh:26
    \n-
    unsigned int subEntities(unsigned int codim) const
    Return the number of subEntities of codimension codim.
    Definition: identitygridentity.hh:319
    \n-
    IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)
    Definition: identitygridentity.hh:243
    \n-
    bool isLeaf() const
    returns true if Entity has NO children
    Definition: identitygridentity.hh:367
    \n-
    IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
    Inter-level access to son elements on higher levels<=maxlevel. This is provided for sparsely stored n...
    Definition: identitygridentity.hh:398
    \n-
    GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
    Definition: identitygridentity.hh:218
    \n-
    GridImp::template Codim< 0 >::EntitySeed EntitySeed
    The type of the EntitySeed interface class.
    Definition: identitygridentity.hh:230
    \n-
    EntitySeed seed() const
    Create EntitySeed.
    Definition: identitygridentity.hh:292
    \n-
    IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const
    First level intersection.
    Definition: identitygridentity.hh:335
    \n-
    IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity &hostEntity)
    Definition: identitygridentity.hh:238
    \n-
    int level() const
    Level of this element.
    Definition: identitygridentity.hh:298
    \n-
    IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const
    First leaf intersection.
    Definition: identitygridentity.hh:351
    \n-
    HostGridEntity hostEntity_
    Definition: identitygridentity.hh:435
    \n-
    IdentityGridEntity & operator=(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:260
    \n-
    Geometry geometry() const
    Geometry of this entity.
    Definition: identitygridentity.hh:311
    \n-
    IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const
    Reference to one past the last neighbor.
    Definition: identitygridentity.hh:343
    \n-
    IdentityGridEntity(const IdentityGridEntity &original)
    Definition: identitygridentity.hh:249
    \n-
    IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const
    Returns iterator to one past the last son.
    Definition: identitygridentity.hh:405
    \n-
    IdentityGridLeafIntersectionIterator< GridImp > ileafend() const
    Reference to one past the last leaf intersection.
    Definition: identitygridentity.hh:359
    \n-
    bool wasRefined() const
    Definition: identitygridentity.hh:412
    \n-
    IdentityGridEntity & operator=(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:271
    \n-
    bool hasFather() const
    returns true if father entity exists
    Definition: identitygridentity.hh:287
    \n-
    GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity HostGridEntity
    Definition: identitygridentity.hh:214
    \n-
    GridImp::template Codim< 0 >::Entity father() const
    Definition: identitygridentity.hh:374
    \n-
    bool mightBeCoarsened() const
    Definition: identitygridentity.hh:424
    \n-
    LocalGeometry geometryInFather() const
    Location of this element relative to the reference element element of the father. This is sufficient ...
    Definition: identitygridentity.hh:388
    \n-
    const GridImp * identityGrid_
    Definition: identitygridentity.hh:436
    \n-
    GridImp::template Codim< cc >::Entity subEntity(int i) const
    Provide access to sub entity i of given codimension. Entities are numbered 0 ... subEntities(cc)-1.
    Definition: identitygridentity.hh:329
    \n-
    IdentityGridEntity(IdentityGridEntity &&original)
    Definition: identitygridentity.hh:254
    \n-
    GridImp::template Codim< 0 >::Geometry Geometry
    Definition: identitygridentity.hh:216
    \n-
    bool equals(const IdentityGridEntity &other) const
    Definition: identitygridentity.hh:281
    \n-
    PartitionType partitionType() const
    The partition type for parallel computing.
    Definition: identitygridentity.hh:305
    \n-
    Definition: identitygridindexsets.hh:26
    \n-
    Definition: identitygridindexsets.hh:103
    \n-
    Definition: identitygridindexsets.hh:199
    \n-
    Definition: identitygridindexsets.hh:251
    \n-
    Different resources needed by all grid implementations.
    \n+
    Iterator over all entities of a given codimension and level of a grid.
    Definition: identitygridleveliterator.hh:21
    \n+
    void increment()
    prefix increment
    Definition: identitygridleveliterator.hh:50
    \n+
    GridImp::template Codim< codim >::Entity Entity
    Definition: identitygridleveliterator.hh:29
    \n+
    IdentityGridLevelIterator(const GridImp *identityGrid, int level)
    Constructor.
    Definition: identitygridleveliterator.hh:32
    \n+
    IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool endDummy)
    Constructor which create the end iterator.
    Definition: identitygridleveliterator.hh:43
    \n+
    static constexpr int codimension
    Definition: identitygridleveliterator.hh:27
    \n+
    bool equals(const IdentityGridLevelIterator &i) const
    equality
    Definition: identitygridleveliterator.hh:60
    \n+
    Entity dereference() const
    dereferencing
    Definition: identitygridleveliterator.hh:55
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,622 +5,113 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n-identitygridentity.hh\n+identitygridleveliterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IDENTITYGRIDENTITY_HH\n- 6#define DUNE_IDENTITYGRIDENTITY_HH\n+ 5#ifndef DUNE_IDENTITYGRIDLEVELITERATOR_HH\n+ 6#define DUNE_IDENTITYGRIDLEVELITERATOR_HH\n 7\n- 12#include \n- 13\n+ 8#include \n+ 9\n 14namespace Dune {\n 15\n- 16\n- 17 // Forward declarations\n- 18\n- 19 template\n- 20 class IdentityGridEntity;\n- 21\n- 22 template\n- 23 class IdentityGridLevelIterator;\n+ 19 template\n+20 class IdentityGridLevelIterator\n+ 21 {\n+ 22\n+ 23 typedef typename GridImp::HostGridType::Traits::template Codim::\n+template Partition::LevelIterator HostGridLevelIterator;\n 24\n- 25 template\n- 26 class IdentityGridLevelIntersectionIterator;\n- 27\n- 28 template\n- 29 class IdentityGridLeafIntersectionIterator;\n+ 25 public:\n+ 26\n+27 constexpr static int codimension = codim;\n+ 28\n+29 typedef typename GridImp::template Codim::Entity Entity;\n 30\n- 31 template\n- 32 class IdentityGridHierarchicIterator;\n- 33\n- 34\n- 35 // External forward declarations\n- 36 template< class Grid >\n- 37 struct HostGridAccess;\n- 38\n- 39\n- 40 //**********************************************************************\n- 41 //\n- 42 // --IdentityGridEntity\n- 43 // --Entity\n- 44 //\n- 52 template\n-53 class IdentityGridEntity :\n- 54 public EntityDefaultImplementation \n- 55 {\n- 56\n- 57 template \n-58 friend class IdentityGridLevelIndexSet;\n- 59\n- 60 template \n-61 friend class IdentityGridLeafIndexSet;\n- 62\n- 63 template \n-64 friend class IdentityGridLocalIdSet;\n- 65\n- 66 template \n-67 friend class IdentityGridGlobalIdSet;\n- 68\n- 69 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n->;\n+32 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level)\n+ 33 : identityGrid_(identityGrid),\n+ 34 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template\n+begin())\n+ 35 {}\n+ 36\n+ 37\n+43 explicit IdentityGridLevelIterator(const GridImp* identityGrid, int level, [\n+[maybe_unused]] bool endDummy)\n+ 44 : identityGrid_(identityGrid),\n+ 45 hostLevelIterator_(identityGrid->hostgrid_->levelGridView(level).template\n+end())\n+ 46 {}\n+ 47\n+ 48\n+50 void increment() {\n+ 51 ++hostLevelIterator_;\n+ 52 }\n+ 53\n+55 Entity dereference() const {\n+ 56 return Entity{{identityGrid_,*hostLevelIterator_}};\n+ 57 }\n+ 58\n+60 bool equals(const IdentityGridLevelIterator& i) const {\n+ 61 return hostLevelIterator_ == i.hostLevelIterator_;\n+ 62 }\n+ 63\n+ 64 private:\n+ 65 const GridImp* identityGrid_;\n+ 66\n+ 67 HostGridLevelIterator hostLevelIterator_;\n+ 68 };\n+ 69\n 70\n- 71\n- 72 private:\n- 73\n- 74 typedef typename GridImp::ctype ctype;\n- 75\n- 76 // The codimension of this entity wrt the host grid\n- 77 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension -\n-GridImp::dimension + codim;\n- 78\n- 79 // equivalent entity in the host grid\n- 80 typedef typename GridImp::HostGridType::Traits::template\n-Codim::Entity HostGridEntity;\n- 81\n- 82\n- 83 public:\n- 84\n-85 typedef typename GridImp::template Codim::Geometry Geometry;\n- 86\n-88 typedef typename GridImp::template Codim::EntitySeed EntitySeed;\n- 89\n-90 IdentityGridEntity()\n- 91 : identityGrid_(nullptr)\n- 92 {}\n- 93\n-94 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity&\n-hostEntity)\n- 95 : hostEntity_(hostEntity)\n- 96 , identityGrid_(identityGrid)\n- 97 {}\n- 98\n-99 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&& hostEntity)\n- 100 : hostEntity_(std::move(hostEntity))\n- 101 , identityGrid_(identityGrid)\n- 102 {}\n- 103\n-105 IdentityGridEntity(const IdentityGridEntity& original)\n- 106 : hostEntity_(original.hostEntity_)\n- 107 , identityGrid_(original.identityGrid_)\n- 108 {}\n- 109\n-110 IdentityGridEntity(IdentityGridEntity&& original)\n- 111 : hostEntity_(std::move(original.hostEntity_))\n- 112 , identityGrid_(original.identityGrid_)\n- 113 {}\n- 114\n-116 IdentityGridEntity& operator=(const IdentityGridEntity& original)\n- 117 {\n- 118 if (this != &original)\n- 119 {\n- 120 identityGrid_ = original.identityGrid_;\n- 121 hostEntity_ = original.hostEntity_;\n- 122 }\n- 123 return *this;\n- 124 }\n- 125\n-127 IdentityGridEntity& operator=(IdentityGridEntity&& original)\n- 128 {\n- 129 if (this != &original)\n- 130 {\n- 131 identityGrid_ = original.identityGrid_;\n- 132 hostEntity_ = std::move(original.hostEntity_);\n- 133 }\n- 134 return *this;\n- 135 }\n- 136\n-137 bool equals(const IdentityGridEntity& other) const\n- 138 {\n- 139 return hostEntity_ == other.hostEntity_;\n- 140 }\n- 141\n-143 bool hasFather () const {\n- 144 return hostEntity_.hasFather();\n- 145 }\n- 146\n-148 EntitySeed seed () const\n- 149 {\n- 150 return EntitySeed(hostEntity_);\n- 151 }\n- 152\n-154 int level () const {\n- 155 return hostEntity_.level();\n- 156 }\n- 157\n- 158\n-161 PartitionType partitionType () const {\n- 162 return hostEntity_.partitionType();\n- 163 }\n- 164\n-167 unsigned int subEntities (unsigned int cc) const\n- 168 {\n- 169 return hostEntity_.subEntities(cc);\n- 170 }\n- 171\n-173 Geometry geometry () const\n- 174 {\n- 175 return Geometry( hostEntity_.geometry() );\n- 176 }\n- 177\n- 178\n-179 HostGridEntity hostEntity_;\n- 180\n- 181 private:\n- 182\n-183 const GridImp* identityGrid_;\n- 184\n- 185 };\n- 186\n- 187\n- 188\n- 189\n- 190 //***********************\n- 191 //\n- 192 // --IdentityGridEntity\n- 193 //\n- 194 //***********************\n- 202 template\n-203 class IdentityGridEntity<0,dim,GridImp> :\n- 204 public EntityDefaultImplementation<0,dim,GridImp, IdentityGridEntity>\n- 205 {\n- 206 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n->;\n- 207\n- 208 public:\n- 209\n- 210 // The codimension of this entitypointer wrt the host grid\n-211 constexpr static int CodimInHostGrid = GridImp::HostGridType::dimension -\n-GridImp::dimension;\n- 212\n- 213 // equivalent entity in the host grid\n-214 typedef typename GridImp::HostGridType::Traits::template\n-Codim::Entity HostGridEntity;\n- 215\n-216 typedef typename GridImp::template Codim<0>::Geometry Geometry;\n- 217\n-218 typedef typename GridImp::template Codim<0>::LocalGeometry LocalGeometry;\n- 219\n-221 typedef IdentityGridLevelIntersectionIterator\n-LevelIntersectionIterator;\n- 222\n-224 typedef IdentityGridLeafIntersectionIterator\n-LeafIntersectionIterator;\n- 225\n-227 typedef IdentityGridHierarchicIterator HierarchicIterator;\n- 228\n-230 typedef typename GridImp::template Codim<0>::EntitySeed EntitySeed;\n- 231\n- 232\n- 233\n-234 IdentityGridEntity()\n- 235 : identityGrid_(nullptr)\n- 236 {}\n- 237\n-238 IdentityGridEntity(const GridImp* identityGrid, const HostGridEntity&\n-hostEntity)\n- 239 : hostEntity_(hostEntity)\n- 240 , identityGrid_(identityGrid)\n- 241 {}\n- 242\n-243 IdentityGridEntity(const GridImp* identityGrid, HostGridEntity&&\n-hostEntity)\n- 244 : hostEntity_(std::move(hostEntity))\n- 245 , identityGrid_(identityGrid)\n- 246 {}\n- 247\n-249 IdentityGridEntity(const IdentityGridEntity& original)\n- 250 : hostEntity_(original.hostEntity_)\n- 251 , identityGrid_(original.identityGrid_)\n- 252 {}\n- 253\n-254 IdentityGridEntity(IdentityGridEntity&& original)\n- 255 : hostEntity_(std::move(original.hostEntity_))\n- 256 , identityGrid_(original.identityGrid_)\n- 257 {}\n- 258\n-260 IdentityGridEntity& operator=(const IdentityGridEntity& original)\n- 261 {\n- 262 if (this != &original)\n- 263 {\n- 264 identityGrid_ = original.identityGrid_;\n- 265 hostEntity_ = original.hostEntity_;\n- 266 }\n- 267 return *this;\n- 268 }\n- 269\n-271 IdentityGridEntity& operator=(IdentityGridEntity&& original)\n- 272 {\n- 273 if (this != &original)\n- 274 {\n- 275 identityGrid_ = original.identityGrid_;\n- 276 hostEntity_ = std::move(original.hostEntity_);\n- 277 }\n- 278 return *this;\n- 279 }\n- 280\n-281 bool equals(const IdentityGridEntity& other) const\n- 282 {\n- 283 return hostEntity_ == other.hostEntity_;\n- 284 }\n- 285\n-287 bool hasFather () const {\n- 288 return hostEntity_.hasFather();\n- 289 }\n- 290\n-292 EntitySeed seed () const\n- 293 {\n- 294 return EntitySeed(hostEntity_);\n- 295 }\n- 296\n-298 int level () const\n- 299 {\n- 300 return hostEntity_.level();\n- 301 }\n- 302\n- 303\n-305 PartitionType partitionType () const {\n- 306 return hostEntity_.partitionType();\n- 307 }\n- 308\n- 309\n-311 Geometry geometry () const\n- 312 {\n- 313 return Geometry( hostEntity_.geometry() );\n- 314 }\n- 315\n- 316\n-319 unsigned int subEntities (unsigned int codim) const\n- 320 {\n- 321 return hostEntity_.subEntities(codim);\n- 322 }\n- 323\n- 324\n- 328 template\n-329 typename GridImp::template Codim::Entity subEntity (int i) const {\n- 330 return IdentityGridEntity(identityGrid_,\n-hostEntity_.template subEntity(i));\n- 331 }\n- 332\n- 333\n-335 IdentityGridLevelIntersectionIterator ilevelbegin () const {\n- 336 return IdentityGridLevelIntersectionIterator(\n- 337 identityGrid_,\n- 338 identityGrid_->getHostGrid().levelGridView(level()).ibegin(hostEntity_));\n- 339 }\n- 340\n- 341\n-343 IdentityGridLevelIntersectionIterator ilevelend () const {\n- 344 return IdentityGridLevelIntersectionIterator(\n- 345 identityGrid_,\n- 346 identityGrid_->getHostGrid().levelGridView(level()).iend(hostEntity_));\n- 347 }\n- 348\n- 349\n-351 IdentityGridLeafIntersectionIterator ileafbegin () const {\n- 352 return IdentityGridLeafIntersectionIterator(\n- 353 identityGrid_,\n- 354 identityGrid_->getHostGrid().leafGridView().ibegin(hostEntity_));\n- 355 }\n- 356\n- 357\n-359 IdentityGridLeafIntersectionIterator ileafend () const {\n- 360 return IdentityGridLeafIntersectionIterator(\n- 361 identityGrid_,\n- 362 identityGrid_->getHostGrid().leafGridView().iend(hostEntity_));\n- 363 }\n- 364\n- 365\n-367 bool isLeaf() const {\n- 368 return hostEntity_.isLeaf();\n- 369 }\n- 370\n- 371\n-374 typename GridImp::template Codim<0>::Entity father () const {\n- 375 return IdentityGridEntity(identityGrid_, hostEntity_.father());\n- 376 }\n- 377\n- 378\n-388 LocalGeometry geometryInFather () const\n- 389 {\n- 390 return LocalGeometry( hostEntity_.geometryInFather() );\n- 391 }\n- 392\n- 393\n-398 IdentityGridHierarchicIterator hbegin (int maxLevel) const\n- 399 {\n- 400 return IdentityGridHierarchicIterator(identityGrid_, *this,\n-maxLevel);\n- 401 }\n- 402\n- 403\n-405 IdentityGridHierarchicIterator hend (int maxLevel) const\n- 406 {\n- 407 return IdentityGridHierarchicIterator(identityGrid_, *this,\n-maxLevel, true);\n- 408 }\n- 409\n- 410\n-412 bool wasRefined () const\n- 413 {\n- 414 if (identityGrid_->adaptationStep!=GridImp::adaptDone)\n- 415 return false;\n- 416\n- 417 int level = this->level();\n- 418 int index = identityGrid_->levelIndexSet(level).index(*this);\n- 419 return identityGrid_->refinementMark_[level][index];\n- 420 }\n- 421\n- 422\n-424 bool mightBeCoarsened () const\n- 425 {\n- 426 return true;\n- 427 }\n- 428\n- 429\n- 430 // /////////////////////////////////////////\n- 431 // Internal stuff\n- 432 // /////////////////////////////////////////\n- 433\n- 434\n-435 HostGridEntity hostEntity_;\n-436 const GridImp* identityGrid_;\n- 437\n- 438 private:\n- 439\n- 440 typedef typename GridImp::ctype ctype;\n- 441\n- 442 }; // end of IdentityGridEntity codim = 0\n- 443\n- 444\n- 445} // namespace Dune\n- 446\n- 447\n- 448#endif\n-Dune::PartitionType\n-PartitionType\n-Attributes used in the generic overlap model.\n-Definition: gridenums.hh:30\n-std\n-STL namespace.\n+ 71} // namespace Dune\n+ 72\n+ 73#endif\n+gridenums.hh\n+Dune::levelGridView\n+Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid<\n+dim, dimworld, ct, GridFamily > &grid, int level)\n+level grid view for the given grid and level.\n+Definition: common/grid.hh:802\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::EntityDefaultImplementation\n-Default Implementations for EntityImp.\n-Definition: common/entity.hh:542\n-Dune::EntityDefaultImplementation<_codim,_dim,_GridImp,_IdentityGridEntity_>::\n-type\n-GeometryType type() const\n-Return the name of the reference element. The type can be used to access the\n-Dune::ReferenceElement.\n-Definition: common/entity.hh:576\n-Dune::HostGridAccess\n-provides access to host grid objects from GeometryGrid\n-Definition: identitygrid.hh:37\n-Dune::IdentityGridEntity\n-The implementation of entities in a IdentityGrid.\n-Definition: identitygridentity.hh:55\n-Dune::IdentityGridEntity::IdentityGridEntity\n-IdentityGridEntity()\n-Definition: identitygridentity.hh:90\n-Dune::IdentityGridEntity::operator=\n-IdentityGridEntity & operator=(IdentityGridEntity &&original)\n-Definition: identitygridentity.hh:127\n-Dune::IdentityGridEntity::IdentityGridEntity\n-IdentityGridEntity(IdentityGridEntity &&original)\n-Definition: identitygridentity.hh:110\n-Dune::IdentityGridEntity::equals\n-bool equals(const IdentityGridEntity &other) const\n-Definition: identitygridentity.hh:137\n-Dune::IdentityGridEntity::hostEntity_\n-HostGridEntity hostEntity_\n-Definition: identitygridentity.hh:179\n-Dune::IdentityGridEntity::EntitySeed\n-GridImp::template Codim< codim >::EntitySeed EntitySeed\n-The type of the EntitySeed interface class.\n-Definition: identitygridentity.hh:88\n-Dune::IdentityGridEntity::seed\n-EntitySeed seed() const\n-Create EntitySeed.\n-Definition: identitygridentity.hh:148\n-Dune::IdentityGridEntity::IdentityGridEntity\n-IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity\n-&hostEntity)\n-Definition: identitygridentity.hh:94\n-Dune::IdentityGridEntity::geometry\n-Geometry geometry() const\n-geometry of this entity\n-Definition: identitygridentity.hh:173\n-Dune::IdentityGridEntity::partitionType\n-PartitionType partitionType() const\n-The partition type for parallel computing.\n-Definition: identitygridentity.hh:161\n-Dune::IdentityGridEntity::subEntities\n-unsigned int subEntities(unsigned int cc) const\n-Return the number of subEntities of codimension codim.\n-Definition: identitygridentity.hh:167\n-Dune::IdentityGridEntity::IdentityGridEntity\n-IdentityGridEntity(const IdentityGridEntity &original)\n-Definition: identitygridentity.hh:105\n-Dune::IdentityGridEntity::IdentityGridEntity\n-IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)\n-Definition: identitygridentity.hh:99\n-Dune::IdentityGridEntity::hasFather\n-bool hasFather() const\n-returns true if father entity exists\n-Definition: identitygridentity.hh:143\n-Dune::IdentityGridEntity::Geometry\n-GridImp::template Codim< codim >::Geometry Geometry\n-Definition: identitygridentity.hh:85\n-Dune::IdentityGridEntity::operator=\n-IdentityGridEntity & operator=(const IdentityGridEntity &original)\n-Definition: identitygridentity.hh:116\n-Dune::IdentityGridEntity::level\n-int level() const\n-level of this element\n-Definition: identitygridentity.hh:154\n-Dune::IdentityGridLevelIntersectionIterator\n-Definition: identitygridintersectioniterator.hh:84\n-Dune::IdentityGridLeafIntersectionIterator\n-Iterator over all element neighborsMesh entities of codimension 0 (\"elements\")\n-allow to visit all nei...\n-Definition: identitygridintersectioniterator.hh:29\n-Dune::IdentityGridHierarchicIterator\n-Iterator over the descendants of an entity.Mesh entities of codimension 0\n-(\"elements\") allow to visit...\n-Definition: identitygridhierarchiciterator.hh:26\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::subEntities\n-unsigned int subEntities(unsigned int codim) const\n-Return the number of subEntities of codimension codim.\n-Definition: identitygridentity.hh:319\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n-IdentityGridEntity(const GridImp *identityGrid, HostGridEntity &&hostEntity)\n-Definition: identitygridentity.hh:243\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::isLeaf\n-bool isLeaf() const\n-returns true if Entity has NO children\n-Definition: identitygridentity.hh:367\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hbegin\n-IdentityGridHierarchicIterator< GridImp > hbegin(int maxLevel) const\n-Inter-level access to son elements on higher levels<=maxlevel. This is provided\n-for sparsely stored n...\n-Definition: identitygridentity.hh:398\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::LocalGeometry\n-GridImp::template Codim< 0 >::LocalGeometry LocalGeometry\n-Definition: identitygridentity.hh:218\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::EntitySeed\n-GridImp::template Codim< 0 >::EntitySeed EntitySeed\n-The type of the EntitySeed interface class.\n-Definition: identitygridentity.hh:230\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::seed\n-EntitySeed seed() const\n-Create EntitySeed.\n-Definition: identitygridentity.hh:292\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ilevelbegin\n-IdentityGridLevelIntersectionIterator< GridImp > ilevelbegin() const\n-First level intersection.\n-Definition: identitygridentity.hh:335\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n-IdentityGridEntity(const GridImp *identityGrid, const HostGridEntity\n-&hostEntity)\n-Definition: identitygridentity.hh:238\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::level\n-int level() const\n-Level of this element.\n-Definition: identitygridentity.hh:298\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ileafbegin\n-IdentityGridLeafIntersectionIterator< GridImp > ileafbegin() const\n-First leaf intersection.\n-Definition: identitygridentity.hh:351\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hostEntity_\n-HostGridEntity hostEntity_\n-Definition: identitygridentity.hh:435\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::operator=\n-IdentityGridEntity & operator=(const IdentityGridEntity &original)\n-Definition: identitygridentity.hh:260\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::geometry\n-Geometry geometry() const\n-Geometry of this entity.\n-Definition: identitygridentity.hh:311\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ilevelend\n-IdentityGridLevelIntersectionIterator< GridImp > ilevelend() const\n-Reference to one past the last neighbor.\n-Definition: identitygridentity.hh:343\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n-IdentityGridEntity(const IdentityGridEntity &original)\n-Definition: identitygridentity.hh:249\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hend\n-IdentityGridHierarchicIterator< GridImp > hend(int maxLevel) const\n-Returns iterator to one past the last son.\n-Definition: identitygridentity.hh:405\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::ileafend\n-IdentityGridLeafIntersectionIterator< GridImp > ileafend() const\n-Reference to one past the last leaf intersection.\n-Definition: identitygridentity.hh:359\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::wasRefined\n-bool wasRefined() const\n-Definition: identitygridentity.hh:412\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::operator=\n-IdentityGridEntity & operator=(IdentityGridEntity &&original)\n-Definition: identitygridentity.hh:271\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::hasFather\n-bool hasFather() const\n-returns true if father entity exists\n-Definition: identitygridentity.hh:287\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::HostGridEntity\n-GridImp::HostGridType::Traits::template Codim< CodimInHostGrid >::Entity\n-HostGridEntity\n-Definition: identitygridentity.hh:214\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::father\n-GridImp::template Codim< 0 >::Entity father() const\n-Definition: identitygridentity.hh:374\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::mightBeCoarsened\n-bool mightBeCoarsened() const\n-Definition: identitygridentity.hh:424\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::geometryInFather\n-LocalGeometry geometryInFather() const\n-Location of this element relative to the reference element element of the\n-father. This is sufficient ...\n-Definition: identitygridentity.hh:388\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::identityGrid_\n-const GridImp * identityGrid_\n-Definition: identitygridentity.hh:436\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::subEntity\n-GridImp::template Codim< cc >::Entity subEntity(int i) const\n-Provide access to sub entity i of given codimension. Entities are numbered 0\n-... subEntities(cc)-1.\n-Definition: identitygridentity.hh:329\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::IdentityGridEntity\n-IdentityGridEntity(IdentityGridEntity &&original)\n-Definition: identitygridentity.hh:254\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::Geometry\n-GridImp::template Codim< 0 >::Geometry Geometry\n-Definition: identitygridentity.hh:216\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::equals\n-bool equals(const IdentityGridEntity &other) const\n-Definition: identitygridentity.hh:281\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>::partitionType\n-PartitionType partitionType() const\n-The partition type for parallel computing.\n-Definition: identitygridentity.hh:305\n-Dune::IdentityGridLevelIndexSet\n-Definition: identitygridindexsets.hh:26\n-Dune::IdentityGridLeafIndexSet\n-Definition: identitygridindexsets.hh:103\n-Dune::IdentityGridGlobalIdSet\n-Definition: identitygridindexsets.hh:199\n-Dune::IdentityGridLocalIdSet\n-Definition: identitygridindexsets.hh:251\n-grid.hh\n-Different resources needed by all grid implementations.\n+Dune::IdentityGridLevelIterator\n+Iterator over all entities of a given codimension and level of a grid.\n+Definition: identitygridleveliterator.hh:21\n+Dune::IdentityGridLevelIterator::increment\n+void increment()\n+prefix increment\n+Definition: identitygridleveliterator.hh:50\n+Dune::IdentityGridLevelIterator::Entity\n+GridImp::template Codim< codim >::Entity Entity\n+Definition: identitygridleveliterator.hh:29\n+Dune::IdentityGridLevelIterator::IdentityGridLevelIterator\n+IdentityGridLevelIterator(const GridImp *identityGrid, int level)\n+Constructor.\n+Definition: identitygridleveliterator.hh:32\n+Dune::IdentityGridLevelIterator::IdentityGridLevelIterator\n+IdentityGridLevelIterator(const GridImp *identityGrid, int level, bool\n+endDummy)\n+Constructor which create the end iterator.\n+Definition: identitygridleveliterator.hh:43\n+Dune::IdentityGridLevelIterator::codimension\n+static constexpr int codimension\n+Definition: identitygridleveliterator.hh:27\n+Dune::IdentityGridLevelIterator::equals\n+bool equals(const IdentityGridLevelIterator &i) const\n+equality\n+Definition: identitygridleveliterator.hh:60\n+Dune::IdentityGridLevelIterator::dereference\n+Entity dereference() const\n+dereferencing\n+Definition: identitygridleveliterator.hh:55\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00737.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00737.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridintersectioniterator.hh File Reference\n+dune-grid: identitygridindexsets.hh File Reference\n \n \n \n \n \n \n \n@@ -65,42 +65,44 @@\n
  • dune
  • grid
  • identitygrid
  • \n
    \n \n
    \n \n-
    identitygridintersectioniterator.hh File Reference
    \n+
    identitygridindexsets.hh File Reference
    \n
    \n
    \n \n-

    The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes. \n+

    The index and id sets for the IdentityGrid class. \n More...

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

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n-\n+\n+\n+\n+\n+\n \n

    \n 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::IdentityGridLevelIndexSet< GridImp >
     
    class  Dune::IdentityGridLevelIntersectionIterator< GridImp >
    class  Dune::IdentityGridLeafIndexSet< GridImp >
     
    class  Dune::IdentityGridGlobalIdSet< GridImp >
     
    class  Dune::IdentityGridLocalIdSet< GridImp >
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.

    \n+

    The index and id sets for the IdentityGrid class.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,35 +6,30 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n Classes | Namespaces\n-identitygridintersectioniterator.hh File Reference\n-The IdentityGridLeafIntersectionIterator and\n-IdentityGridLevelIntersectionIterator classes. More...\n-#include \"identitygridintersections.hh\"\n-#include \"identitygridentity.hh\"\n-#include \n+identitygridindexsets.hh File Reference\n+The index and id sets for the IdentityGrid class. More...\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdentityGridLeafIntersectionIterator<_GridImp_>\n- Iterator over all element neighborsMesh entities of codimension 0\n- (\"elements\") allow to visit all neighbors, where a neighbor is an\n-\u00a0 entity of codimension 0 which has a common entity of codimension 1\n- These neighbors are accessed via a IntersectionIterator. This allows\n- the implement non-matching meshes. The number of neighbors may be\n- different from the number of an element! More...\n+class \u00a0Dune::IdentityGridLevelIndexSet<_GridImp_>\n \u00a0\n-class \u00a0Dune::IdentityGridLevelIntersectionIterator<_GridImp_>\n+class \u00a0Dune::IdentityGridLeafIndexSet<_GridImp_>\n+\u00a0\n+class \u00a0Dune::IdentityGridGlobalIdSet<_GridImp_>\n+\u00a0\n+class \u00a0Dune::IdentityGridLocalIdSet<_GridImp_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The IdentityGridLeafIntersectionIterator and\n-IdentityGridLevelIntersectionIterator classes.\n+The index and id sets for the IdentityGrid class.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00737_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridintersectioniterator.hh Source File\n+dune-grid: identitygridindexsets.hh Source File\n \n \n \n \n \n \n \n@@ -62,153 +62,333 @@\n \n \n
    \n
    \n-
    identitygridintersectioniterator.hh
    \n+
    identitygridindexsets.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
    \n-
    6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
    \n+
    5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH
    \n+
    6#define DUNE_IDENTITYGRID_INDEXSETS_HH
    \n
    7
    \n-\n-\n-
    10
    \n-\n-
    12
    \n-
    17namespace Dune {
    \n-
    18
    \n-
    27 template<class GridImp>
    \n-\n-
    29 {
    \n-
    30
    \n-
    31 constexpr static int dim = GridImp::dimension;
    \n-
    32
    \n-
    33 constexpr static int dimworld = GridImp::dimensionworld;
    \n-
    34
    \n-
    35 // The type used to store coordinates
    \n-
    36 typedef typename GridImp::ctype ctype;
    \n-
    37
    \n-
    38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator HostLeafIntersectionIterator;
    \n-
    39
    \n-
    40 public:
    \n+\n+
    13
    \n+
    14#include <vector>
    \n+
    15
    \n+
    16namespace Dune {
    \n+
    17
    \n+
    19 template<class GridImp>
    \n+\n+
    21 public IndexSet<GridImp,
    \n+
    22 IdentityGridLevelIndexSet<GridImp>,
    \n+
    23 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::IndexType,
    \n+
    24 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::Types
    \n+
    25 >
    \n+
    26 {
    \n+
    27 public:
    \n+
    28
    \n+
    29 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n+
    30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
    \n+
    31
    \n+
    32 constexpr static int dim = GridImp::dimension;
    \n+
    33
    \n+
    35 template<int codim>
    \n+
    36 int index (const typename GridImp::Traits::template Codim<codim>::Entity& e) const
    \n+
    37 {
    \n+
    38 return grid_->hostgrid_->levelIndexSet(level_).template index<codim>(grid_->template getHostEntity<codim>(e));
    \n+
    39 }
    \n+
    40
    \n
    41
    \n-\n-
    43
    \n-\n-
    45 {}
    \n-
    46
    \n-
    47 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,
    \n-
    48 const HostLeafIntersectionIterator& hostIterator)
    \n-
    49 : identityGrid_(identityGrid)
    \n-
    50 , hostIterator_(hostIterator)
    \n-
    51 {}
    \n-
    52
    \n-\n-
    55 return hostIterator_ == other.hostIterator_;
    \n-
    56 }
    \n-
    57
    \n-
    58
    \n-
    60 void increment() {
    \n-
    61 ++hostIterator_;
    \n-
    62 }
    \n-
    63
    \n-\n-
    66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
    \n+
    43 template<int cc>
    \n+
    44 int subIndex (const typename GridImp::Traits::template Codim<cc>::Entity& e, int i, int codim) const
    \n+
    45 {
    \n+
    46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template getHostEntity<cc>(e), i, codim);
    \n+
    47 }
    \n+
    48
    \n+
    49
    \n+
    51 std::size_t size (int codim) const {
    \n+
    52 return grid_->hostgrid_->levelIndexSet(level_).size(codim);
    \n+
    53 }
    \n+
    54
    \n+
    55
    \n+
    57 std::size_t size (GeometryType type) const
    \n+
    58 {
    \n+
    59 return grid_->hostgrid_->levelIndexSet(level_).size(type);
    \n+
    60 }
    \n+
    61
    \n+
    62
    \n+
    64 const std::vector<GeometryType>& geomTypes (int codim) const
    \n+
    65 {
    \n+
    66 return grid_->hostgrid_->levelIndexSet(level_).geomTypes(codim);
    \n
    67 }
    \n
    68
    \n-
    69 private:
    \n-
    70 //**********************************************************
    \n-
    71 // private data
    \n-
    72 //**********************************************************
    \n-
    73
    \n-
    74 const GridImp* identityGrid_ = nullptr;
    \n-
    75 HostLeafIntersectionIterator hostIterator_ = {};
    \n-
    76 };
    \n-
    77
    \n-
    78
    \n-
    79
    \n-
    80
    \n-
    82 template<class GridImp>
    \n-\n-
    84 {
    \n-
    85 constexpr static int dim = GridImp::dimension;
    \n-
    86
    \n-
    87 constexpr static int dimworld = GridImp::dimensionworld;
    \n+
    70 Types types (int codim) const
    \n+
    71 {
    \n+
    72 return grid_->hostgrid_->levelIndexSet(level_).types(codim);
    \n+
    73 }
    \n+
    74
    \n+
    76 template<class EntityType>
    \n+
    77 bool contains (const EntityType& e) const
    \n+
    78 {
    \n+
    79 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template getHostEntity<EntityType::codimension>(e));
    \n+
    80 }
    \n+
    81
    \n+
    83 void update(const GridImp& grid, int level)
    \n+
    84 {
    \n+
    85 grid_ = &grid;
    \n+
    86 level_ = level;
    \n+
    87 }
    \n
    88
    \n-
    89 // The type used to store coordinates
    \n-
    90 typedef typename GridImp::ctype ctype;
    \n+
    89
    \n+
    90 GridImp* grid_;
    \n
    91
    \n-
    92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator HostLevelIntersectionIterator;
    \n-
    93
    \n-
    94 public:
    \n+
    92 int level_;
    \n+
    93 };
    \n+
    94
    \n
    95
    \n-\n-
    97
    \n-\n-
    99 {}
    \n-
    100
    \n-
    101 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,
    \n-
    102 const HostLevelIntersectionIterator& hostIterator)
    \n-
    103 : identityGrid_(identityGrid)
    \n-
    104 , hostIterator_(hostIterator)
    \n-
    105 {}
    \n-
    106
    \n-\n-
    109 return hostIterator_ == other.hostIterator_;
    \n-
    110 }
    \n-
    111
    \n-
    112
    \n-
    114 void increment() {
    \n-
    115 ++hostIterator_;
    \n-
    116 }
    \n-
    117
    \n-\n-
    120 return IdentityGridLevelIntersection<GridImp>(identityGrid_,*hostIterator_);
    \n-
    121 }
    \n+
    96 template<class GridImp>
    \n+\n+
    98 public IndexSet<GridImp,
    \n+
    99 IdentityGridLeafIndexSet<GridImp>,
    \n+
    100 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::IndexType,
    \n+
    101 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::Types
    \n+
    102 >
    \n+
    103 {
    \n+
    104 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n+
    105
    \n+
    106 public:
    \n+
    107
    \n+
    108 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
    \n+
    109
    \n+
    110 /*
    \n+
    111 * We use the remove_const to extract the Type from the mutable class,
    \n+
    112 * because the const class is not instantiated yet.
    \n+
    113 */
    \n+
    114 constexpr static int dim = std::remove_const<GridImp>::type::dimension;
    \n+
    115
    \n+
    116
    \n+
    118 IdentityGridLeafIndexSet (const GridImp& grid)
    \n+
    119 : grid_(&grid)
    \n+
    120 {}
    \n+
    121
    \n
    122
    \n-
    123 private:
    \n-
    124
    \n-
    125
    \n-
    126 const GridImp* identityGrid_ = nullptr;
    \n-
    127 HostLevelIntersectionIterator hostIterator_ = {};
    \n-
    128
    \n-
    129 };
    \n-
    130
    \n-
    131
    \n-
    132} // namespace Dune
    \n+
    124 /*
    \n+
    125 We use the RemoveConst to extract the Type from the mutable class,
    \n+
    126 because the const class is not instantiated yet.
    \n+
    127 */
    \n+
    128 template<int codim>
    \n+
    129 int index (const typename std::remove_const<GridImp>::type::template Codim<codim>::Entity& e) const
    \n+
    130 {
    \n+
    131 return grid_->hostgrid_->leafIndexSet().template index<codim>(grid_->template getHostEntity<codim>(e));
    \n+
    132 }
    \n
    133
    \n-
    134#endif
    \n-
    The IdentityGridEntity class.
    \n-
    The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
    \n+
    134
    \n+
    136 /*
    \n+
    137 We use the RemoveConst to extract the Type from the mutable class,
    \n+
    138 because the const class is not instantiated yet.
    \n+
    139 */
    \n+
    140 template<int cc>
    \n+
    141 int subIndex (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e, int i, int codim) const
    \n+
    142 {
    \n+
    143 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template getHostEntity<cc>(e),i, codim);
    \n+
    144 }
    \n+
    145
    \n+
    146
    \n+
    148 std::size_t size (GeometryType type) const
    \n+
    149 {
    \n+
    150 return grid_->hostgrid_->leafIndexSet().size(type);
    \n+
    151 }
    \n+
    152
    \n+
    153
    \n+
    155 std::size_t size (int codim) const
    \n+
    156 {
    \n+
    157 return grid_->hostgrid_->leafIndexSet().size(codim);
    \n+
    158 }
    \n+
    159
    \n+
    160
    \n+
    162 const std::vector<GeometryType>& geomTypes (int codim) const
    \n+
    163 {
    \n+
    164 return grid_->hostgrid_->leafIndexSet().geomTypes(codim);
    \n+
    165 }
    \n+
    166
    \n+
    168 Types types (int codim) const
    \n+
    169 {
    \n+
    170 return grid_->hostgrid_->leafIndexSet().types(codim);
    \n+
    171 }
    \n+
    172
    \n+
    174 template<class EntityType>
    \n+
    175 bool contains (const EntityType& e) const
    \n+
    176 {
    \n+
    177 return grid_->hostgrid_->leafIndexSet().contains(grid_->template getHostEntity<EntityType::codimension>(e));
    \n+
    178 }
    \n+
    179
    \n+
    180
    \n+
    181
    \n+
    183 void update(const GridImp& grid)
    \n+
    184 {
    \n+
    185 grid_ = &grid;
    \n+
    186 }
    \n+
    187
    \n+
    188
    \n+
    189 GridImp* grid_;
    \n+
    190 };
    \n+
    191
    \n+
    192
    \n+
    193
    \n+
    194
    \n+
    195 template <class GridImp>
    \n+\n+
    197 public IdSet<GridImp,IdentityGridGlobalIdSet<GridImp>,
    \n+
    198 typename std::remove_const<GridImp>::type::HostGridType::Traits::GlobalIdSet::IdType>
    \n+
    199 {
    \n+
    200
    \n+
    201 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n+
    202
    \n+
    203
    \n+
    204 public:
    \n+
    206 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}
    \n+
    207
    \n+
    209 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;
    \n+
    210
    \n+
    211
    \n+
    213 /*
    \n+
    214 We use the remove_const to extract the Type from the mutable class,
    \n+
    215 because the const class is not instantiated yet.
    \n+
    216 */
    \n+
    217 template<int cd>
    \n+
    218 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
    \n+
    219 {
    \n+
    220 // Return id of the host entity
    \n+
    221 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);
    \n+
    222 }
    \n+
    223
    \n+
    224
    \n+
    226 /*
    \n+
    227 We use the remove_const to extract the Type from the mutable class,
    \n+
    228 because the const class is not instantiated yet.
    \n+
    229 */
    \n+
    230 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim<0>::Entity& e, int i, int codim) const
    \n+
    231 {
    \n+
    232 // Return sub id of the host entity
    \n+
    233 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, codim);
    \n+
    234 }
    \n+
    235
    \n+
    236
    \n+
    238 void update() {}
    \n+
    239
    \n+
    240
    \n+
    241 const GridImp* grid_;
    \n+
    242 };
    \n+
    243
    \n+
    244
    \n+
    245
    \n+
    246
    \n+
    247 template<class GridImp>
    \n+\n+
    249 public IdSet<GridImp,IdentityGridLocalIdSet<GridImp>,
    \n+
    250 typename std::remove_const<GridImp>::type::HostGridType::Traits::LocalIdSet::IdType>
    \n+
    251 {
    \n+
    252 private:
    \n+
    253
    \n+
    254 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n+
    255
    \n+
    256
    \n+
    257 public:
    \n+
    259 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;
    \n+
    260
    \n+
    261
    \n+
    263 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}
    \n+
    264
    \n+
    265
    \n+
    267 /*
    \n+
    268 We use the remove_const to extract the Type from the mutable class,
    \n+
    269 because the const class is not instantiated yet.
    \n+
    270 */
    \n+
    271 template<int cd>
    \n+
    272 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
    \n+
    273 {
    \n+
    274 // Return id of the host entity
    \n+
    275 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);
    \n+
    276 }
    \n+
    277
    \n+
    278
    \n+
    280 /*
    \n+
    281 * We use the remove_const to extract the Type from the mutable class,
    \n+
    282 * because the const class is not instantiated yet.
    \n+
    283 */
    \n+
    284 IdType subId (const typename std::remove_const<GridImp>::type::template Codim<0>::Entity& e, int i, int codim) const
    \n+
    285 {
    \n+
    286 // Return sub id of the host entity
    \n+
    287 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);
    \n+
    288 }
    \n+
    289
    \n+
    290
    \n+
    292 void update() {}
    \n+
    293
    \n+
    294
    \n+
    295 const GridImp* grid_;
    \n+
    296 };
    \n+
    297
    \n+
    298
    \n+
    299} // namespace Dune
    \n+
    300
    \n+
    301
    \n+
    302#endif
    \n+
    Provides base classes for index and id sets.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n-
    Definition: identitygridintersectioniterator.hh:84
    \n-
    bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other) const
    equality
    Definition: identitygridintersectioniterator.hh:108
    \n-
    void increment()
    prefix increment
    Definition: identitygridintersectioniterator.hh:114
    \n-
    IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const HostLevelIntersectionIterator &hostIterator)
    Definition: identitygridintersectioniterator.hh:101
    \n-
    Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp > > Intersection
    Definition: identitygridintersectioniterator.hh:96
    \n-
    Intersection dereference() const
    dereferencing
    Definition: identitygridintersectioniterator.hh:119
    \n-
    IdentityGridLevelIntersectionIterator()
    Definition: identitygridintersectioniterator.hh:98
    \n-
    Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
    Definition: identitygridintersectioniterator.hh:29
    \n-
    bool equals(const IdentityGridLeafIntersectionIterator &other) const
    equality
    Definition: identitygridintersectioniterator.hh:54
    \n-
    void increment()
    prefix increment
    Definition: identitygridintersectioniterator.hh:60
    \n-
    IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const HostLeafIntersectionIterator &hostIterator)
    Definition: identitygridintersectioniterator.hh:47
    \n-
    Intersection dereference() const
    dereferencing
    Definition: identitygridintersectioniterator.hh:65
    \n-
    Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp > > Intersection
    Definition: identitygridintersectioniterator.hh:42
    \n-
    IdentityGridLeafIntersectionIterator()
    Definition: identitygridintersectioniterator.hh:44
    \n-
    An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
    Definition: identitygridintersections.hh:33
    \n-
    Definition: identitygridintersections.hh:192
    \n-\n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n+
    Id Set Interface.
    Definition: indexidset.hh:452
    \n+
    Definition: identitygridindexsets.hh:26
    \n+
    bool contains(const EntityType &e) const
    Return true if the given entity is contained in the index set.
    Definition: identitygridindexsets.hh:77
    \n+
    int index(const typename GridImp::Traits::template Codim< codim >::Entity &e) const
    get index of an entity
    Definition: identitygridindexsets.hh:36
    \n+
    GridImp * grid_
    Definition: identitygridindexsets.hh:90
    \n+
    std::remove_const< GridImp >::type::HostGridType HostGrid
    Definition: identitygridindexsets.hh:29
    \n+
    const std::vector< GeometryType > & geomTypes(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:64
    \n+
    Types types(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:70
    \n+
    std::size_t size(GeometryType type) const
    get number of entities of given codim, type and on this level
    Definition: identitygridindexsets.hh:57
    \n+
    static constexpr int dim
    Definition: identitygridindexsets.hh:32
    \n+
    HostGrid::LevelGridView::IndexSet::Types Types
    Definition: identitygridindexsets.hh:30
    \n+
    std::size_t size(int codim) const
    get number of entities of given codim, type and on this level
    Definition: identitygridindexsets.hh:51
    \n+
    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
    \n+
    int level_
    Definition: identitygridindexsets.hh:92
    \n+
    void update(const GridImp &grid, int level)
    Set up the index set.
    Definition: identitygridindexsets.hh:83
    \n+
    Definition: identitygridindexsets.hh:103
    \n+
    IdentityGridLeafIndexSet(const GridImp &grid)
    constructor stores reference to a grid and level
    Definition: identitygridindexsets.hh:118
    \n+
    static constexpr int dim
    Definition: identitygridindexsets.hh:114
    \n+
    std::size_t size(int codim) const
    get number of entities of given codim
    Definition: identitygridindexsets.hh:155
    \n+
    bool contains(const EntityType &e) const
    Return true if the given entity is contained in the index set.
    Definition: identitygridindexsets.hh:175
    \n+
    std::size_t size(GeometryType type) const
    get number of entities of given type
    Definition: identitygridindexsets.hh:148
    \n+
    HostGrid::LevelGridView::IndexSet::Types Types
    Definition: identitygridindexsets.hh:108
    \n+
    int index(const typename std::remove_const< GridImp >::type::template Codim< codim >::Entity &e) const
    get index of an entity
    Definition: identitygridindexsets.hh:129
    \n+
    int subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, int codim) const
    get index of subEntity of a codim 0 entity
    Definition: identitygridindexsets.hh:141
    \n+
    Types types(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:168
    \n+
    GridImp * grid_
    Definition: identitygridindexsets.hh:189
    \n+
    void update(const GridImp &grid)
    Definition: identitygridindexsets.hh:183
    \n+
    const std::vector< GeometryType > & geomTypes(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:162
    \n+
    Definition: identitygridindexsets.hh:199
    \n+
    IdentityGridGlobalIdSet(const GridImp &g)
    constructor stores reference to a grid
    Definition: identitygridindexsets.hh:206
    \n+
    void update()
    Definition: identitygridindexsets.hh:238
    \n+
    const GridImp * grid_
    Definition: identitygridindexsets.hh:241
    \n+
    HostGrid::Traits::GlobalIdSet::IdType IdType
    define the type used for persistent indices
    Definition: identitygridindexsets.hh:209
    \n+
    IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, int codim) const
    get id of subEntity
    Definition: identitygridindexsets.hh:230
    \n+
    IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
    get id of an entity
    Definition: identitygridindexsets.hh:218
    \n+
    Definition: identitygridindexsets.hh:251
    \n+
    IdType subId(const typename std::remove_const< GridImp >::type::template Codim< 0 >::Entity &e, int i, int codim) const
    get id of subEntity
    Definition: identitygridindexsets.hh:284
    \n+
    IdentityGridLocalIdSet(const GridImp &g)
    constructor stores reference to a grid
    Definition: identitygridindexsets.hh:263
    \n+
    const GridImp * grid_
    Definition: identitygridindexsets.hh:295
    \n+
    void update()
    Definition: identitygridindexsets.hh:292
    \n+
    IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
    get id of an entity
    Definition: identitygridindexsets.hh:272
    \n+
    HostGrid::Traits::LocalIdSet::IdType IdType
    define the type used for persistent local ids
    Definition: identitygridindexsets.hh:259
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,209 +5,470 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n-identitygridintersectioniterator.hh\n+identitygridindexsets.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH\n- 6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH\n+ 5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH\n+ 6#define DUNE_IDENTITYGRID_INDEXSETS_HH\n 7\n- 8#include \"identitygridintersections.hh\"\n- 9#include \"identitygridentity.hh\"\n- 10\n- 11#include \n- 12\n- 17namespace Dune {\n- 18\n- 27 template\n-28 class IdentityGridLeafIntersectionIterator\n- 29 {\n- 30\n- 31 constexpr static int dim = GridImp::dimension;\n- 32\n- 33 constexpr static int dimworld = GridImp::dimensionworld;\n- 34\n- 35 // The type used to store coordinates\n- 36 typedef typename GridImp::ctype ctype;\n- 37\n- 38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator\n-HostLeafIntersectionIterator;\n- 39\n- 40 public:\n+ 12#include \n+ 13\n+ 14#include \n+ 15\n+ 16namespace Dune {\n+ 17\n+ 19 template\n+20 class IdentityGridLevelIndexSet :\n+ 21 public IndexSet,\n+ 23 typename std::remove_const::type::HostGridType::LevelGridView::\n+IndexSet::IndexType,\n+ 24 typename std::remove_const::type::HostGridType::LevelGridView::\n+IndexSet::Types\n+ 25 >\n+ 26 {\n+ 27 public:\n+ 28\n+29 typedef typename std::remove_const::type::HostGridType HostGrid;\n+30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;\n+ 31\n+32 constexpr static int dim = GridImp::dimension;\n+ 33\n+ 35 template\n+36 int index (const typename GridImp::Traits::template Codim::Entity& e)\n+const\n+ 37 {\n+ 38 return grid_->hostgrid_->levelIndexSet(level_).template index(grid_-\n+>template getHostEntity(e));\n+ 39 }\n+ 40\n 41\n-42 typedef Dune::Intersection > Intersection;\n- 43\n-44 IdentityGridLeafIntersectionIterator()\n- 45 {}\n- 46\n-47 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,\n- 48 const HostLeafIntersectionIterator& hostIterator)\n- 49 : identityGrid_(identityGrid)\n- 50 , hostIterator_(hostIterator)\n- 51 {}\n- 52\n-54 bool equals(const IdentityGridLeafIntersectionIterator& other) const {\n- 55 return hostIterator_ == other.hostIterator_;\n- 56 }\n- 57\n- 58\n-60 void increment() {\n- 61 ++hostIterator_;\n- 62 }\n- 63\n-65 Intersection dereference() const {\n- 66 return IdentityGridLeafIntersection(identityGrid_,*hostIterator_);\n+ 43 template\n+44 int subIndex (const typename GridImp::Traits::template Codim::Entity& e,\n+int i, int codim) const\n+ 45 {\n+ 46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template\n+getHostEntity(e), i, codim);\n+ 47 }\n+ 48\n+ 49\n+51 std::size_t size (int codim) const {\n+ 52 return grid_->hostgrid_->levelIndexSet(level_).size(codim);\n+ 53 }\n+ 54\n+ 55\n+57 std::size_t size (GeometryType type) const\n+ 58 {\n+ 59 return grid_->hostgrid_->levelIndexSet(level_).size(type);\n+ 60 }\n+ 61\n+ 62\n+64 const std::vector& geomTypes (int codim) const\n+ 65 {\n+ 66 return grid_->hostgrid_->levelIndexSet(level_).geomTypes(codim);\n 67 }\n 68\n- 69 private:\n- 70 //**********************************************************\n- 71 // private data\n- 72 //**********************************************************\n- 73\n- 74 const GridImp* identityGrid_ = nullptr;\n- 75 HostLeafIntersectionIterator hostIterator_ = {};\n- 76 };\n- 77\n- 78\n- 79\n- 80\n- 82 template\n-83 class IdentityGridLevelIntersectionIterator\n+70 Types types (int codim) const\n+ 71 {\n+ 72 return grid_->hostgrid_->levelIndexSet(level_).types(codim);\n+ 73 }\n+ 74\n+ 76 template\n+77 bool contains (const EntityType& e) const\n+ 78 {\n+ 79 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template\n+getHostEntity(e));\n+ 80 }\n+ 81\n+83 void update(const GridImp& grid, int level)\n 84 {\n- 85 constexpr static int dim = GridImp::dimension;\n- 86\n- 87 constexpr static int dimworld = GridImp::dimensionworld;\n+ 85 grid_ = &grid;\n+ 86 level_ = level;\n+ 87 }\n 88\n- 89 // The type used to store coordinates\n- 90 typedef typename GridImp::ctype ctype;\n+ 89\n+90 GridImp* grid_;\n 91\n- 92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator\n-HostLevelIntersectionIterator;\n- 93\n- 94 public:\n+92 int level_;\n+ 93 };\n+ 94\n 95\n-96 typedef Dune::Intersection > Intersection;\n- 97\n-98 IdentityGridLevelIntersectionIterator()\n- 99 {}\n- 100\n-101 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,\n- 102 const HostLevelIntersectionIterator& hostIterator)\n- 103 : identityGrid_(identityGrid)\n- 104 , hostIterator_(hostIterator)\n- 105 {}\n- 106\n-108 bool equals(const IdentityGridLevelIntersectionIterator& other)\n-const {\n- 109 return hostIterator_ == other.hostIterator_;\n- 110 }\n- 111\n- 112\n-114 void increment() {\n- 115 ++hostIterator_;\n- 116 }\n- 117\n-119 Intersection dereference() const {\n- 120 return IdentityGridLevelIntersection\n-(identityGrid_,*hostIterator_);\n- 121 }\n+ 96 template\n+97 class IdentityGridLeafIndexSet :\n+ 98 public IndexSet,\n+ 100 typename std::remove_const::type::HostGridType::LeafGridView::\n+IndexSet::IndexType,\n+ 101 typename std::remove_const::type::HostGridType::LeafGridView::\n+IndexSet::Types\n+ 102 >\n+ 103 {\n+ 104 typedef typename std::remove_const::type::HostGridType HostGrid;\n+ 105\n+ 106 public:\n+ 107\n+108 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;\n+ 109\n+ 110 /*\n+ 111 * We use the remove_const to extract the Type from the mutable class,\n+ 112 * because the const class is not instantiated yet.\n+ 113 */\n+114 constexpr static int dim = std::remove_const::type::dimension;\n+ 115\n+ 116\n+118 IdentityGridLeafIndexSet (const GridImp& grid)\n+ 119 : grid_(&grid)\n+ 120 {}\n+ 121\n 122\n- 123 private:\n- 124\n- 125\n- 126 const GridImp* identityGrid_ = nullptr;\n- 127 HostLevelIntersectionIterator hostIterator_ = {};\n- 128\n- 129 };\n- 130\n- 131\n- 132} // namespace Dune\n+ 124 /*\n+ 125 We use the RemoveConst to extract the Type from the mutable class,\n+ 126 because the const class is not instantiated yet.\n+ 127 */\n+ 128 template\n+129 int index (const typename std::remove_const::type::template\n+Codim::Entity& e) const\n+ 130 {\n+ 131 return grid_->hostgrid_->leafIndexSet().template index(grid_-\n+>template getHostEntity(e));\n+ 132 }\n 133\n- 134#endif\n-identitygridentity.hh\n-The IdentityGridEntity class.\n-identitygridintersections.hh\n-The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.\n+ 134\n+ 136 /*\n+ 137 We use the RemoveConst to extract the Type from the mutable class,\n+ 138 because the const class is not instantiated yet.\n+ 139 */\n+ 140 template\n+141 int subIndex (const typename std::remove_const::type::Traits::\n+template Codim::Entity& e, int i, int codim) const\n+ 142 {\n+ 143 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template\n+getHostEntity(e),i, codim);\n+ 144 }\n+ 145\n+ 146\n+148 std::size_t size (GeometryType type) const\n+ 149 {\n+ 150 return grid_->hostgrid_->leafIndexSet().size(type);\n+ 151 }\n+ 152\n+ 153\n+155 std::size_t size (int codim) const\n+ 156 {\n+ 157 return grid_->hostgrid_->leafIndexSet().size(codim);\n+ 158 }\n+ 159\n+ 160\n+162 const std::vector& geomTypes (int codim) const\n+ 163 {\n+ 164 return grid_->hostgrid_->leafIndexSet().geomTypes(codim);\n+ 165 }\n+ 166\n+168 Types types (int codim) const\n+ 169 {\n+ 170 return grid_->hostgrid_->leafIndexSet().types(codim);\n+ 171 }\n+ 172\n+ 174 template\n+175 bool contains (const EntityType& e) const\n+ 176 {\n+ 177 return grid_->hostgrid_->leafIndexSet().contains(grid_->template\n+getHostEntity(e));\n+ 178 }\n+ 179\n+ 180\n+ 181\n+183 void update(const GridImp& grid)\n+ 184 {\n+ 185 grid_ = &grid;\n+ 186 }\n+ 187\n+ 188\n+189 GridImp* grid_;\n+ 190 };\n+ 191\n+ 192\n+ 193\n+ 194\n+ 195 template \n+196 class IdentityGridGlobalIdSet :\n+ 197 public IdSet,\n+ 198 typename std::remove_const::type::HostGridType::Traits::\n+GlobalIdSet::IdType>\n+ 199 {\n+ 200\n+ 201 typedef typename std::remove_const::type::HostGridType HostGrid;\n+ 202\n+ 203\n+ 204 public:\n+206 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}\n+ 207\n+209 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;\n+ 210\n+ 211\n+ 213 /*\n+ 214 We use the remove_const to extract the Type from the mutable class,\n+ 215 because the const class is not instantiated yet.\n+ 216 */\n+ 217 template\n+218 IdType id (const typename std::remove_const::type::Traits::\n+template Codim::Entity& e) const\n+ 219 {\n+ 220 // Return id of the host entity\n+ 221 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);\n+ 222 }\n+ 223\n+ 224\n+ 226 /*\n+ 227 We use the remove_const to extract the Type from the mutable class,\n+ 228 because the const class is not instantiated yet.\n+ 229 */\n+230 IdType subId (const typename std::remove_const::type::Traits::\n+template Codim<0>::Entity& e, int i, int codim) const\n+ 231 {\n+ 232 // Return sub id of the host entity\n+ 233 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i,\n+codim);\n+ 234 }\n+ 235\n+ 236\n+238 void update() {}\n+ 239\n+ 240\n+241 const GridImp* grid_;\n+ 242 };\n+ 243\n+ 244\n+ 245\n+ 246\n+ 247 template\n+248 class IdentityGridLocalIdSet :\n+ 249 public IdSet,\n+ 250 typename std::remove_const::type::HostGridType::Traits::\n+LocalIdSet::IdType>\n+ 251 {\n+ 252 private:\n+ 253\n+ 254 typedef typename std::remove_const::type::HostGridType HostGrid;\n+ 255\n+ 256\n+ 257 public:\n+259 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;\n+ 260\n+ 261\n+263 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}\n+ 264\n+ 265\n+ 267 /*\n+ 268 We use the remove_const to extract the Type from the mutable class,\n+ 269 because the const class is not instantiated yet.\n+ 270 */\n+ 271 template\n+272 IdType id (const typename std::remove_const::type::Traits::\n+template Codim::Entity& e) const\n+ 273 {\n+ 274 // Return id of the host entity\n+ 275 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);\n+ 276 }\n+ 277\n+ 278\n+ 280 /*\n+ 281 * We use the remove_const to extract the Type from the mutable class,\n+ 282 * because the const class is not instantiated yet.\n+ 283 */\n+284 IdType subId (const typename std::remove_const::type::template\n+Codim<0>::Entity& e, int i, int codim) const\n+ 285 {\n+ 286 // Return sub id of the host entity\n+ 287 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);\n+ 288 }\n+ 289\n+ 290\n+292 void update() {}\n+ 293\n+ 294\n+295 const GridImp* grid_;\n+ 296 };\n+ 297\n+ 298\n+ 299} // namespace Dune\n+ 300\n+ 301\n+ 302#endif\n+indexidset.hh\n+Provides base classes for index and id sets.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Intersection\n-Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n-element or with the d...\n-Definition: common/intersection.hh:164\n-Dune::IdentityGridLevelIntersectionIterator\n-Definition: identitygridintersectioniterator.hh:84\n-Dune::IdentityGridLevelIntersectionIterator::equals\n-bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other)\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::IndexSet\n+Index Set Interface base class.\n+Definition: indexidset.hh:78\n+Dune::IdSet\n+Id Set Interface.\n+Definition: indexidset.hh:452\n+Dune::IdentityGridLevelIndexSet\n+Definition: identitygridindexsets.hh:26\n+Dune::IdentityGridLevelIndexSet::contains\n+bool contains(const EntityType &e) const\n+Return true if the given entity is contained in the index set.\n+Definition: identitygridindexsets.hh:77\n+Dune::IdentityGridLevelIndexSet::index\n+int index(const typename GridImp::Traits::template Codim< codim >::Entity &e)\n const\n-equality\n-Definition: identitygridintersectioniterator.hh:108\n-Dune::IdentityGridLevelIntersectionIterator::increment\n-void increment()\n-prefix increment\n-Definition: identitygridintersectioniterator.hh:114\n-Dune::IdentityGridLevelIntersectionIterator::\n-IdentityGridLevelIntersectionIterator\n-IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const\n-HostLevelIntersectionIterator &hostIterator)\n-Definition: identitygridintersectioniterator.hh:101\n-Dune::IdentityGridLevelIntersectionIterator::Intersection\n-Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp\n-> > Intersection\n-Definition: identitygridintersectioniterator.hh:96\n-Dune::IdentityGridLevelIntersectionIterator::dereference\n-Intersection dereference() const\n-dereferencing\n-Definition: identitygridintersectioniterator.hh:119\n-Dune::IdentityGridLevelIntersectionIterator::\n-IdentityGridLevelIntersectionIterator\n-IdentityGridLevelIntersectionIterator()\n-Definition: identitygridintersectioniterator.hh:98\n-Dune::IdentityGridLeafIntersectionIterator\n-Iterator over all element neighborsMesh entities of codimension 0 (\"elements\")\n-allow to visit all nei...\n-Definition: identitygridintersectioniterator.hh:29\n-Dune::IdentityGridLeafIntersectionIterator::equals\n-bool equals(const IdentityGridLeafIntersectionIterator &other) const\n-equality\n-Definition: identitygridintersectioniterator.hh:54\n-Dune::IdentityGridLeafIntersectionIterator::increment\n-void increment()\n-prefix increment\n-Definition: identitygridintersectioniterator.hh:60\n-Dune::IdentityGridLeafIntersectionIterator::\n-IdentityGridLeafIntersectionIterator\n-IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const\n-HostLeafIntersectionIterator &hostIterator)\n-Definition: identitygridintersectioniterator.hh:47\n-Dune::IdentityGridLeafIntersectionIterator::dereference\n-Intersection dereference() const\n-dereferencing\n-Definition: identitygridintersectioniterator.hh:65\n-Dune::IdentityGridLeafIntersectionIterator::Intersection\n-Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp\n-> > Intersection\n-Definition: identitygridintersectioniterator.hh:42\n-Dune::IdentityGridLeafIntersectionIterator::\n-IdentityGridLeafIntersectionIterator\n-IdentityGridLeafIntersectionIterator()\n-Definition: identitygridintersectioniterator.hh:44\n-Dune::IdentityGridLeafIntersection\n-An intersection with a leaf neighbor elementMesh entities of codimension 0\n-(\"elements\") allow to visi...\n-Definition: identitygridintersections.hh:33\n-Dune::IdentityGridLevelIntersection\n-Definition: identitygridintersections.hh:192\n-intersection.hh\n+get index of an entity\n+Definition: identitygridindexsets.hh:36\n+Dune::IdentityGridLevelIndexSet::grid_\n+GridImp * grid_\n+Definition: identitygridindexsets.hh:90\n+Dune::IdentityGridLevelIndexSet::HostGrid\n+std::remove_const< GridImp >::type::HostGridType HostGrid\n+Definition: identitygridindexsets.hh:29\n+Dune::IdentityGridLevelIndexSet::geomTypes\n+const std::vector< GeometryType > & geomTypes(int codim) const\n+Deliver all geometry types used in this grid.\n+Definition: identitygridindexsets.hh:64\n+Dune::IdentityGridLevelIndexSet::types\n+Types types(int codim) const\n+Deliver all geometry types used in this grid.\n+Definition: identitygridindexsets.hh:70\n+Dune::IdentityGridLevelIndexSet::size\n+std::size_t size(GeometryType type) const\n+get number of entities of given codim, type and on this level\n+Definition: identitygridindexsets.hh:57\n+Dune::IdentityGridLevelIndexSet::dim\n+static constexpr int dim\n+Definition: identitygridindexsets.hh:32\n+Dune::IdentityGridLevelIndexSet::Types\n+HostGrid::LevelGridView::IndexSet::Types Types\n+Definition: identitygridindexsets.hh:30\n+Dune::IdentityGridLevelIndexSet::size\n+std::size_t size(int codim) const\n+get number of entities of given codim, type and on this level\n+Definition: identitygridindexsets.hh:51\n+Dune::IdentityGridLevelIndexSet::subIndex\n+int subIndex(const typename GridImp::Traits::template Codim< cc >::Entity &e,\n+int i, int codim) const\n+get index of subEntity of a codim 0 entity\n+Definition: identitygridindexsets.hh:44\n+Dune::IdentityGridLevelIndexSet::level_\n+int level_\n+Definition: identitygridindexsets.hh:92\n+Dune::IdentityGridLevelIndexSet::update\n+void update(const GridImp &grid, int level)\n+Set up the index set.\n+Definition: identitygridindexsets.hh:83\n+Dune::IdentityGridLeafIndexSet\n+Definition: identitygridindexsets.hh:103\n+Dune::IdentityGridLeafIndexSet::IdentityGridLeafIndexSet\n+IdentityGridLeafIndexSet(const GridImp &grid)\n+constructor stores reference to a grid and level\n+Definition: identitygridindexsets.hh:118\n+Dune::IdentityGridLeafIndexSet::dim\n+static constexpr int dim\n+Definition: identitygridindexsets.hh:114\n+Dune::IdentityGridLeafIndexSet::size\n+std::size_t size(int codim) const\n+get number of entities of given codim\n+Definition: identitygridindexsets.hh:155\n+Dune::IdentityGridLeafIndexSet::contains\n+bool contains(const EntityType &e) const\n+Return true if the given entity is contained in the index set.\n+Definition: identitygridindexsets.hh:175\n+Dune::IdentityGridLeafIndexSet::size\n+std::size_t size(GeometryType type) const\n+get number of entities of given type\n+Definition: identitygridindexsets.hh:148\n+Dune::IdentityGridLeafIndexSet::Types\n+HostGrid::LevelGridView::IndexSet::Types Types\n+Definition: identitygridindexsets.hh:108\n+Dune::IdentityGridLeafIndexSet::index\n+int index(const typename std::remove_const< GridImp >::type::template Codim<\n+codim >::Entity &e) const\n+get index of an entity\n+Definition: identitygridindexsets.hh:129\n+Dune::IdentityGridLeafIndexSet::subIndex\n+int subIndex(const typename std::remove_const< GridImp >::type::Traits::\n+template Codim< cc >::Entity &e, int i, int codim) const\n+get index of subEntity of a codim 0 entity\n+Definition: identitygridindexsets.hh:141\n+Dune::IdentityGridLeafIndexSet::types\n+Types types(int codim) const\n+Deliver all geometry types used in this grid.\n+Definition: identitygridindexsets.hh:168\n+Dune::IdentityGridLeafIndexSet::grid_\n+GridImp * grid_\n+Definition: identitygridindexsets.hh:189\n+Dune::IdentityGridLeafIndexSet::update\n+void update(const GridImp &grid)\n+Definition: identitygridindexsets.hh:183\n+Dune::IdentityGridLeafIndexSet::geomTypes\n+const std::vector< GeometryType > & geomTypes(int codim) const\n+Deliver all geometry types used in this grid.\n+Definition: identitygridindexsets.hh:162\n+Dune::IdentityGridGlobalIdSet\n+Definition: identitygridindexsets.hh:199\n+Dune::IdentityGridGlobalIdSet::IdentityGridGlobalIdSet\n+IdentityGridGlobalIdSet(const GridImp &g)\n+constructor stores reference to a grid\n+Definition: identitygridindexsets.hh:206\n+Dune::IdentityGridGlobalIdSet::update\n+void update()\n+Definition: identitygridindexsets.hh:238\n+Dune::IdentityGridGlobalIdSet::grid_\n+const GridImp * grid_\n+Definition: identitygridindexsets.hh:241\n+Dune::IdentityGridGlobalIdSet::IdType\n+HostGrid::Traits::GlobalIdSet::IdType IdType\n+define the type used for persistent indices\n+Definition: identitygridindexsets.hh:209\n+Dune::IdentityGridGlobalIdSet::subId\n+IdType subId(const typename std::remove_const< GridImp >::type::Traits::\n+template Codim< 0 >::Entity &e, int i, int codim) const\n+get id of subEntity\n+Definition: identitygridindexsets.hh:230\n+Dune::IdentityGridGlobalIdSet::id\n+IdType id(const typename std::remove_const< GridImp >::type::Traits::template\n+Codim< cd >::Entity &e) const\n+get id of an entity\n+Definition: identitygridindexsets.hh:218\n+Dune::IdentityGridLocalIdSet\n+Definition: identitygridindexsets.hh:251\n+Dune::IdentityGridLocalIdSet::subId\n+IdType subId(const typename std::remove_const< GridImp >::type::template Codim<\n+0 >::Entity &e, int i, int codim) const\n+get id of subEntity\n+Definition: identitygridindexsets.hh:284\n+Dune::IdentityGridLocalIdSet::IdentityGridLocalIdSet\n+IdentityGridLocalIdSet(const GridImp &g)\n+constructor stores reference to a grid\n+Definition: identitygridindexsets.hh:263\n+Dune::IdentityGridLocalIdSet::grid_\n+const GridImp * grid_\n+Definition: identitygridindexsets.hh:295\n+Dune::IdentityGridLocalIdSet::update\n+void update()\n+Definition: identitygridindexsets.hh:292\n+Dune::IdentityGridLocalIdSet::id\n+IdType id(const typename std::remove_const< GridImp >::type::Traits::template\n+Codim< cd >::Entity &e) const\n+get id of an entity\n+Definition: identitygridindexsets.hh:272\n+Dune::IdentityGridLocalIdSet::IdType\n+HostGrid::Traits::LocalIdSet::IdType IdType\n+define the type used for persistent local ids\n+Definition: identitygridindexsets.hh:259\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00740.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00740.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridindexsets.hh File Reference\n+dune-grid: identitygridhierarchiciterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,44 +65,37 @@\n
  • dune
  • grid
  • identitygrid
  • \n
    \n \n
    \n \n-
    identitygridindexsets.hh File Reference
    \n+
    identitygridhierarchiciterator.hh File Reference
    \n
    \n
    \n \n-

    The index and id sets for the IdentityGrid class. \n+

    The IdentityGridHierarchicIterator class. \n More...

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

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n 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...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The index and id sets for the IdentityGrid class.

    \n+

    The IdentityGridHierarchicIterator class.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,30 +6,27 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n Classes | Namespaces\n-identitygridindexsets.hh File Reference\n-The index and id sets for the IdentityGrid class. More...\n-#include \n-#include \n+identitygridhierarchiciterator.hh File Reference\n+The IdentityGridHierarchicIterator class. More...\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdentityGridLevelIndexSet<_GridImp_>\n-\u00a0\n-class \u00a0Dune::IdentityGridLeafIndexSet<_GridImp_>\n-\u00a0\n-class \u00a0Dune::IdentityGridGlobalIdSet<_GridImp_>\n-\u00a0\n-class \u00a0Dune::IdentityGridLocalIdSet<_GridImp_>\n+class \u00a0Dune::IdentityGridHierarchicIterator<_GridImp_>\n+ Iterator over the descendants of an entity.Mesh entities of codimension\n+ 0 (\"elements\") allow to visit all entities of codimension 0 obtained\n+\u00a0 through nested, hierarchic refinement of the entity. Iteration over\n+ this set of entities is provided by the HierarchicIterator, starting\n+ from a given entity. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The index and id sets for the IdentityGrid class.\n+The IdentityGridHierarchicIterator class.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00740_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridindexsets.hh Source File\n+dune-grid: identitygridhierarchiciterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,333 +62,87 @@\n \n \n
    \n
    \n-
    identitygridindexsets.hh
    \n+
    identitygridhierarchiciterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH
    \n-
    6#define DUNE_IDENTITYGRID_INDEXSETS_HH
    \n+
    5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH
    \n+
    6#define DUNE_IDENTITYGRIDHIERITERATOR_HH
    \n
    7
    \n-\n+
    12namespace Dune {
    \n
    13
    \n-
    14#include <vector>
    \n-
    15
    \n-
    16namespace Dune {
    \n-
    17
    \n-
    19 template<class GridImp>
    \n-\n-
    21 public IndexSet<GridImp,
    \n-
    22 IdentityGridLevelIndexSet<GridImp>,
    \n-
    23 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::IndexType,
    \n-
    24 typename std::remove_const<GridImp>::type::HostGridType::LevelGridView::IndexSet::Types
    \n-
    25 >
    \n+
    14
    \n+
    15 //**********************************************************************
    \n+
    16 //
    \n+
    24 template<class GridImp>
    \n+\n
    26 {
    \n-
    27 public:
    \n-
    28
    \n-
    29 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n-
    30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
    \n-
    31
    \n-
    32 constexpr static int dim = GridImp::dimension;
    \n-
    33
    \n-
    35 template<int codim>
    \n-
    36 int index (const typename GridImp::Traits::template Codim<codim>::Entity& e) const
    \n-
    37 {
    \n-
    38 return grid_->hostgrid_->levelIndexSet(level_).template index<codim>(grid_->template getHostEntity<codim>(e));
    \n-
    39 }
    \n-
    40
    \n-
    41
    \n-
    43 template<int cc>
    \n-
    44 int subIndex (const typename GridImp::Traits::template Codim<cc>::Entity& e, int i, int codim) const
    \n-
    45 {
    \n-
    46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template getHostEntity<cc>(e), i, codim);
    \n-
    47 }
    \n-
    48
    \n+
    27
    \n+
    28 // Type of the corresponding HierarchicIterator in the host grid
    \n+
    29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::HierarchicIterator HostGridHierarchicIterator;
    \n+
    30
    \n+
    31 public:
    \n+
    32
    \n+
    33 constexpr static int codimension = 0;
    \n+
    34
    \n+
    35 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n+
    36
    \n+
    38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel) :
    \n+
    39 identityGrid_(identityGrid),
    \n+
    40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))
    \n+
    41 {}
    \n+
    42
    \n+
    43
    \n+
    45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :
    \n+
    46 identityGrid_(identityGrid),
    \n+
    47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))
    \n+
    48 {}
    \n
    49
    \n-
    51 std::size_t size (int codim) const {
    \n-
    52 return grid_->hostgrid_->levelIndexSet(level_).size(codim);
    \n-
    53 }
    \n-
    54
    \n-
    55
    \n-
    57 std::size_t size (GeometryType type) const
    \n-
    58 {
    \n-
    59 return grid_->hostgrid_->levelIndexSet(level_).size(type);
    \n+
    50
    \n+
    52 void increment()
    \n+
    53 {
    \n+
    54 ++hostHierarchicIterator_;
    \n+
    55 }
    \n+
    56
    \n+\n+
    59 return Entity{{identityGrid_,*hostHierarchicIterator_}};
    \n
    60 }
    \n
    61
    \n-
    62
    \n-
    64 const std::vector<GeometryType>& geomTypes (int codim) const
    \n-
    65 {
    \n-
    66 return grid_->hostgrid_->levelIndexSet(level_).geomTypes(codim);
    \n-
    67 }
    \n-
    68
    \n-
    70 Types types (int codim) const
    \n-
    71 {
    \n-
    72 return grid_->hostgrid_->levelIndexSet(level_).types(codim);
    \n-
    73 }
    \n+\n+
    64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;
    \n+
    65 }
    \n+
    66
    \n+
    67 private:
    \n+
    68 const GridImp* identityGrid_;
    \n+
    69
    \n+
    70 HostGridHierarchicIterator hostHierarchicIterator_;
    \n+
    71
    \n+
    72 };
    \n+
    73
    \n
    74
    \n-
    76 template<class EntityType>
    \n-
    77 bool contains (const EntityType& e) const
    \n-
    78 {
    \n-
    79 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template getHostEntity<EntityType::codimension>(e));
    \n-
    80 }
    \n-
    81
    \n-
    83 void update(const GridImp& grid, int level)
    \n-
    84 {
    \n-
    85 grid_ = &grid;
    \n-
    86 level_ = level;
    \n-
    87 }
    \n-
    88
    \n-
    89
    \n-
    90 GridImp* grid_;
    \n-
    91
    \n-
    92 int level_;
    \n-
    93 };
    \n-
    94
    \n-
    95
    \n-
    96 template<class GridImp>
    \n-\n-
    98 public IndexSet<GridImp,
    \n-
    99 IdentityGridLeafIndexSet<GridImp>,
    \n-
    100 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::IndexType,
    \n-
    101 typename std::remove_const<GridImp>::type::HostGridType::LeafGridView::IndexSet::Types
    \n-
    102 >
    \n-
    103 {
    \n-
    104 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n-
    105
    \n-
    106 public:
    \n-
    107
    \n-
    108 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;
    \n-
    109
    \n-
    110 /*
    \n-
    111 * We use the remove_const to extract the Type from the mutable class,
    \n-
    112 * because the const class is not instantiated yet.
    \n-
    113 */
    \n-
    114 constexpr static int dim = std::remove_const<GridImp>::type::dimension;
    \n-
    115
    \n-
    116
    \n-
    118 IdentityGridLeafIndexSet (const GridImp& grid)
    \n-
    119 : grid_(&grid)
    \n-
    120 {}
    \n-
    121
    \n-
    122
    \n-
    124 /*
    \n-
    125 We use the RemoveConst to extract the Type from the mutable class,
    \n-
    126 because the const class is not instantiated yet.
    \n-
    127 */
    \n-
    128 template<int codim>
    \n-
    129 int index (const typename std::remove_const<GridImp>::type::template Codim<codim>::Entity& e) const
    \n-
    130 {
    \n-
    131 return grid_->hostgrid_->leafIndexSet().template index<codim>(grid_->template getHostEntity<codim>(e));
    \n-
    132 }
    \n-
    133
    \n-
    134
    \n-
    136 /*
    \n-
    137 We use the RemoveConst to extract the Type from the mutable class,
    \n-
    138 because the const class is not instantiated yet.
    \n-
    139 */
    \n-
    140 template<int cc>
    \n-
    141 int subIndex (const typename std::remove_const<GridImp>::type::Traits::template Codim<cc>::Entity& e, int i, int codim) const
    \n-
    142 {
    \n-
    143 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template getHostEntity<cc>(e),i, codim);
    \n-
    144 }
    \n-
    145
    \n-
    146
    \n-
    148 std::size_t size (GeometryType type) const
    \n-
    149 {
    \n-
    150 return grid_->hostgrid_->leafIndexSet().size(type);
    \n-
    151 }
    \n-
    152
    \n-
    153
    \n-
    155 std::size_t size (int codim) const
    \n-
    156 {
    \n-
    157 return grid_->hostgrid_->leafIndexSet().size(codim);
    \n-
    158 }
    \n-
    159
    \n-
    160
    \n-
    162 const std::vector<GeometryType>& geomTypes (int codim) const
    \n-
    163 {
    \n-
    164 return grid_->hostgrid_->leafIndexSet().geomTypes(codim);
    \n-
    165 }
    \n-
    166
    \n-
    168 Types types (int codim) const
    \n-
    169 {
    \n-
    170 return grid_->hostgrid_->leafIndexSet().types(codim);
    \n-
    171 }
    \n-
    172
    \n-
    174 template<class EntityType>
    \n-
    175 bool contains (const EntityType& e) const
    \n-
    176 {
    \n-
    177 return grid_->hostgrid_->leafIndexSet().contains(grid_->template getHostEntity<EntityType::codimension>(e));
    \n-
    178 }
    \n-
    179
    \n-
    180
    \n-
    181
    \n-
    183 void update(const GridImp& grid)
    \n-
    184 {
    \n-
    185 grid_ = &grid;
    \n-
    186 }
    \n-
    187
    \n-
    188
    \n-
    189 GridImp* grid_;
    \n-
    190 };
    \n-
    191
    \n-
    192
    \n-
    193
    \n-
    194
    \n-
    195 template <class GridImp>
    \n-\n-
    197 public IdSet<GridImp,IdentityGridGlobalIdSet<GridImp>,
    \n-
    198 typename std::remove_const<GridImp>::type::HostGridType::Traits::GlobalIdSet::IdType>
    \n-
    199 {
    \n-
    200
    \n-
    201 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n-
    202
    \n-
    203
    \n-
    204 public:
    \n-
    206 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}
    \n-
    207
    \n-
    209 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;
    \n-
    210
    \n-
    211
    \n-
    213 /*
    \n-
    214 We use the remove_const to extract the Type from the mutable class,
    \n-
    215 because the const class is not instantiated yet.
    \n-
    216 */
    \n-
    217 template<int cd>
    \n-
    218 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
    \n-
    219 {
    \n-
    220 // Return id of the host entity
    \n-
    221 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);
    \n-
    222 }
    \n-
    223
    \n-
    224
    \n-
    226 /*
    \n-
    227 We use the remove_const to extract the Type from the mutable class,
    \n-
    228 because the const class is not instantiated yet.
    \n-
    229 */
    \n-
    230 IdType subId (const typename std::remove_const<GridImp>::type::Traits::template Codim<0>::Entity& e, int i, int codim) const
    \n-
    231 {
    \n-
    232 // Return sub id of the host entity
    \n-
    233 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i, codim);
    \n-
    234 }
    \n-
    235
    \n-
    236
    \n-
    238 void update() {}
    \n-
    239
    \n-
    240
    \n-
    241 const GridImp* grid_;
    \n-
    242 };
    \n-
    243
    \n-
    244
    \n-
    245
    \n-
    246
    \n-
    247 template<class GridImp>
    \n-\n-
    249 public IdSet<GridImp,IdentityGridLocalIdSet<GridImp>,
    \n-
    250 typename std::remove_const<GridImp>::type::HostGridType::Traits::LocalIdSet::IdType>
    \n-
    251 {
    \n-
    252 private:
    \n-
    253
    \n-
    254 typedef typename std::remove_const<GridImp>::type::HostGridType HostGrid;
    \n-
    255
    \n-
    256
    \n-
    257 public:
    \n-
    259 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;
    \n-
    260
    \n-
    261
    \n-
    263 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}
    \n-
    264
    \n-
    265
    \n-
    267 /*
    \n-
    268 We use the remove_const to extract the Type from the mutable class,
    \n-
    269 because the const class is not instantiated yet.
    \n-
    270 */
    \n-
    271 template<int cd>
    \n-
    272 IdType id (const typename std::remove_const<GridImp>::type::Traits::template Codim<cd>::Entity& e) const
    \n-
    273 {
    \n-
    274 // Return id of the host entity
    \n-
    275 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);
    \n-
    276 }
    \n-
    277
    \n-
    278
    \n-
    280 /*
    \n-
    281 * We use the remove_const to extract the Type from the mutable class,
    \n-
    282 * because the const class is not instantiated yet.
    \n-
    283 */
    \n-
    284 IdType subId (const typename std::remove_const<GridImp>::type::template Codim<0>::Entity& e, int i, int codim) const
    \n-
    285 {
    \n-
    286 // Return sub id of the host entity
    \n-
    287 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);
    \n-
    288 }
    \n-
    289
    \n-
    290
    \n-
    292 void update() {}
    \n-
    293
    \n-
    294
    \n-
    295 const GridImp* grid_;
    \n-
    296 };
    \n-
    297
    \n-
    298
    \n-
    299} // namespace Dune
    \n-
    300
    \n-
    301
    \n-
    302#endif
    \n-
    Provides base classes for index and id sets.
    \n+
    75} // end namespace Dune
    \n+
    76
    \n+
    77#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n-
    Id Set Interface.
    Definition: indexidset.hh:452
    \n-
    Definition: identitygridindexsets.hh:26
    \n-
    bool contains(const EntityType &e) const
    Return true if the given entity is contained in the index set.
    Definition: identitygridindexsets.hh:77
    \n-
    int index(const typename GridImp::Traits::template Codim< codim >::Entity &e) const
    get index of an entity
    Definition: identitygridindexsets.hh:36
    \n-
    GridImp * grid_
    Definition: identitygridindexsets.hh:90
    \n-
    std::remove_const< GridImp >::type::HostGridType HostGrid
    Definition: identitygridindexsets.hh:29
    \n-
    const std::vector< GeometryType > & geomTypes(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:64
    \n-
    Types types(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:70
    \n-
    std::size_t size(GeometryType type) const
    get number of entities of given codim, type and on this level
    Definition: identitygridindexsets.hh:57
    \n-
    static constexpr int dim
    Definition: identitygridindexsets.hh:32
    \n-
    HostGrid::LevelGridView::IndexSet::Types Types
    Definition: identitygridindexsets.hh:30
    \n-
    std::size_t size(int codim) const
    get number of entities of given codim, type and on this level
    Definition: identitygridindexsets.hh:51
    \n-
    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
    \n-
    int level_
    Definition: identitygridindexsets.hh:92
    \n-
    void update(const GridImp &grid, int level)
    Set up the index set.
    Definition: identitygridindexsets.hh:83
    \n-
    Definition: identitygridindexsets.hh:103
    \n-
    IdentityGridLeafIndexSet(const GridImp &grid)
    constructor stores reference to a grid and level
    Definition: identitygridindexsets.hh:118
    \n-
    static constexpr int dim
    Definition: identitygridindexsets.hh:114
    \n-
    std::size_t size(int codim) const
    get number of entities of given codim
    Definition: identitygridindexsets.hh:155
    \n-
    bool contains(const EntityType &e) const
    Return true if the given entity is contained in the index set.
    Definition: identitygridindexsets.hh:175
    \n-
    std::size_t size(GeometryType type) const
    get number of entities of given type
    Definition: identitygridindexsets.hh:148
    \n-
    HostGrid::LevelGridView::IndexSet::Types Types
    Definition: identitygridindexsets.hh:108
    \n-
    int index(const typename std::remove_const< GridImp >::type::template Codim< codim >::Entity &e) const
    get index of an entity
    Definition: identitygridindexsets.hh:129
    \n-
    int subIndex(const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, int codim) const
    get index of subEntity of a codim 0 entity
    Definition: identitygridindexsets.hh:141
    \n-
    Types types(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:168
    \n-
    GridImp * grid_
    Definition: identitygridindexsets.hh:189
    \n-
    void update(const GridImp &grid)
    Definition: identitygridindexsets.hh:183
    \n-
    const std::vector< GeometryType > & geomTypes(int codim) const
    Deliver all geometry types used in this grid.
    Definition: identitygridindexsets.hh:162
    \n-
    Definition: identitygridindexsets.hh:199
    \n-
    IdentityGridGlobalIdSet(const GridImp &g)
    constructor stores reference to a grid
    Definition: identitygridindexsets.hh:206
    \n-
    void update()
    Definition: identitygridindexsets.hh:238
    \n-
    const GridImp * grid_
    Definition: identitygridindexsets.hh:241
    \n-
    HostGrid::Traits::GlobalIdSet::IdType IdType
    define the type used for persistent indices
    Definition: identitygridindexsets.hh:209
    \n-
    IdType subId(const typename std::remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i, int codim) const
    get id of subEntity
    Definition: identitygridindexsets.hh:230
    \n-
    IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
    get id of an entity
    Definition: identitygridindexsets.hh:218
    \n-
    Definition: identitygridindexsets.hh:251
    \n-
    IdType subId(const typename std::remove_const< GridImp >::type::template Codim< 0 >::Entity &e, int i, int codim) const
    get id of subEntity
    Definition: identitygridindexsets.hh:284
    \n-
    IdentityGridLocalIdSet(const GridImp &g)
    constructor stores reference to a grid
    Definition: identitygridindexsets.hh:263
    \n-
    const GridImp * grid_
    Definition: identitygridindexsets.hh:295
    \n-
    void update()
    Definition: identitygridindexsets.hh:292
    \n-
    IdType id(const typename std::remove_const< GridImp >::type::Traits::template Codim< cd >::Entity &e) const
    get id of an entity
    Definition: identitygridindexsets.hh:272
    \n-
    HostGrid::Traits::LocalIdSet::IdType IdType
    define the type used for persistent local ids
    Definition: identitygridindexsets.hh:259
    \n+
    Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
    Definition: identitygridhierarchiciterator.hh:26
    \n+
    void increment()
    Definition: identitygridhierarchiciterator.hh:52
    \n+
    GridImp::template Codim< 0 >::Entity Entity
    Definition: identitygridhierarchiciterator.hh:35
    \n+
    bool equals(const IdentityGridHierarchicIterator &i) const
    equality
    Definition: identitygridhierarchiciterator.hh:63
    \n+
    static constexpr int codimension
    Definition: identitygridhierarchiciterator.hh:33
    \n+
    IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel, bool endDummy)
    Definition: identitygridhierarchiciterator.hh:45
    \n+
    Entity dereference() const
    dereferencing
    Definition: identitygridhierarchiciterator.hh:58
    \n+
    IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel)
    the default Constructor
    Definition: identitygridhierarchiciterator.hh:38
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,470 +5,110 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n-identitygridindexsets.hh\n+identitygridhierarchiciterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IDENTITYGRID_INDEXSETS_HH\n- 6#define DUNE_IDENTITYGRID_INDEXSETS_HH\n+ 5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH\n+ 6#define DUNE_IDENTITYGRIDHIERITERATOR_HH\n 7\n- 12#include \n+ 12namespace Dune {\n 13\n- 14#include \n- 15\n- 16namespace Dune {\n- 17\n- 19 template\n-20 class IdentityGridLevelIndexSet :\n- 21 public IndexSet,\n- 23 typename std::remove_const::type::HostGridType::LevelGridView::\n-IndexSet::IndexType,\n- 24 typename std::remove_const::type::HostGridType::LevelGridView::\n-IndexSet::Types\n- 25 >\n+ 14\n+ 15 //**********************************************************************\n+ 16 //\n+ 24 template\n+25 class IdentityGridHierarchicIterator\n 26 {\n- 27 public:\n- 28\n-29 typedef typename std::remove_const::type::HostGridType HostGrid;\n-30 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;\n- 31\n-32 constexpr static int dim = GridImp::dimension;\n- 33\n- 35 template\n-36 int index (const typename GridImp::Traits::template Codim::Entity& e)\n-const\n- 37 {\n- 38 return grid_->hostgrid_->levelIndexSet(level_).template index(grid_-\n->template getHostEntity(e));\n- 39 }\n- 40\n- 41\n- 43 template\n-44 int subIndex (const typename GridImp::Traits::template Codim::Entity& e,\n-int i, int codim) const\n- 45 {\n- 46 return grid_->hostgrid_->levelIndexSet(level_).subIndex(grid_->template\n-getHostEntity(e), i, codim);\n- 47 }\n- 48\n+ 27\n+ 28 // Type of the corresponding HierarchicIterator in the host grid\n+ 29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::\n+HierarchicIterator HostGridHierarchicIterator;\n+ 30\n+ 31 public:\n+ 32\n+33 constexpr static int codimension = 0;\n+ 34\n+35 typedef typename GridImp::template Codim<0>::Entity Entity;\n+ 36\n+38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const\n+Entity& startEntity, int maxLevel) :\n+ 39 identityGrid_(identityGrid),\n+ 40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))\n+ 41 {}\n+ 42\n+ 43\n+45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const\n+Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :\n+ 46 identityGrid_(identityGrid),\n+ 47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))\n+ 48 {}\n 49\n-51 std::size_t size (int codim) const {\n- 52 return grid_->hostgrid_->levelIndexSet(level_).size(codim);\n- 53 }\n- 54\n- 55\n-57 std::size_t size (GeometryType type) const\n- 58 {\n- 59 return grid_->hostgrid_->levelIndexSet(level_).size(type);\n+ 50\n+52 void increment()\n+ 53 {\n+ 54 ++hostHierarchicIterator_;\n+ 55 }\n+ 56\n+58 Entity dereference() const {\n+ 59 return Entity{{identityGrid_,*hostHierarchicIterator_}};\n 60 }\n 61\n- 62\n-64 const std::vector& geomTypes (int codim) const\n- 65 {\n- 66 return grid_->hostgrid_->levelIndexSet(level_).geomTypes(codim);\n- 67 }\n- 68\n-70 Types types (int codim) const\n- 71 {\n- 72 return grid_->hostgrid_->levelIndexSet(level_).types(codim);\n- 73 }\n+63 bool equals(const IdentityGridHierarchicIterator& i) const {\n+ 64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;\n+ 65 }\n+ 66\n+ 67 private:\n+ 68 const GridImp* identityGrid_;\n+ 69\n+ 70 HostGridHierarchicIterator hostHierarchicIterator_;\n+ 71\n+ 72 };\n+ 73\n 74\n- 76 template\n-77 bool contains (const EntityType& e) const\n- 78 {\n- 79 return grid_->hostgrid_->levelIndexSet(level_).contains(grid_->template\n-getHostEntity(e));\n- 80 }\n- 81\n-83 void update(const GridImp& grid, int level)\n- 84 {\n- 85 grid_ = &grid;\n- 86 level_ = level;\n- 87 }\n- 88\n- 89\n-90 GridImp* grid_;\n- 91\n-92 int level_;\n- 93 };\n- 94\n- 95\n- 96 template\n-97 class IdentityGridLeafIndexSet :\n- 98 public IndexSet,\n- 100 typename std::remove_const::type::HostGridType::LeafGridView::\n-IndexSet::IndexType,\n- 101 typename std::remove_const::type::HostGridType::LeafGridView::\n-IndexSet::Types\n- 102 >\n- 103 {\n- 104 typedef typename std::remove_const::type::HostGridType HostGrid;\n- 105\n- 106 public:\n- 107\n-108 typedef typename HostGrid::LevelGridView::IndexSet::Types Types;\n- 109\n- 110 /*\n- 111 * We use the remove_const to extract the Type from the mutable class,\n- 112 * because the const class is not instantiated yet.\n- 113 */\n-114 constexpr static int dim = std::remove_const::type::dimension;\n- 115\n- 116\n-118 IdentityGridLeafIndexSet (const GridImp& grid)\n- 119 : grid_(&grid)\n- 120 {}\n- 121\n- 122\n- 124 /*\n- 125 We use the RemoveConst to extract the Type from the mutable class,\n- 126 because the const class is not instantiated yet.\n- 127 */\n- 128 template\n-129 int index (const typename std::remove_const::type::template\n-Codim::Entity& e) const\n- 130 {\n- 131 return grid_->hostgrid_->leafIndexSet().template index(grid_-\n->template getHostEntity(e));\n- 132 }\n- 133\n- 134\n- 136 /*\n- 137 We use the RemoveConst to extract the Type from the mutable class,\n- 138 because the const class is not instantiated yet.\n- 139 */\n- 140 template\n-141 int subIndex (const typename std::remove_const::type::Traits::\n-template Codim::Entity& e, int i, int codim) const\n- 142 {\n- 143 return grid_->hostgrid_->leafIndexSet().subIndex(grid_->template\n-getHostEntity(e),i, codim);\n- 144 }\n- 145\n- 146\n-148 std::size_t size (GeometryType type) const\n- 149 {\n- 150 return grid_->hostgrid_->leafIndexSet().size(type);\n- 151 }\n- 152\n- 153\n-155 std::size_t size (int codim) const\n- 156 {\n- 157 return grid_->hostgrid_->leafIndexSet().size(codim);\n- 158 }\n- 159\n- 160\n-162 const std::vector& geomTypes (int codim) const\n- 163 {\n- 164 return grid_->hostgrid_->leafIndexSet().geomTypes(codim);\n- 165 }\n- 166\n-168 Types types (int codim) const\n- 169 {\n- 170 return grid_->hostgrid_->leafIndexSet().types(codim);\n- 171 }\n- 172\n- 174 template\n-175 bool contains (const EntityType& e) const\n- 176 {\n- 177 return grid_->hostgrid_->leafIndexSet().contains(grid_->template\n-getHostEntity(e));\n- 178 }\n- 179\n- 180\n- 181\n-183 void update(const GridImp& grid)\n- 184 {\n- 185 grid_ = &grid;\n- 186 }\n- 187\n- 188\n-189 GridImp* grid_;\n- 190 };\n- 191\n- 192\n- 193\n- 194\n- 195 template \n-196 class IdentityGridGlobalIdSet :\n- 197 public IdSet,\n- 198 typename std::remove_const::type::HostGridType::Traits::\n-GlobalIdSet::IdType>\n- 199 {\n- 200\n- 201 typedef typename std::remove_const::type::HostGridType HostGrid;\n- 202\n- 203\n- 204 public:\n-206 IdentityGridGlobalIdSet (const GridImp& g) : grid_(&g) {}\n- 207\n-209 typedef typename HostGrid::Traits::GlobalIdSet::IdType IdType;\n- 210\n- 211\n- 213 /*\n- 214 We use the remove_const to extract the Type from the mutable class,\n- 215 because the const class is not instantiated yet.\n- 216 */\n- 217 template\n-218 IdType id (const typename std::remove_const::type::Traits::\n-template Codim::Entity& e) const\n- 219 {\n- 220 // Return id of the host entity\n- 221 return grid_->hostgrid_->globalIdSet().id(e.impl().hostEntity_);\n- 222 }\n- 223\n- 224\n- 226 /*\n- 227 We use the remove_const to extract the Type from the mutable class,\n- 228 because the const class is not instantiated yet.\n- 229 */\n-230 IdType subId (const typename std::remove_const::type::Traits::\n-template Codim<0>::Entity& e, int i, int codim) const\n- 231 {\n- 232 // Return sub id of the host entity\n- 233 return grid_->hostgrid_->globalIdSet().subId(e.impl().hostEntity_,i,\n-codim);\n- 234 }\n- 235\n- 236\n-238 void update() {}\n- 239\n- 240\n-241 const GridImp* grid_;\n- 242 };\n- 243\n- 244\n- 245\n- 246\n- 247 template\n-248 class IdentityGridLocalIdSet :\n- 249 public IdSet,\n- 250 typename std::remove_const::type::HostGridType::Traits::\n-LocalIdSet::IdType>\n- 251 {\n- 252 private:\n- 253\n- 254 typedef typename std::remove_const::type::HostGridType HostGrid;\n- 255\n- 256\n- 257 public:\n-259 typedef typename HostGrid::Traits::LocalIdSet::IdType IdType;\n- 260\n- 261\n-263 IdentityGridLocalIdSet (const GridImp& g) : grid_(&g) {}\n- 264\n- 265\n- 267 /*\n- 268 We use the remove_const to extract the Type from the mutable class,\n- 269 because the const class is not instantiated yet.\n- 270 */\n- 271 template\n-272 IdType id (const typename std::remove_const::type::Traits::\n-template Codim::Entity& e) const\n- 273 {\n- 274 // Return id of the host entity\n- 275 return grid_->hostgrid_->localIdSet().id(e.impl().hostEntity_);\n- 276 }\n- 277\n- 278\n- 280 /*\n- 281 * We use the remove_const to extract the Type from the mutable class,\n- 282 * because the const class is not instantiated yet.\n- 283 */\n-284 IdType subId (const typename std::remove_const::type::template\n-Codim<0>::Entity& e, int i, int codim) const\n- 285 {\n- 286 // Return sub id of the host entity\n- 287 return grid_->hostgrid_->localIdSet().subId(e.impl().hostEntity_,i,codim);\n- 288 }\n- 289\n- 290\n-292 void update() {}\n- 293\n- 294\n-295 const GridImp* grid_;\n- 296 };\n- 297\n- 298\n- 299} // namespace Dune\n- 300\n- 301\n- 302#endif\n-indexidset.hh\n-Provides base classes for index and id sets.\n+ 75} // end namespace Dune\n+ 76\n+ 77#endif\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::IndexSet\n-Index Set Interface base class.\n-Definition: indexidset.hh:78\n-Dune::IdSet\n-Id Set Interface.\n-Definition: indexidset.hh:452\n-Dune::IdentityGridLevelIndexSet\n-Definition: identitygridindexsets.hh:26\n-Dune::IdentityGridLevelIndexSet::contains\n-bool contains(const EntityType &e) const\n-Return true if the given entity is contained in the index set.\n-Definition: identitygridindexsets.hh:77\n-Dune::IdentityGridLevelIndexSet::index\n-int index(const typename GridImp::Traits::template Codim< codim >::Entity &e)\n-const\n-get index of an entity\n-Definition: identitygridindexsets.hh:36\n-Dune::IdentityGridLevelIndexSet::grid_\n-GridImp * grid_\n-Definition: identitygridindexsets.hh:90\n-Dune::IdentityGridLevelIndexSet::HostGrid\n-std::remove_const< GridImp >::type::HostGridType HostGrid\n-Definition: identitygridindexsets.hh:29\n-Dune::IdentityGridLevelIndexSet::geomTypes\n-const std::vector< GeometryType > & geomTypes(int codim) const\n-Deliver all geometry types used in this grid.\n-Definition: identitygridindexsets.hh:64\n-Dune::IdentityGridLevelIndexSet::types\n-Types types(int codim) const\n-Deliver all geometry types used in this grid.\n-Definition: identitygridindexsets.hh:70\n-Dune::IdentityGridLevelIndexSet::size\n-std::size_t size(GeometryType type) const\n-get number of entities of given codim, type and on this level\n-Definition: identitygridindexsets.hh:57\n-Dune::IdentityGridLevelIndexSet::dim\n-static constexpr int dim\n-Definition: identitygridindexsets.hh:32\n-Dune::IdentityGridLevelIndexSet::Types\n-HostGrid::LevelGridView::IndexSet::Types Types\n-Definition: identitygridindexsets.hh:30\n-Dune::IdentityGridLevelIndexSet::size\n-std::size_t size(int codim) const\n-get number of entities of given codim, type and on this level\n-Definition: identitygridindexsets.hh:51\n-Dune::IdentityGridLevelIndexSet::subIndex\n-int subIndex(const typename GridImp::Traits::template Codim< cc >::Entity &e,\n-int i, int codim) const\n-get index of subEntity of a codim 0 entity\n-Definition: identitygridindexsets.hh:44\n-Dune::IdentityGridLevelIndexSet::level_\n-int level_\n-Definition: identitygridindexsets.hh:92\n-Dune::IdentityGridLevelIndexSet::update\n-void update(const GridImp &grid, int level)\n-Set up the index set.\n-Definition: identitygridindexsets.hh:83\n-Dune::IdentityGridLeafIndexSet\n-Definition: identitygridindexsets.hh:103\n-Dune::IdentityGridLeafIndexSet::IdentityGridLeafIndexSet\n-IdentityGridLeafIndexSet(const GridImp &grid)\n-constructor stores reference to a grid and level\n-Definition: identitygridindexsets.hh:118\n-Dune::IdentityGridLeafIndexSet::dim\n-static constexpr int dim\n-Definition: identitygridindexsets.hh:114\n-Dune::IdentityGridLeafIndexSet::size\n-std::size_t size(int codim) const\n-get number of entities of given codim\n-Definition: identitygridindexsets.hh:155\n-Dune::IdentityGridLeafIndexSet::contains\n-bool contains(const EntityType &e) const\n-Return true if the given entity is contained in the index set.\n-Definition: identitygridindexsets.hh:175\n-Dune::IdentityGridLeafIndexSet::size\n-std::size_t size(GeometryType type) const\n-get number of entities of given type\n-Definition: identitygridindexsets.hh:148\n-Dune::IdentityGridLeafIndexSet::Types\n-HostGrid::LevelGridView::IndexSet::Types Types\n-Definition: identitygridindexsets.hh:108\n-Dune::IdentityGridLeafIndexSet::index\n-int index(const typename std::remove_const< GridImp >::type::template Codim<\n-codim >::Entity &e) const\n-get index of an entity\n-Definition: identitygridindexsets.hh:129\n-Dune::IdentityGridLeafIndexSet::subIndex\n-int subIndex(const typename std::remove_const< GridImp >::type::Traits::\n-template Codim< cc >::Entity &e, int i, int codim) const\n-get index of subEntity of a codim 0 entity\n-Definition: identitygridindexsets.hh:141\n-Dune::IdentityGridLeafIndexSet::types\n-Types types(int codim) const\n-Deliver all geometry types used in this grid.\n-Definition: identitygridindexsets.hh:168\n-Dune::IdentityGridLeafIndexSet::grid_\n-GridImp * grid_\n-Definition: identitygridindexsets.hh:189\n-Dune::IdentityGridLeafIndexSet::update\n-void update(const GridImp &grid)\n-Definition: identitygridindexsets.hh:183\n-Dune::IdentityGridLeafIndexSet::geomTypes\n-const std::vector< GeometryType > & geomTypes(int codim) const\n-Deliver all geometry types used in this grid.\n-Definition: identitygridindexsets.hh:162\n-Dune::IdentityGridGlobalIdSet\n-Definition: identitygridindexsets.hh:199\n-Dune::IdentityGridGlobalIdSet::IdentityGridGlobalIdSet\n-IdentityGridGlobalIdSet(const GridImp &g)\n-constructor stores reference to a grid\n-Definition: identitygridindexsets.hh:206\n-Dune::IdentityGridGlobalIdSet::update\n-void update()\n-Definition: identitygridindexsets.hh:238\n-Dune::IdentityGridGlobalIdSet::grid_\n-const GridImp * grid_\n-Definition: identitygridindexsets.hh:241\n-Dune::IdentityGridGlobalIdSet::IdType\n-HostGrid::Traits::GlobalIdSet::IdType IdType\n-define the type used for persistent indices\n-Definition: identitygridindexsets.hh:209\n-Dune::IdentityGridGlobalIdSet::subId\n-IdType subId(const typename std::remove_const< GridImp >::type::Traits::\n-template Codim< 0 >::Entity &e, int i, int codim) const\n-get id of subEntity\n-Definition: identitygridindexsets.hh:230\n-Dune::IdentityGridGlobalIdSet::id\n-IdType id(const typename std::remove_const< GridImp >::type::Traits::template\n-Codim< cd >::Entity &e) const\n-get id of an entity\n-Definition: identitygridindexsets.hh:218\n-Dune::IdentityGridLocalIdSet\n-Definition: identitygridindexsets.hh:251\n-Dune::IdentityGridLocalIdSet::subId\n-IdType subId(const typename std::remove_const< GridImp >::type::template Codim<\n-0 >::Entity &e, int i, int codim) const\n-get id of subEntity\n-Definition: identitygridindexsets.hh:284\n-Dune::IdentityGridLocalIdSet::IdentityGridLocalIdSet\n-IdentityGridLocalIdSet(const GridImp &g)\n-constructor stores reference to a grid\n-Definition: identitygridindexsets.hh:263\n-Dune::IdentityGridLocalIdSet::grid_\n-const GridImp * grid_\n-Definition: identitygridindexsets.hh:295\n-Dune::IdentityGridLocalIdSet::update\n-void update()\n-Definition: identitygridindexsets.hh:292\n-Dune::IdentityGridLocalIdSet::id\n-IdType id(const typename std::remove_const< GridImp >::type::Traits::template\n-Codim< cd >::Entity &e) const\n-get id of an entity\n-Definition: identitygridindexsets.hh:272\n-Dune::IdentityGridLocalIdSet::IdType\n-HostGrid::Traits::LocalIdSet::IdType IdType\n-define the type used for persistent local ids\n-Definition: identitygridindexsets.hh:259\n+Dune::IdentityGridHierarchicIterator\n+Iterator over the descendants of an entity.Mesh entities of codimension 0\n+(\"elements\") allow to visit...\n+Definition: identitygridhierarchiciterator.hh:26\n+Dune::IdentityGridHierarchicIterator::increment\n+void increment()\n+Definition: identitygridhierarchiciterator.hh:52\n+Dune::IdentityGridHierarchicIterator::Entity\n+GridImp::template Codim< 0 >::Entity Entity\n+Definition: identitygridhierarchiciterator.hh:35\n+Dune::IdentityGridHierarchicIterator::equals\n+bool equals(const IdentityGridHierarchicIterator &i) const\n+equality\n+Definition: identitygridhierarchiciterator.hh:63\n+Dune::IdentityGridHierarchicIterator::codimension\n+static constexpr int codimension\n+Definition: identitygridhierarchiciterator.hh:33\n+Dune::IdentityGridHierarchicIterator::IdentityGridHierarchicIterator\n+IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity\n+&startEntity, int maxLevel, bool endDummy)\n+Definition: identitygridhierarchiciterator.hh:45\n+Dune::IdentityGridHierarchicIterator::dereference\n+Entity dereference() const\n+dereferencing\n+Definition: identitygridhierarchiciterator.hh:58\n+Dune::IdentityGridHierarchicIterator::IdentityGridHierarchicIterator\n+IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity\n+&startEntity, int maxLevel)\n+the default Constructor\n+Definition: identitygridhierarchiciterator.hh:38\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00743.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00743.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridintersections.hh File Reference\n+dune-grid: identitygridintersectioniterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,41 +65,42 @@\n
  • dune
  • grid
  • identitygrid
  • \n \n \n
    \n \n-
    identitygridintersections.hh File Reference
    \n+
    identitygridintersectioniterator.hh File Reference
    \n
    \n
    \n \n-

    The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. \n+

    The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes. \n More...

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

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n-\n+\n \n

    \n 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::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::IdentityGridLevelIntersection< GridImp >
    class  Dune::IdentityGridLevelIntersectionIterator< GridImp >
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.

    \n+

    The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,33 +6,35 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n Classes | Namespaces\n-identitygridintersections.hh File Reference\n-The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.\n-More...\n-#include \"identitygridleafiterator.hh\"\n-#include \n+identitygridintersectioniterator.hh File Reference\n+The IdentityGridLeafIntersectionIterator and\n+IdentityGridLevelIntersectionIterator classes. More...\n+#include \"identitygridintersections.hh\"\n+#include \"identitygridentity.hh\"\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdentityGridLeafIntersection<_GridImp_>\n- An intersection with a leaf neighbor elementMesh entities of\n- codimension 0 (\"elements\") allow to visit all neighbors, where a\n-\u00a0 neighbor is an entity of codimension 0 which has a common entity of\n- codimension 1 These neighbors are accessed via a IntersectionIterator.\n- This allows the implement non-matching meshes. The number of neighbors\n- may be different from the number of an element! More...\n+class \u00a0Dune::IdentityGridLeafIntersectionIterator<_GridImp_>\n+ Iterator over all element neighborsMesh entities of codimension 0\n+ (\"elements\") allow to visit all neighbors, where a neighbor is an\n+\u00a0 entity of codimension 0 which has a common entity of codimension 1\n+ These neighbors are accessed via a IntersectionIterator. This allows\n+ the implement non-matching meshes. The number of neighbors may be\n+ different from the number of an element! More...\n \u00a0\n-class \u00a0Dune::IdentityGridLevelIntersection<_GridImp_>\n+class \u00a0Dune::IdentityGridLevelIntersectionIterator<_GridImp_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.\n+The IdentityGridLeafIntersectionIterator and\n+IdentityGridLevelIntersectionIterator classes.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00743_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridintersections.hh Source File\n+dune-grid: identitygridintersectioniterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,352 +62,153 @@\n \n \n
    \n
    \n-
    identitygridintersections.hh
    \n+
    identitygridintersectioniterator.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
    \n-
    6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH
    \n+
    5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
    \n+
    6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH
    \n
    7
    \n-\n-\n+\n+\n
    10
    \n-
    15namespace Dune {
    \n-
    16
    \n-
    17
    \n-
    18 // External forward declarations
    \n-
    19 template< class Grid >
    \n-
    20 struct HostGridAccess;
    \n-
    21
    \n-
    22
    \n-
    31 template<class GridImp>
    \n-\n-
    33 {
    \n+\n+
    12
    \n+
    17namespace Dune {
    \n+
    18
    \n+
    27 template<class GridImp>
    \n+\n+
    29 {
    \n+
    30
    \n+
    31 constexpr static int dim = GridImp::dimension;
    \n+
    32
    \n+
    33 constexpr static int dimworld = GridImp::dimensionworld;
    \n
    34
    \n-
    35 friend class IdentityGridLeafIntersectionIterator<GridImp>;
    \n-
    36
    \n-
    37 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n-
    38
    \n-
    39 constexpr static int dim = GridImp::dimension;
    \n-
    40
    \n-
    41 constexpr static int dimworld = GridImp::dimensionworld;
    \n-
    42
    \n-
    43 // The type used to store coordinates
    \n-
    44 typedef typename GridImp::ctype ctype;
    \n-
    45
    \n-
    46 typedef typename GridImp::HostGridType::LeafGridView::Intersection HostLeafIntersection;
    \n-
    47
    \n-
    48 public:
    \n-
    49
    \n-
    50 typedef typename GridImp::template Codim<1>::Geometry Geometry;
    \n-
    51 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
    \n-
    52 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n-
    53 typedef FieldVector<ctype, dimworld> NormalVector;
    \n-
    54
    \n-\n-
    56 {}
    \n+
    35 // The type used to store coordinates
    \n+
    36 typedef typename GridImp::ctype ctype;
    \n+
    37
    \n+
    38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator HostLeafIntersectionIterator;
    \n+
    39
    \n+
    40 public:
    \n+
    41
    \n+\n+
    43
    \n+\n+
    45 {}
    \n+
    46
    \n+
    47 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,
    \n+
    48 const HostLeafIntersectionIterator& hostIterator)
    \n+
    49 : identityGrid_(identityGrid)
    \n+
    50 , hostIterator_(hostIterator)
    \n+
    51 {}
    \n+
    52
    \n+\n+
    55 return hostIterator_ == other.hostIterator_;
    \n+
    56 }
    \n
    57
    \n-
    58 IdentityGridLeafIntersection(const GridImp* identityGrid,
    \n-
    59 const HostLeafIntersection& hostIntersection)
    \n-
    60 : identityGrid_(identityGrid)
    \n-
    61 , hostIntersection_(hostIntersection)
    \n-
    62 {}
    \n+
    58
    \n+
    60 void increment() {
    \n+
    61 ++hostIterator_;
    \n+
    62 }
    \n
    63
    \n-
    64 IdentityGridLeafIntersection(const GridImp* identityGrid,
    \n-
    65 HostLeafIntersection&& hostIntersection)
    \n-
    66 : identityGrid_(identityGrid)
    \n-
    67 , hostIntersection_(std::move(hostIntersection))
    \n-
    68 {}
    \n-
    69
    \n-
    70 bool equals(const IdentityGridLeafIntersection& other) const
    \n-
    71 {
    \n-
    72 return hostIntersection_ == other.hostIntersection_;
    \n-
    73 }
    \n-
    74
    \n-
    77 Entity inside() const {
    \n-
    78 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
    \n-
    79 }
    \n+\n+
    66 return IdentityGridLeafIntersection<GridImp>(identityGrid_,*hostIterator_);
    \n+
    67 }
    \n+
    68
    \n+
    69 private:
    \n+
    70 //**********************************************************
    \n+
    71 // private data
    \n+
    72 //**********************************************************
    \n+
    73
    \n+
    74 const GridImp* identityGrid_ = nullptr;
    \n+
    75 HostLeafIntersectionIterator hostIterator_ = {};
    \n+
    76 };
    \n+
    77
    \n+
    78
    \n+
    79
    \n
    80
    \n-
    81
    \n-
    84 Entity outside() const {
    \n-
    85 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
    \n-
    86 }
    \n-
    87
    \n+
    82 template<class GridImp>
    \n+\n+
    84 {
    \n+
    85 constexpr static int dim = GridImp::dimension;
    \n+
    86
    \n+
    87 constexpr static int dimworld = GridImp::dimensionworld;
    \n
    88
    \n-
    90 bool boundary () const {
    \n-
    91 return hostIntersection_.boundary();
    \n-
    92 }
    \n+
    89 // The type used to store coordinates
    \n+
    90 typedef typename GridImp::ctype ctype;
    \n+
    91
    \n+
    92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator HostLevelIntersectionIterator;
    \n
    93
    \n-\n-
    100 return hostIntersection_.centerUnitOuterNormal();
    \n-
    101 }
    \n-
    102
    \n-
    104 bool neighbor () const {
    \n-
    105 return hostIntersection_.neighbor();
    \n-
    106 }
    \n-
    107
    \n-
    109 size_t boundarySegmentIndex() const {
    \n-
    110 return hostIntersection_.boundarySegmentIndex();
    \n-
    111 }
    \n+
    94 public:
    \n+
    95
    \n+\n+
    97
    \n+\n+
    99 {}
    \n+
    100
    \n+
    101 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,
    \n+
    102 const HostLevelIntersectionIterator& hostIterator)
    \n+
    103 : identityGrid_(identityGrid)
    \n+
    104 , hostIterator_(hostIterator)
    \n+
    105 {}
    \n+
    106
    \n+\n+
    109 return hostIterator_ == other.hostIterator_;
    \n+
    110 }
    \n+
    111
    \n
    112
    \n-
    114 bool conforming () const {
    \n-
    115 return hostIntersection_.conforming();
    \n+
    114 void increment() {
    \n+
    115 ++hostIterator_;
    \n
    116 }
    \n
    117
    \n-\n-
    120 return hostIntersection_.type();
    \n+\n+
    120 return IdentityGridLevelIntersection<GridImp>(identityGrid_,*hostIterator_);
    \n
    121 }
    \n
    122
    \n-
    123
    \n-\n-
    129 {
    \n-
    130 return LocalGeometry( hostIntersection_.geometryInInside() );
    \n-
    131 }
    \n-
    132
    \n-\n-
    136 {
    \n-
    137 return LocalGeometry( hostIntersection_.geometryInOutside() );
    \n-
    138 }
    \n-
    139
    \n-\n-
    143 {
    \n-
    144 return Geometry( hostIntersection_.geometry() );
    \n-
    145 }
    \n-
    146
    \n-
    147
    \n-
    149 int indexInInside () const {
    \n-
    150 return hostIntersection_.indexInInside();
    \n-
    151 }
    \n-
    152
    \n-
    153
    \n-
    155 int indexInOutside () const {
    \n-
    156 return hostIntersection_.indexInOutside();
    \n-
    157 }
    \n-
    158
    \n-
    159
    \n-
    161 FieldVector<ctype, GridImp::dimensionworld> outerNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
    \n-
    162 return hostIntersection_.outerNormal(local);
    \n-
    163 }
    \n-
    164
    \n-
    166 FieldVector<ctype, GridImp::dimensionworld> integrationOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
    \n-
    167 return hostIntersection_.integrationOuterNormal(local);
    \n-
    168 }
    \n-
    169
    \n-
    171 FieldVector<ctype, GridImp::dimensionworld> unitOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
    \n-
    172 return hostIntersection_.unitOuterNormal(local);
    \n-
    173 }
    \n-
    174
    \n-
    175
    \n-
    176 private:
    \n-
    177 //**********************************************************
    \n-
    178 // private methods
    \n-
    179 //**********************************************************
    \n-
    180
    \n-
    181 const GridImp* identityGrid_;
    \n-
    182
    \n-
    183 HostLeafIntersection hostIntersection_;
    \n-
    184 };
    \n-
    185
    \n-
    186
    \n-
    187
    \n-
    188
    \n-
    190 template<class GridImp>
    \n-\n-
    192 {
    \n-
    193
    \n-
    194 friend class IdentityGridLevelIntersectionIterator<GridImp>;
    \n-
    195
    \n-
    196 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n-
    197
    \n-
    198 constexpr static int dim = GridImp::dimension;
    \n-
    199
    \n-
    200 constexpr static int dimworld = GridImp::dimensionworld;
    \n-
    201
    \n-
    202 // The type used to store coordinates
    \n-
    203 typedef typename GridImp::ctype ctype;
    \n-
    204
    \n-
    205 typedef typename GridImp::HostGridType::LevelGridView::Intersection HostLevelIntersection;
    \n-
    206
    \n-
    207 public:
    \n-
    208
    \n-
    209 typedef typename GridImp::template Codim<1>::Geometry Geometry;
    \n-
    210 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
    \n-
    211 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n-
    212 typedef FieldVector<ctype, dimworld> NormalVector;
    \n-
    213
    \n-\n-
    215 {}
    \n-
    216
    \n-
    217 IdentityGridLevelIntersection(const GridImp* identityGrid,
    \n-
    218 const HostLevelIntersection& hostIntersection)
    \n-
    219 : identityGrid_(identityGrid)
    \n-
    220 , hostIntersection_(hostIntersection)
    \n-
    221 {}
    \n-
    222
    \n-
    223 IdentityGridLevelIntersection(const GridImp* identityGrid,
    \n-
    224 HostLevelIntersection&& hostIntersection)
    \n-
    225 : identityGrid_(identityGrid)
    \n-
    226 , hostIntersection_(std::move(hostIntersection))
    \n-
    227 {}
    \n-
    228
    \n-
    229 bool equals(const IdentityGridLevelIntersection& other) const
    \n-
    230 {
    \n-
    231 return hostIntersection_ == other.hostIntersection_;
    \n-
    232 }
    \n-
    233
    \n-
    236 Entity inside() const {
    \n-
    237 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
    \n-
    238 }
    \n-
    239
    \n-
    240
    \n-
    243 Entity outside() const {
    \n-
    244 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
    \n-
    245 }
    \n-
    246
    \n-
    247
    \n-
    250 bool boundary () const {
    \n-
    251 return hostIntersection_.boundary();
    \n-
    252 }
    \n-
    253
    \n-\n-
    260 return hostIntersection_.centerUnitOuterNormal();
    \n-
    261 }
    \n-
    262
    \n-
    264 bool neighbor () const {
    \n-
    265 return hostIntersection_.neighbor();
    \n-
    266 }
    \n-
    267
    \n-
    269 size_t boundarySegmentIndex() const {
    \n-
    270 return hostIntersection_.boundarySegmentIndex();
    \n-
    271 }
    \n-
    272
    \n-
    274 bool conforming () const {
    \n-
    275 return hostIntersection_.conforming();
    \n-
    276 }
    \n-
    277
    \n-\n-
    280 return hostIntersection_.type();
    \n-
    281 }
    \n-
    282
    \n-
    283
    \n-\n-
    289 {
    \n-
    290 return LocalGeometry( hostIntersection_.geometryInInside() );
    \n-
    291 }
    \n-
    292
    \n-\n-
    296 {
    \n-
    297 return LocalGeometry( hostIntersection_.geometryInOutside() );
    \n-
    298 }
    \n-
    299
    \n-\n-
    303 {
    \n-
    304 return Geometry( hostIntersection_.geometry() );
    \n-
    305 }
    \n-
    306
    \n-
    307
    \n-
    309 int indexInInside () const {
    \n-
    310 return hostIntersection_.indexInInside();
    \n-
    311 }
    \n-
    312
    \n-
    313
    \n-
    315 int indexInOutside () const {
    \n-
    316 return hostIntersection_.indexInOutside();
    \n-
    317 }
    \n-
    318
    \n-
    319
    \n-
    321 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& local) const {
    \n-
    322 return hostIntersection_.outerNormal(local);
    \n-
    323 }
    \n-
    324
    \n-
    326 FieldVector<ctype, dimworld> integrationOuterNormal (const FieldVector<ctype, dim-1>& local) const {
    \n-
    327 return hostIntersection_.integrationOuterNormal(local);
    \n-
    328 }
    \n-
    329
    \n-
    331 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& local) const {
    \n-
    332 return hostIntersection_.unitOuterNormal(local);
    \n-
    333 }
    \n-
    334
    \n-
    335 private:
    \n-
    336
    \n-
    337 const GridImp* identityGrid_;
    \n-
    338
    \n-
    339 HostLevelIntersection hostIntersection_;
    \n-
    340
    \n-
    341 };
    \n-
    342
    \n-
    343
    \n-
    344} // namespace Dune
    \n-
    345
    \n-
    346#endif
    \n-
    The IdentityGridEntity class.
    \n-
    The IdentityGridLeafIterator class.
    \n-
    STL namespace.
    \n+
    123 private:
    \n+
    124
    \n+
    125
    \n+
    126 const GridImp* identityGrid_ = nullptr;
    \n+
    127 HostLevelIntersectionIterator hostIterator_ = {};
    \n+
    128
    \n+
    129 };
    \n+
    130
    \n+
    131
    \n+
    132} // namespace Dune
    \n+
    133
    \n+
    134#endif
    \n+
    The IdentityGridEntity class.
    \n+
    The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n+
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n
    Definition: identitygridintersectioniterator.hh:84
    \n+
    bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other) const
    equality
    Definition: identitygridintersectioniterator.hh:108
    \n+
    void increment()
    prefix increment
    Definition: identitygridintersectioniterator.hh:114
    \n+
    IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const HostLevelIntersectionIterator &hostIterator)
    Definition: identitygridintersectioniterator.hh:101
    \n+
    Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp > > Intersection
    Definition: identitygridintersectioniterator.hh:96
    \n+
    Intersection dereference() const
    dereferencing
    Definition: identitygridintersectioniterator.hh:119
    \n+
    IdentityGridLevelIntersectionIterator()
    Definition: identitygridintersectioniterator.hh:98
    \n
    Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
    Definition: identitygridintersectioniterator.hh:29
    \n-
    Specialization for codim-0-entities.
    Definition: identitygridentity.hh:205
    \n+
    bool equals(const IdentityGridLeafIntersectionIterator &other) const
    equality
    Definition: identitygridintersectioniterator.hh:54
    \n+
    void increment()
    prefix increment
    Definition: identitygridintersectioniterator.hh:60
    \n+
    IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const HostLeafIntersectionIterator &hostIterator)
    Definition: identitygridintersectioniterator.hh:47
    \n+
    Intersection dereference() const
    dereferencing
    Definition: identitygridintersectioniterator.hh:65
    \n+
    Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp > > Intersection
    Definition: identitygridintersectioniterator.hh:42
    \n+
    IdentityGridLeafIntersectionIterator()
    Definition: identitygridintersectioniterator.hh:44
    \n
    An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
    Definition: identitygridintersections.hh:33
    \n-
    Entity inside() const
    Definition: identitygridintersections.hh:77
    \n-
    IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection &&hostIntersection)
    Definition: identitygridintersections.hh:64
    \n-
    NormalVector centerUnitOuterNormal() const
    Return unit outer normal (length == 1)
    Definition: identitygridintersections.hh:99
    \n-
    GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
    Definition: identitygridintersections.hh:51
    \n-
    Geometry geometry() const
    Definition: identitygridintersections.hh:142
    \n-
    Entity outside() const
    Definition: identitygridintersections.hh:84
    \n-
    LocalGeometry geometryInOutside() const
    Definition: identitygridintersections.hh:135
    \n-
    bool boundary() const
    return true if intersection is with boundary.
    Definition: identitygridintersections.hh:90
    \n-
    GeometryType type() const
    Geometry type of an intersection.
    Definition: identitygridintersections.hh:119
    \n-
    FieldVector< ctype, dimworld > NormalVector
    Definition: identitygridintersections.hh:53
    \n-
    LocalGeometry geometryInInside() const
    Definition: identitygridintersections.hh:128
    \n-
    bool conforming() const
    Return true if this is a conforming intersection.
    Definition: identitygridintersections.hh:114
    \n-
    IdentityGridLeafIntersection(const GridImp *identityGrid, const HostLeafIntersection &hostIntersection)
    Definition: identitygridintersections.hh:58
    \n-
    size_t boundarySegmentIndex() const
    return the boundary segment index
    Definition: identitygridintersections.hh:109
    \n-
    bool equals(const IdentityGridLeafIntersection &other) const
    Definition: identitygridintersections.hh:70
    \n-
    FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
    return outer normal
    Definition: identitygridintersections.hh:161
    \n-
    int indexInOutside() const
    local number of codim 1 entity in neighbor where intersection is contained
    Definition: identitygridintersections.hh:155
    \n-
    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
    \n-
    bool neighbor() const
    return true if across the edge an neighbor on this level exists
    Definition: identitygridintersections.hh:104
    \n-
    FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
    return unit outer normal
    Definition: identitygridintersections.hh:171
    \n-
    int indexInInside() const
    local number of codim 1 entity in self where intersection is contained in
    Definition: identitygridintersections.hh:149
    \n-
    GridImp::template Codim< 1 >::Geometry Geometry
    Definition: identitygridintersections.hh:50
    \n-
    GridImp::template Codim< 0 >::Entity Entity
    Definition: identitygridintersections.hh:52
    \n
    Definition: identitygridintersections.hh:192
    \n-
    Geometry geometry() const
    Definition: identitygridintersections.hh:302
    \n-
    GridImp::template Codim< 0 >::Entity Entity
    Definition: identitygridintersections.hh:211
    \n-
    IdentityGridLevelIntersection(const GridImp *identityGrid, const HostLevelIntersection &hostIntersection)
    Definition: identitygridintersections.hh:217
    \n-
    GridImp::template Codim< 1 >::Geometry Geometry
    Definition: identitygridintersections.hh:209
    \n-
    bool equals(const IdentityGridLevelIntersection &other) const
    Definition: identitygridintersections.hh:229
    \n-
    bool neighbor() const
    return true if across the edge an neighbor on this level exists
    Definition: identitygridintersections.hh:264
    \n-
    NormalVector centerUnitOuterNormal() const
    Return unit outer normal (length == 1)
    Definition: identitygridintersections.hh:259
    \n-
    bool conforming() const
    Return true if this is a conforming intersection.
    Definition: identitygridintersections.hh:274
    \n-
    int indexInInside() const
    local number of codim 1 entity in self where intersection is contained in
    Definition: identitygridintersections.hh:309
    \n-
    FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &local) const
    return outer normal
    Definition: identitygridintersections.hh:321
    \n-
    GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
    Definition: identitygridintersections.hh:210
    \n-
    FieldVector< ctype, dimworld > NormalVector
    Definition: identitygridintersections.hh:212
    \n-
    bool boundary() const
    return true if intersection is with boundary.
    Definition: identitygridintersections.hh:250
    \n-
    FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
    return outer normal multiplied by the integration element
    Definition: identitygridintersections.hh:326
    \n-
    LocalGeometry geometryInOutside() const
    Definition: identitygridintersections.hh:295
    \n-
    LocalGeometry geometryInInside() const
    Definition: identitygridintersections.hh:288
    \n-
    int indexInOutside() const
    local number of codim 1 entity in neighbor where intersection is contained
    Definition: identitygridintersections.hh:315
    \n-
    FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
    return unit outer normal
    Definition: identitygridintersections.hh:331
    \n-
    size_t boundarySegmentIndex() const
    return the boundary segment index
    Definition: identitygridintersections.hh:269
    \n-
    Entity outside() const
    Definition: identitygridintersections.hh:243
    \n-
    Entity inside() const
    Definition: identitygridintersections.hh:236
    \n-
    GeometryType type() const
    Geometry type of an intersection.
    Definition: identitygridintersections.hh:279
    \n-
    IdentityGridLevelIntersection(const GridImp *identityGrid, HostLevelIntersection &&hostIntersection)
    Definition: identitygridintersections.hh:223
    \n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,506 +5,209 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n-identitygridintersections.hh\n+identitygridintersectioniterator.hh\n Go_to_the_documentation_of_this_file.\n-1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n+ 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH\n- 6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH\n+ 5#ifndef DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH\n+ 6#define DUNE_IDENTITYGRID_INTERSECTIONITERATOR_HH\n 7\n- 8#include \"identitygridleafiterator.hh\"\n- 9#include \n+ 8#include \"identitygridintersections.hh\"\n+ 9#include \"identitygridentity.hh\"\n 10\n- 15namespace Dune {\n- 16\n- 17\n- 18 // External forward declarations\n- 19 template< class Grid >\n- 20 struct HostGridAccess;\n- 21\n- 22\n- 31 template\n-32 class IdentityGridLeafIntersection\n- 33 {\n+ 11#include \n+ 12\n+ 17namespace Dune {\n+ 18\n+ 27 template\n+28 class IdentityGridLeafIntersectionIterator\n+ 29 {\n+ 30\n+ 31 constexpr static int dim = GridImp::dimension;\n+ 32\n+ 33 constexpr static int dimworld = GridImp::dimensionworld;\n 34\n- 35 friend class IdentityGridLeafIntersectionIterator;\n- 36\n- 37 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n->;\n- 38\n- 39 constexpr static int dim = GridImp::dimension;\n- 40\n- 41 constexpr static int dimworld = GridImp::dimensionworld;\n- 42\n- 43 // The type used to store coordinates\n- 44 typedef typename GridImp::ctype ctype;\n- 45\n- 46 typedef typename GridImp::HostGridType::LeafGridView::Intersection\n-HostLeafIntersection;\n- 47\n- 48 public:\n- 49\n-50 typedef typename GridImp::template Codim<1>::Geometry Geometry;\n-51 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;\n-52 typedef typename GridImp::template Codim<0>::Entity Entity;\n-53 typedef FieldVector NormalVector;\n- 54\n-55 IdentityGridLeafIntersection()\n- 56 {}\n+ 35 // The type used to store coordinates\n+ 36 typedef typename GridImp::ctype ctype;\n+ 37\n+ 38 typedef typename GridImp::HostGridType::LeafGridView::IntersectionIterator\n+HostLeafIntersectionIterator;\n+ 39\n+ 40 public:\n+ 41\n+42 typedef Dune::Intersection > Intersection;\n+ 43\n+44 IdentityGridLeafIntersectionIterator()\n+ 45 {}\n+ 46\n+47 IdentityGridLeafIntersectionIterator(const GridImp* identityGrid,\n+ 48 const HostLeafIntersectionIterator& hostIterator)\n+ 49 : identityGrid_(identityGrid)\n+ 50 , hostIterator_(hostIterator)\n+ 51 {}\n+ 52\n+54 bool equals(const IdentityGridLeafIntersectionIterator& other) const {\n+ 55 return hostIterator_ == other.hostIterator_;\n+ 56 }\n 57\n-58 IdentityGridLeafIntersection(const GridImp* identityGrid,\n- 59 const HostLeafIntersection& hostIntersection)\n- 60 : identityGrid_(identityGrid)\n- 61 , hostIntersection_(hostIntersection)\n- 62 {}\n+ 58\n+60 void increment() {\n+ 61 ++hostIterator_;\n+ 62 }\n 63\n-64 IdentityGridLeafIntersection(const GridImp* identityGrid,\n- 65 HostLeafIntersection&& hostIntersection)\n- 66 : identityGrid_(identityGrid)\n- 67 , hostIntersection_(std::move(hostIntersection))\n- 68 {}\n- 69\n-70 bool equals(const IdentityGridLeafIntersection& other) const\n- 71 {\n- 72 return hostIntersection_ == other.hostIntersection_;\n- 73 }\n- 74\n-77 Entity inside() const {\n- 78 return IdentityGridEntity<0,dim,GridImp>\n-(identityGrid_,hostIntersection_.inside());\n- 79 }\n+65 Intersection dereference() const {\n+ 66 return IdentityGridLeafIntersection(identityGrid_,*hostIterator_);\n+ 67 }\n+ 68\n+ 69 private:\n+ 70 //**********************************************************\n+ 71 // private data\n+ 72 //**********************************************************\n+ 73\n+ 74 const GridImp* identityGrid_ = nullptr;\n+ 75 HostLeafIntersectionIterator hostIterator_ = {};\n+ 76 };\n+ 77\n+ 78\n+ 79\n 80\n- 81\n-84 Entity outside() const {\n- 85 return IdentityGridEntity<0,dim,GridImp>\n-(identityGrid_,hostIntersection_.outside());\n- 86 }\n- 87\n+ 82 template\n+83 class IdentityGridLevelIntersectionIterator\n+ 84 {\n+ 85 constexpr static int dim = GridImp::dimension;\n+ 86\n+ 87 constexpr static int dimworld = GridImp::dimensionworld;\n 88\n-90 bool boundary () const {\n- 91 return hostIntersection_.boundary();\n- 92 }\n+ 89 // The type used to store coordinates\n+ 90 typedef typename GridImp::ctype ctype;\n+ 91\n+ 92 typedef typename GridImp::HostGridType::LevelGridView::IntersectionIterator\n+HostLevelIntersectionIterator;\n 93\n-99 NormalVector centerUnitOuterNormal () const {\n- 100 return hostIntersection_.centerUnitOuterNormal();\n- 101 }\n- 102\n-104 bool neighbor () const {\n- 105 return hostIntersection_.neighbor();\n- 106 }\n- 107\n-109 size_t boundarySegmentIndex() const {\n- 110 return hostIntersection_.boundarySegmentIndex();\n- 111 }\n+ 94 public:\n+ 95\n+96 typedef Dune::Intersection > Intersection;\n+ 97\n+98 IdentityGridLevelIntersectionIterator()\n+ 99 {}\n+ 100\n+101 IdentityGridLevelIntersectionIterator(const GridImp* identityGrid,\n+ 102 const HostLevelIntersectionIterator& hostIterator)\n+ 103 : identityGrid_(identityGrid)\n+ 104 , hostIterator_(hostIterator)\n+ 105 {}\n+ 106\n+108 bool equals(const IdentityGridLevelIntersectionIterator& other)\n+const {\n+ 109 return hostIterator_ == other.hostIterator_;\n+ 110 }\n+ 111\n 112\n-114 bool conforming () const {\n- 115 return hostIntersection_.conforming();\n+114 void increment() {\n+ 115 ++hostIterator_;\n 116 }\n 117\n-119 GeometryType type () const {\n- 120 return hostIntersection_.type();\n+119 Intersection dereference() const {\n+ 120 return IdentityGridLevelIntersection\n+(identityGrid_,*hostIterator_);\n 121 }\n 122\n- 123\n-128 LocalGeometry geometryInInside () const\n- 129 {\n- 130 return LocalGeometry( hostIntersection_.geometryInInside() );\n- 131 }\n- 132\n-135 LocalGeometry geometryInOutside () const\n- 136 {\n- 137 return LocalGeometry( hostIntersection_.geometryInOutside() );\n- 138 }\n- 139\n-142 Geometry geometry () const\n- 143 {\n- 144 return Geometry( hostIntersection_.geometry() );\n- 145 }\n- 146\n- 147\n-149 int indexInInside () const {\n- 150 return hostIntersection_.indexInInside();\n- 151 }\n- 152\n- 153\n-155 int indexInOutside () const {\n- 156 return hostIntersection_.indexInOutside();\n- 157 }\n- 158\n- 159\n-161 FieldVector outerNormal (const\n-FieldVector& local) const {\n- 162 return hostIntersection_.outerNormal(local);\n- 163 }\n- 164\n-166 FieldVector integrationOuterNormal (const\n-FieldVector& local) const {\n- 167 return hostIntersection_.integrationOuterNormal(local);\n- 168 }\n- 169\n-171 FieldVector unitOuterNormal (const\n-FieldVector& local) const {\n- 172 return hostIntersection_.unitOuterNormal(local);\n- 173 }\n- 174\n- 175\n- 176 private:\n- 177 //**********************************************************\n- 178 // private methods\n- 179 //**********************************************************\n- 180\n- 181 const GridImp* identityGrid_;\n- 182\n-183 HostLeafIntersection hostIntersection_;\n- 184 };\n- 185\n- 186\n- 187\n- 188\n- 190 template\n-191 class IdentityGridLevelIntersection\n- 192 {\n- 193\n- 194 friend class IdentityGridLevelIntersectionIterator;\n- 195\n- 196 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n->;\n- 197\n- 198 constexpr static int dim = GridImp::dimension;\n- 199\n- 200 constexpr static int dimworld = GridImp::dimensionworld;\n- 201\n- 202 // The type used to store coordinates\n- 203 typedef typename GridImp::ctype ctype;\n- 204\n- 205 typedef typename GridImp::HostGridType::LevelGridView::Intersection\n-HostLevelIntersection;\n- 206\n- 207 public:\n- 208\n-209 typedef typename GridImp::template Codim<1>::Geometry Geometry;\n-210 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;\n-211 typedef typename GridImp::template Codim<0>::Entity Entity;\n-212 typedef FieldVector NormalVector;\n- 213\n-214 IdentityGridLevelIntersection()\n- 215 {}\n- 216\n-217 IdentityGridLevelIntersection(const GridImp* identityGrid,\n- 218 const HostLevelIntersection& hostIntersection)\n- 219 : identityGrid_(identityGrid)\n- 220 , hostIntersection_(hostIntersection)\n- 221 {}\n- 222\n-223 IdentityGridLevelIntersection(const GridImp* identityGrid,\n- 224 HostLevelIntersection&& hostIntersection)\n- 225 : identityGrid_(identityGrid)\n- 226 , hostIntersection_(std::move(hostIntersection))\n- 227 {}\n- 228\n-229 bool equals(const IdentityGridLevelIntersection& other) const\n- 230 {\n- 231 return hostIntersection_ == other.hostIntersection_;\n- 232 }\n- 233\n-236 Entity inside() const {\n- 237 return IdentityGridEntity<0,dim,GridImp>\n-(identityGrid_,hostIntersection_.inside());\n- 238 }\n- 239\n- 240\n-243 Entity outside() const {\n- 244 return IdentityGridEntity<0,dim,GridImp>\n-(identityGrid_,hostIntersection_.outside());\n- 245 }\n- 246\n- 247\n-250 bool boundary () const {\n- 251 return hostIntersection_.boundary();\n- 252 }\n- 253\n-259 NormalVector centerUnitOuterNormal () const {\n- 260 return hostIntersection_.centerUnitOuterNormal();\n- 261 }\n- 262\n-264 bool neighbor () const {\n- 265 return hostIntersection_.neighbor();\n- 266 }\n- 267\n-269 size_t boundarySegmentIndex() const {\n- 270 return hostIntersection_.boundarySegmentIndex();\n- 271 }\n- 272\n-274 bool conforming () const {\n- 275 return hostIntersection_.conforming();\n- 276 }\n- 277\n-279 GeometryType type () const {\n- 280 return hostIntersection_.type();\n- 281 }\n- 282\n- 283\n-288 LocalGeometry geometryInInside () const\n- 289 {\n- 290 return LocalGeometry( hostIntersection_.geometryInInside() );\n- 291 }\n- 292\n-295 LocalGeometry geometryInOutside () const\n- 296 {\n- 297 return LocalGeometry( hostIntersection_.geometryInOutside() );\n- 298 }\n- 299\n-302 Geometry geometry () const\n- 303 {\n- 304 return Geometry( hostIntersection_.geometry() );\n- 305 }\n- 306\n- 307\n-309 int indexInInside () const {\n- 310 return hostIntersection_.indexInInside();\n- 311 }\n- 312\n- 313\n-315 int indexInOutside () const {\n- 316 return hostIntersection_.indexInOutside();\n- 317 }\n- 318\n- 319\n-321 FieldVector outerNormal (const FieldVector&\n-local) const {\n- 322 return hostIntersection_.outerNormal(local);\n- 323 }\n- 324\n-326 FieldVector integrationOuterNormal (const\n-FieldVector& local) const {\n- 327 return hostIntersection_.integrationOuterNormal(local);\n- 328 }\n- 329\n-331 FieldVector unitOuterNormal (const FieldVector& local) const {\n- 332 return hostIntersection_.unitOuterNormal(local);\n- 333 }\n- 334\n- 335 private:\n- 336\n- 337 const GridImp* identityGrid_;\n- 338\n- 339 HostLevelIntersection hostIntersection_;\n- 340\n- 341 };\n- 342\n- 343\n- 344} // namespace Dune\n- 345\n- 346#endif\n+ 123 private:\n+ 124\n+ 125\n+ 126 const GridImp* identityGrid_ = nullptr;\n+ 127 HostLevelIntersectionIterator hostIterator_ = {};\n+ 128\n+ 129 };\n+ 130\n+ 131\n+ 132} // namespace Dune\n+ 133\n+ 134#endif\n identitygridentity.hh\n The IdentityGridEntity class.\n-identitygridleafiterator.hh\n-The IdentityGridLeafIterator class.\n-std\n-STL namespace.\n+identitygridintersections.hh\n+The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::HostGridAccess\n-provides access to host grid objects from GeometryGrid\n-Definition: identitygrid.hh:37\n+Dune::Intersection\n+Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n+element or with the d...\n+Definition: common/intersection.hh:164\n Dune::IdentityGridLevelIntersectionIterator\n Definition: identitygridintersectioniterator.hh:84\n+Dune::IdentityGridLevelIntersectionIterator::equals\n+bool equals(const IdentityGridLevelIntersectionIterator< GridImp > &other)\n+const\n+equality\n+Definition: identitygridintersectioniterator.hh:108\n+Dune::IdentityGridLevelIntersectionIterator::increment\n+void increment()\n+prefix increment\n+Definition: identitygridintersectioniterator.hh:114\n+Dune::IdentityGridLevelIntersectionIterator::\n+IdentityGridLevelIntersectionIterator\n+IdentityGridLevelIntersectionIterator(const GridImp *identityGrid, const\n+HostLevelIntersectionIterator &hostIterator)\n+Definition: identitygridintersectioniterator.hh:101\n+Dune::IdentityGridLevelIntersectionIterator::Intersection\n+Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp\n+> > Intersection\n+Definition: identitygridintersectioniterator.hh:96\n+Dune::IdentityGridLevelIntersectionIterator::dereference\n+Intersection dereference() const\n+dereferencing\n+Definition: identitygridintersectioniterator.hh:119\n+Dune::IdentityGridLevelIntersectionIterator::\n+IdentityGridLevelIntersectionIterator\n+IdentityGridLevelIntersectionIterator()\n+Definition: identitygridintersectioniterator.hh:98\n Dune::IdentityGridLeafIntersectionIterator\n Iterator over all element neighborsMesh entities of codimension 0 (\"elements\")\n allow to visit all nei...\n Definition: identitygridintersectioniterator.hh:29\n-Dune::IdentityGridEntity<_0,_dim,_GridImp_>\n-Specialization for codim-0-entities.\n-Definition: identitygridentity.hh:205\n+Dune::IdentityGridLeafIntersectionIterator::equals\n+bool equals(const IdentityGridLeafIntersectionIterator &other) const\n+equality\n+Definition: identitygridintersectioniterator.hh:54\n+Dune::IdentityGridLeafIntersectionIterator::increment\n+void increment()\n+prefix increment\n+Definition: identitygridintersectioniterator.hh:60\n+Dune::IdentityGridLeafIntersectionIterator::\n+IdentityGridLeafIntersectionIterator\n+IdentityGridLeafIntersectionIterator(const GridImp *identityGrid, const\n+HostLeafIntersectionIterator &hostIterator)\n+Definition: identitygridintersectioniterator.hh:47\n+Dune::IdentityGridLeafIntersectionIterator::dereference\n+Intersection dereference() const\n+dereferencing\n+Definition: identitygridintersectioniterator.hh:65\n+Dune::IdentityGridLeafIntersectionIterator::Intersection\n+Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp\n+> > Intersection\n+Definition: identitygridintersectioniterator.hh:42\n+Dune::IdentityGridLeafIntersectionIterator::\n+IdentityGridLeafIntersectionIterator\n+IdentityGridLeafIntersectionIterator()\n+Definition: identitygridintersectioniterator.hh:44\n Dune::IdentityGridLeafIntersection\n An intersection with a leaf neighbor elementMesh entities of codimension 0\n (\"elements\") allow to visi...\n Definition: identitygridintersections.hh:33\n-Dune::IdentityGridLeafIntersection::inside\n-Entity inside() const\n-Definition: identitygridintersections.hh:77\n-Dune::IdentityGridLeafIntersection::IdentityGridLeafIntersection\n-IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection\n-&&hostIntersection)\n-Definition: identitygridintersections.hh:64\n-Dune::IdentityGridLeafIntersection::centerUnitOuterNormal\n-NormalVector centerUnitOuterNormal() const\n-Return unit outer normal (length == 1)\n-Definition: identitygridintersections.hh:99\n-Dune::IdentityGridLeafIntersection::LocalGeometry\n-GridImp::template Codim< 1 >::LocalGeometry LocalGeometry\n-Definition: identitygridintersections.hh:51\n-Dune::IdentityGridLeafIntersection::geometry\n-Geometry geometry() const\n-Definition: identitygridintersections.hh:142\n-Dune::IdentityGridLeafIntersection::outside\n-Entity outside() const\n-Definition: identitygridintersections.hh:84\n-Dune::IdentityGridLeafIntersection::geometryInOutside\n-LocalGeometry geometryInOutside() const\n-Definition: identitygridintersections.hh:135\n-Dune::IdentityGridLeafIntersection::boundary\n-bool boundary() const\n-return true if intersection is with boundary.\n-Definition: identitygridintersections.hh:90\n-Dune::IdentityGridLeafIntersection::type\n-GeometryType type() const\n-Geometry type of an intersection.\n-Definition: identitygridintersections.hh:119\n-Dune::IdentityGridLeafIntersection::NormalVector\n-FieldVector< ctype, dimworld > NormalVector\n-Definition: identitygridintersections.hh:53\n-Dune::IdentityGridLeafIntersection::geometryInInside\n-LocalGeometry geometryInInside() const\n-Definition: identitygridintersections.hh:128\n-Dune::IdentityGridLeafIntersection::conforming\n-bool conforming() const\n-Return true if this is a conforming intersection.\n-Definition: identitygridintersections.hh:114\n-Dune::IdentityGridLeafIntersection::IdentityGridLeafIntersection\n-IdentityGridLeafIntersection(const GridImp *identityGrid, const\n-HostLeafIntersection &hostIntersection)\n-Definition: identitygridintersections.hh:58\n-Dune::IdentityGridLeafIntersection::boundarySegmentIndex\n-size_t boundarySegmentIndex() const\n-return the boundary segment index\n-Definition: identitygridintersections.hh:109\n-Dune::IdentityGridLeafIntersection::equals\n-bool equals(const IdentityGridLeafIntersection &other) const\n-Definition: identitygridintersections.hh:70\n-Dune::IdentityGridLeafIntersection::outerNormal\n-FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector<\n-ctype, GridImp::dimension-1 > &local) const\n-return outer normal\n-Definition: identitygridintersections.hh:161\n-Dune::IdentityGridLeafIntersection::indexInOutside\n-int indexInOutside() const\n-local number of codim 1 entity in neighbor where intersection is contained\n-Definition: identitygridintersections.hh:155\n-Dune::IdentityGridLeafIntersection::integrationOuterNormal\n-FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const\n-FieldVector< ctype, GridImp::dimension-1 > &local) const\n-return outer normal multiplied by the integration element\n-Definition: identitygridintersections.hh:166\n-Dune::IdentityGridLeafIntersection::neighbor\n-bool neighbor() const\n-return true if across the edge an neighbor on this level exists\n-Definition: identitygridintersections.hh:104\n-Dune::IdentityGridLeafIntersection::unitOuterNormal\n-FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const\n-FieldVector< ctype, GridImp::dimension-1 > &local) const\n-return unit outer normal\n-Definition: identitygridintersections.hh:171\n-Dune::IdentityGridLeafIntersection::indexInInside\n-int indexInInside() const\n-local number of codim 1 entity in self where intersection is contained in\n-Definition: identitygridintersections.hh:149\n-Dune::IdentityGridLeafIntersection::Geometry\n-GridImp::template Codim< 1 >::Geometry Geometry\n-Definition: identitygridintersections.hh:50\n-Dune::IdentityGridLeafIntersection::Entity\n-GridImp::template Codim< 0 >::Entity Entity\n-Definition: identitygridintersections.hh:52\n Dune::IdentityGridLevelIntersection\n Definition: identitygridintersections.hh:192\n-Dune::IdentityGridLevelIntersection::geometry\n-Geometry geometry() const\n-Definition: identitygridintersections.hh:302\n-Dune::IdentityGridLevelIntersection::Entity\n-GridImp::template Codim< 0 >::Entity Entity\n-Definition: identitygridintersections.hh:211\n-Dune::IdentityGridLevelIntersection::IdentityGridLevelIntersection\n-IdentityGridLevelIntersection(const GridImp *identityGrid, const\n-HostLevelIntersection &hostIntersection)\n-Definition: identitygridintersections.hh:217\n-Dune::IdentityGridLevelIntersection::Geometry\n-GridImp::template Codim< 1 >::Geometry Geometry\n-Definition: identitygridintersections.hh:209\n-Dune::IdentityGridLevelIntersection::equals\n-bool equals(const IdentityGridLevelIntersection &other) const\n-Definition: identitygridintersections.hh:229\n-Dune::IdentityGridLevelIntersection::neighbor\n-bool neighbor() const\n-return true if across the edge an neighbor on this level exists\n-Definition: identitygridintersections.hh:264\n-Dune::IdentityGridLevelIntersection::centerUnitOuterNormal\n-NormalVector centerUnitOuterNormal() const\n-Return unit outer normal (length == 1)\n-Definition: identitygridintersections.hh:259\n-Dune::IdentityGridLevelIntersection::conforming\n-bool conforming() const\n-Return true if this is a conforming intersection.\n-Definition: identitygridintersections.hh:274\n-Dune::IdentityGridLevelIntersection::indexInInside\n-int indexInInside() const\n-local number of codim 1 entity in self where intersection is contained in\n-Definition: identitygridintersections.hh:309\n-Dune::IdentityGridLevelIntersection::outerNormal\n-FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 >\n-&local) const\n-return outer normal\n-Definition: identitygridintersections.hh:321\n-Dune::IdentityGridLevelIntersection::LocalGeometry\n-GridImp::template Codim< 1 >::LocalGeometry LocalGeometry\n-Definition: identitygridintersections.hh:210\n-Dune::IdentityGridLevelIntersection::NormalVector\n-FieldVector< ctype, dimworld > NormalVector\n-Definition: identitygridintersections.hh:212\n-Dune::IdentityGridLevelIntersection::boundary\n-bool boundary() const\n-return true if intersection is with boundary.\n-Definition: identitygridintersections.hh:250\n-Dune::IdentityGridLevelIntersection::integrationOuterNormal\n-FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype,\n-dim-1 > &local) const\n-return outer normal multiplied by the integration element\n-Definition: identitygridintersections.hh:326\n-Dune::IdentityGridLevelIntersection::geometryInOutside\n-LocalGeometry geometryInOutside() const\n-Definition: identitygridintersections.hh:295\n-Dune::IdentityGridLevelIntersection::geometryInInside\n-LocalGeometry geometryInInside() const\n-Definition: identitygridintersections.hh:288\n-Dune::IdentityGridLevelIntersection::indexInOutside\n-int indexInOutside() const\n-local number of codim 1 entity in neighbor where intersection is contained\n-Definition: identitygridintersections.hh:315\n-Dune::IdentityGridLevelIntersection::unitOuterNormal\n-FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-\n-1 > &local) const\n-return unit outer normal\n-Definition: identitygridintersections.hh:331\n-Dune::IdentityGridLevelIntersection::boundarySegmentIndex\n-size_t boundarySegmentIndex() const\n-return the boundary segment index\n-Definition: identitygridintersections.hh:269\n-Dune::IdentityGridLevelIntersection::outside\n-Entity outside() const\n-Definition: identitygridintersections.hh:243\n-Dune::IdentityGridLevelIntersection::inside\n-Entity inside() const\n-Definition: identitygridintersections.hh:236\n-Dune::IdentityGridLevelIntersection::type\n-GeometryType type() const\n-Geometry type of an intersection.\n-Definition: identitygridintersections.hh:279\n-Dune::IdentityGridLevelIntersection::IdentityGridLevelIntersection\n-IdentityGridLevelIntersection(const GridImp *identityGrid,\n-HostLevelIntersection &&hostIntersection)\n-Definition: identitygridintersections.hh:223\n+intersection.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00749.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00749.html", "unified_diff": "@@ -71,15 +71,15 @@\n Namespaces
    \n
    identitygridleafiterator.hh File Reference
    \n
    \n
    \n \n

    The IdentityGridLeafIterator class. \n More...

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

    Go to the source code of this file.

    \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00749_source.html", "unified_diff": "@@ -72,15 +72,15 @@\n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_IDENTITYGRIDLEAFITERATOR_HH
    \n
    6#define DUNE_IDENTITYGRIDLEAFITERATOR_HH
    \n
    7
    \n-\n+\n
    9
    \n
    14namespace Dune {
    \n
    15
    \n
    16
    \n
    20 template<int codim, PartitionIteratorType pitype, class GridImp>
    \n \n
    22 {
    \n@@ -125,15 +125,15 @@\n
    69
    \n
    70 };
    \n
    71
    \n
    72
    \n
    73} // namespace Dune
    \n
    74
    \n
    75#endif
    \n-\n+\n
    Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
    leaf grid view for the given grid
    Definition: common/grid.hh:819
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Iterator over all entities of a given codimension and level of a grid.
    Definition: identitygridleafiterator.hh:22
    \n
    Entity dereference() const
    dereferencing
    Definition: identitygridleafiterator.hh:56
    \n
    bool equals(const IdentityGridLeafIterator &i) const
    equality
    Definition: identitygridleafiterator.hh:61
    \n
    IdentityGridLeafIterator(const GridImp *identityGrid, bool endDummy)
    Constructor which create the end iterator.
    Definition: identitygridleafiterator.hh:44
    \n
    static constexpr int codimension
    Definition: identitygridleafiterator.hh:30
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00752.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00752.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridhierarchiciterator.hh File Reference\n+dune-grid: identitygridentityseed.hh File Reference\n \n \n \n \n \n \n \n@@ -65,37 +65,37 @@\n
  • dune
  • grid
  • identitygrid
  • \n
    \n \n
    \n \n-
    identitygridhierarchiciterator.hh File Reference
    \n+
    identitygridentityseed.hh File Reference
    \n
    \n
    \n \n-

    The IdentityGridHierarchicIterator class. \n+

    The IdentityGridEntitySeed class. \n More...

    \n \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::IdentityGridLeafIterator< codim, pitype, GridImp >
     Iterator over all entities of a given codimension and level of a grid. More...
    \n \n-\n-\n+\n+\n \n

    \n 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::IdentityGridEntitySeed< codim, GridImp >
     The EntitySeed class provides the minimal information needed to restore an Entity using the grid. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The IdentityGridHierarchicIterator class.

    \n+

    The IdentityGridEntitySeed class.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,27 +6,24 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n Classes | Namespaces\n-identitygridhierarchiciterator.hh File Reference\n-The IdentityGridHierarchicIterator class. More...\n+identitygridentityseed.hh File Reference\n+The IdentityGridEntitySeed class. More...\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdentityGridHierarchicIterator<_GridImp_>\n- Iterator over the descendants of an entity.Mesh entities of codimension\n- 0 (\"elements\") allow to visit all entities of codimension 0 obtained\n-\u00a0 through nested, hierarchic refinement of the entity. Iteration over\n- this set of entities is provided by the HierarchicIterator, starting\n- from a given entity. More...\n+class \u00a0Dune::IdentityGridEntitySeed<_codim,_GridImp_>\n+\u00a0 The EntitySeed class provides the minimal information needed to restore\n+ an Entity using the grid. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The IdentityGridHierarchicIterator class.\n+The IdentityGridEntitySeed class.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00752_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridhierarchiciterator.hh Source File\n+dune-grid: identitygridentityseed.hh Source File\n \n \n \n \n \n \n \n@@ -62,87 +62,75 @@\n \n \n
    \n
    \n-
    identitygridhierarchiciterator.hh
    \n+
    identitygridentityseed.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH
    \n-
    6#define DUNE_IDENTITYGRIDHIERITERATOR_HH
    \n+
    5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH
    \n+
    6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
    \n
    7
    \n-
    12namespace Dune {
    \n-
    13
    \n-
    14
    \n-
    15 //**********************************************************************
    \n-
    16 //
    \n-
    24 template<class GridImp>
    \n-\n-
    26 {
    \n-
    27
    \n-
    28 // Type of the corresponding HierarchicIterator in the host grid
    \n-
    29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::HierarchicIterator HostGridHierarchicIterator;
    \n-
    30
    \n-
    31 public:
    \n+
    14namespace Dune {
    \n+
    15
    \n+
    16
    \n+
    22 template<int codim, class GridImp>
    \n+\n+
    24 {
    \n+
    25 protected:
    \n+
    26
    \n+
    27 // Entity type of the hostgrid
    \n+
    28 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
    \n+
    29
    \n+
    30 // EntitySeed type of the hostgrid
    \n+
    31 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
    \n
    32
    \n-
    33 constexpr static int codimension = 0;
    \n+
    33 public:
    \n
    34
    \n-
    35 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n+
    35 constexpr static int codimension = codim;
    \n
    36
    \n-
    38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel) :
    \n-
    39 identityGrid_(identityGrid),
    \n-
    40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))
    \n+\n
    41 {}
    \n
    42
    \n-
    43
    \n-
    45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :
    \n-
    46 identityGrid_(identityGrid),
    \n-
    47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))
    \n-
    48 {}
    \n-
    49
    \n-
    50
    \n-
    52 void increment()
    \n-
    53 {
    \n-
    54 ++hostHierarchicIterator_;
    \n-
    55 }
    \n-
    56
    \n-\n-
    59 return Entity{{identityGrid_,*hostHierarchicIterator_}};
    \n-
    60 }
    \n-
    61
    \n-\n-
    64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;
    \n-
    65 }
    \n-
    66
    \n-
    67 private:
    \n-
    68 const GridImp* identityGrid_;
    \n+\n+
    50 hostEntitySeed_(hostEntity.seed())
    \n+
    51 {}
    \n+
    52
    \n+\n+
    57 {
    \n+
    58 return hostEntitySeed_;
    \n+
    59 }
    \n+
    60
    \n+
    64 bool isValid() const
    \n+
    65 {
    \n+
    66 return hostEntitySeed_.isValid();
    \n+
    67 }
    \n+
    68 private:
    \n
    69
    \n-
    70 HostGridHierarchicIterator hostHierarchicIterator_;
    \n-
    71
    \n-
    72 };
    \n-
    73
    \n+
    70 HostEntitySeed hostEntitySeed_;
    \n+
    71 };
    \n+
    72
    \n+
    73} // namespace Dune
    \n
    74
    \n-
    75} // end namespace Dune
    \n-
    76
    \n-
    77#endif
    \n+
    75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Iterator over the descendants of an entity.Mesh entities of codimension 0 ("elements") allow to visit...
    Definition: identitygridhierarchiciterator.hh:26
    \n-
    void increment()
    Definition: identitygridhierarchiciterator.hh:52
    \n-
    GridImp::template Codim< 0 >::Entity Entity
    Definition: identitygridhierarchiciterator.hh:35
    \n-
    bool equals(const IdentityGridHierarchicIterator &i) const
    equality
    Definition: identitygridhierarchiciterator.hh:63
    \n-
    static constexpr int codimension
    Definition: identitygridhierarchiciterator.hh:33
    \n-
    IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel, bool endDummy)
    Definition: identitygridhierarchiciterator.hh:45
    \n-
    Entity dereference() const
    dereferencing
    Definition: identitygridhierarchiciterator.hh:58
    \n-
    IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity &startEntity, int maxLevel)
    the default Constructor
    Definition: identitygridhierarchiciterator.hh:38
    \n+
    The EntitySeed class provides the minimal information needed to restore an Entity using the grid.
    Definition: identitygridentityseed.hh:24
    \n+
    static constexpr int codimension
    Definition: identitygridentityseed.hh:35
    \n+
    IdentityGridEntitySeed()
    Construct an empty (i.e. isValid() == false) seed.
    Definition: identitygridentityseed.hh:40
    \n+
    bool isValid() const
    Check whether it is safe to create an Entity from this Seed.
    Definition: identitygridentityseed.hh:64
    \n+
    GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity
    Definition: identitygridentityseed.hh:28
    \n+
    IdentityGridEntitySeed(const HostEntity &hostEntity)
    Create EntitySeed from hostgrid Entity.
    Definition: identitygridentityseed.hh:49
    \n+
    const HostEntitySeed & hostEntitySeed() const
    Get stored HostEntitySeed.
    Definition: identitygridentityseed.hh:56
    \n+
    GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed HostEntitySeed
    Definition: identitygridentityseed.hh:31
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,110 +5,97 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n-identitygridhierarchiciterator.hh\n+identitygridentityseed.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IDENTITYGRIDHIERITERATOR_HH\n- 6#define DUNE_IDENTITYGRIDHIERITERATOR_HH\n+ 5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH\n+ 6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH\n 7\n- 12namespace Dune {\n- 13\n- 14\n- 15 //**********************************************************************\n- 16 //\n- 24 template\n-25 class IdentityGridHierarchicIterator\n- 26 {\n- 27\n- 28 // Type of the corresponding HierarchicIterator in the host grid\n- 29 typedef typename GridImp::HostGridType::template Codim<0>::Entity::\n-HierarchicIterator HostGridHierarchicIterator;\n- 30\n- 31 public:\n+ 14namespace Dune {\n+ 15\n+ 16\n+ 22 template\n+23 class IdentityGridEntitySeed\n+ 24 {\n+ 25 protected:\n+ 26\n+ 27 // Entity type of the hostgrid\n+28 typedef typename GridImp::HostGridType::Traits::template Codim::\n+Entity HostEntity;\n+ 29\n+ 30 // EntitySeed type of the hostgrid\n+31 typedef typename GridImp::HostGridType::Traits::template Codim::\n+EntitySeed HostEntitySeed;\n 32\n-33 constexpr static int codimension = 0;\n+ 33 public:\n 34\n-35 typedef typename GridImp::template Codim<0>::Entity Entity;\n+35 constexpr static int codimension = codim;\n 36\n-38 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const\n-Entity& startEntity, int maxLevel) :\n- 39 identityGrid_(identityGrid),\n- 40 hostHierarchicIterator_(startEntity.impl().hostEntity_.hbegin(maxLevel))\n+40 IdentityGridEntitySeed()\n 41 {}\n 42\n- 43\n-45 explicit IdentityGridHierarchicIterator(const GridImp* identityGrid, const\n-Entity& startEntity, int maxLevel, [[maybe_unused]] bool endDummy) :\n- 46 identityGrid_(identityGrid),\n- 47 hostHierarchicIterator_(startEntity.impl().hostEntity_.hend(maxLevel))\n- 48 {}\n- 49\n- 50\n-52 void increment()\n- 53 {\n- 54 ++hostHierarchicIterator_;\n- 55 }\n- 56\n-58 Entity dereference() const {\n- 59 return Entity{{identityGrid_,*hostHierarchicIterator_}};\n- 60 }\n- 61\n-63 bool equals(const IdentityGridHierarchicIterator& i) const {\n- 64 return hostHierarchicIterator_ == i.hostHierarchicIterator_;\n- 65 }\n- 66\n- 67 private:\n- 68 const GridImp* identityGrid_;\n+49 IdentityGridEntitySeed(const HostEntity& hostEntity) :\n+ 50 hostEntitySeed_(hostEntity.seed())\n+ 51 {}\n+ 52\n+56 const HostEntitySeed& hostEntitySeed() const\n+ 57 {\n+ 58 return hostEntitySeed_;\n+ 59 }\n+ 60\n+64 bool isValid() const\n+ 65 {\n+ 66 return hostEntitySeed_.isValid();\n+ 67 }\n+ 68 private:\n 69\n- 70 HostGridHierarchicIterator hostHierarchicIterator_;\n- 71\n- 72 };\n- 73\n+ 70 HostEntitySeed hostEntitySeed_;\n+ 71 };\n+ 72\n+ 73} // namespace Dune\n 74\n- 75} // end namespace Dune\n- 76\n- 77#endif\n+ 75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::IdentityGridHierarchicIterator\n-Iterator over the descendants of an entity.Mesh entities of codimension 0\n-(\"elements\") allow to visit...\n-Definition: identitygridhierarchiciterator.hh:26\n-Dune::IdentityGridHierarchicIterator::increment\n-void increment()\n-Definition: identitygridhierarchiciterator.hh:52\n-Dune::IdentityGridHierarchicIterator::Entity\n-GridImp::template Codim< 0 >::Entity Entity\n-Definition: identitygridhierarchiciterator.hh:35\n-Dune::IdentityGridHierarchicIterator::equals\n-bool equals(const IdentityGridHierarchicIterator &i) const\n-equality\n-Definition: identitygridhierarchiciterator.hh:63\n-Dune::IdentityGridHierarchicIterator::codimension\n+Dune::IdentityGridEntitySeed\n+The EntitySeed class provides the minimal information needed to restore an\n+Entity using the grid.\n+Definition: identitygridentityseed.hh:24\n+Dune::IdentityGridEntitySeed::codimension\n static constexpr int codimension\n-Definition: identitygridhierarchiciterator.hh:33\n-Dune::IdentityGridHierarchicIterator::IdentityGridHierarchicIterator\n-IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity\n-&startEntity, int maxLevel, bool endDummy)\n-Definition: identitygridhierarchiciterator.hh:45\n-Dune::IdentityGridHierarchicIterator::dereference\n-Entity dereference() const\n-dereferencing\n-Definition: identitygridhierarchiciterator.hh:58\n-Dune::IdentityGridHierarchicIterator::IdentityGridHierarchicIterator\n-IdentityGridHierarchicIterator(const GridImp *identityGrid, const Entity\n-&startEntity, int maxLevel)\n-the default Constructor\n-Definition: identitygridhierarchiciterator.hh:38\n+Definition: identitygridentityseed.hh:35\n+Dune::IdentityGridEntitySeed::IdentityGridEntitySeed\n+IdentityGridEntitySeed()\n+Construct an empty (i.e. isValid() == false) seed.\n+Definition: identitygridentityseed.hh:40\n+Dune::IdentityGridEntitySeed::isValid\n+bool isValid() const\n+Check whether it is safe to create an Entity from this Seed.\n+Definition: identitygridentityseed.hh:64\n+Dune::IdentityGridEntitySeed::HostEntity\n+GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity\n+Definition: identitygridentityseed.hh:28\n+Dune::IdentityGridEntitySeed::IdentityGridEntitySeed\n+IdentityGridEntitySeed(const HostEntity &hostEntity)\n+Create EntitySeed from hostgrid Entity.\n+Definition: identitygridentityseed.hh:49\n+Dune::IdentityGridEntitySeed::hostEntitySeed\n+const HostEntitySeed & hostEntitySeed() const\n+Get stored HostEntitySeed.\n+Definition: identitygridentityseed.hh:56\n+Dune::IdentityGridEntitySeed::HostEntitySeed\n+GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed\n+HostEntitySeed\n+Definition: identitygridentityseed.hh:31\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00755.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00755.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridentityseed.hh File Reference\n+dune-grid: identitygridintersections.hh File Reference\n \n \n \n \n \n \n \n@@ -65,37 +65,41 @@\n
  • dune
  • grid
  • identitygrid
  • \n
    \n \n
    \n \n-
    identitygridentityseed.hh File Reference
    \n+
    identitygridintersections.hh File Reference
    \n
    \n
    \n \n-

    The IdentityGridEntitySeed class. \n+

    The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes. \n More...

    \n-\n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n \n

    \n 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 >
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    The IdentityGridEntitySeed class.

    \n+

    The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,24 +6,33 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n Classes | Namespaces\n-identitygridentityseed.hh File Reference\n-The IdentityGridEntitySeed class. More...\n+identitygridintersections.hh File Reference\n+The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.\n+More...\n+#include \"identitygridleafiterator.hh\"\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::IdentityGridEntitySeed<_codim,_GridImp_>\n-\u00a0 The EntitySeed class provides the minimal information needed to restore\n- an Entity using the grid. More...\n+class \u00a0Dune::IdentityGridLeafIntersection<_GridImp_>\n+ An intersection with a leaf neighbor elementMesh entities of\n+ codimension 0 (\"elements\") allow to visit all neighbors, where a\n+\u00a0 neighbor is an entity of codimension 0 which has a common entity of\n+ codimension 1 These neighbors are accessed via a IntersectionIterator.\n+ This allows the implement non-matching meshes. The number of neighbors\n+ may be different from the number of an element! More...\n+\u00a0\n+class \u00a0Dune::IdentityGridLevelIntersection<_GridImp_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-The IdentityGridEntitySeed class.\n+The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00755_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: identitygridentityseed.hh Source File\n+dune-grid: identitygridintersections.hh Source File\n \n \n \n \n \n \n \n@@ -62,75 +62,352 @@\n \n \n
    \n
    \n-
    identitygridentityseed.hh
    \n+
    identitygridintersections.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH
    \n-
    6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
    \n+
    5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH
    \n+
    6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH
    \n
    7
    \n-
    14namespace Dune {
    \n-
    15
    \n+\n+\n+
    10
    \n+
    15namespace Dune {
    \n
    16
    \n-
    22 template<int codim, class GridImp>
    \n-\n-
    24 {
    \n-
    25 protected:
    \n-
    26
    \n-
    27 // Entity type of the hostgrid
    \n-
    28 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
    \n-
    29
    \n-
    30 // EntitySeed type of the hostgrid
    \n-
    31 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
    \n-
    32
    \n-
    33 public:
    \n+
    17
    \n+
    18 // External forward declarations
    \n+
    19 template< class Grid >
    \n+
    20 struct HostGridAccess;
    \n+
    21
    \n+
    22
    \n+
    31 template<class GridImp>
    \n+\n+
    33 {
    \n
    34
    \n-
    35 constexpr static int codimension = codim;
    \n+
    35 friend class IdentityGridLeafIntersectionIterator<GridImp>;
    \n
    36
    \n-\n-
    41 {}
    \n+
    37 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n+
    38
    \n+
    39 constexpr static int dim = GridImp::dimension;
    \n+
    40
    \n+
    41 constexpr static int dimworld = GridImp::dimensionworld;
    \n
    42
    \n-\n-
    50 hostEntitySeed_(hostEntity.seed())
    \n-
    51 {}
    \n-
    52
    \n-\n-
    57 {
    \n-
    58 return hostEntitySeed_;
    \n-
    59 }
    \n-
    60
    \n-
    64 bool isValid() const
    \n-
    65 {
    \n-
    66 return hostEntitySeed_.isValid();
    \n-
    67 }
    \n-
    68 private:
    \n+
    43 // The type used to store coordinates
    \n+
    44 typedef typename GridImp::ctype ctype;
    \n+
    45
    \n+
    46 typedef typename GridImp::HostGridType::LeafGridView::Intersection HostLeafIntersection;
    \n+
    47
    \n+
    48 public:
    \n+
    49
    \n+
    50 typedef typename GridImp::template Codim<1>::Geometry Geometry;
    \n+
    51 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
    \n+
    52 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n+
    53 typedef FieldVector<ctype, dimworld> NormalVector;
    \n+
    54
    \n+\n+
    56 {}
    \n+
    57
    \n+
    58 IdentityGridLeafIntersection(const GridImp* identityGrid,
    \n+
    59 const HostLeafIntersection& hostIntersection)
    \n+
    60 : identityGrid_(identityGrid)
    \n+
    61 , hostIntersection_(hostIntersection)
    \n+
    62 {}
    \n+
    63
    \n+
    64 IdentityGridLeafIntersection(const GridImp* identityGrid,
    \n+
    65 HostLeafIntersection&& hostIntersection)
    \n+
    66 : identityGrid_(identityGrid)
    \n+
    67 , hostIntersection_(std::move(hostIntersection))
    \n+
    68 {}
    \n
    69
    \n-
    70 HostEntitySeed hostEntitySeed_;
    \n-
    71 };
    \n-
    72
    \n-
    73} // namespace Dune
    \n+
    70 bool equals(const IdentityGridLeafIntersection& other) const
    \n+
    71 {
    \n+
    72 return hostIntersection_ == other.hostIntersection_;
    \n+
    73 }
    \n
    74
    \n-
    75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
    \n+
    77 Entity inside() const {
    \n+
    78 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
    \n+
    79 }
    \n+
    80
    \n+
    81
    \n+
    84 Entity outside() const {
    \n+
    85 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
    \n+
    86 }
    \n+
    87
    \n+
    88
    \n+
    90 bool boundary () const {
    \n+
    91 return hostIntersection_.boundary();
    \n+
    92 }
    \n+
    93
    \n+\n+
    100 return hostIntersection_.centerUnitOuterNormal();
    \n+
    101 }
    \n+
    102
    \n+
    104 bool neighbor () const {
    \n+
    105 return hostIntersection_.neighbor();
    \n+
    106 }
    \n+
    107
    \n+
    109 size_t boundarySegmentIndex() const {
    \n+
    110 return hostIntersection_.boundarySegmentIndex();
    \n+
    111 }
    \n+
    112
    \n+
    114 bool conforming () const {
    \n+
    115 return hostIntersection_.conforming();
    \n+
    116 }
    \n+
    117
    \n+\n+
    120 return hostIntersection_.type();
    \n+
    121 }
    \n+
    122
    \n+
    123
    \n+\n+
    129 {
    \n+
    130 return LocalGeometry( hostIntersection_.geometryInInside() );
    \n+
    131 }
    \n+
    132
    \n+\n+
    136 {
    \n+
    137 return LocalGeometry( hostIntersection_.geometryInOutside() );
    \n+
    138 }
    \n+
    139
    \n+\n+
    143 {
    \n+
    144 return Geometry( hostIntersection_.geometry() );
    \n+
    145 }
    \n+
    146
    \n+
    147
    \n+
    149 int indexInInside () const {
    \n+
    150 return hostIntersection_.indexInInside();
    \n+
    151 }
    \n+
    152
    \n+
    153
    \n+
    155 int indexInOutside () const {
    \n+
    156 return hostIntersection_.indexInOutside();
    \n+
    157 }
    \n+
    158
    \n+
    159
    \n+
    161 FieldVector<ctype, GridImp::dimensionworld> outerNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
    \n+
    162 return hostIntersection_.outerNormal(local);
    \n+
    163 }
    \n+
    164
    \n+
    166 FieldVector<ctype, GridImp::dimensionworld> integrationOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
    \n+
    167 return hostIntersection_.integrationOuterNormal(local);
    \n+
    168 }
    \n+
    169
    \n+
    171 FieldVector<ctype, GridImp::dimensionworld> unitOuterNormal (const FieldVector<ctype, GridImp::dimension-1>& local) const {
    \n+
    172 return hostIntersection_.unitOuterNormal(local);
    \n+
    173 }
    \n+
    174
    \n+
    175
    \n+
    176 private:
    \n+
    177 //**********************************************************
    \n+
    178 // private methods
    \n+
    179 //**********************************************************
    \n+
    180
    \n+
    181 const GridImp* identityGrid_;
    \n+
    182
    \n+
    183 HostLeafIntersection hostIntersection_;
    \n+
    184 };
    \n+
    185
    \n+
    186
    \n+
    187
    \n+
    188
    \n+
    190 template<class GridImp>
    \n+\n+
    192 {
    \n+
    193
    \n+
    194 friend class IdentityGridLevelIntersectionIterator<GridImp>;
    \n+
    195
    \n+
    196 friend struct HostGridAccess< typename std::remove_const< GridImp >::type >;
    \n+
    197
    \n+
    198 constexpr static int dim = GridImp::dimension;
    \n+
    199
    \n+
    200 constexpr static int dimworld = GridImp::dimensionworld;
    \n+
    201
    \n+
    202 // The type used to store coordinates
    \n+
    203 typedef typename GridImp::ctype ctype;
    \n+
    204
    \n+
    205 typedef typename GridImp::HostGridType::LevelGridView::Intersection HostLevelIntersection;
    \n+
    206
    \n+
    207 public:
    \n+
    208
    \n+
    209 typedef typename GridImp::template Codim<1>::Geometry Geometry;
    \n+
    210 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;
    \n+
    211 typedef typename GridImp::template Codim<0>::Entity Entity;
    \n+
    212 typedef FieldVector<ctype, dimworld> NormalVector;
    \n+
    213
    \n+\n+
    215 {}
    \n+
    216
    \n+
    217 IdentityGridLevelIntersection(const GridImp* identityGrid,
    \n+
    218 const HostLevelIntersection& hostIntersection)
    \n+
    219 : identityGrid_(identityGrid)
    \n+
    220 , hostIntersection_(hostIntersection)
    \n+
    221 {}
    \n+
    222
    \n+
    223 IdentityGridLevelIntersection(const GridImp* identityGrid,
    \n+
    224 HostLevelIntersection&& hostIntersection)
    \n+
    225 : identityGrid_(identityGrid)
    \n+
    226 , hostIntersection_(std::move(hostIntersection))
    \n+
    227 {}
    \n+
    228
    \n+
    229 bool equals(const IdentityGridLevelIntersection& other) const
    \n+
    230 {
    \n+
    231 return hostIntersection_ == other.hostIntersection_;
    \n+
    232 }
    \n+
    233
    \n+
    236 Entity inside() const {
    \n+
    237 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.inside());
    \n+
    238 }
    \n+
    239
    \n+
    240
    \n+
    243 Entity outside() const {
    \n+
    244 return IdentityGridEntity<0,dim,GridImp>(identityGrid_,hostIntersection_.outside());
    \n+
    245 }
    \n+
    246
    \n+
    247
    \n+
    250 bool boundary () const {
    \n+
    251 return hostIntersection_.boundary();
    \n+
    252 }
    \n+
    253
    \n+\n+
    260 return hostIntersection_.centerUnitOuterNormal();
    \n+
    261 }
    \n+
    262
    \n+
    264 bool neighbor () const {
    \n+
    265 return hostIntersection_.neighbor();
    \n+
    266 }
    \n+
    267
    \n+
    269 size_t boundarySegmentIndex() const {
    \n+
    270 return hostIntersection_.boundarySegmentIndex();
    \n+
    271 }
    \n+
    272
    \n+
    274 bool conforming () const {
    \n+
    275 return hostIntersection_.conforming();
    \n+
    276 }
    \n+
    277
    \n+\n+
    280 return hostIntersection_.type();
    \n+
    281 }
    \n+
    282
    \n+
    283
    \n+\n+
    289 {
    \n+
    290 return LocalGeometry( hostIntersection_.geometryInInside() );
    \n+
    291 }
    \n+
    292
    \n+\n+
    296 {
    \n+
    297 return LocalGeometry( hostIntersection_.geometryInOutside() );
    \n+
    298 }
    \n+
    299
    \n+\n+
    303 {
    \n+
    304 return Geometry( hostIntersection_.geometry() );
    \n+
    305 }
    \n+
    306
    \n+
    307
    \n+
    309 int indexInInside () const {
    \n+
    310 return hostIntersection_.indexInInside();
    \n+
    311 }
    \n+
    312
    \n+
    313
    \n+
    315 int indexInOutside () const {
    \n+
    316 return hostIntersection_.indexInOutside();
    \n+
    317 }
    \n+
    318
    \n+
    319
    \n+
    321 FieldVector<ctype, dimworld> outerNormal (const FieldVector<ctype, dim-1>& local) const {
    \n+
    322 return hostIntersection_.outerNormal(local);
    \n+
    323 }
    \n+
    324
    \n+
    326 FieldVector<ctype, dimworld> integrationOuterNormal (const FieldVector<ctype, dim-1>& local) const {
    \n+
    327 return hostIntersection_.integrationOuterNormal(local);
    \n+
    328 }
    \n+
    329
    \n+
    331 FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& local) const {
    \n+
    332 return hostIntersection_.unitOuterNormal(local);
    \n+
    333 }
    \n+
    334
    \n+
    335 private:
    \n+
    336
    \n+
    337 const GridImp* identityGrid_;
    \n+
    338
    \n+
    339 HostLevelIntersection hostIntersection_;
    \n+
    340
    \n+
    341 };
    \n+
    342
    \n+
    343
    \n+
    344} // namespace Dune
    \n+
    345
    \n+
    346#endif
    \n+
    The IdentityGridEntity class.
    \n+
    The IdentityGridLeafIterator class.
    \n+
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    The EntitySeed class provides the minimal information needed to restore an Entity using the grid.
    Definition: identitygridentityseed.hh:24
    \n-
    static constexpr int codimension
    Definition: identitygridentityseed.hh:35
    \n-
    IdentityGridEntitySeed()
    Construct an empty (i.e. isValid() == false) seed.
    Definition: identitygridentityseed.hh:40
    \n-
    bool isValid() const
    Check whether it is safe to create an Entity from this Seed.
    Definition: identitygridentityseed.hh:64
    \n-
    GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity
    Definition: identitygridentityseed.hh:28
    \n-
    IdentityGridEntitySeed(const HostEntity &hostEntity)
    Create EntitySeed from hostgrid Entity.
    Definition: identitygridentityseed.hh:49
    \n-
    const HostEntitySeed & hostEntitySeed() const
    Get stored HostEntitySeed.
    Definition: identitygridentityseed.hh:56
    \n-
    GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed HostEntitySeed
    Definition: identitygridentityseed.hh:31
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n+
    Definition: identitygridintersectioniterator.hh:84
    \n+
    Iterator over all element neighborsMesh entities of codimension 0 ("elements") allow to visit all nei...
    Definition: identitygridintersectioniterator.hh:29
    \n+
    Specialization for codim-0-entities.
    Definition: identitygridentity.hh:205
    \n+
    An intersection with a leaf neighbor elementMesh entities of codimension 0 ("elements") allow to visi...
    Definition: identitygridintersections.hh:33
    \n+
    Entity inside() const
    Definition: identitygridintersections.hh:77
    \n+
    IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection &&hostIntersection)
    Definition: identitygridintersections.hh:64
    \n+
    NormalVector centerUnitOuterNormal() const
    Return unit outer normal (length == 1)
    Definition: identitygridintersections.hh:99
    \n+
    GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
    Definition: identitygridintersections.hh:51
    \n+
    Geometry geometry() const
    Definition: identitygridintersections.hh:142
    \n+
    Entity outside() const
    Definition: identitygridintersections.hh:84
    \n+
    LocalGeometry geometryInOutside() const
    Definition: identitygridintersections.hh:135
    \n+
    bool boundary() const
    return true if intersection is with boundary.
    Definition: identitygridintersections.hh:90
    \n+
    GeometryType type() const
    Geometry type of an intersection.
    Definition: identitygridintersections.hh:119
    \n+
    FieldVector< ctype, dimworld > NormalVector
    Definition: identitygridintersections.hh:53
    \n+
    LocalGeometry geometryInInside() const
    Definition: identitygridintersections.hh:128
    \n+
    bool conforming() const
    Return true if this is a conforming intersection.
    Definition: identitygridintersections.hh:114
    \n+
    IdentityGridLeafIntersection(const GridImp *identityGrid, const HostLeafIntersection &hostIntersection)
    Definition: identitygridintersections.hh:58
    \n+
    size_t boundarySegmentIndex() const
    return the boundary segment index
    Definition: identitygridintersections.hh:109
    \n+
    bool equals(const IdentityGridLeafIntersection &other) const
    Definition: identitygridintersections.hh:70
    \n+
    FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
    return outer normal
    Definition: identitygridintersections.hh:161
    \n+
    int indexInOutside() const
    local number of codim 1 entity in neighbor where intersection is contained
    Definition: identitygridintersections.hh:155
    \n+
    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
    \n+
    bool neighbor() const
    return true if across the edge an neighbor on this level exists
    Definition: identitygridintersections.hh:104
    \n+
    FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const FieldVector< ctype, GridImp::dimension-1 > &local) const
    return unit outer normal
    Definition: identitygridintersections.hh:171
    \n+
    int indexInInside() const
    local number of codim 1 entity in self where intersection is contained in
    Definition: identitygridintersections.hh:149
    \n+
    GridImp::template Codim< 1 >::Geometry Geometry
    Definition: identitygridintersections.hh:50
    \n+
    GridImp::template Codim< 0 >::Entity Entity
    Definition: identitygridintersections.hh:52
    \n+
    Definition: identitygridintersections.hh:192
    \n+
    Geometry geometry() const
    Definition: identitygridintersections.hh:302
    \n+
    GridImp::template Codim< 0 >::Entity Entity
    Definition: identitygridintersections.hh:211
    \n+
    IdentityGridLevelIntersection(const GridImp *identityGrid, const HostLevelIntersection &hostIntersection)
    Definition: identitygridintersections.hh:217
    \n+
    GridImp::template Codim< 1 >::Geometry Geometry
    Definition: identitygridintersections.hh:209
    \n+
    bool equals(const IdentityGridLevelIntersection &other) const
    Definition: identitygridintersections.hh:229
    \n+
    bool neighbor() const
    return true if across the edge an neighbor on this level exists
    Definition: identitygridintersections.hh:264
    \n+
    NormalVector centerUnitOuterNormal() const
    Return unit outer normal (length == 1)
    Definition: identitygridintersections.hh:259
    \n+
    bool conforming() const
    Return true if this is a conforming intersection.
    Definition: identitygridintersections.hh:274
    \n+
    int indexInInside() const
    local number of codim 1 entity in self where intersection is contained in
    Definition: identitygridintersections.hh:309
    \n+
    FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 > &local) const
    return outer normal
    Definition: identitygridintersections.hh:321
    \n+
    GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
    Definition: identitygridintersections.hh:210
    \n+
    FieldVector< ctype, dimworld > NormalVector
    Definition: identitygridintersections.hh:212
    \n+
    bool boundary() const
    return true if intersection is with boundary.
    Definition: identitygridintersections.hh:250
    \n+
    FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
    return outer normal multiplied by the integration element
    Definition: identitygridintersections.hh:326
    \n+
    LocalGeometry geometryInOutside() const
    Definition: identitygridintersections.hh:295
    \n+
    LocalGeometry geometryInInside() const
    Definition: identitygridintersections.hh:288
    \n+
    int indexInOutside() const
    local number of codim 1 entity in neighbor where intersection is contained
    Definition: identitygridintersections.hh:315
    \n+
    FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
    return unit outer normal
    Definition: identitygridintersections.hh:331
    \n+
    size_t boundarySegmentIndex() const
    return the boundary segment index
    Definition: identitygridintersections.hh:269
    \n+
    Entity outside() const
    Definition: identitygridintersections.hh:243
    \n+
    Entity inside() const
    Definition: identitygridintersections.hh:236
    \n+
    GeometryType type() const
    Geometry type of an intersection.
    Definition: identitygridintersections.hh:279
    \n+
    IdentityGridLevelIntersection(const GridImp *identityGrid, HostLevelIntersection &&hostIntersection)
    Definition: identitygridintersections.hh:223
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,97 +5,506 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * identitygrid\n-identitygridentityseed.hh\n+identitygridintersections.hh\n Go_to_the_documentation_of_this_file.\n- 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n+1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH\n- 6#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH\n+ 5#ifndef DUNE_IDENTITYGRID_INTERSECTIONS_HH\n+ 6#define DUNE_IDENTITYGRID_INTERSECTIONS_HH\n 7\n- 14namespace Dune {\n- 15\n+ 8#include \"identitygridleafiterator.hh\"\n+ 9#include \n+ 10\n+ 15namespace Dune {\n 16\n- 22 template\n-23 class IdentityGridEntitySeed\n- 24 {\n- 25 protected:\n- 26\n- 27 // Entity type of the hostgrid\n-28 typedef typename GridImp::HostGridType::Traits::template Codim::\n-Entity HostEntity;\n- 29\n- 30 // EntitySeed type of the hostgrid\n-31 typedef typename GridImp::HostGridType::Traits::template Codim::\n-EntitySeed HostEntitySeed;\n- 32\n- 33 public:\n+ 17\n+ 18 // External forward declarations\n+ 19 template< class Grid >\n+ 20 struct HostGridAccess;\n+ 21\n+ 22\n+ 31 template\n+32 class IdentityGridLeafIntersection\n+ 33 {\n 34\n-35 constexpr static int codimension = codim;\n+ 35 friend class IdentityGridLeafIntersectionIterator;\n 36\n-40 IdentityGridEntitySeed()\n- 41 {}\n+ 37 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n+>;\n+ 38\n+ 39 constexpr static int dim = GridImp::dimension;\n+ 40\n+ 41 constexpr static int dimworld = GridImp::dimensionworld;\n 42\n-49 IdentityGridEntitySeed(const HostEntity& hostEntity) :\n- 50 hostEntitySeed_(hostEntity.seed())\n- 51 {}\n- 52\n-56 const HostEntitySeed& hostEntitySeed() const\n- 57 {\n- 58 return hostEntitySeed_;\n- 59 }\n- 60\n-64 bool isValid() const\n- 65 {\n- 66 return hostEntitySeed_.isValid();\n- 67 }\n- 68 private:\n+ 43 // The type used to store coordinates\n+ 44 typedef typename GridImp::ctype ctype;\n+ 45\n+ 46 typedef typename GridImp::HostGridType::LeafGridView::Intersection\n+HostLeafIntersection;\n+ 47\n+ 48 public:\n+ 49\n+50 typedef typename GridImp::template Codim<1>::Geometry Geometry;\n+51 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;\n+52 typedef typename GridImp::template Codim<0>::Entity Entity;\n+53 typedef FieldVector NormalVector;\n+ 54\n+55 IdentityGridLeafIntersection()\n+ 56 {}\n+ 57\n+58 IdentityGridLeafIntersection(const GridImp* identityGrid,\n+ 59 const HostLeafIntersection& hostIntersection)\n+ 60 : identityGrid_(identityGrid)\n+ 61 , hostIntersection_(hostIntersection)\n+ 62 {}\n+ 63\n+64 IdentityGridLeafIntersection(const GridImp* identityGrid,\n+ 65 HostLeafIntersection&& hostIntersection)\n+ 66 : identityGrid_(identityGrid)\n+ 67 , hostIntersection_(std::move(hostIntersection))\n+ 68 {}\n 69\n- 70 HostEntitySeed hostEntitySeed_;\n- 71 };\n- 72\n- 73} // namespace Dune\n+70 bool equals(const IdentityGridLeafIntersection& other) const\n+ 71 {\n+ 72 return hostIntersection_ == other.hostIntersection_;\n+ 73 }\n 74\n- 75#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH\n+77 Entity inside() const {\n+ 78 return IdentityGridEntity<0,dim,GridImp>\n+(identityGrid_,hostIntersection_.inside());\n+ 79 }\n+ 80\n+ 81\n+84 Entity outside() const {\n+ 85 return IdentityGridEntity<0,dim,GridImp>\n+(identityGrid_,hostIntersection_.outside());\n+ 86 }\n+ 87\n+ 88\n+90 bool boundary () const {\n+ 91 return hostIntersection_.boundary();\n+ 92 }\n+ 93\n+99 NormalVector centerUnitOuterNormal () const {\n+ 100 return hostIntersection_.centerUnitOuterNormal();\n+ 101 }\n+ 102\n+104 bool neighbor () const {\n+ 105 return hostIntersection_.neighbor();\n+ 106 }\n+ 107\n+109 size_t boundarySegmentIndex() const {\n+ 110 return hostIntersection_.boundarySegmentIndex();\n+ 111 }\n+ 112\n+114 bool conforming () const {\n+ 115 return hostIntersection_.conforming();\n+ 116 }\n+ 117\n+119 GeometryType type () const {\n+ 120 return hostIntersection_.type();\n+ 121 }\n+ 122\n+ 123\n+128 LocalGeometry geometryInInside () const\n+ 129 {\n+ 130 return LocalGeometry( hostIntersection_.geometryInInside() );\n+ 131 }\n+ 132\n+135 LocalGeometry geometryInOutside () const\n+ 136 {\n+ 137 return LocalGeometry( hostIntersection_.geometryInOutside() );\n+ 138 }\n+ 139\n+142 Geometry geometry () const\n+ 143 {\n+ 144 return Geometry( hostIntersection_.geometry() );\n+ 145 }\n+ 146\n+ 147\n+149 int indexInInside () const {\n+ 150 return hostIntersection_.indexInInside();\n+ 151 }\n+ 152\n+ 153\n+155 int indexInOutside () const {\n+ 156 return hostIntersection_.indexInOutside();\n+ 157 }\n+ 158\n+ 159\n+161 FieldVector outerNormal (const\n+FieldVector& local) const {\n+ 162 return hostIntersection_.outerNormal(local);\n+ 163 }\n+ 164\n+166 FieldVector integrationOuterNormal (const\n+FieldVector& local) const {\n+ 167 return hostIntersection_.integrationOuterNormal(local);\n+ 168 }\n+ 169\n+171 FieldVector unitOuterNormal (const\n+FieldVector& local) const {\n+ 172 return hostIntersection_.unitOuterNormal(local);\n+ 173 }\n+ 174\n+ 175\n+ 176 private:\n+ 177 //**********************************************************\n+ 178 // private methods\n+ 179 //**********************************************************\n+ 180\n+ 181 const GridImp* identityGrid_;\n+ 182\n+183 HostLeafIntersection hostIntersection_;\n+ 184 };\n+ 185\n+ 186\n+ 187\n+ 188\n+ 190 template\n+191 class IdentityGridLevelIntersection\n+ 192 {\n+ 193\n+ 194 friend class IdentityGridLevelIntersectionIterator;\n+ 195\n+ 196 friend struct HostGridAccess< typename std::remove_const< GridImp >::type\n+>;\n+ 197\n+ 198 constexpr static int dim = GridImp::dimension;\n+ 199\n+ 200 constexpr static int dimworld = GridImp::dimensionworld;\n+ 201\n+ 202 // The type used to store coordinates\n+ 203 typedef typename GridImp::ctype ctype;\n+ 204\n+ 205 typedef typename GridImp::HostGridType::LevelGridView::Intersection\n+HostLevelIntersection;\n+ 206\n+ 207 public:\n+ 208\n+209 typedef typename GridImp::template Codim<1>::Geometry Geometry;\n+210 typedef typename GridImp::template Codim<1>::LocalGeometry LocalGeometry;\n+211 typedef typename GridImp::template Codim<0>::Entity Entity;\n+212 typedef FieldVector NormalVector;\n+ 213\n+214 IdentityGridLevelIntersection()\n+ 215 {}\n+ 216\n+217 IdentityGridLevelIntersection(const GridImp* identityGrid,\n+ 218 const HostLevelIntersection& hostIntersection)\n+ 219 : identityGrid_(identityGrid)\n+ 220 , hostIntersection_(hostIntersection)\n+ 221 {}\n+ 222\n+223 IdentityGridLevelIntersection(const GridImp* identityGrid,\n+ 224 HostLevelIntersection&& hostIntersection)\n+ 225 : identityGrid_(identityGrid)\n+ 226 , hostIntersection_(std::move(hostIntersection))\n+ 227 {}\n+ 228\n+229 bool equals(const IdentityGridLevelIntersection& other) const\n+ 230 {\n+ 231 return hostIntersection_ == other.hostIntersection_;\n+ 232 }\n+ 233\n+236 Entity inside() const {\n+ 237 return IdentityGridEntity<0,dim,GridImp>\n+(identityGrid_,hostIntersection_.inside());\n+ 238 }\n+ 239\n+ 240\n+243 Entity outside() const {\n+ 244 return IdentityGridEntity<0,dim,GridImp>\n+(identityGrid_,hostIntersection_.outside());\n+ 245 }\n+ 246\n+ 247\n+250 bool boundary () const {\n+ 251 return hostIntersection_.boundary();\n+ 252 }\n+ 253\n+259 NormalVector centerUnitOuterNormal () const {\n+ 260 return hostIntersection_.centerUnitOuterNormal();\n+ 261 }\n+ 262\n+264 bool neighbor () const {\n+ 265 return hostIntersection_.neighbor();\n+ 266 }\n+ 267\n+269 size_t boundarySegmentIndex() const {\n+ 270 return hostIntersection_.boundarySegmentIndex();\n+ 271 }\n+ 272\n+274 bool conforming () const {\n+ 275 return hostIntersection_.conforming();\n+ 276 }\n+ 277\n+279 GeometryType type () const {\n+ 280 return hostIntersection_.type();\n+ 281 }\n+ 282\n+ 283\n+288 LocalGeometry geometryInInside () const\n+ 289 {\n+ 290 return LocalGeometry( hostIntersection_.geometryInInside() );\n+ 291 }\n+ 292\n+295 LocalGeometry geometryInOutside () const\n+ 296 {\n+ 297 return LocalGeometry( hostIntersection_.geometryInOutside() );\n+ 298 }\n+ 299\n+302 Geometry geometry () const\n+ 303 {\n+ 304 return Geometry( hostIntersection_.geometry() );\n+ 305 }\n+ 306\n+ 307\n+309 int indexInInside () const {\n+ 310 return hostIntersection_.indexInInside();\n+ 311 }\n+ 312\n+ 313\n+315 int indexInOutside () const {\n+ 316 return hostIntersection_.indexInOutside();\n+ 317 }\n+ 318\n+ 319\n+321 FieldVector outerNormal (const FieldVector&\n+local) const {\n+ 322 return hostIntersection_.outerNormal(local);\n+ 323 }\n+ 324\n+326 FieldVector integrationOuterNormal (const\n+FieldVector& local) const {\n+ 327 return hostIntersection_.integrationOuterNormal(local);\n+ 328 }\n+ 329\n+331 FieldVector unitOuterNormal (const FieldVector& local) const {\n+ 332 return hostIntersection_.unitOuterNormal(local);\n+ 333 }\n+ 334\n+ 335 private:\n+ 336\n+ 337 const GridImp* identityGrid_;\n+ 338\n+ 339 HostLevelIntersection hostIntersection_;\n+ 340\n+ 341 };\n+ 342\n+ 343\n+ 344} // namespace Dune\n+ 345\n+ 346#endif\n+identitygridentity.hh\n+The IdentityGridEntity class.\n+identitygridleafiterator.hh\n+The IdentityGridLeafIterator class.\n+std\n+STL namespace.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::IdentityGridEntitySeed\n-The EntitySeed class provides the minimal information needed to restore an\n-Entity using the grid.\n-Definition: identitygridentityseed.hh:24\n-Dune::IdentityGridEntitySeed::codimension\n-static constexpr int codimension\n-Definition: identitygridentityseed.hh:35\n-Dune::IdentityGridEntitySeed::IdentityGridEntitySeed\n-IdentityGridEntitySeed()\n-Construct an empty (i.e. isValid() == false) seed.\n-Definition: identitygridentityseed.hh:40\n-Dune::IdentityGridEntitySeed::isValid\n-bool isValid() const\n-Check whether it is safe to create an Entity from this Seed.\n-Definition: identitygridentityseed.hh:64\n-Dune::IdentityGridEntitySeed::HostEntity\n-GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity\n-Definition: identitygridentityseed.hh:28\n-Dune::IdentityGridEntitySeed::IdentityGridEntitySeed\n-IdentityGridEntitySeed(const HostEntity &hostEntity)\n-Create EntitySeed from hostgrid Entity.\n-Definition: identitygridentityseed.hh:49\n-Dune::IdentityGridEntitySeed::hostEntitySeed\n-const HostEntitySeed & hostEntitySeed() const\n-Get stored HostEntitySeed.\n-Definition: identitygridentityseed.hh:56\n-Dune::IdentityGridEntitySeed::HostEntitySeed\n-GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed\n-HostEntitySeed\n-Definition: identitygridentityseed.hh:31\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::HostGridAccess\n+provides access to host grid objects from GeometryGrid\n+Definition: identitygrid.hh:37\n+Dune::IdentityGridLevelIntersectionIterator\n+Definition: identitygridintersectioniterator.hh:84\n+Dune::IdentityGridLeafIntersectionIterator\n+Iterator over all element neighborsMesh entities of codimension 0 (\"elements\")\n+allow to visit all nei...\n+Definition: identitygridintersectioniterator.hh:29\n+Dune::IdentityGridEntity<_0,_dim,_GridImp_>\n+Specialization for codim-0-entities.\n+Definition: identitygridentity.hh:205\n+Dune::IdentityGridLeafIntersection\n+An intersection with a leaf neighbor elementMesh entities of codimension 0\n+(\"elements\") allow to visi...\n+Definition: identitygridintersections.hh:33\n+Dune::IdentityGridLeafIntersection::inside\n+Entity inside() const\n+Definition: identitygridintersections.hh:77\n+Dune::IdentityGridLeafIntersection::IdentityGridLeafIntersection\n+IdentityGridLeafIntersection(const GridImp *identityGrid, HostLeafIntersection\n+&&hostIntersection)\n+Definition: identitygridintersections.hh:64\n+Dune::IdentityGridLeafIntersection::centerUnitOuterNormal\n+NormalVector centerUnitOuterNormal() const\n+Return unit outer normal (length == 1)\n+Definition: identitygridintersections.hh:99\n+Dune::IdentityGridLeafIntersection::LocalGeometry\n+GridImp::template Codim< 1 >::LocalGeometry LocalGeometry\n+Definition: identitygridintersections.hh:51\n+Dune::IdentityGridLeafIntersection::geometry\n+Geometry geometry() const\n+Definition: identitygridintersections.hh:142\n+Dune::IdentityGridLeafIntersection::outside\n+Entity outside() const\n+Definition: identitygridintersections.hh:84\n+Dune::IdentityGridLeafIntersection::geometryInOutside\n+LocalGeometry geometryInOutside() const\n+Definition: identitygridintersections.hh:135\n+Dune::IdentityGridLeafIntersection::boundary\n+bool boundary() const\n+return true if intersection is with boundary.\n+Definition: identitygridintersections.hh:90\n+Dune::IdentityGridLeafIntersection::type\n+GeometryType type() const\n+Geometry type of an intersection.\n+Definition: identitygridintersections.hh:119\n+Dune::IdentityGridLeafIntersection::NormalVector\n+FieldVector< ctype, dimworld > NormalVector\n+Definition: identitygridintersections.hh:53\n+Dune::IdentityGridLeafIntersection::geometryInInside\n+LocalGeometry geometryInInside() const\n+Definition: identitygridintersections.hh:128\n+Dune::IdentityGridLeafIntersection::conforming\n+bool conforming() const\n+Return true if this is a conforming intersection.\n+Definition: identitygridintersections.hh:114\n+Dune::IdentityGridLeafIntersection::IdentityGridLeafIntersection\n+IdentityGridLeafIntersection(const GridImp *identityGrid, const\n+HostLeafIntersection &hostIntersection)\n+Definition: identitygridintersections.hh:58\n+Dune::IdentityGridLeafIntersection::boundarySegmentIndex\n+size_t boundarySegmentIndex() const\n+return the boundary segment index\n+Definition: identitygridintersections.hh:109\n+Dune::IdentityGridLeafIntersection::equals\n+bool equals(const IdentityGridLeafIntersection &other) const\n+Definition: identitygridintersections.hh:70\n+Dune::IdentityGridLeafIntersection::outerNormal\n+FieldVector< ctype, GridImp::dimensionworld > outerNormal(const FieldVector<\n+ctype, GridImp::dimension-1 > &local) const\n+return outer normal\n+Definition: identitygridintersections.hh:161\n+Dune::IdentityGridLeafIntersection::indexInOutside\n+int indexInOutside() const\n+local number of codim 1 entity in neighbor where intersection is contained\n+Definition: identitygridintersections.hh:155\n+Dune::IdentityGridLeafIntersection::integrationOuterNormal\n+FieldVector< ctype, GridImp::dimensionworld > integrationOuterNormal(const\n+FieldVector< ctype, GridImp::dimension-1 > &local) const\n+return outer normal multiplied by the integration element\n+Definition: identitygridintersections.hh:166\n+Dune::IdentityGridLeafIntersection::neighbor\n+bool neighbor() const\n+return true if across the edge an neighbor on this level exists\n+Definition: identitygridintersections.hh:104\n+Dune::IdentityGridLeafIntersection::unitOuterNormal\n+FieldVector< ctype, GridImp::dimensionworld > unitOuterNormal(const\n+FieldVector< ctype, GridImp::dimension-1 > &local) const\n+return unit outer normal\n+Definition: identitygridintersections.hh:171\n+Dune::IdentityGridLeafIntersection::indexInInside\n+int indexInInside() const\n+local number of codim 1 entity in self where intersection is contained in\n+Definition: identitygridintersections.hh:149\n+Dune::IdentityGridLeafIntersection::Geometry\n+GridImp::template Codim< 1 >::Geometry Geometry\n+Definition: identitygridintersections.hh:50\n+Dune::IdentityGridLeafIntersection::Entity\n+GridImp::template Codim< 0 >::Entity Entity\n+Definition: identitygridintersections.hh:52\n+Dune::IdentityGridLevelIntersection\n+Definition: identitygridintersections.hh:192\n+Dune::IdentityGridLevelIntersection::geometry\n+Geometry geometry() const\n+Definition: identitygridintersections.hh:302\n+Dune::IdentityGridLevelIntersection::Entity\n+GridImp::template Codim< 0 >::Entity Entity\n+Definition: identitygridintersections.hh:211\n+Dune::IdentityGridLevelIntersection::IdentityGridLevelIntersection\n+IdentityGridLevelIntersection(const GridImp *identityGrid, const\n+HostLevelIntersection &hostIntersection)\n+Definition: identitygridintersections.hh:217\n+Dune::IdentityGridLevelIntersection::Geometry\n+GridImp::template Codim< 1 >::Geometry Geometry\n+Definition: identitygridintersections.hh:209\n+Dune::IdentityGridLevelIntersection::equals\n+bool equals(const IdentityGridLevelIntersection &other) const\n+Definition: identitygridintersections.hh:229\n+Dune::IdentityGridLevelIntersection::neighbor\n+bool neighbor() const\n+return true if across the edge an neighbor on this level exists\n+Definition: identitygridintersections.hh:264\n+Dune::IdentityGridLevelIntersection::centerUnitOuterNormal\n+NormalVector centerUnitOuterNormal() const\n+Return unit outer normal (length == 1)\n+Definition: identitygridintersections.hh:259\n+Dune::IdentityGridLevelIntersection::conforming\n+bool conforming() const\n+Return true if this is a conforming intersection.\n+Definition: identitygridintersections.hh:274\n+Dune::IdentityGridLevelIntersection::indexInInside\n+int indexInInside() const\n+local number of codim 1 entity in self where intersection is contained in\n+Definition: identitygridintersections.hh:309\n+Dune::IdentityGridLevelIntersection::outerNormal\n+FieldVector< ctype, dimworld > outerNormal(const FieldVector< ctype, dim-1 >\n+&local) const\n+return outer normal\n+Definition: identitygridintersections.hh:321\n+Dune::IdentityGridLevelIntersection::LocalGeometry\n+GridImp::template Codim< 1 >::LocalGeometry LocalGeometry\n+Definition: identitygridintersections.hh:210\n+Dune::IdentityGridLevelIntersection::NormalVector\n+FieldVector< ctype, dimworld > NormalVector\n+Definition: identitygridintersections.hh:212\n+Dune::IdentityGridLevelIntersection::boundary\n+bool boundary() const\n+return true if intersection is with boundary.\n+Definition: identitygridintersections.hh:250\n+Dune::IdentityGridLevelIntersection::integrationOuterNormal\n+FieldVector< ctype, dimworld > integrationOuterNormal(const FieldVector< ctype,\n+dim-1 > &local) const\n+return outer normal multiplied by the integration element\n+Definition: identitygridintersections.hh:326\n+Dune::IdentityGridLevelIntersection::geometryInOutside\n+LocalGeometry geometryInOutside() const\n+Definition: identitygridintersections.hh:295\n+Dune::IdentityGridLevelIntersection::geometryInInside\n+LocalGeometry geometryInInside() const\n+Definition: identitygridintersections.hh:288\n+Dune::IdentityGridLevelIntersection::indexInOutside\n+int indexInOutside() const\n+local number of codim 1 entity in neighbor where intersection is contained\n+Definition: identitygridintersections.hh:315\n+Dune::IdentityGridLevelIntersection::unitOuterNormal\n+FieldVector< ctype, dimworld > unitOuterNormal(const FieldVector< ctype, dim-\n+1 > &local) const\n+return unit outer normal\n+Definition: identitygridintersections.hh:331\n+Dune::IdentityGridLevelIntersection::boundarySegmentIndex\n+size_t boundarySegmentIndex() const\n+return the boundary segment index\n+Definition: identitygridintersections.hh:269\n+Dune::IdentityGridLevelIntersection::outside\n+Entity outside() const\n+Definition: identitygridintersections.hh:243\n+Dune::IdentityGridLevelIntersection::inside\n+Entity inside() const\n+Definition: identitygridintersections.hh:236\n+Dune::IdentityGridLevelIntersection::type\n+GeometryType type() const\n+Geometry type of an intersection.\n+Definition: identitygridintersections.hh:279\n+Dune::IdentityGridLevelIntersection::IdentityGridLevelIntersection\n+IdentityGridLevelIntersection(const GridImp *identityGrid,\n+HostLevelIntersection &&hostIntersection)\n+Definition: identitygridintersections.hh:223\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00758.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00758.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtksequencewriter.hh File Reference\n+dune-grid: starcdreader.hh File Reference\n \n \n \n \n \n \n \n@@ -58,35 +58,37 @@\n \n
    \n \n \n \n
    \n \n-
    vtksequencewriter.hh File Reference
    \n+
    starcdreader.hh File Reference
    \n
    \n
    \n-
    #include <memory>
    \n-#include <dune/grid/io/file/vtk/vtksequencewriterbase.hh>
    \n-#include <dune/grid/io/file/vtk/vtkwriter.hh>
    \n-#include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>
    \n+
    #include <dune/common/exceptions.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/grid/common/gridfactory.hh>
    \n+#include <iostream>
    \n+#include <fstream>
    \n+#include <memory>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::VTKSequenceWriter< GridView >
     Writer for the ouput of grid functions in the vtk format. More...
    class  Dune::StarCDReader< GridType >
     File reader for the Star-CD format. More...
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,25 +6,26 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n Classes | Namespaces\n-vtksequencewriter.hh File Reference\n+starcdreader.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTKSequenceWriter<_GridView_>\n-\u00a0 Writer for the ouput of grid functions in the vtk format. More...\n+class \u00a0Dune::StarCDReader<_GridType_>\n+\u00a0 File reader for the Star-CD format. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00758_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtksequencewriter.hh Source File\n+dune-grid: starcdreader.hh Source File\n \n \n \n \n \n \n \n@@ -58,94 +58,180 @@\n \n \n \n \n \n
    \n-
    vtksequencewriter.hh
    \n+
    starcdreader.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_VTKSEQUENCE_HH
    \n-
    7#define DUNE_VTKSEQUENCE_HH
    \n-
    8
    \n-
    9#include <memory>
    \n-
    10
    \n-\n-
    12
    \n-\n-\n+
    5#ifndef DUNE_STARCD_READER_HH
    \n+
    6#define DUNE_STARCD_READER_HH
    \n+
    7
    \n+
    8#include <dune/common/exceptions.hh>
    \n+
    9
    \n+
    10#include <dune/geometry/type.hh>
    \n+\n+
    12#include <iostream>
    \n+
    13#include <fstream>
    \n+
    14#include <memory>
    \n
    15
    \n
    16namespace Dune {
    \n
    17
    \n-
    26 template< class GridView >
    \n-\n-
    28 public VTKSequenceWriterBase<GridView>
    \n-
    29 {
    \n-
    30 public:
    \n-\n-
    43 const std::string& name )
    \n-\n-
    45 name,
    \n-
    46 "",
    \n-
    47 "",
    \n-
    48 vtkWriter->gridView_.comm().rank(),
    \n-
    49 vtkWriter->gridView_.comm().size())
    \n-
    50 {}
    \n-
    51
    \n-\n-
    70 const std::string& name,
    \n-
    71 const std::string& path,
    \n-
    72 const std::string& extendpath )
    \n-\n-
    74 name,
    \n-
    75 path,
    \n-
    76 extendpath,
    \n-
    77 vtkWriter->gridView_.comm().rank(),
    \n-
    78 vtkWriter->gridView_.comm().size())
    \n-
    79 {}
    \n+
    51 template <class GridType>
    \n+\n+
    53
    \n+
    54 public:
    \n+
    55
    \n+
    65 static std::unique_ptr<GridType> read(const std::string& fileName, bool verbose = true)
    \n+
    66 {
    \n+
    67 // extract the grid dimension
    \n+
    68 const int dim = GridType::dimension;
    \n+
    69
    \n+
    70 // currently only dim = 3 is implemented
    \n+
    71 if (dim != 3)
    \n+
    72 DUNE_THROW(Dune::NotImplemented,
    \n+
    73 "Reading Star-CD format is not implemented for dimension " << dim);
    \n+
    74
    \n+
    75 // set up the grid factory
    \n+\n+
    77
    \n+
    78 // set the name of the vertex file
    \n+
    79 std::string vertexFileName = fileName + ".vrt";
    \n
    80
    \n-
    87 explicit VTKSequenceWriter ( const GridView &gridView,
    \n-
    88 const std::string& name,
    \n-
    89 const std::string& path,
    \n-
    90 const std::string& extendpath,
    \n-\n-
    92 : VTKSequenceWriterBase<GridView>(std::make_shared<VTKWriter<GridView> >(gridView,dm),
    \n-
    93 name,path,extendpath,
    \n-
    94 gridView.comm().rank(), gridView.comm().size())
    \n-
    95 {}
    \n-
    96 };
    \n-
    97
    \n-
    98} // end namespace Dune
    \n-
    99
    \n-
    100#endif
    \n-\n-
    Provides subsampled file i/o for the visualization toolkit.
    \n-
    Provides file i/o for the visualization toolkit.
    \n-
    STL namespace.
    \n+
    81 // set the vertex input stream
    \n+
    82 std::ifstream vertexFile(vertexFileName.c_str());
    \n+
    83 if (!vertexFile)
    \n+
    84 DUNE_THROW(Dune::IOError, "Could not open " << vertexFileName);
    \n+
    85
    \n+
    86 // read the vertices
    \n+
    87 int dummyIdx;
    \n+
    88 int numberOfVertices = 0;
    \n+
    89 while (vertexFile >> dummyIdx) {
    \n+
    90 numberOfVertices++;
    \n+
    91
    \n+
    92 Dune::FieldVector<double,dim> position;
    \n+
    93
    \n+
    94 for (int k = 0; k < dim; k++)
    \n+
    95 vertexFile >> position[k];
    \n+
    96
    \n+
    97 factory.insertVertex(position);
    \n+
    98 }
    \n+
    99 if (verbose)
    \n+
    100 std::cout << numberOfVertices << " vertices read." << std::endl;
    \n+
    101
    \n+
    102 // set the name of the element file
    \n+
    103 std::string elementFileName = fileName + ".cel";
    \n+
    104
    \n+
    105 // set the element input stream
    \n+
    106 std::ifstream elementFile(elementFileName.c_str());
    \n+
    107 if (!elementFile)
    \n+
    108 DUNE_THROW(Dune::IOError, "Could not open " << elementFileName);
    \n+
    109
    \n+
    110 // read the elements
    \n+
    111 int numberOfElements = 0;
    \n+
    112 int numberOfSimplices = 0;
    \n+
    113 int numberOfPyramids = 0;
    \n+
    114 int numberOfPrisms = 0;
    \n+
    115 int numberOfCubes = 0;;
    \n+
    116 int maxNumberOfVertices = (int)pow(2, dim);
    \n+
    117 int isVolume = 1;
    \n+
    118 while (elementFile >> dummyIdx) {
    \n+
    119 std::vector<unsigned int> vertices(maxNumberOfVertices);
    \n+
    120 for (int k = 0; k < maxNumberOfVertices; k++)
    \n+
    121 elementFile >> vertices[k];
    \n+
    122
    \n+
    123 int boundaryId;
    \n+
    124 elementFile >> boundaryId;
    \n+
    125
    \n+
    126 int volumeOrSurface[2];
    \n+
    127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1];
    \n+
    128
    \n+
    129 if (volumeOrSurface[0] == isVolume) {
    \n+
    130 numberOfElements++;
    \n+
    131
    \n+
    132 if (vertices[2] == vertices[3]) { // simplex or prism
    \n+
    133 if (vertices[4] == vertices[5]) { // simplex
    \n+
    134 numberOfSimplices++;
    \n+
    135 std::vector<unsigned int> simplexVertices(4);
    \n+
    136 for (int k = 0; k < 3; k++)
    \n+
    137 simplexVertices[k] = vertices[k] - 1;
    \n+
    138 simplexVertices[3] = vertices[4] - 1;
    \n+
    139 factory.insertElement(Dune::GeometryTypes::tetrahedron, simplexVertices);
    \n+
    140 }
    \n+
    141 else { // prism
    \n+
    142 numberOfPrisms++;
    \n+
    143 std::vector<unsigned int> prismVertices(6);
    \n+
    144 for (int k = 0; k < 3; k++)
    \n+
    145 prismVertices[k] = vertices[k] - 1;
    \n+
    146 for (int k = 3; k < 6; k++)
    \n+
    147 prismVertices[k] = vertices[k+1] - 1;
    \n+
    148 factory.insertElement(Dune::GeometryTypes::prism, prismVertices);
    \n+
    149 }
    \n+
    150 }
    \n+
    151 else { // cube or pyramid
    \n+
    152 if (vertices[4] == vertices[5]) { // pyramid
    \n+
    153 numberOfPyramids++;
    \n+
    154 std::vector<unsigned int> pyramidVertices(5);
    \n+
    155 for (int k = 0; k < 5; k++)
    \n+
    156 pyramidVertices[k] = vertices[k] - 1;
    \n+
    157 factory.insertElement(Dune::GeometryTypes::pyramid, pyramidVertices);
    \n+
    158 }
    \n+
    159 else { // cube
    \n+
    160 numberOfCubes++;
    \n+
    161 std::vector<unsigned int> cubeVertices(8);
    \n+
    162 for (int k = 0; k < 8; k++)
    \n+
    163 cubeVertices[k] = vertices[k] - 1;
    \n+
    164 std::swap(cubeVertices[2], cubeVertices[3]);
    \n+
    165 std::swap(cubeVertices[6], cubeVertices[7]);
    \n+
    166 factory.insertElement(Dune::GeometryTypes::hexahedron, cubeVertices);
    \n+
    167 }
    \n+
    168 }
    \n+
    169 }
    \n+
    170 }
    \n+
    171 if (verbose)
    \n+
    172 std::cout << numberOfElements << " elements read: "
    \n+
    173 << numberOfSimplices << " simplices, " << numberOfPyramids << " pyramids, "
    \n+
    174 << numberOfPrisms << " prisms, " << numberOfCubes << " cubes." << std::endl;
    \n+
    175
    \n+
    176 // finish off the construction of the grid object
    \n+
    177 if (verbose)
    \n+
    178 std::cout << "Starting createGrid() ... " << std::flush;
    \n+
    179
    \n+
    180 return factory.createGrid();
    \n+
    181
    \n+
    182 }
    \n+
    183
    \n+
    184 };
    \n+
    185
    \n+
    186}
    \n+
    187
    \n+
    188#endif
    \n+
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    DataMode
    Whether to produce conforming or non-conforming output.
    Definition: common.hh:67
    \n-
    @ conforming
    Output conforming data.
    Definition: common.hh:73
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    Writer for the ouput of grid functions in the vtk format.
    Definition: vtksequencewriter.hh:29
    \n-
    VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name, const std::string &path, const std::string &extendpath)
    Constructor with a given VTKWriter or SubsamplingVTKWriter.
    Definition: vtksequencewriter.hh:69
    \n-
    VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name)
    Constructor with a given VTKWriter or SubsamplingVTKWriter.
    Definition: vtksequencewriter.hh:42
    \n-
    VTKSequenceWriter(const GridView &gridView, const std::string &name, const std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK::conforming)
    Constructor creating its own VTKWriter object.
    Definition: vtksequencewriter.hh:87
    \n-
    Base class to write pvd-files which contains a list of all collected vtk-files.
    Definition: vtksequencewriterbase.hh:34
    \n-
    const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
    Definition: vtksequencewriterbase.hh:63
    \n-
    Writer for the ouput of grid functions in the vtk format.
    Definition: vtkwriter.hh:95
    \n+
    @ pyramid
    Definition: common.hh:141
    \n+
    @ tetrahedron
    Definition: common.hh:138
    \n+
    @ prism
    Definition: common.hh:140
    \n+
    @ hexahedron
    Definition: common.hh:139
    \n+
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:314
    \n+
    virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
    Insert an element into the coarse grid.
    Definition: common/gridfactory.hh:346
    \n+
    virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
    Insert a vertex into the coarse grid.
    Definition: common/gridfactory.hh:335
    \n+
    virtual std::unique_ptr< GridType > createGrid()
    Finalize grid creation and hand over the grid.
    Definition: common/gridfactory.hh:372
    \n+
    File reader for the Star-CD format.
    Definition: starcdreader.hh:52
    \n+
    static std::unique_ptr< GridType > read(const std::string &fileName, bool verbose=true)
    Read grid from a Star-CD file.
    Definition: starcdreader.hh:65
    \n+
    Provide a generic factory class for unstructured grids.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,122 +6,207 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-vtksequencewriter.hh\n+starcdreader.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_VTKSEQUENCE_HH\n- 7#define DUNE_VTKSEQUENCE_HH\n- 8\n- 9#include \n- 10\n- 11#include \n- 12\n- 13#include \n- 14#include \n+ 5#ifndef DUNE_STARCD_READER_HH\n+ 6#define DUNE_STARCD_READER_HH\n+ 7\n+ 8#include \n+ 9\n+ 10#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n 15\n 16namespace Dune {\n 17\n- 26 template< class GridView >\n-27 class VTKSequenceWriter :\n- 28 public VTKSequenceWriterBase\n- 29 {\n- 30 public:\n-42 VTKSequenceWriter ( std::shared_ptr > vtkWriter,\n- 43 const std::string& name )\n- 44 : VTKSequenceWriterBase(vtkWriter,\n- 45 name,\n- 46 \"\",\n- 47 \"\",\n- 48 vtkWriter->gridView_.comm().rank(),\n- 49 vtkWriter->gridView_.comm().size())\n- 50 {}\n- 51\n-69 VTKSequenceWriter ( std::shared_ptr > vtkWriter,\n- 70 const std::string& name,\n- 71 const std::string& path,\n- 72 const std::string& extendpath )\n- 73 : VTKSequenceWriterBase(vtkWriter,\n- 74 name,\n- 75 path,\n- 76 extendpath,\n- 77 vtkWriter->gridView_.comm().rank(),\n- 78 vtkWriter->gridView_.comm().size())\n- 79 {}\n+ 51 template \n+52 class StarCDReader {\n+ 53\n+ 54 public:\n+ 55\n+65 static std::unique_ptr read(const std::string& fileName, bool\n+verbose = true)\n+ 66 {\n+ 67 // extract the grid dimension\n+ 68 const int dim = GridType::dimension;\n+ 69\n+ 70 // currently only dim = 3 is implemented\n+ 71 if (dim != 3)\n+ 72 DUNE_THROW(Dune::NotImplemented,\n+ 73 \"Reading Star-CD format is not implemented for dimension \" << dim);\n+ 74\n+ 75 // set up the grid factory\n+ 76 GridFactory factory;\n+ 77\n+ 78 // set the name of the vertex file\n+ 79 std::string vertexFileName = fileName + \".vrt\";\n 80\n-87 explicit VTKSequenceWriter ( const GridView &gridView,\n- 88 const std::string& name,\n- 89 const std::string& path,\n- 90 const std::string& extendpath,\n- 91 VTK::DataMode dm = VTK::conforming )\n- 92 : VTKSequenceWriterBase(std::make_shared >\n-(gridView,dm),\n- 93 name,path,extendpath,\n- 94 gridView.comm().rank(), gridView.comm().size())\n- 95 {}\n- 96 };\n- 97\n- 98} // end namespace Dune\n- 99\n- 100#endif\n-vtksequencewriterbase.hh\n-subsamplingvtkwriter.hh\n-Provides subsampled file i/o for the visualization toolkit.\n-vtkwriter.hh\n-Provides file i/o for the visualization toolkit.\n-std\n-STL namespace.\n+ 81 // set the vertex input stream\n+ 82 std::ifstream vertexFile(vertexFileName.c_str());\n+ 83 if (!vertexFile)\n+ 84 DUNE_THROW(Dune::IOError, \"Could not open \" << vertexFileName);\n+ 85\n+ 86 // read the vertices\n+ 87 int dummyIdx;\n+ 88 int numberOfVertices = 0;\n+ 89 while (vertexFile >> dummyIdx) {\n+ 90 numberOfVertices++;\n+ 91\n+ 92 Dune::FieldVector position;\n+ 93\n+ 94 for (int k = 0; k < dim; k++)\n+ 95 vertexFile >> position[k];\n+ 96\n+ 97 factory.insertVertex(position);\n+ 98 }\n+ 99 if (verbose)\n+ 100 std::cout << numberOfVertices << \" vertices read.\" << std::endl;\n+ 101\n+ 102 // set the name of the element file\n+ 103 std::string elementFileName = fileName + \".cel\";\n+ 104\n+ 105 // set the element input stream\n+ 106 std::ifstream elementFile(elementFileName.c_str());\n+ 107 if (!elementFile)\n+ 108 DUNE_THROW(Dune::IOError, \"Could not open \" << elementFileName);\n+ 109\n+ 110 // read the elements\n+ 111 int numberOfElements = 0;\n+ 112 int numberOfSimplices = 0;\n+ 113 int numberOfPyramids = 0;\n+ 114 int numberOfPrisms = 0;\n+ 115 int numberOfCubes = 0;;\n+ 116 int maxNumberOfVertices = (int)pow(2, dim);\n+ 117 int isVolume = 1;\n+ 118 while (elementFile >> dummyIdx) {\n+ 119 std::vector vertices(maxNumberOfVertices);\n+ 120 for (int k = 0; k < maxNumberOfVertices; k++)\n+ 121 elementFile >> vertices[k];\n+ 122\n+ 123 int boundaryId;\n+ 124 elementFile >> boundaryId;\n+ 125\n+ 126 int volumeOrSurface[2];\n+ 127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1];\n+ 128\n+ 129 if (volumeOrSurface[0] == isVolume) {\n+ 130 numberOfElements++;\n+ 131\n+ 132 if (vertices[2] == vertices[3]) { // simplex or prism\n+ 133 if (vertices[4] == vertices[5]) { // simplex\n+ 134 numberOfSimplices++;\n+ 135 std::vector simplexVertices(4);\n+ 136 for (int k = 0; k < 3; k++)\n+ 137 simplexVertices[k] = vertices[k] - 1;\n+ 138 simplexVertices[3] = vertices[4] - 1;\n+ 139 factory.insertElement(Dune::GeometryTypes::tetrahedron, simplexVertices);\n+ 140 }\n+ 141 else { // prism\n+ 142 numberOfPrisms++;\n+ 143 std::vector prismVertices(6);\n+ 144 for (int k = 0; k < 3; k++)\n+ 145 prismVertices[k] = vertices[k] - 1;\n+ 146 for (int k = 3; k < 6; k++)\n+ 147 prismVertices[k] = vertices[k+1] - 1;\n+ 148 factory.insertElement(Dune::GeometryTypes::prism, prismVertices);\n+ 149 }\n+ 150 }\n+ 151 else { // cube or pyramid\n+ 152 if (vertices[4] == vertices[5]) { // pyramid\n+ 153 numberOfPyramids++;\n+ 154 std::vector pyramidVertices(5);\n+ 155 for (int k = 0; k < 5; k++)\n+ 156 pyramidVertices[k] = vertices[k] - 1;\n+ 157 factory.insertElement(Dune::GeometryTypes::pyramid, pyramidVertices);\n+ 158 }\n+ 159 else { // cube\n+ 160 numberOfCubes++;\n+ 161 std::vector cubeVertices(8);\n+ 162 for (int k = 0; k < 8; k++)\n+ 163 cubeVertices[k] = vertices[k] - 1;\n+ 164 std::swap(cubeVertices[2], cubeVertices[3]);\n+ 165 std::swap(cubeVertices[6], cubeVertices[7]);\n+ 166 factory.insertElement(Dune::GeometryTypes::hexahedron, cubeVertices);\n+ 167 }\n+ 168 }\n+ 169 }\n+ 170 }\n+ 171 if (verbose)\n+ 172 std::cout << numberOfElements << \" elements read: \"\n+ 173 << numberOfSimplices << \" simplices, \" << numberOfPyramids << \" pyramids,\n+\"\n+ 174 << numberOfPrisms << \" prisms, \" << numberOfCubes << \" cubes.\" << std::\n+endl;\n+ 175\n+ 176 // finish off the construction of the grid object\n+ 177 if (verbose)\n+ 178 std::cout << \"Starting createGrid() ... \" << std::flush;\n+ 179\n+ 180 return factory.createGrid();\n+ 181\n+ 182 }\n+ 183\n+ 184 };\n+ 185\n+ 186}\n+ 187\n+ 188#endif\n+std::swap\n+void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n+> &b)\n+Definition: utility/persistentcontainer.hh:83\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::DataMode\n-DataMode\n-Whether to produce conforming or non-conforming output.\n-Definition: common.hh:67\n-Dune::VTK::conforming\n-@ conforming\n-Output conforming data.\n-Definition: common.hh:73\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::VTKSequenceWriter\n-Writer for the ouput of grid functions in the vtk format.\n-Definition: vtksequencewriter.hh:29\n-Dune::VTKSequenceWriter::VTKSequenceWriter\n-VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const\n-std::string &name, const std::string &path, const std::string &extendpath)\n-Constructor with a given VTKWriter or SubsamplingVTKWriter.\n-Definition: vtksequencewriter.hh:69\n-Dune::VTKSequenceWriter::VTKSequenceWriter\n-VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const\n-std::string &name)\n-Constructor with a given VTKWriter or SubsamplingVTKWriter.\n-Definition: vtksequencewriter.hh:42\n-Dune::VTKSequenceWriter::VTKSequenceWriter\n-VTKSequenceWriter(const GridView &gridView, const std::string &name, const\n-std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK::\n-conforming)\n-Constructor creating its own VTKWriter object.\n-Definition: vtksequencewriter.hh:87\n-Dune::VTKSequenceWriterBase\n-Base class to write pvd-files which contains a list of all collected vtk-files.\n-Definition: vtksequencewriterbase.hh:34\n-Dune::VTKSequenceWriterBase::vtkWriter\n-const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const\n-Definition: vtksequencewriterbase.hh:63\n-Dune::VTKWriter\n-Writer for the ouput of grid functions in the vtk format.\n-Definition: vtkwriter.hh:95\n+Dune::VTK::pyramid\n+@ pyramid\n+Definition: common.hh:141\n+Dune::VTK::tetrahedron\n+@ tetrahedron\n+Definition: common.hh:138\n+Dune::VTK::prism\n+@ prism\n+Definition: common.hh:140\n+Dune::VTK::hexahedron\n+@ hexahedron\n+Definition: common.hh:139\n+Dune::GridFactory\n+Provide a generic factory class for unstructured grids.\n+Definition: common/gridfactory.hh:314\n+Dune::GridFactory::insertElement\n+virtual void insertElement(const GeometryType &type, const std::vector<\n+unsigned int > &vertices)\n+Insert an element into the coarse grid.\n+Definition: common/gridfactory.hh:346\n+Dune::GridFactory::insertVertex\n+virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)\n+Insert a vertex into the coarse grid.\n+Definition: common/gridfactory.hh:335\n+Dune::GridFactory::createGrid\n+virtual std::unique_ptr< GridType > createGrid()\n+Finalize grid creation and hand over the grid.\n+Definition: common/gridfactory.hh:372\n+Dune::StarCDReader\n+File reader for the Star-CD format.\n+Definition: starcdreader.hh:52\n+Dune::StarCDReader::read\n+static std::unique_ptr< GridType > read(const std::string &fileName, bool\n+verbose=true)\n+Read grid from a Star-CD file.\n+Definition: starcdreader.hh:65\n+gridfactory.hh\n+Provide a generic factory class for unstructured grids.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00761.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00761.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: corneriterator.hh File Reference\n+dune-grid: vtk.hh File Reference\n \n \n \n \n \n \n \n@@ -58,46 +58,33 @@\n \n \n \n \n \n
    \n- \n-
    corneriterator.hh File Reference
    \n+
    vtk.hh File Reference
    \n
    \n
    \n-
    #include <iterator>
    \n-#include <dune/common/iteratorfacades.hh>
    \n-#include <dune/common/typetraits.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/io/file/vtk/corner.hh>
    \n+\n+

    Convenience header which includes all available VTK writers. \n+More...

    \n+\n

    Go to the source code of this file.

    \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::VTK::CornerIterator< CellIterator >
     iterate over the corners of some cell range More...
     
    \n-\n-\n-\n-\n-\n-\n-

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-
    \n+

    Detailed Description

    \n+

    Convenience header which includes all available VTK writers.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,29 +6,20 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-Classes | Namespaces\n-corneriterator.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n+vtk.hh File Reference\n+Convenience header which includes all available VTK writers. More...\n+#include \"vtk/boundarywriter.hh\"\n+#include \"vtk/subsamplingvtkwriter.hh\"\n+#include \"vtk/vtksequencewriter.hh\"\n+#include \"vtk/vtkwriter.hh\"\n+#include \"vtk/volumewriter.hh\"\n Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::VTK::CornerIterator<_CellIterator_>\n-\u00a0 iterate over the corners of some cell range More...\n-\u00a0\n- Namespaces\n-namespace \u00a0Dune\n-\u00a0 Include standard header files.\n-\u00a0\n-namespace \u00a0Dune::VTK\n-\u00a0\n+***** Detailed Description *****\n+Convenience header which includes all available VTK writers.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00761_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: corneriterator.hh Source File\n+dune-grid: vtk.hh Source File\n \n \n \n \n \n \n \n@@ -58,156 +58,41 @@\n \n \n \n \n \n
    \n-
    corneriterator.hh
    \n+
    vtk.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_HH
    \n
    8
    \n-
    9#include <iterator>
    \n-
    10
    \n-
    11#include <dune/common/iteratorfacades.hh>
    \n-
    12#include <dune/common/typetraits.hh>
    \n-
    13
    \n-
    14#include <dune/geometry/referenceelements.hh>
    \n-
    15
    \n-\n-
    17
    \n-
    18namespace Dune
    \n-
    19{
    \n-
    22
    \n-
    23 namespace VTK {
    \n-
    24
    \n-
    26
    \n-
    30 template<typename CellIterator>
    \n-\n-
    32 : public ForwardIteratorFacade
    \n-
    33 < CornerIterator<CellIterator>,
    \n-
    34 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n-
    35 CellIterator>::value_type>::type>,
    \n-
    36 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n-
    37 CellIterator>::value_type>::type>&,
    \n-
    38 typename std::iterator_traits<CellIterator>::difference_type>
    \n-
    39 {
    \n-
    40 public:
    \n-
    41 // reiterate the facades typedefs here
    \n-\n-
    43 typedef VTK::Corner<typename std::remove_const<typename std::iterator_traits<
    \n-
    44 CellIterator>::value_type>::type> Corner;
    \n-
    45 typedef const Corner Value;
    \n-
    46 typedef Value& Reference;
    \n-
    47 typedef typename std::iterator_traits<CellIterator>::difference_type
    \n-\n-
    49
    \n-
    50 typedef typename std::iterator_traits<CellIterator>::value_type::Geometry::ctype
    \n-\n-
    52 static const unsigned dim = std::iterator_traits<CellIterator>::
    \n-
    53 value_type::mydimension;
    \n-
    54 typedef ReferenceElements<ctype, dim> Refelems;
    \n-
    55
    \n-
    56 private:
    \n-
    57 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
    \n-
    58 DifferenceType> Facade;
    \n-
    59
    \n-
    60 CellIterator cellit;
    \n-
    61 CellIterator cellend;
    \n-
    62 Corner corner;
    \n-
    63
    \n-
    64 public:
    \n-\n-
    66 return corner;
    \n-
    67 }
    \n-
    68
    \n-
    69 bool isDereferencable() const {
    \n-
    70 return cellit != cellend;
    \n-
    71 }
    \n-
    72
    \n-
    73 bool equals(const DerivedType& other) const {
    \n-
    74 bool mePassedTheEnd = !isDereferencable();
    \n-
    75 bool otherPassedTheEnd = !other.isDereferencable();
    \n-
    76 // both are passed the end => return true
    \n-
    77 if(mePassedTheEnd && otherPassedTheEnd) return true;
    \n-
    78 // one is passed the end => return false
    \n-
    79 if(mePassedTheEnd || otherPassedTheEnd) return false;
    \n-
    80 // none is passed the end, do their iterators and indices match?
    \n-
    81 return cellit == other.cellit &&
    \n-
    82 corner.duneIndex() == other.corner.duneIndex();
    \n-
    83 }
    \n-
    84
    \n-
    85 void increment() {
    \n-
    86 int index = corner.vtkIndex();
    \n-
    87 ++index;
    \n-
    88 if(index == Refelems::general(cellit->type()).size(dim)) {
    \n-
    89 ++cellit;
    \n-
    90 if(cellit != cellend) {
    \n-
    91 corner.cell(*cellit);
    \n-
    92 corner.vtkIndex(0);
    \n-
    93 }
    \n-
    94 }
    \n-
    95 else
    \n-
    96 corner.vtkIndex(index);
    \n-
    97 }
    \n-
    98
    \n-
    100
    \n-
    105 CornerIterator(const CellIterator& cellit_, const CellIterator& cellend_,
    \n-
    106 unsigned vtkIndex = 0)
    \n-
    107 : cellit(cellit_), cellend(cellend_)
    \n-
    108 {
    \n-
    109 if(cellit != cellend) {
    \n-
    110 corner.cell(*cellit);
    \n-
    111 corner.vtkIndex(vtkIndex);
    \n-
    112 }
    \n-
    113 }
    \n-
    115
    \n-
    118 CornerIterator(const CellIterator& cellend_)
    \n-
    119 : cellit(cellend_), cellend(cellend_)
    \n-
    120 { }
    \n-
    121 };
    \n-
    122
    \n-
    123 } // namespace VTK
    \n-
    124
    \n-
    126
    \n-
    127} // namespace Dune
    \n-
    128
    \n-
    129#endif // DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
    \n-\n-
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n-
    unsigned vtkIndex() const
    get the index of the corner within the cell in VTK-numbering
    Definition: corner.hh:63
    \n-
    unsigned duneIndex() const
    get the index of the corner within the cell in Dune-numbering
    Definition: corner.hh:55
    \n-
    const Cell & cell() const
    get reference to the cell
    Definition: corner.hh:46
    \n-
    iterate over the corners of some cell range
    Definition: corneriterator.hh:39
    \n-
    Value & Reference
    Definition: corneriterator.hh:46
    \n-
    VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
    Definition: corneriterator.hh:44
    \n-
    void increment()
    Definition: corneriterator.hh:85
    \n-
    Reference dereference() const
    Definition: corneriterator.hh:65
    \n-
    std::iterator_traits< CellIterator >::difference_type DifferenceType
    Definition: corneriterator.hh:48
    \n-
    static const unsigned dim
    Definition: corneriterator.hh:52
    \n-
    ReferenceElements< ctype, dim > Refelems
    Definition: corneriterator.hh:54
    \n-
    const Corner Value
    Definition: corneriterator.hh:45
    \n-
    CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_, unsigned vtkIndex=0)
    construct a CornerIterator
    Definition: corneriterator.hh:105
    \n-
    CornerIterator(const CellIterator &cellend_)
    construct a CornerIterator
    Definition: corneriterator.hh:118
    \n-
    bool equals(const DerivedType &other) const
    Definition: corneriterator.hh:73
    \n-
    CornerIterator< CellIterator > DerivedType
    Definition: corneriterator.hh:42
    \n-
    std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype
    Definition: corneriterator.hh:51
    \n-
    bool isDereferencable() const
    Definition: corneriterator.hh:69
    \n+
    13#include "vtk/boundarywriter.hh"
    \n+\n+\n+
    16#include "vtk/vtkwriter.hh"
    \n+
    17#include "vtk/volumewriter.hh"
    \n+
    18
    \n+
    19#endif // DUNE_GRID_IO_FILE_VTK_HH
    \n+\n+
    Provides subsampled file i/o for the visualization toolkit.
    \n+
    Provides file i/o for the visualization toolkit.
    \n+\n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,198 +6,35 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-corneriterator.hh\n+vtk.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_HH\n 8\n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13\n- 14#include \n- 15\n- 16#include \n- 17\n- 18namespace Dune\n- 19{\n- 22\n- 23 namespace VTK {\n- 24\n- 26\n- 30 template\n-31 class CornerIterator\n- 32 : public ForwardIteratorFacade\n- 33 < CornerIterator,\n- 34 const Corner::value_type>::type>,\n- 36 const Corner::value_type>::type>&,\n- 38 typename std::iterator_traits::difference_type>\n- 39 {\n- 40 public:\n- 41 // reiterate the facades typedefs here\n-42 typedef CornerIterator DerivedType;\n- 43 typedef VTK::Corner::value_type>::type> Corner;\n-45 typedef const Corner Value;\n-46 typedef Value& Reference;\n- 47 typedef typename std::iterator_traits::difference_type\n-48 DifferenceType;\n- 49\n- 50 typedef typename std::iterator_traits::value_type::Geometry::\n-ctype\n-51 ctype;\n-52 static const unsigned dim = std::iterator_traits::\n- 53 value_type::mydimension;\n-54 typedef ReferenceElements Refelems;\n- 55\n- 56 private:\n- 57 typedef ForwardIteratorFacade Facade;\n- 59\n- 60 CellIterator cellit;\n- 61 CellIterator cellend;\n- 62 Corner corner;\n- 63\n- 64 public:\n-65 Reference dereference() const {\n- 66 return corner;\n- 67 }\n- 68\n-69 bool isDereferencable() const {\n- 70 return cellit != cellend;\n- 71 }\n- 72\n-73 bool equals(const DerivedType& other) const {\n- 74 bool mePassedTheEnd = !isDereferencable();\n- 75 bool otherPassedTheEnd = !other.isDereferencable();\n- 76 // both are passed the end => return true\n- 77 if(mePassedTheEnd && otherPassedTheEnd) return true;\n- 78 // one is passed the end => return false\n- 79 if(mePassedTheEnd || otherPassedTheEnd) return false;\n- 80 // none is passed the end, do their iterators and indices match?\n- 81 return cellit == other.cellit &&\n- 82 corner.duneIndex() == other.corner.duneIndex();\n- 83 }\n- 84\n-85 void increment() {\n- 86 int index = corner.vtkIndex();\n- 87 ++index;\n- 88 if(index == Refelems::general(cellit->type()).size(dim)) {\n- 89 ++cellit;\n- 90 if(cellit != cellend) {\n- 91 corner.cell(*cellit);\n- 92 corner.vtkIndex(0);\n- 93 }\n- 94 }\n- 95 else\n- 96 corner.vtkIndex(index);\n- 97 }\n- 98\n- 100\n-105 CornerIterator(const CellIterator& cellit_, const CellIterator& cellend_,\n- 106 unsigned vtkIndex = 0)\n- 107 : cellit(cellit_), cellend(cellend_)\n- 108 {\n- 109 if(cellit != cellend) {\n- 110 corner.cell(*cellit);\n- 111 corner.vtkIndex(vtkIndex);\n- 112 }\n- 113 }\n- 115\n-118 CornerIterator(const CellIterator& cellend_)\n- 119 : cellit(cellend_), cellend(cellend_)\n- 120 { }\n- 121 };\n- 122\n- 123 } // namespace VTK\n- 124\n- 126\n- 127} // namespace Dune\n- 128\n- 129#endif // DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH\n-corner.hh\n-Dune\n-Include standard header files.\n-Definition: agrid.hh:60\n-Dune::VTK::Corner\n-simple class representing a corner of a cell\n-Definition: corner.hh:25\n-Dune::VTK::Corner::vtkIndex\n-unsigned vtkIndex() const\n-get the index of the corner within the cell in VTK-numbering\n-Definition: corner.hh:63\n-Dune::VTK::Corner::duneIndex\n-unsigned duneIndex() const\n-get the index of the corner within the cell in Dune-numbering\n-Definition: corner.hh:55\n-Dune::VTK::Corner::cell\n-const Cell & cell() const\n-get reference to the cell\n-Definition: corner.hh:46\n-Dune::VTK::CornerIterator\n-iterate over the corners of some cell range\n-Definition: corneriterator.hh:39\n-Dune::VTK::CornerIterator::Reference\n-Value & Reference\n-Definition: corneriterator.hh:46\n-Dune::VTK::CornerIterator::Corner\n-VTK::Corner< typename std::remove_const< typename std::iterator_traits<\n-CellIterator >::value_type >::type > Corner\n-Definition: corneriterator.hh:44\n-Dune::VTK::CornerIterator::increment\n-void increment()\n-Definition: corneriterator.hh:85\n-Dune::VTK::CornerIterator::dereference\n-Reference dereference() const\n-Definition: corneriterator.hh:65\n-Dune::VTK::CornerIterator::DifferenceType\n-std::iterator_traits< CellIterator >::difference_type DifferenceType\n-Definition: corneriterator.hh:48\n-Dune::VTK::CornerIterator::dim\n-static const unsigned dim\n-Definition: corneriterator.hh:52\n-Dune::VTK::CornerIterator::Refelems\n-ReferenceElements< ctype, dim > Refelems\n-Definition: corneriterator.hh:54\n-Dune::VTK::CornerIterator::Value\n-const Corner Value\n-Definition: corneriterator.hh:45\n-Dune::VTK::CornerIterator::CornerIterator\n-CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_,\n-unsigned vtkIndex=0)\n-construct a CornerIterator\n-Definition: corneriterator.hh:105\n-Dune::VTK::CornerIterator::CornerIterator\n-CornerIterator(const CellIterator &cellend_)\n-construct a CornerIterator\n-Definition: corneriterator.hh:118\n-Dune::VTK::CornerIterator::equals\n-bool equals(const DerivedType &other) const\n-Definition: corneriterator.hh:73\n-Dune::VTK::CornerIterator::DerivedType\n-CornerIterator< CellIterator > DerivedType\n-Definition: corneriterator.hh:42\n-Dune::VTK::CornerIterator::ctype\n-std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype\n-Definition: corneriterator.hh:51\n-Dune::VTK::CornerIterator::isDereferencable\n-bool isDereferencable() const\n-Definition: corneriterator.hh:69\n+ 13#include \"vtk/boundarywriter.hh\"\n+ 14#include \"vtk/subsamplingvtkwriter.hh\"\n+ 15#include \"vtk/vtksequencewriter.hh\"\n+ 16#include \"vtk/vtkwriter.hh\"\n+ 17#include \"vtk/volumewriter.hh\"\n+ 18\n+ 19#endif // DUNE_GRID_IO_FILE_VTK_HH\n+boundarywriter.hh\n+subsamplingvtkwriter.hh\n+Provides subsampled file i/o for the visualization toolkit.\n+vtkwriter.hh\n+Provides file i/o for the visualization toolkit.\n+vtksequencewriter.hh\n+volumewriter.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00764.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00764.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: corner.hh File Reference\n+dune-grid: gnuplot.cc File Reference\n \n \n \n \n \n \n \n@@ -58,42 +58,37 @@\n \n \n \n \n \n
    \n \n-
    corner.hh File Reference
    \n+
    gnuplot.cc File Reference
    \n
    \n
    \n-\n-

    Go to the source code of this file.

    \n-\n-\n-\n-\n-\n-

    \n-Classes

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

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

    \n+
    #include "../gnuplot.hh"
    \n+
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-
    \n+

    Detailed Description

    \n+

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

    \n+
    Author
    Christian Engwer
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,25 +6,23 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-Classes | Namespaces\n-corner.hh File Reference\n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::VTK::Corner<_Cell_>\n-\u00a0 simple class representing a corner of a cell More...\n-\u00a0\n+ * gnuplot\n+Namespaces\n+gnuplot.cc File Reference\n+Implementation of gnuplot output for 1D and 2D grids. More...\n+#include \"../gnuplot.hh\"\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::VTK\n-\u00a0\n+***** Detailed Description *****\n+Implementation of gnuplot output for 1D and 2D grids.\n+ Author\n+ Christian Engwer\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00767.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00767.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: b64enc.hh File Reference\n+dune-grid: gmshwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -58,54 +58,49 @@\n \n \n \n \n \n
    \n \n-
    b64enc.hh File Reference
    \n+
    gmshwriter.hh File Reference
    \n
    \n
    \n-\n-

    Simple base64 encode. \n-More...

    \n-
    #include <assert.h>
    \n+
    #include <fstream>
    \n+#include <iostream>
    \n+#include <iomanip>
    \n+#include <string>
    \n+#include <vector>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid/common/mcmgmapper.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n

    \n Classes

    struct  Dune::b64chunk
     struct representing the three byte text as well as the four 6 bit chunks More...
    class  Dune::GmshWriter< GridView >
     Write Gmsh mesh file. More...
     
    \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n-\n-\n

    \n-Variables

    const char Dune::base64table []
     endoing table More...
     
    \n-

    Detailed Description

    \n-

    Simple base64 encode.

    \n-
    Author
    Christian Engwer
    \n-

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

    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,35 +6,31 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n Classes | Namespaces\n-b64enc.hh File Reference\n-Simple base64 encode. More...\n-#include \n+gmshwriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::b64chunk\n-\u00a0 struct representing the three byte text as well as the four 6 bit\n- chunks More...\n+class \u00a0Dune::GmshWriter<_GridView_>\n+\u00a0 Write Gmsh mesh file. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n- Variables\n-const char\u00a0Dune::base64table []\n-\u00a0 endoing table More...\n-\u00a0\n-***** Detailed Description *****\n-Simple base64 encode.\n- Author\n- Christian Engwer\n-We implement the base64 encoding (c.f. RFC 4648 https://tools.ietf.org/html/\n-rfc4648).\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00767_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: b64enc.hh Source File\n+dune-grid: gmshwriter.hh Source File\n \n \n \n \n \n \n \n@@ -58,96 +58,236 @@\n \n \n \n \n \n
    \n-
    b64enc.hh
    \n+
    gmshwriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_B64ENC_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_B64ENC_HH
    \n-
    8
    \n-
    9#include <assert.h>
    \n-
    10
    \n-
    11namespace Dune {
    \n-
    12
    \n-
    23 const char base64table[] =
    \n-
    24 {
    \n-
    25 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
    \n-
    26 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
    \n-
    27 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
    \n-
    28 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
    \n-
    29 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
    \n-
    30 };
    \n-
    31
    \n-
    33 struct b64chunk
    \n-
    34 {
    \n-
    35 using size_type = unsigned char;
    \n-\n-
    37 char txt[3];
    \n-
    38
    \n-
    39 void reset()
    \n-
    40 {
    \n-
    41 size = 0;
    \n-
    42 txt[0] = txt[1] = txt[2] = 0;
    \n-
    43 }
    \n-
    44
    \n-
    45 int read(const char* t, size_type s)
    \n-
    46 {
    \n-
    47 size = s>=3 ? 3 : s;
    \n-
    48 txt[0] = s>0 ? t[0] : 0;
    \n-
    49 txt[1] = s>1 ? t[1] : 0;
    \n-
    50 txt[2] = s>2 ? t[2] : 0;
    \n-
    51 return size;
    \n-
    52 }
    \n-
    53
    \n-
    54 void put(const char c)
    \n-
    55 {
    \n-
    56 assert (size < 3);
    \n-
    57 txt[size++] = c;
    \n-
    58 }
    \n-
    59
    \n-
    60 void write(char* t)
    \n-
    61 {
    \n-
    62 const unsigned A = (txt[0] & 0b1111'1100) >> 2;
    \n-
    63 const unsigned B = (txt[0] & 0b0000'0011) << 4 | (txt[1] & 0b1111'0000) >> 4;
    \n-
    64 const unsigned C = (txt[1] & 0b0000'1111) << 2 | (txt[2] & 0b1100'0000) >> 6;
    \n-
    65 const unsigned D = txt[2] & 0b0011'1111;
    \n-
    66 t[0] = size>0 ? base64table[A] : '=';
    \n-
    67 t[1] = size>0 ? base64table[B] : '=';
    \n-
    68 t[2] = size>1 ? base64table[C] : '=';
    \n-
    69 t[3] = size>2 ? base64table[D] : '=';
    \n-
    70 size = 0;
    \n-
    71 }
    \n-
    72 };
    \n-
    73
    \n-
    76} // namespace Dune
    \n-
    77
    \n-
    78#endif // DUNE_GRID_IO_FILE_VTK_B64ENC_HH
    \n+
    5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH
    \n+
    6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH
    \n+
    7
    \n+
    8#include <fstream>
    \n+
    9#include <iostream>
    \n+
    10#include <iomanip>
    \n+
    11#include <string>
    \n+
    12#include <vector>
    \n+
    13
    \n+
    14#include <dune/common/exceptions.hh>
    \n+
    15#include <dune/geometry/type.hh>
    \n+
    16#include <dune/geometry/referenceelements.hh>
    \n+\n+\n+
    19
    \n+
    20namespace Dune {
    \n+
    21
    \n+
    35 template <class GridView>
    \n+\n+
    37 {
    \n+
    38 private:
    \n+
    39 const GridView gv;
    \n+
    40 int precision;
    \n+
    41
    \n+
    42 static const unsigned int dim = GridView::dimension;
    \n+
    43 static const unsigned int dimWorld = GridView::dimensionworld;
    \n+
    44 static_assert( (dimWorld <= 3), "GmshWriter requires dimWorld <= 3." );
    \n+
    45
    \n+
    47 template<typename Entity>
    \n+
    48 std::size_t nodeIndexFromEntity(const Entity& entity, int i) const {
    \n+
    49 return gv.indexSet().subIndex(entity, i, dim)+1;
    \n+
    50 }
    \n+
    51
    \n+
    55 static std::size_t translateDuneToGmshType(const GeometryType& type) {
    \n+
    56 std::size_t element_type;
    \n+
    57
    \n+
    58 if (type.isLine())
    \n+
    59 element_type = 1;
    \n+
    60 else if (type.isTriangle())
    \n+
    61 element_type = 2;
    \n+
    62 else if (type.isQuadrilateral())
    \n+
    63 element_type = 3;
    \n+
    64 else if (type.isTetrahedron())
    \n+
    65 element_type = 4;
    \n+
    66 else if (type.isHexahedron())
    \n+
    67 element_type = 5;
    \n+
    68 else if (type.isPrism())
    \n+
    69 element_type = 6;
    \n+
    70 else if (type.isPyramid())
    \n+
    71 element_type = 7;
    \n+
    72 else if (type.isVertex())
    \n+
    73 element_type = 15;
    \n+
    74 else
    \n+
    75 DUNE_THROW(Dune::IOError, "GeometryType " << type << " is not supported by gmsh.");
    \n+
    76
    \n+
    77 return element_type;
    \n+
    78 }
    \n+
    79
    \n+
    94 void outputElements(std::ofstream& file, const std::vector<int>& physicalEntities, const std::vector<int>& physicalBoundaries) const {
    \n+\n+
    96 std::size_t counter(1);
    \n+
    97 for (const auto& entity : elements(gv)) {
    \n+
    98 // Check whether the type is compatible. If not, close file and rethrow exception.
    \n+
    99 try {
    \n+
    100 std::size_t element_type = translateDuneToGmshType(entity.type());
    \n+
    101
    \n+
    102 file << counter << " " << element_type;
    \n+
    103 // If present, set the first tag to the physical entity
    \n+
    104 if (!physicalEntities.empty())
    \n+
    105 file << " " << 1 << " " << physicalEntities[elementMapper.index(entity)];
    \n+
    106 else
    \n+
    107 file << " " << 0; // "0" for "I do not use any tags."
    \n+
    108
    \n+
    109 // Output list of nodes.
    \n+
    110 // 3, 5 and 7 got different vertex numbering compared to Dune
    \n+
    111 if (3 == element_type)
    \n+
    112 file << " "
    \n+
    113 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
    \n+
    114 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2);
    \n+
    115 else if (5 == element_type)
    \n+
    116 file << " "
    \n+
    117 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
    \n+
    118 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
    \n+
    119 << nodeIndexFromEntity(entity, 4) << " " << nodeIndexFromEntity(entity, 5) << " "
    \n+
    120 << nodeIndexFromEntity(entity, 7) << " " << nodeIndexFromEntity(entity, 6);
    \n+
    121 else if (7 == element_type)
    \n+
    122 file << " "
    \n+
    123 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
    \n+
    124 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
    \n+
    125 << nodeIndexFromEntity(entity, 4);
    \n+
    126 else {
    \n+
    127 for (int k = 0; k < entity.geometry().corners(); ++k)
    \n+
    128 file << " " << nodeIndexFromEntity(entity, k);
    \n+
    129 }
    \n+
    130 ++counter;
    \n+
    131
    \n+
    132 file << std::endl;
    \n+
    133
    \n+
    134 // Write boundaries
    \n+
    135 if (!physicalBoundaries.empty()) {
    \n+
    136 auto refElement = referenceElement<typename GridView::ctype,dim>(entity.type());
    \n+
    137 for(const auto& intersection : intersections(gv, entity)) {
    \n+
    138 if(intersection.boundary()) {
    \n+
    139 const auto faceLocalIndex(intersection.indexInInside());
    \n+
    140 file << counter << " " << translateDuneToGmshType(intersection.type())
    \n+
    141 << " " << 1 << " " << physicalBoundaries[intersection.boundarySegmentIndex()];
    \n+
    142 for (int k = 0; k < intersection.geometry().corners(); ++k)
    \n+
    143 {
    \n+
    144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim));
    \n+
    145 file << " " << nodeIndexFromEntity(entity, vtxLocalIndex);
    \n+
    146 }
    \n+
    147 ++counter;
    \n+
    148 file << std::endl;
    \n+
    149 }
    \n+
    150 }
    \n+
    151 }
    \n+
    152
    \n+
    153 } catch(Exception& e) {
    \n+
    154 file.close();
    \n+
    155 throw;
    \n+
    156 }
    \n+
    157 }
    \n+
    158 }
    \n+
    159
    \n+
    160
    \n+
    167 void outputNodes(std::ofstream& file) const {
    \n+
    168 for (const auto& vertex : vertices(gv)) {
    \n+
    169 const auto globalCoord = vertex.geometry().center();
    \n+
    170 const auto nodeIndex = gv.indexSet().index(vertex)+1; // Start counting indices by "1".
    \n+
    171
    \n+
    172 if (1 == dimWorld)
    \n+
    173 file << nodeIndex << " " << globalCoord[0] << " " << 0 << " " << 0 << std::endl;
    \n+
    174 else if (2 == dimWorld)
    \n+
    175 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << 0 << std::endl;
    \n+
    176 else // (3 == dimWorld)
    \n+
    177 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << globalCoord[2] << std::endl;
    \n+
    178 }
    \n+
    179 }
    \n+
    180
    \n+
    181 public:
    \n+
    187 GmshWriter(const GridView& gridView, int numDigits=6) : gv(gridView), precision(numDigits) {}
    \n+
    188
    \n+
    193 void setPrecision(int numDigits) {
    \n+
    194 precision = numDigits;
    \n+
    195 }
    \n+
    196
    \n+
    218 void write(const std::string& fileName,
    \n+
    219 const std::vector<int>& physicalEntities=std::vector<int>(),
    \n+
    220 const std::vector<int>& physicalBoundaries=std::vector<int>()) const {
    \n+
    221 // Open file
    \n+
    222 std::ofstream file(fileName.c_str());
    \n+
    223 if (!file.is_open())
    \n+
    224 DUNE_THROW(Dune::IOError, "Could not open " << fileName << " with write access.");
    \n+
    225
    \n+
    226 // Set precision
    \n+
    227 file << std::setprecision( precision );
    \n+
    228
    \n+
    229 // Output Header
    \n+
    230 file << "$MeshFormat" << std::endl
    \n+
    231 << "2.0 0 " << sizeof(double) << std::endl // "2.0" for "version 2.0", "0" for ASCII
    \n+
    232 << "$EndMeshFormat" << std::endl;
    \n+
    233
    \n+
    234 // Output Nodes
    \n+
    235 file << "$Nodes" << std::endl
    \n+
    236 << gv.size(dim) << std::endl;
    \n+
    237
    \n+
    238 outputNodes(file);
    \n+
    239
    \n+
    240 file << "$EndNodes" << std::endl;
    \n+
    241
    \n+
    242 // Output Elements;
    \n+
    243 int boundariesSize(0);
    \n+
    244 if(!physicalBoundaries.empty())
    \n+
    245 for(const auto& entity : elements(gv))
    \n+
    246 for(const auto& intersection : intersections(gv, entity))
    \n+
    247 if(intersection.boundary())
    \n+
    248 ++boundariesSize;
    \n+
    249
    \n+
    250 file << "$Elements" << std::endl
    \n+
    251 << gv.size(0) + boundariesSize<< std::endl;
    \n+
    252
    \n+
    253 outputElements(file, physicalEntities, physicalBoundaries);
    \n+
    254
    \n+
    255 file << "$EndElements" << std::endl;
    \n+
    256 }
    \n+
    257
    \n+
    258 };
    \n+
    259
    \n+
    260} // namespace Dune
    \n+
    261
    \n+
    262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH
    \n+
    Mapper for multiple codim and multiple geometry types.
    \n+
    const IndexSet & indexSet() const
    obtain the index set
    Definition: common/gridview.hh:191
    \n+
    int size(int codim) const
    obtain number of entities in a given codimension
    Definition: common/gridview.hh:197
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n+
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/gridview.hh:151
    \n+
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    const char base64table[]
    endoing table
    Definition: b64enc.hh:23
    \n-
    struct representing the three byte text as well as the four 6 bit chunks
    Definition: b64enc.hh:34
    \n-
    char txt[3]
    Definition: b64enc.hh:37
    \n-
    unsigned char size_type
    Definition: b64enc.hh:35
    \n-
    void write(char *t)
    Definition: b64enc.hh:60
    \n-
    size_type size
    Definition: b64enc.hh:36
    \n-
    int read(const char *t, size_type s)
    Definition: b64enc.hh:45
    \n-
    void put(const char c)
    Definition: b64enc.hh:54
    \n-
    void reset()
    Definition: b64enc.hh:39
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    @ vertex
    Definition: common.hh:133
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    Geometry geometry() const
    obtain geometric realization of the entity
    Definition: common/entity.hh:141
    \n+
    GeometryType type() const
    Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
    Definition: common/entity.hh:146
    \n+
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n+
    Implementation class for a multiple codim and multiple geometry type mapper.
    Definition: mcmgmapper.hh:129
    \n+
    Index index(const EntityType &e) const
    Map entity to starting index in array for dof block.
    Definition: mcmgmapper.hh:171
    \n+
    Write Gmsh mesh file.
    Definition: gmshwriter.hh:37
    \n+
    GmshWriter(const GridView &gridView, int numDigits=6)
    Constructor expecting GridView of Grid to be written.
    Definition: gmshwriter.hh:187
    \n+
    void setPrecision(int numDigits)
    Set the number of digits to be used when writing the vertices. By default is 6.
    Definition: gmshwriter.hh:193
    \n+
    void write(const std::string &fileName, const std::vector< int > &physicalEntities=std::vector< int >(), const std::vector< int > &physicalBoundaries=std::vector< int >()) const
    Write given grid in Gmsh 2.0 compatible ASCII file.
    Definition: gmshwriter.hh:218
    \n+
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,112 +6,302 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-b64enc.hh\n+gmshwriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_B64ENC_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_B64ENC_HH\n- 8\n- 9#include \n- 10\n- 11namespace Dune {\n- 12\n-23 const char base64table[] =\n- 24 {\n- 25 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n- 26 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n- 27 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',\n- 28 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n- 29 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'\n- 30 };\n- 31\n-33 struct b64chunk\n- 34 {\n-35 using size_type = unsigned char;\n-36 size_type size;\n-37 char txt[3];\n- 38\n-39 void reset()\n- 40 {\n- 41 size = 0;\n- 42 txt[0] = txt[1] = txt[2] = 0;\n- 43 }\n- 44\n-45 int read(const char* t, size_type s)\n- 46 {\n- 47 size = s>=3 ? 3 : s;\n- 48 txt[0] = s>0 ? t[0] : 0;\n- 49 txt[1] = s>1 ? t[1] : 0;\n- 50 txt[2] = s>2 ? t[2] : 0;\n- 51 return size;\n- 52 }\n- 53\n-54 void put(const char c)\n- 55 {\n- 56 assert (size < 3);\n- 57 txt[size++] = c;\n- 58 }\n- 59\n-60 void write(char* t)\n- 61 {\n- 62 const unsigned A = (txt[0] & 0b1111'1100) >> 2;\n- 63 const unsigned B = (txt[0] & 0b0000'0011) << 4 | (txt[1] & 0b1111'0000) >>\n-4;\n- 64 const unsigned C = (txt[1] & 0b0000'1111) << 2 | (txt[2] & 0b1100'0000) >>\n-6;\n- 65 const unsigned D = txt[2] & 0b0011'1111;\n- 66 t[0] = size>0 ? base64table[A] : '=';\n- 67 t[1] = size>0 ? base64table[B] : '=';\n- 68 t[2] = size>1 ? base64table[C] : '=';\n- 69 t[3] = size>2 ? base64table[D] : '=';\n- 70 size = 0;\n- 71 }\n- 72 };\n- 73\n- 76} // namespace Dune\n- 77\n- 78#endif // DUNE_GRID_IO_FILE_VTK_B64ENC_HH\n+ 5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH\n+ 6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH\n+ 7\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16#include \n+ 17#include \n+ 18#include \n+ 19\n+ 20namespace Dune {\n+ 21\n+ 35 template \n+36 class GmshWriter\n+ 37 {\n+ 38 private:\n+ 39 const GridView gv;\n+ 40 int precision;\n+ 41\n+ 42 static const unsigned int dim = GridView::dimension;\n+ 43 static const unsigned int dimWorld = GridView::dimensionworld;\n+ 44 static_assert( (dimWorld <= 3), \"GmshWriter requires dimWorld <= 3.\" );\n+ 45\n+ 47 template\n+ 48 std::size_t nodeIndexFromEntity(const Entity& entity, int i) const {\n+ 49 return gv.indexSet().subIndex(entity, i, dim)+1;\n+ 50 }\n+ 51\n+ 55 static std::size_t translateDuneToGmshType(const GeometryType& type) {\n+ 56 std::size_t element_type;\n+ 57\n+ 58 if (type.isLine())\n+ 59 element_type = 1;\n+ 60 else if (type.isTriangle())\n+ 61 element_type = 2;\n+ 62 else if (type.isQuadrilateral())\n+ 63 element_type = 3;\n+ 64 else if (type.isTetrahedron())\n+ 65 element_type = 4;\n+ 66 else if (type.isHexahedron())\n+ 67 element_type = 5;\n+ 68 else if (type.isPrism())\n+ 69 element_type = 6;\n+ 70 else if (type.isPyramid())\n+ 71 element_type = 7;\n+ 72 else if (type.isVertex())\n+ 73 element_type = 15;\n+ 74 else\n+ 75 DUNE_THROW(Dune::IOError, \"GeometryType \" << type << \" is not supported by\n+gmsh.\");\n+ 76\n+ 77 return element_type;\n+ 78 }\n+ 79\n+ 94 void outputElements(std::ofstream& file, const std::vector&\n+physicalEntities, const std::vector& physicalBoundaries) const {\n+ 95 MultipleCodimMultipleGeomTypeMapper elementMapper(gv,\n+mcmgElementLayout());\n+ 96 std::size_t counter(1);\n+ 97 for (const auto& entity : elements(gv)) {\n+ 98 // Check whether the type is compatible. If not, close file and rethrow\n+exception.\n+ 99 try {\n+ 100 std::size_t element_type = translateDuneToGmshType(entity.type());\n+ 101\n+ 102 file << counter << \" \" << element_type;\n+ 103 // If present, set the first tag to the physical entity\n+ 104 if (!physicalEntities.empty())\n+ 105 file << \" \" << 1 << \" \" << physicalEntities[elementMapper.index(entity)];\n+ 106 else\n+ 107 file << \" \" << 0; // \"0\" for \"I do not use any tags.\"\n+ 108\n+ 109 // Output list of nodes.\n+ 110 // 3, 5 and 7 got different vertex numbering compared to Dune\n+ 111 if (3 == element_type)\n+ 112 file << \" \"\n+ 113 << nodeIndexFromEntity(entity, 0) << \" \" << nodeIndexFromEntity(entity, 1)\n+<< \" \"\n+ 114 << nodeIndexFromEntity(entity, 3) << \" \" << nodeIndexFromEntity(entity,\n+2);\n+ 115 else if (5 == element_type)\n+ 116 file << \" \"\n+ 117 << nodeIndexFromEntity(entity, 0) << \" \" << nodeIndexFromEntity(entity, 1)\n+<< \" \"\n+ 118 << nodeIndexFromEntity(entity, 3) << \" \" << nodeIndexFromEntity(entity, 2)\n+<< \" \"\n+ 119 << nodeIndexFromEntity(entity, 4) << \" \" << nodeIndexFromEntity(entity, 5)\n+<< \" \"\n+ 120 << nodeIndexFromEntity(entity, 7) << \" \" << nodeIndexFromEntity(entity,\n+6);\n+ 121 else if (7 == element_type)\n+ 122 file << \" \"\n+ 123 << nodeIndexFromEntity(entity, 0) << \" \" << nodeIndexFromEntity(entity, 1)\n+<< \" \"\n+ 124 << nodeIndexFromEntity(entity, 3) << \" \" << nodeIndexFromEntity(entity, 2)\n+<< \" \"\n+ 125 << nodeIndexFromEntity(entity, 4);\n+ 126 else {\n+ 127 for (int k = 0; k < entity.geometry().corners(); ++k)\n+ 128 file << \" \" << nodeIndexFromEntity(entity, k);\n+ 129 }\n+ 130 ++counter;\n+ 131\n+ 132 file << std::endl;\n+ 133\n+ 134 // Write boundaries\n+ 135 if (!physicalBoundaries.empty()) {\n+ 136 auto refElement = referenceElement\n+(entity.type());\n+ 137 for(const auto& intersection : intersections(gv, entity)) {\n+ 138 if(intersection.boundary()) {\n+ 139 const auto faceLocalIndex(intersection.indexInInside());\n+ 140 file << counter << \" \" << translateDuneToGmshType(intersection.type())\n+ 141 << \" \" << 1 << \" \" << physicalBoundaries[intersection.boundarySegmentIndex\n+()];\n+ 142 for (int k = 0; k < intersection.geometry().corners(); ++k)\n+ 143 {\n+ 144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim));\n+ 145 file << \" \" << nodeIndexFromEntity(entity, vtxLocalIndex);\n+ 146 }\n+ 147 ++counter;\n+ 148 file << std::endl;\n+ 149 }\n+ 150 }\n+ 151 }\n+ 152\n+ 153 } catch(Exception& e) {\n+ 154 file.close();\n+ 155 throw;\n+ 156 }\n+ 157 }\n+ 158 }\n+ 159\n+ 160\n+ 167 void outputNodes(std::ofstream& file) const {\n+ 168 for (const auto& vertex : vertices(gv)) {\n+ 169 const auto globalCoord = vertex.geometry().center();\n+ 170 const auto nodeIndex = gv.indexSet().index(vertex)+1; // Start counting\n+indices by \"1\".\n+ 171\n+ 172 if (1 == dimWorld)\n+ 173 file << nodeIndex << \" \" << globalCoord[0] << \" \" << 0 << \" \" << 0 <<\n+std::endl;\n+ 174 else if (2 == dimWorld)\n+ 175 file << nodeIndex << \" \" << globalCoord[0] << \" \" << globalCoord[1] << \" \"\n+<< 0 << std::endl;\n+ 176 else // (3 == dimWorld)\n+ 177 file << nodeIndex << \" \" << globalCoord[0] << \" \" << globalCoord[1] << \" \"\n+<< globalCoord[2] << std::endl;\n+ 178 }\n+ 179 }\n+ 180\n+ 181 public:\n+187 GmshWriter(const GridView& gridView, int numDigits=6) : gv(gridView),\n+precision(numDigits) {}\n+ 188\n+193 void setPrecision(int numDigits) {\n+ 194 precision = numDigits;\n+ 195 }\n+ 196\n+218 void write(const std::string& fileName,\n+ 219 const std::vector& physicalEntities=std::vector(),\n+ 220 const std::vector& physicalBoundaries=std::vector()) const {\n+ 221 // Open file\n+ 222 std::ofstream file(fileName.c_str());\n+ 223 if (!file.is_open())\n+ 224 DUNE_THROW(Dune::IOError, \"Could not open \" << fileName << \" with write\n+access.\");\n+ 225\n+ 226 // Set precision\n+ 227 file << std::setprecision( precision );\n+ 228\n+ 229 // Output Header\n+ 230 file << \"$MeshFormat\" << std::endl\n+ 231 << \"2.0 0 \" << sizeof(double) << std::endl // \"2.0\" for \"version 2.0\", \"0\"\n+for ASCII\n+ 232 << \"$EndMeshFormat\" << std::endl;\n+ 233\n+ 234 // Output Nodes\n+ 235 file << \"$Nodes\" << std::endl\n+ 236 << gv.size(dim) << std::endl;\n+ 237\n+ 238 outputNodes(file);\n+ 239\n+ 240 file << \"$EndNodes\" << std::endl;\n+ 241\n+ 242 // Output Elements;\n+ 243 int boundariesSize(0);\n+ 244 if(!physicalBoundaries.empty())\n+ 245 for(const auto& entity : elements(gv))\n+ 246 for(const auto& intersection : intersections(gv, entity))\n+ 247 if(intersection.boundary())\n+ 248 ++boundariesSize;\n+ 249\n+ 250 file << \"$Elements\" << std::endl\n+ 251 << gv.size(0) + boundariesSize<< std::endl;\n+ 252\n+ 253 outputElements(file, physicalEntities, physicalBoundaries);\n+ 254\n+ 255 file << \"$EndElements\" << std::endl;\n+ 256 }\n+ 257\n+ 258 };\n+ 259\n+ 260} // namespace Dune\n+ 261\n+ 262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH\n+mcmgmapper.hh\n+Mapper for multiple codim and multiple geometry types.\n+Dune::GridView::indexSet\n+const IndexSet & indexSet() const\n+obtain the index set\n+Definition: common/gridview.hh:191\n+Dune::GridView::size\n+int size(int codim) const\n+obtain number of entities in a given codimension\n+Definition: common/gridview.hh:197\n+Dune::GridView::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/gridview.hh:148\n+Dune::GridView::dimensionworld\n+static constexpr int dimensionworld\n+The dimension of the world the grid lives in.\n+Definition: common/gridview.hh:151\n+Dune::mcmgElementLayout\n+MCMGLayout mcmgElementLayout()\n+layout for elements (codim-0 entities)\n+Definition: mcmgmapper.hh:97\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::base64table\n-const char base64table[]\n-endoing table\n-Definition: b64enc.hh:23\n-Dune::b64chunk\n-struct representing the three byte text as well as the four 6 bit chunks\n-Definition: b64enc.hh:34\n-Dune::b64chunk::txt\n-char txt[3]\n-Definition: b64enc.hh:37\n-Dune::b64chunk::size_type\n-unsigned char size_type\n-Definition: b64enc.hh:35\n-Dune::b64chunk::write\n-void write(char *t)\n-Definition: b64enc.hh:60\n-Dune::b64chunk::size\n-size_type size\n-Definition: b64enc.hh:36\n-Dune::b64chunk::read\n-int read(const char *t, size_type s)\n-Definition: b64enc.hh:45\n-Dune::b64chunk::put\n-void put(const char c)\n-Definition: b64enc.hh:54\n-Dune::b64chunk::reset\n-void reset()\n-Definition: b64enc.hh:39\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::Entity::geometry\n+Geometry geometry() const\n+obtain geometric realization of the entity\n+Definition: common/entity.hh:141\n+Dune::Entity::type\n+GeometryType type() const\n+Return the name of the reference element. The type can be used to access the\n+Dune::ReferenceElement.\n+Definition: common/entity.hh:146\n+Dune::GridView\n+Grid view abstract base class.\n+Definition: common/gridview.hh:66\n+Dune::MultipleCodimMultipleGeomTypeMapper\n+Implementation class for a multiple codim and multiple geometry type mapper.\n+Definition: mcmgmapper.hh:129\n+Dune::MultipleCodimMultipleGeomTypeMapper::index\n+Index index(const EntityType &e) const\n+Map entity to starting index in array for dof block.\n+Definition: mcmgmapper.hh:171\n+Dune::GmshWriter\n+Write Gmsh mesh file.\n+Definition: gmshwriter.hh:37\n+Dune::GmshWriter::GmshWriter\n+GmshWriter(const GridView &gridView, int numDigits=6)\n+Constructor expecting GridView of Grid to be written.\n+Definition: gmshwriter.hh:187\n+Dune::GmshWriter::setPrecision\n+void setPrecision(int numDigits)\n+Set the number of digits to be used when writing the vertices. By default is 6.\n+Definition: gmshwriter.hh:193\n+Dune::GmshWriter::write\n+void write(const std::string &fileName, const std::vector< int >\n+&physicalEntities=std::vector< int >(), const std::vector< int >\n+&physicalBoundaries=std::vector< int >()) const\n+Write given grid in Gmsh 2.0 compatible ASCII file.\n+Definition: gmshwriter.hh:218\n+grid.hh\n+Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00770.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00770.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: basicwriter.hh File Reference\n+dune-grid: gmshreader.hh File Reference\n \n \n \n \n \n \n \n@@ -58,53 +58,83 @@\n \n \n \n \n \n
    \n \n-
    basicwriter.hh File Reference
    \n+Namespaces |\n+Enumerations |\n+Functions
    \n+
    gmshreader.hh File Reference
    \n \n
    \n-
    #include <fstream>
    \n-#include <iomanip>
    \n-#include <iterator>
    \n-#include <list>
    \n+
    #include <cstdarg>
    \n+#include <cstdio>
    \n+#include <cstring>
    \n+#include <fstream>
    \n+#include <iostream>
    \n+#include <map>
    \n #include <memory>
    \n-#include <sstream>
    \n #include <string>
    \n-#include <dune/common/parallel/mpiguard.hh>
    \n-#include <dune/common/path.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/io/file/vtk/common.hh>
    \n-#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n-#include <dune/grid/io/file/vtk/pvtuwriter.hh>
    \n-#include <dune/grid/io/file/vtk/vtuwriter.hh>
    \n+#include <tuple>
    \n+#include <vector>
    \n+#include <utility>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/grid/common/boundarysegment.hh>
    \n+#include <dune/grid/common/gridfactory.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::VTK::BasicWriter< IteratorFactory >
    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...
     
    \n \n \n \n \n-\n+\n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
    namespace  Dune::Gmsh
     
    \n+\n+\n+\n+\n+

    \n+Enumerations

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

    \n+Functions

    constexpr ReaderOptions Dune::Gmsh::operator| (ReaderOptions a, ReaderOptions b)
     composition operator for reader options More...
     
    constexpr bool Dune::Gmsh::operator& (ReaderOptions a, ReaderOptions b)
     query operator for reader options (is b set in a) More...
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,37 +6,62 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-Classes | Namespaces\n-basicwriter.hh File Reference\n+Classes | Namespaces | Enumerations | Functions\n+gmshreader.hh File Reference\n+#include \n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n+#include \n+#include \n #include \n-#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::BasicWriter<_IteratorFactory_>\n+struct \u00a0Dune::GmshReaderOptions\n+\u00a0 Options for read operation. More...\n+\u00a0\n+ class \u00a0Dune::GmshReaderParser<_GridType_>\n+\u00a0 dimension independent parts for GmshReaderParser More...\n+\u00a0\n+ class \u00a0Dune::GmshReader<_GridType_>\n+\u00a0 Read Gmsh mesh file. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::VTK\n+namespace \u00a0Dune::Gmsh\n+\u00a0\n+ Enumerations\n+enum class \u00a0Dune::Gmsh::ReaderOptions { Dune::Gmsh::ReaderOptions::verbose = 1\n+ , Dune::Gmsh::ReaderOptions::insertBoundarySegments = 2 , Dune::\n+ Gmsh::ReaderOptions::readElementData = 4 , Dune::Gmsh::\n+ ReaderOptions::readBoundaryData = 8 }\n+\u00a0 Option for the Gmsh mesh file reader. More...\n+\u00a0\n+ Functions\n+constexpr ReaderOptions\u00a0Dune::Gmsh::operator| (ReaderOptions a, ReaderOptions\n+ b)\n+\u00a0 composition operator for reader options More...\n+\u00a0\n+ constexpr bool\u00a0Dune::Gmsh::operator& (ReaderOptions a, ReaderOptions\n+ b)\n+\u00a0 query operator for reader options (is b set in a)\n+ More...\n \u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00770_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: basicwriter.hh Source File\n+dune-grid: gmshreader.hh Source File\n \n \n \n \n \n \n \n@@ -58,452 +58,1110 @@\n \n
    \n \n \n \n
    \n-
    basicwriter.hh
    \n+
    gmshreader.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
    \n+
    6#ifndef DUNE_GMSHREADER_HH
    \n+
    7#define DUNE_GMSHREADER_HH
    \n
    8
    \n-
    9#include <fstream>
    \n-
    10#include <iomanip>
    \n-
    11#include <iterator>
    \n-
    12#include <list>
    \n-
    13#include <memory>
    \n-
    14#include <sstream>
    \n-
    15#include <string>
    \n-
    16
    \n-
    17#include <dune/common/parallel/mpiguard.hh>
    \n-
    18#include <dune/common/path.hh>
    \n-
    19
    \n-
    20#include <dune/geometry/referenceelements.hh>
    \n-
    21
    \n-\n-\n-\n-\n-
    26
    \n-
    27namespace Dune
    \n-
    28{
    \n+
    9#include <cstdarg>
    \n+
    10#include <cstdio>
    \n+
    11#include <cstring>
    \n+
    12#include <fstream>
    \n+
    13#include <iostream>
    \n+
    14#include <map>
    \n+
    15#include <memory>
    \n+
    16#include <string>
    \n+
    17#include <tuple>
    \n+
    18#include <vector>
    \n+
    19#include <utility>
    \n+
    20
    \n+
    21#include <dune/common/exceptions.hh>
    \n+
    22#include <dune/common/fvector.hh>
    \n+
    23
    \n+
    24#include <dune/geometry/type.hh>
    \n+
    25
    \n+\n+\n+
    28
    \n+
    29namespace Dune
    \n+
    30{
    \n
    31
    \n-
    32 namespace VTK {
    \n-
    33
    \n-
    34 template<typename IteratorFactory>
    \n-\n-
    36 typedef typename IteratorFactory::CellIterator CellIterator;
    \n-
    37 typedef typename IteratorFactory::CornerIterator CornerIterator;
    \n-
    38 typedef typename IteratorFactory::PointIterator PointIterator;
    \n-
    39
    \n-
    40 typedef typename IteratorFactory::Cell Cell;
    \n-
    41
    \n-
    42 public:
    \n-\n-
    44
    \n-
    45 private:
    \n-
    46 typedef std::list<std::shared_ptr<FunctionWriter> > WriterList;
    \n-
    47 typedef typename WriterList::const_iterator WIterator;
    \n-
    48
    \n-
    49 typedef typename Cell::Geometry::ctype ctype;
    \n-
    50 static const unsigned celldim = Cell::mydimension;
    \n-
    51 typedef ReferenceElements<ctype, celldim> Refelems;
    \n-
    52
    \n-
    53 static const FileType fileType = celldim == 1
    \n-\n-
    55
    \n-
    56 const IteratorFactory& factory;
    \n-
    57
    \n-
    58 WriterList cellData;
    \n-
    59 WriterList pointData;
    \n-
    60
    \n-\n-
    62 typename IteratorFactory::ConnectivityWriter connectivity;
    \n-
    63 OffsetsWriter<Cell> offsets;
    \n-\n-
    65
    \n-
    66 public:
    \n-
    67 BasicWriter(const IteratorFactory& factory_)
    \n-
    68 : factory(factory_), connectivity(factory.makeConnectivity())
    \n-
    69 { }
    \n-
    70
    \n-
    72 //
    \n-
    73 // Methods for adding data
    \n-
    74 //
    \n-
    75
    \n-
    76 void addCellData(const std::shared_ptr<FunctionWriter>& writer) {
    \n-
    77 cellData.push_back(writer);
    \n-
    78 }
    \n-
    79
    \n-
    80 void addPointData(const std::shared_ptr<FunctionWriter>& writer) {
    \n-
    81 pointData.push_back(writer);
    \n-
    82 }
    \n-
    83
    \n-
    84 void clear() {
    \n-
    85 cellData.clear();
    \n-
    86 pointData.clear();
    \n-
    87 }
    \n-
    88
    \n-
    89 protected:
    \n-
    91 //
    \n-
    92 // Methods for writing single functions
    \n-
    93 //
    \n+\n+
    39 {
    \n+\n+\n+\n+
    45 };
    \n+
    46 };
    \n+
    47
    \n+
    48 namespace {
    \n+
    49
    \n+
    50 // arbitrary dimension, implementation is in specialization
    \n+
    51 template< int dimension, int dimWorld = dimension >
    \n+
    52 class GmshReaderQuadraticBoundarySegment
    \n+
    53 {
    \n+
    54 public:
    \n+
    55 // empty function since this class does not implement anything
    \n+
    56 static void registerFactory() {}
    \n+
    57 };
    \n+
    58
    \n+
    59 // quadratic boundary segments in 1d
    \n+
    60 /*
    \n+
    61 Note the points
    \n+
    62
    \n+
    63 (0) (alpha) (1)
    \n+
    64
    \n+
    65 are mapped to the points in global coordinates
    \n+
    66
    \n+
    67 p0 p2 p1
    \n+
    68
    \n+
    69 alpha is determined automatically from the given points.
    \n+
    70 */
    \n+
    71 template< int dimWorld >
    \n+
    72 struct GmshReaderQuadraticBoundarySegment< 2, dimWorld >
    \n+
    73 : public Dune::BoundarySegment< 2, dimWorld >
    \n+
    74 {
    \n+
    75 typedef GmshReaderQuadraticBoundarySegment< 2, dimWorld > ThisType;
    \n+
    76 typedef typename Dune::BoundarySegment< 2, dimWorld > :: ObjectStreamType ObjectStreamType;
    \n+
    77 typedef Dune::FieldVector< double, dimWorld > GlobalVector;
    \n+
    78
    \n+
    79 GmshReaderQuadraticBoundarySegment ( const GlobalVector &p0_, const GlobalVector &p1_, const GlobalVector &p2_)
    \n+
    80 : p0(p0_), p1(p1_), p2(p2_)
    \n+
    81 {
    \n+
    82 init();
    \n+
    83 }
    \n+
    84
    \n+
    85 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )
    \n+
    86 {
    \n+
    87 // key is read before by the factory
    \n+
    88 const int bytes = sizeof(double)*dimWorld;
    \n+
    89 in.read( (char *) &p0[ 0 ], bytes );
    \n+
    90 in.read( (char *) &p1[ 0 ], bytes );
    \n+
    91 in.read( (char *) &p2[ 0 ], bytes );
    \n+
    92 init();
    \n+
    93 }
    \n
    94
    \n-\n-
    96 FunctionWriter& functionWriter,
    \n-
    97 unsigned ncells) const
    \n-
    98 {
    \n-
    99 if(functionWriter.beginWrite(vtuWriter, ncells)) {
    \n-
    100 const CellIterator& cellend = factory.endCells();
    \n-
    101 for(CellIterator cellit = factory.beginCells(); cellit != cellend;
    \n-
    102 ++cellit)
    \n-
    103 functionWriter.write(*cellit, Refelems::general(cellit->type()).
    \n-
    104 position(0,0));
    \n-
    105 }
    \n-
    106 functionWriter.endWrite();
    \n-
    107 }
    \n-
    108
    \n-\n-
    110 FunctionWriter& functionWriter,
    \n-
    111 unsigned npoints) const
    \n-
    112 {
    \n-
    113 if(functionWriter.beginWrite(vtuWriter, npoints)) {
    \n-
    114 const PointIterator& pend = factory.endPoints();
    \n-
    115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit)
    \n-
    116 functionWriter.write(pit->cell(), pit->duneIndex());
    \n-
    117 }
    \n-
    118 functionWriter.endWrite();
    \n-
    119 }
    \n-
    120
    \n-\n-
    122 FunctionWriter& functionWriter,
    \n-
    123 unsigned ncorners) const
    \n-
    124 {
    \n-
    125 if(functionWriter.beginWrite(vtuWriter, ncorners)) {
    \n-
    126 const CornerIterator& cend = factory.endCorners();
    \n-
    127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit)
    \n-
    128 functionWriter.write(cit->cell(), cit->duneIndex());
    \n-
    129 }
    \n-
    130 functionWriter.endWrite();
    \n-
    131 }
    \n-
    132
    \n-
    134 //
    \n-
    135 // Methods for writing whole sections
    \n-
    136 //
    \n-
    137
    \n-
    138 static std::string getFirstScalar(const WriterList& data) {
    \n-
    139 const WIterator& wend = data.end();
    \n-
    140 for(WIterator wit = data.begin(); wit != wend; ++wit)
    \n-
    141 if((*wit)->ncomps() == 1)
    \n-
    142 return (*wit)->name();
    \n-
    143 return "";
    \n-
    144 }
    \n-
    145
    \n-
    146 static std::string getFirstVector(const WriterList& data) {
    \n-
    147 const WIterator& wend = data.end();
    \n-
    148 for(WIterator wit = data.begin(); wit != wend; ++wit)
    \n-
    149 if((*wit)->ncomps() == 3)
    \n-
    150 return (*wit)->name();
    \n-
    151 return "";
    \n-
    152 }
    \n-
    153
    \n-
    154 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {
    \n-
    155 if(cellData.empty()) return;
    \n-
    156
    \n-
    157 vtuWriter.beginCellData(getFirstScalar(cellData),
    \n-
    158 getFirstVector(cellData));
    \n-
    159 const WIterator& wend = cellData.end();
    \n-
    160 for(WIterator wit = cellData.begin(); wit != wend; ++wit)
    \n-
    161 writeCellFunction(vtuWriter, **wit, ncells);
    \n-
    162 vtuWriter.endCellData();
    \n-
    163 }
    \n-
    164
    \n-
    165 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {
    \n-
    166 if(pointData.empty()) return;
    \n-
    167
    \n-
    168 vtuWriter.beginPointData(getFirstScalar(pointData),
    \n-
    169 getFirstVector(pointData));
    \n-
    170 const WIterator& wend = pointData.end();
    \n-
    171 for(WIterator wit = pointData.begin(); wit != wend; ++wit)
    \n-
    172 writePointFunction(vtuWriter, **wit, npoints);
    \n-
    173 vtuWriter.endPointData();
    \n-
    174 }
    \n-
    175
    \n-
    176 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
    \n-
    177 unsigned ncorners) {
    \n-
    178 vtuWriter.beginPoints();
    \n-
    179 writePointFunction(vtuWriter, coords, npoints);
    \n-
    180 vtuWriter.endPoints();
    \n-
    181
    \n-
    182 vtuWriter.beginCells();
    \n-
    183 writeCornerFunction(vtuWriter, connectivity, ncorners);
    \n-
    184 writeCellFunction(vtuWriter, offsets, ncells);
    \n-
    185 if(fileType != polyData)
    \n-
    186 writeCellFunction(vtuWriter, types, ncells);
    \n-
    187 vtuWriter.endCells();
    \n-
    188 }
    \n-
    189
    \n-
    190 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
    \n-
    191 unsigned ncorners) {
    \n-
    192 writeCellData(vtuWriter, ncells);
    \n-
    193 writePointData(vtuWriter, npoints);
    \n-
    194 writeGrid(vtuWriter, ncells, npoints, ncorners);
    \n-
    195 }
    \n-
    196
    \n-
    197 public:
    \n-
    198 void writePiece(const std::string& filename, OutputType outputType) {
    \n-
    199 std::ofstream stream;
    \n-
    200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n-
    201 std::ios_base::eofbit);
    \n-
    202 stream.open(filename.c_str(), std::ios::binary);
    \n-
    203
    \n-
    204 VTUWriter vtuWriter(stream, outputType, fileType);
    \n+
    95 static void registerFactory()
    \n+
    96 {
    \n+
    97 if( key() < 0 )
    \n+
    98 {
    \n+
    99 key() = Dune::BoundarySegment< 2, dimWorld >::template registerFactory< ThisType >();
    \n+
    100 }
    \n+
    101 }
    \n+
    102
    \n+
    103 virtual GlobalVector operator() ( const Dune::FieldVector<double,1> &local ) const
    \n+
    104 {
    \n+
    105 GlobalVector y;
    \n+
    106 y = 0.0;
    \n+
    107 y.axpy((local[0]-alpha)*(local[0]-1.0)/alpha,p0);
    \n+
    108 y.axpy(local[0]*(local[0]-1.0)/(alpha*(alpha-1.0)),p1);
    \n+
    109 y.axpy(local[0]*(local[0]-alpha)/(1.0-alpha),p2);
    \n+
    110 return y;
    \n+
    111 }
    \n+
    112
    \n+
    113 void backup( ObjectStreamType& out ) const
    \n+
    114 {
    \n+
    115 // backup key to identify object
    \n+
    116 out.write( (const char *) &key(), sizeof( int ) );
    \n+
    117 // backup data
    \n+
    118 const int bytes = sizeof(double)*dimWorld;
    \n+
    119 out.write( (const char*) &p0[ 0 ], bytes );
    \n+
    120 out.write( (const char*) &p1[ 0 ], bytes );
    \n+
    121 out.write( (const char*) &p2[ 0 ], bytes );
    \n+
    122 }
    \n+
    123
    \n+
    124 protected:
    \n+
    125 void init()
    \n+
    126 {
    \n+
    127 GlobalVector d1 = p1;
    \n+
    128 d1 -= p0;
    \n+
    129 GlobalVector d2 = p2;
    \n+
    130 d2 -= p1;
    \n+
    131
    \n+
    132 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());
    \n+
    133 if (alpha<1E-6 || alpha>1-1E-6)
    \n+
    134 DUNE_THROW(Dune::IOError, "ration in quadratic boundary segment bad");
    \n+
    135 }
    \n+
    136
    \n+
    137 static int& key() {
    \n+
    138 static int k = -1;
    \n+
    139 return k;
    \n+
    140 }
    \n+
    141
    \n+
    142 private:
    \n+
    143 GlobalVector p0,p1,p2;
    \n+
    144 double alpha;
    \n+
    145 };
    \n+
    146
    \n+
    147
    \n+
    148 // quadratic boundary segments in 2d
    \n+
    149 /* numbering of points corresponding to gmsh:
    \n+
    150
    \n+
    151 2
    \n+
    152
    \n+
    153 5 4
    \n+
    154
    \n+
    155 0 3 1
    \n+
    156
    \n+
    157 Note: The vertices 3, 4, 5 are not necessarily at the edge midpoints but can
    \n+
    158 be placed with parameters alpha, beta , gamma at the following positions
    \n+
    159 in local coordinates:
    \n+
    160
    \n+
    161
    \n+
    162 2 = (0,1)
    \n+
    163
    \n+
    164 5 = (0,beta) 4 = (1-gamma/sqrt(2),gamma/sqrt(2))
    \n+
    165
    \n+
    166 0 = (0,0) 3 = (alpha,0) 1 = (1,0)
    \n+
    167
    \n+
    168 The parameters alpha, beta, gamma are determined from the given vertices in
    \n+
    169 global coordinates.
    \n+
    170 */
    \n+
    171 template<>
    \n+
    172 class GmshReaderQuadraticBoundarySegment< 3, 3 >
    \n+
    173 : public Dune::BoundarySegment< 3 >
    \n+
    174 {
    \n+
    175 typedef GmshReaderQuadraticBoundarySegment< 3, 3 > ThisType;
    \n+
    176 typedef typename Dune::BoundarySegment< 3 > :: ObjectStreamType ObjectStreamType;
    \n+
    177 public:
    \n+
    178 GmshReaderQuadraticBoundarySegment (Dune::FieldVector<double,3> p0_, Dune::FieldVector<double,3> p1_,
    \n+
    179 Dune::FieldVector<double,3> p2_, Dune::FieldVector<double,3> p3_,
    \n+
    180 Dune::FieldVector<double,3> p4_, Dune::FieldVector<double,3> p5_)
    \n+
    181 : p0(p0_), p1(p1_), p2(p2_), p3(p3_), p4(p4_), p5(p5_)
    \n+
    182 {
    \n+
    183 init();
    \n+
    184 }
    \n+
    185
    \n+
    186 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )
    \n+
    187 {
    \n+
    188 const int bytes = sizeof(double)*3;
    \n+
    189 in.read( (char *) &p0[ 0 ], bytes );
    \n+
    190 in.read( (char *) &p1[ 0 ], bytes );
    \n+
    191 in.read( (char *) &p2[ 0 ], bytes );
    \n+
    192 in.read( (char *) &p3[ 0 ], bytes );
    \n+
    193 in.read( (char *) &p4[ 0 ], bytes );
    \n+
    194 in.read( (char *) &p5[ 0 ], bytes );
    \n+
    195 init();
    \n+
    196 }
    \n+
    197
    \n+
    198 static void registerFactory()
    \n+
    199 {
    \n+
    200 if( key() < 0 )
    \n+
    201 {
    \n+
    202 key() = Dune::BoundarySegment< 3 >::template registerFactory< ThisType >();
    \n+
    203 }
    \n+
    204 }
    \n
    205
    \n-
    206 unsigned ncells = std::distance(factory.beginCells(),
    \n-
    207 factory.endCells());
    \n-
    208 unsigned npoints = std::distance(factory.beginPoints(),
    \n-
    209 factory.endPoints());
    \n-
    210 unsigned ncorners = std::distance(factory.beginCorners(),
    \n-
    211 factory.endCorners());
    \n-
    212
    \n-
    213 vtuWriter.beginMain(ncells, npoints);
    \n-
    214 writeAll(vtuWriter, ncells, npoints, ncorners);
    \n-
    215 vtuWriter.endMain();
    \n-
    216
    \n-
    217 if(vtuWriter.beginAppended())
    \n-
    218 writeAll(vtuWriter, ncells, npoints, ncorners);
    \n-
    219 vtuWriter.endAppended();
    \n-
    220
    \n-
    221 }
    \n-
    222
    \n-
    224
    \n-
    240 void writeCollection(const std::string name,
    \n-
    241 const std::string& piecename,
    \n-
    242 const std::string& piecepath)
    \n-
    243 {
    \n-
    244 std::ofstream stream;
    \n-
    245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n-
    246 std::ios_base::eofbit);
    \n-
    247 stream.open(name.c_str(), std::ios::binary);
    \n-
    248
    \n-
    249 PVTUWriter writer(stream, fileType);
    \n-
    250
    \n-
    251 writer.beginMain();
    \n-
    252
    \n-
    253 // PPointData
    \n-
    254 writer.beginPointData(getFirstScalar(pointData),
    \n-
    255 getFirstVector(pointData));
    \n-
    256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)
    \n-
    257 (*it)->addArray(writer);
    \n-
    258 writer.endPointData();
    \n-
    259
    \n-
    260 // PCellData
    \n-
    261 writer.beginCellData(getFirstScalar(cellData),
    \n-
    262 getFirstVector(cellData));
    \n-
    263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)
    \n-
    264 (*it)->addArray(writer);
    \n-
    265 writer.endCellData();
    \n-
    266
    \n-
    267 // PPoints
    \n-
    268 writer.beginPoints();
    \n-
    269 coords.addArray(writer);
    \n-
    270 writer.endPoints();
    \n-
    271
    \n-
    272 // Pieces
    \n-
    273 for( int i = 0; i < factory.comm().size(); ++i )
    \n-
    274 writer.addPiece(getParallelPieceName(piecename, piecepath, i));
    \n-
    275
    \n-
    276 writer.endMain();
    \n-
    277 }
    \n-
    278
    \n-
    280 //
    \n-
    281 // Filename generators
    \n-
    282 //
    \n-
    283
    \n-
    285
    \n-
    295 std::string getParallelPieceName(const std::string& name,
    \n-
    296 const std::string& path, int rank) const
    \n-
    297 {
    \n-
    298 std::ostringstream s;
    \n-
    299 if(path.size() > 0) {
    \n-
    300 s << path;
    \n-
    301 if(path[path.size()-1] != '/')
    \n-
    302 s << '/';
    \n-
    303 }
    \n-
    304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
    \n-
    305 << ':';
    \n-
    306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';
    \n-
    307 s << name;
    \n-
    308 switch(fileType) {
    \n-
    309 case polyData : s << ".vtp"; break;
    \n-
    310 case unstructuredGrid : s << ".vtu"; break;
    \n-
    311 }
    \n-
    312 return s.str();
    \n-
    313 }
    \n-
    314
    \n-
    316
    \n-
    325 std::string getParallelHeaderName(const std::string& name,
    \n-
    326 const std::string& path) const
    \n-
    327 {
    \n-
    328 std::ostringstream s;
    \n-
    329 if(path.size() > 0) {
    \n-
    330 s << path;
    \n-
    331 if(path[path.size()-1] != '/')
    \n-
    332 s << '/';
    \n-
    333 }
    \n-
    334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
    \n-
    335 << ':';
    \n-
    336 s << name;
    \n-
    337 switch(fileType) {
    \n-
    338 case polyData : s << ".pvtp"; break;
    \n-
    339 case unstructuredGrid : s << ".pvtu"; break;
    \n-
    340 }
    \n-
    341 return s.str();
    \n-
    342 }
    \n-
    343
    \n-
    345
    \n-
    357 std::string getSerialPieceName(const std::string& name,
    \n-
    358 const std::string& path) const
    \n-
    359 {
    \n-
    360 switch(fileType) {
    \n-
    361 case polyData : return concatPaths(path, name+".vtp");
    \n-
    362 case unstructuredGrid : return concatPaths(path, name+".vtu");
    \n-
    363 }
    \n-
    364 return concatPaths(path, name); // unknown fileType
    \n-
    365 }
    \n+
    206 virtual Dune::FieldVector<double,3> operator() (const Dune::FieldVector<double,2>& local) const
    \n+
    207 {
    \n+
    208 Dune::FieldVector<double,3> y;
    \n+
    209 y = 0.0;
    \n+
    210 y.axpy(phi0(local),p0);
    \n+
    211 y.axpy(phi1(local),p1);
    \n+
    212 y.axpy(phi2(local),p2);
    \n+
    213 y.axpy(phi3(local),p3);
    \n+
    214 y.axpy(phi4(local),p4);
    \n+
    215 y.axpy(phi5(local),p5);
    \n+
    216 return y;
    \n+
    217 }
    \n+
    218
    \n+
    219 void backup( ObjectStreamType& out ) const
    \n+
    220 {
    \n+
    221 // backup key to identify object in factory
    \n+
    222 out.write( (const char*) &key(), sizeof( int ) );
    \n+
    223 // backup data
    \n+
    224 const int bytes = sizeof(double)*3;
    \n+
    225 out.write( (const char*) &p0[ 0 ], bytes );
    \n+
    226 out.write( (const char*) &p1[ 0 ], bytes );
    \n+
    227 out.write( (const char*) &p2[ 0 ], bytes );
    \n+
    228 out.write( (const char*) &p3[ 0 ], bytes );
    \n+
    229 out.write( (const char*) &p4[ 0 ], bytes );
    \n+
    230 out.write( (const char*) &p5[ 0 ], bytes );
    \n+
    231 }
    \n+
    232
    \n+
    233 protected:
    \n+
    234 void init()
    \n+
    235 {
    \n+
    236 using std::sqrt;
    \n+
    237 sqrt2 = sqrt(2.0);
    \n+
    238 Dune::FieldVector<double,3> d1,d2;
    \n+
    239
    \n+
    240 d1 = p3; d1 -= p0;
    \n+
    241 d2 = p1; d2 -= p3;
    \n+
    242 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());
    \n+
    243 if (alpha<1E-6 || alpha>1-1E-6)
    \n+
    244 DUNE_THROW(Dune::IOError, "alpha in quadratic boundary segment bad");
    \n+
    245
    \n+
    246 d1 = p5; d1 -= p0;
    \n+
    247 d2 = p2; d2 -= p5;
    \n+
    248 beta=d1.two_norm()/(d1.two_norm()+d2.two_norm());
    \n+
    249 if (beta<1E-6 || beta>1-1E-6)
    \n+
    250 DUNE_THROW(Dune::IOError, "beta in quadratic boundary segment bad");
    \n+
    251
    \n+
    252 d1 = p4; d1 -= p1;
    \n+
    253 d2 = p2; d2 -= p4;
    \n+
    254 gamma=sqrt2*(d1.two_norm()/(d1.two_norm()+d2.two_norm()));
    \n+
    255 if (gamma<1E-6 || gamma>1-1E-6)
    \n+
    256 DUNE_THROW(Dune::IOError, "gamma in quadratic boundary segment bad");
    \n+
    257 }
    \n+
    258
    \n+
    259 static int& key() {
    \n+
    260 static int k = -1;
    \n+
    261 return k;
    \n+
    262 }
    \n+
    263
    \n+
    264 private:
    \n+
    265 // The six Lagrange basis function on the reference element
    \n+
    266 // for the points given above
    \n+
    267
    \n+
    268 double phi0 (const Dune::FieldVector<double,2>& local) const
    \n+
    269 {
    \n+
    270 return (alpha*beta-beta*local[0]-alpha*local[1])*(1-local[0]-local[1])/(alpha*beta);
    \n+
    271 }
    \n+
    272 double phi3 (const Dune::FieldVector<double,2>& local) const
    \n+
    273 {
    \n+
    274 return local[0]*(1-local[0]-local[1])/(alpha*(1-alpha));
    \n+
    275 }
    \n+
    276 double phi1 (const Dune::FieldVector<double,2>& local) const
    \n+
    277 {
    \n+
    278 return local[0]*(gamma*local[0]-(sqrt2-gamma-sqrt2*alpha)*local[1]-alpha*gamma)/(gamma*(1-alpha));
    \n+
    279 }
    \n+
    280 double phi5 (const Dune::FieldVector<double,2>& local) const
    \n+
    281 {
    \n+
    282 return local[1]*(1-local[0]-local[1])/(beta*(1-beta));
    \n+
    283 }
    \n+
    284 double phi4 (const Dune::FieldVector<double,2>& local) const
    \n+
    285 {
    \n+
    286 return local[0]*local[1]/((1-gamma/sqrt2)*gamma/sqrt2);
    \n+
    287 }
    \n+
    288 double phi2 (const Dune::FieldVector<double,2>& local) const
    \n+
    289 {
    \n+
    290 return local[1]*(beta*(1-gamma/sqrt2)-local[0]*(beta-gamma/sqrt2)-local[1]*(1-gamma/sqrt2))/((1-gamma/sqrt2)*(beta-1));
    \n+
    291 }
    \n+
    292
    \n+
    293 Dune::FieldVector<double,3> p0,p1,p2,p3,p4,p5;
    \n+
    294 double alpha,beta,gamma,sqrt2;
    \n+
    295 };
    \n+
    296
    \n+
    297 } // end empty namespace
    \n+
    298
    \n+
    300 template<typename GridType>
    \n+\n+
    302 {
    \n+
    303 protected:
    \n+
    304 // private data
    \n+\n+\n+\n+\n+\n+\n+
    311 // read buffer
    \n+
    312 char buf[512];
    \n+
    313 std::string fileName;
    \n+
    314 // exported data
    \n+\n+\n+
    317
    \n+
    318 // static data
    \n+
    319 static const int dim = GridType::dimension;
    \n+
    320 static const int dimWorld = GridType::dimensionworld;
    \n+
    321 static_assert( (dimWorld <= 3), "GmshReader requires dimWorld <= 3." );
    \n+
    322
    \n+
    323 // typedefs
    \n+
    324 typedef FieldVector< double, dimWorld > GlobalVector;
    \n+
    325
    \n+
    326 // don't use something like
    \n+
    327 // readfile(file, 1, "%s\\n", buf);
    \n+
    328 // to skip the rest of of the line -- that will only skip the next
    \n+
    329 // whitespace-separated word! Use skipline() instead.
    \n+
    330 void readfile(FILE * file, int cnt, const char * format,
    \n+
    331 void* t1, void* t2 = 0, void* t3 = 0, void* t4 = 0,
    \n+
    332 void* t5 = 0, void* t6 = 0, void* t7 = 0, void* t8 = 0,
    \n+
    333 void* t9 = 0, void* t10 = 0)
    \n+
    334 {
    \n+
    335 off_t pos = ftello(file);
    \n+
    336 int c = fscanf(file, format, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
    \n+
    337 if (c != cnt)
    \n+
    338 DUNE_THROW(Dune::IOError, "Error parsing " << fileName << " "
    \n+
    339 "file pos " << pos
    \n+
    340 << ": Expected '" << format << "', only read " << c << " entries instead of " << cnt << ".");
    \n+
    341 }
    \n+
    342
    \n+
    343 // skip over the rest of the line, including the terminating newline
    \n+
    344 void skipline(FILE * file)
    \n+
    345 {
    \n+
    346 int c;
    \n+
    347 do {
    \n+
    348 c = std::fgetc(file);
    \n+
    349 } while(c != '\\n' && c != EOF);
    \n+
    350 }
    \n+
    351
    \n+
    352 public:
    \n+
    353
    \n+\n+
    355 factory(_factory), verbose(v), insert_boundary_segments(i) {}
    \n+
    356
    \n+
    357 std::vector<int> & boundaryIdMap()
    \n+
    358 {
    \n+\n+
    360 }
    \n+
    361
    \n+
    362 std::vector<int> & elementIndexMap()
    \n+
    363 {
    \n+\n+
    365 }
    \n
    366
    \n-
    368 //
    \n-
    369 // User interface functions for writing
    \n-
    370 //
    \n-
    371
    \n-
    373
    \n-
    395 std::string pwrite(const std::string& name, const std::string& path,
    \n-
    396 const std::string& extendpath, OutputType outputType)
    \n-
    397 {
    \n-
    398 MPIGuard guard(factory.comm());
    \n-
    399
    \n-
    400 // do some magic because paraview can only cope with relative paths to
    \n-
    401 // piece files
    \n-
    402 std::ofstream file;
    \n-
    403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n-
    404 std::ios_base::eofbit);
    \n-
    405 std::string piecepath = concatPaths(path, extendpath);
    \n-
    406 std::string relpiecepath = relativePath(path, piecepath);
    \n-
    407
    \n-
    408 // write this processes .vtu/.vtp piece file
    \n-
    409 std::string fullname = getParallelPieceName(name, piecepath,
    \n-
    410 factory.comm().rank());
    \n-
    411 writePiece(fullname, outputType);
    \n-
    412
    \n-
    413 // if we are rank 0, write .pvtu/.pvtp parallel header
    \n-
    414 fullname = getParallelHeaderName(name, path);
    \n-
    415 if(factory.comm().rank() == 0)
    \n-
    416 writeCollection(fullname, name, relpiecepath);
    \n-
    417
    \n-
    418 guard.finalize();
    \n+
    367 void read (const std::string& f)
    \n+
    368 {
    \n+
    369 if (verbose) std::cout << "Reading " << dim << "d Gmsh grid..." << std::endl;
    \n+
    370
    \n+
    371 // open file name, we use C I/O
    \n+
    372 fileName = f;
    \n+
    373 FILE* file = fopen(fileName.c_str(),"rb");
    \n+
    374 if (file==0)
    \n+
    375 DUNE_THROW(Dune::IOError, "Could not open " << fileName);
    \n+
    376
    \n+
    377 //=========================================
    \n+
    378 // Header: Read vertices into vector
    \n+
    379 // Check vertices that are needed
    \n+
    380 //=========================================
    \n+
    381
    \n+\n+\n+
    384 element_count = 0;
    \n+
    385
    \n+
    386 // process header
    \n+
    387 double version_number;
    \n+
    388 int file_type, data_size;
    \n+
    389
    \n+
    390 readfile(file,1,"%s\\n",buf);
    \n+
    391 if (strcmp(buf,"$MeshFormat")!=0)
    \n+
    392 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line");
    \n+
    393 readfile(file,3,"%lg %d %d\\n",&version_number,&file_type,&data_size);
    \n+
    394 if( (version_number < 2.0) || (version_number > 2.2) )
    \n+
    395 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files");
    \n+
    396 if (verbose) std::cout << "version " << version_number << " Gmsh file detected" << std::endl;
    \n+
    397 readfile(file,1,"%s\\n",buf);
    \n+
    398 if (strcmp(buf,"$EndMeshFormat")!=0)
    \n+
    399 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat");
    \n+
    400
    \n+
    401 // node section
    \n+
    402 int number_of_nodes;
    \n+
    403
    \n+
    404 readfile(file,1,"%s\\n",buf);
    \n+
    405 if (strcmp(buf,"$Nodes")!=0)
    \n+
    406 DUNE_THROW(Dune::IOError, "expected $Nodes");
    \n+
    407 readfile(file,1,"%d\\n",&number_of_nodes);
    \n+
    408 if (verbose) std::cout << "file contains " << number_of_nodes << " nodes" << std::endl;
    \n+
    409
    \n+
    410 // read nodes
    \n+
    411 // The '+1' is due to the fact that gmsh numbers node starting from 1 rather than from 0
    \n+
    412 std::vector< GlobalVector > nodes( number_of_nodes+1 );
    \n+
    413 {
    \n+
    414 int id;
    \n+
    415 double x[ 3 ];
    \n+
    416 for( int i = 1; i <= number_of_nodes; ++i )
    \n+
    417 {
    \n+
    418 readfile(file,4, "%d %lg %lg %lg\\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] );
    \n
    419
    \n-
    420 return fullname;
    \n-
    421 }
    \n-
    422
    \n-
    436 std::string write(const std::string &name, OutputType outputType)
    \n-
    437 {
    \n-
    438 // in the parallel case, just use pwrite, it has all the necessary
    \n-
    439 // stuff, so we don't need to reimplement it here.
    \n-
    440 if(factory.comm().size() > 1)
    \n-
    441 return pwrite(name, "", "", outputType);
    \n+
    420 if (id > number_of_nodes) {
    \n+
    421 DUNE_THROW(Dune::IOError,
    \n+
    422 "Only dense sequences of node indices are currently supported (node index "
    \n+
    423 << id << " is invalid).");
    \n+
    424 }
    \n+
    425
    \n+
    426 // just store node position
    \n+
    427 for( int j = 0; j < dimWorld; ++j )
    \n+
    428 nodes[ id ][ j ] = x[ j ];
    \n+
    429 }
    \n+
    430 readfile(file,1,"%s\\n",buf);
    \n+
    431 if (strcmp(buf,"$EndNodes")!=0)
    \n+
    432 DUNE_THROW(Dune::IOError, "expected $EndNodes");
    \n+
    433 }
    \n+
    434
    \n+
    435 // element section
    \n+
    436 readfile(file,1,"%s\\n",buf);
    \n+
    437 if (strcmp(buf,"$Elements")!=0)
    \n+
    438 DUNE_THROW(Dune::IOError, "expected $Elements");
    \n+
    439 int number_of_elements;
    \n+
    440 readfile(file,1,"%d\\n",&number_of_elements);
    \n+
    441 if (verbose) std::cout << "file contains " << number_of_elements << " elements" << std::endl;
    \n
    442
    \n-
    443 // generate filename for process data
    \n-
    444 std::string pieceName = getSerialPieceName(name, "");
    \n-
    445
    \n-
    446 writePiece(pieceName, outputType);
    \n+
    443 //=========================================
    \n+
    444 // Pass 1: Select and insert those vertices in the file that
    \n+
    445 // actually occur as corners of an element.
    \n+
    446 //=========================================
    \n
    447
    \n-
    448 return pieceName;
    \n-
    449 }
    \n-
    450
    \n-
    451 };
    \n-
    452
    \n-
    453 } // namespace VTK
    \n-
    454
    \n-
    456
    \n-
    457} // namespace Dune
    \n-
    458
    \n-
    459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
    \n-\n-\n-\n-
    Common stuff for the VTKWriter.
    \n+
    448 off_t section_element_offset = ftello(file);
    \n+
    449 std::map<int,unsigned int> renumber;
    \n+
    450 for (int i=1; i<=number_of_elements; i++)
    \n+
    451 {
    \n+
    452 int id, elm_type, number_of_tags;
    \n+
    453 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
    \n+
    454 for (int k=1; k<=number_of_tags; k++)
    \n+
    455 {
    \n+
    456 int blub;
    \n+
    457 readfile(file,1,"%d ",&blub);
    \n+
    458 // k == 1: physical entity (not used here)
    \n+
    459 // k == 2: elementary entity (not used here either)
    \n+
    460 // if version_number < 2.2:
    \n+
    461 // k == 3: mesh partition 0
    \n+
    462 // else
    \n+
    463 // k == 3: number of mesh partitions
    \n+
    464 // k => 4: mesh partition k-4
    \n+
    465 }
    \n+
    466 pass1HandleElement(file, elm_type, renumber, nodes);
    \n+
    467 }
    \n+
    468 if (verbose) std::cout << "number of real vertices = " << number_of_real_vertices << std::endl;
    \n+
    469 if (verbose) std::cout << "number of boundary elements = " << boundary_element_count << std::endl;
    \n+
    470 if (verbose) std::cout << "number of elements = " << element_count << std::endl;
    \n+
    471 readfile(file,1,"%s\\n",buf);
    \n+
    472 if (strcmp(buf,"$EndElements")!=0)
    \n+
    473 DUNE_THROW(Dune::IOError, "expected $EndElements");
    \n+\n+\n+
    476
    \n+
    477 //==============================================
    \n+
    478 // Pass 2: Insert boundary segments and elements
    \n+
    479 //==============================================
    \n+
    480
    \n+
    481 fseeko(file, section_element_offset, SEEK_SET);
    \n+\n+
    483 element_count = 0;
    \n+
    484 for (int i=1; i<=number_of_elements; i++)
    \n+
    485 {
    \n+
    486 int id, elm_type, number_of_tags;
    \n+
    487 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
    \n+
    488 int physical_entity = -1;
    \n+
    489
    \n+
    490 for (int k=1; k<=number_of_tags; k++)
    \n+
    491 {
    \n+
    492 int blub;
    \n+
    493 readfile(file,1,"%d ",&blub);
    \n+
    494 if (k==1) physical_entity = blub;
    \n+
    495 }
    \n+
    496 pass2HandleElement(file, elm_type, renumber, nodes, physical_entity);
    \n+
    497 }
    \n+
    498 readfile(file,1,"%s\\n",buf);
    \n+
    499 if (strcmp(buf,"$EndElements")!=0)
    \n+
    500 DUNE_THROW(Dune::IOError, "expected $EndElements");
    \n+
    501
    \n+
    502 fclose(file);
    \n+
    503 }
    \n+
    504
    \n+
    510 void pass1HandleElement(FILE* file, const int elm_type,
    \n+
    511 std::map<int,unsigned int> & renumber,
    \n+
    512 const std::vector< GlobalVector > & nodes)
    \n+
    513 {
    \n+
    514 // some data about gmsh elements
    \n+
    515 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
    \n+
    516 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
    \n+
    517 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
    \n+
    518
    \n+
    519 // test whether we support the element type
    \n+
    520 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
    \n+
    521 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
    \n+
    522 {
    \n+
    523 skipline(file); // skip rest of line if element is unknown
    \n+
    524 return;
    \n+
    525 }
    \n+
    526
    \n+
    527 // The format string for parsing is n times '%d' in a row
    \n+
    528 std::string formatString = "%d";
    \n+
    529 for (int i=1; i<nDofs[elm_type]; i++)
    \n+
    530 formatString += " %d";
    \n+
    531 formatString += "\\n";
    \n+
    532
    \n+
    533 // '10' is the largest number of dofs we may encounter in a .msh file
    \n+
    534 std::vector<int> elementDofs(10);
    \n+
    535
    \n+
    536 readfile(file,nDofs[elm_type], formatString.c_str(),
    \n+
    537 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
    \n+
    538 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
    \n+
    539 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
    \n+
    540 &(elementDofs[9]));
    \n+
    541
    \n+
    542 // insert each vertex if it hasn't been inserted already
    \n+
    543 for (int i=0; i<nVertices[elm_type]; i++)
    \n+
    544 if (renumber.find(elementDofs[i])==renumber.end())
    \n+
    545 {
    \n+
    546 renumber[elementDofs[i]] = number_of_real_vertices++;
    \n+
    547 factory.insertVertex(nodes[elementDofs[i]]);
    \n+
    548 }
    \n+
    549
    \n+
    550 // count elements and boundary elements
    \n+
    551 if (elementDim[elm_type] == dim)
    \n+\n+
    553 else
    \n+\n+
    555
    \n+
    556 }
    \n+
    557
    \n+
    558
    \n+
    559
    \n+
    560 // generic-case: This is not supposed to be used at runtime.
    \n+
    561 template <class E, class V, class V2>
    \n+\n+
    563 const V&,
    \n+
    564 const E&,
    \n+
    565 const V2&
    \n+
    566 )
    \n+
    567 {
    \n+
    568 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non-3D Grid");
    \n+
    569 }
    \n+
    570
    \n+
    571 // 3d-case:
    \n+
    572 template <class E, class V>
    \n+\n+
    574 const std::vector<FieldVector<double, 3> >& nodes,
    \n+
    575 const E& elementDofs,
    \n+
    576 const V& vertices
    \n+
    577 )
    \n+
    578 {
    \n+
    579 std::array<FieldVector<double,dimWorld>, 6> v;
    \n+
    580 for (int i=0; i<6; i++)
    \n+
    581 for (int j=0; j<dimWorld; j++)
    \n+
    582 v[i][j] = nodes[elementDofs[i]][j];
    \n+
    583
    \n+
    584 BoundarySegment<dim,dimWorld>* newBoundarySegment
    \n+
    585 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 3, 3 >( v[0], v[1], v[2],
    \n+
    586 v[3], v[4], v[5] );
    \n+
    587
    \n+
    588 factory.insertBoundarySegment( vertices,
    \n+
    589 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment) );
    \n+
    590 }
    \n+
    591
    \n+
    592
    \n+
    593
    \n+
    598 virtual void pass2HandleElement(FILE* file, const int elm_type,
    \n+
    599 std::map<int,unsigned int> & renumber,
    \n+
    600 const std::vector< GlobalVector > & nodes,
    \n+
    601 const int physical_entity)
    \n+
    602 {
    \n+
    603 // some data about gmsh elements
    \n+
    604 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
    \n+
    605 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
    \n+
    606 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
    \n+
    607
    \n+
    608 // test whether we support the element type
    \n+
    609 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
    \n+
    610 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
    \n+
    611 {
    \n+
    612 skipline(file); // skip rest of line if element is unknown
    \n+
    613 return;
    \n+
    614 }
    \n+
    615
    \n+
    616 // The format string for parsing is n times '%d' in a row
    \n+
    617 std::string formatString = "%d";
    \n+
    618 for (int i=1; i<nDofs[elm_type]; i++)
    \n+
    619 formatString += " %d";
    \n+
    620 formatString += "\\n";
    \n+
    621
    \n+
    622 // '10' is the largest number of dofs we may encounter in a .msh file
    \n+
    623 std::vector<int> elementDofs(10);
    \n+
    624
    \n+
    625 readfile(file,nDofs[elm_type], formatString.c_str(),
    \n+
    626 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
    \n+
    627 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
    \n+
    628 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
    \n+
    629 &(elementDofs[9]));
    \n+
    630
    \n+
    631 // correct differences between gmsh and Dune in the local vertex numbering
    \n+
    632 switch (elm_type)
    \n+
    633 {
    \n+
    634 case 3 : // 4-node quadrilateral
    \n+
    635 std::swap(elementDofs[2],elementDofs[3]);
    \n+
    636 break;
    \n+
    637 case 5 : // 8-node hexahedron
    \n+
    638 std::swap(elementDofs[2],elementDofs[3]);
    \n+
    639 std::swap(elementDofs[6],elementDofs[7]);
    \n+
    640 break;
    \n+
    641 case 7 : // 5-node pyramid
    \n+
    642 std::swap(elementDofs[2],elementDofs[3]);
    \n+
    643 break;
    \n+
    644 }
    \n+
    645
    \n+
    646 // renumber corners to account for the explicitly given vertex
    \n+
    647 // numbering in the file
    \n+
    648 std::vector<unsigned int> vertices(nVertices[elm_type]);
    \n+
    649
    \n+
    650 for (int i=0; i<nVertices[elm_type]; i++)
    \n+
    651 vertices[i] = renumber[elementDofs[i]];
    \n+
    652
    \n+
    653 // If it is an element, insert it as such
    \n+
    654 if (elementDim[elm_type] == dim) {
    \n+
    655
    \n+
    656 switch (elm_type)
    \n+
    657 {
    \n+
    658 case 1 : // 2-node line
    \n+
    659 factory.insertElement(Dune::GeometryTypes::line,vertices);
    \n+
    660 break;
    \n+
    661 case 2 : // 3-node triangle
    \n+
    662 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
    \n+
    663 break;
    \n+
    664 case 3 : // 4-node quadrilateral
    \n+
    665 factory.insertElement(Dune::GeometryTypes::quadrilateral,vertices);
    \n+
    666 break;
    \n+
    667 case 4 : // 4-node tetrahedron
    \n+
    668 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
    \n+
    669 break;
    \n+
    670 case 5 : // 8-node hexahedron
    \n+
    671 factory.insertElement(Dune::GeometryTypes::hexahedron,vertices);
    \n+
    672 break;
    \n+
    673 case 6 : // 6-node prism
    \n+
    674 factory.insertElement(Dune::GeometryTypes::prism,vertices);
    \n+
    675 break;
    \n+
    676 case 7 : // 5-node pyramid
    \n+
    677 factory.insertElement(Dune::GeometryTypes::pyramid,vertices);
    \n+
    678 break;
    \n+
    679 case 9 : // 6-node triangle
    \n+
    680 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
    \n+
    681 break;
    \n+
    682 case 11 : // 10-node tetrahedron
    \n+
    683 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
    \n+
    684 break;
    \n+
    685 }
    \n+
    686
    \n+
    687 } else {
    \n+
    688 // it must be a boundary segment then
    \n+\n+
    690
    \n+
    691 switch (elm_type)
    \n+
    692 {
    \n+
    693 case 1 : // 2-node line
    \n+
    694 factory.insertBoundarySegment(vertices);
    \n+
    695 break;
    \n+
    696
    \n+
    697 case 2 : // 3-node triangle
    \n+
    698 factory.insertBoundarySegment(vertices);
    \n+
    699 break;
    \n+
    700
    \n+
    701 case 3 : // 4-node quadrilateral
    \n+
    702 factory.insertBoundarySegment(vertices);
    \n+
    703 break;
    \n+
    704
    \n+
    705 case 15 : // 1-node point
    \n+
    706 factory.insertBoundarySegment(vertices);
    \n+
    707 break;
    \n+
    708
    \n+
    709 case 8 : { // 3-node line
    \n+
    710 std::array<FieldVector<double,dimWorld>, 3> v;
    \n+
    711 for (int i=0; i<dimWorld; i++) {
    \n+
    712 v[0][i] = nodes[elementDofs[0]][i];
    \n+
    713 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended!
    \n+
    714 v[2][i] = nodes[elementDofs[1]][i];
    \n+
    715 }
    \n+
    716 BoundarySegment<dim,dimWorld>* newBoundarySegment
    \n+
    717 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 2, dimWorld >(v[0], v[1], v[2]);
    \n+
    718 factory.insertBoundarySegment(vertices,
    \n+
    719 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment));
    \n+
    720 break;
    \n+
    721 }
    \n+
    722 case 9 : { // 6-node triangle
    \n+
    723 boundarysegment_insert(nodes, elementDofs, vertices);
    \n+
    724 break;
    \n+
    725 }
    \n+
    726 default: {
    \n+
    727 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " << elm_type << " for boundary segments");
    \n+
    728 break;
    \n+
    729 }
    \n+
    730
    \n+
    731 }
    \n+
    732
    \n+
    733 }
    \n+
    734 }
    \n+
    735
    \n+
    736 // count elements and boundary elements
    \n+
    737 if (elementDim[elm_type] == dim) {
    \n+\n+\n+
    740 } else {
    \n+\n+\n+
    743 }
    \n+
    744
    \n+
    745 }
    \n+
    746
    \n+
    747 };
    \n+
    748
    \n+
    749 namespace Gmsh {
    \n+
    755 enum class ReaderOptions
    \n+
    756 {
    \n+
    757 verbose = 1,
    \n+\n+
    759 readElementData = 4,
    \n+\n+
    761 };
    \n+
    762
    \n+\n+
    765 {
    \n+
    766 return static_cast<ReaderOptions>(
    \n+
    767 static_cast<int>(a) | static_cast<int>(b)
    \n+
    768 );
    \n+
    769 }
    \n+
    770
    \n+\n+
    773 {
    \n+
    774 return static_cast<int>(a) & static_cast<int>(b);
    \n+
    775 }
    \n+
    776
    \n+
    777 } // end namespace Gmsh
    \n+
    778
    \n+
    803 template<typename GridType>
    \n+\n+
    805 {
    \n+
    807
    \n+
    826 static void doRead(Dune::GridFactory<GridType> &factory,
    \n+
    827 const std::string &fileName,
    \n+
    828 std::vector<int>& boundarySegmentToPhysicalEntity,
    \n+
    829 std::vector<int>& elementToPhysicalEntity,
    \n+
    830 bool verbose, bool insertBoundarySegments)
    \n+
    831 {
    \n+
    832 // register boundary segment to boundary segment factory for possible load balancing
    \n+
    833 // this needs to be done on all cores since the type might not be known otherwise
    \n+
    834 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld >::registerFactory();
    \n+
    835
    \n+
    836#ifndef NDEBUG
    \n+
    837 // check that this method is called on all cores
    \n+
    838 factory.comm().barrier();
    \n+
    839#endif
    \n+
    840
    \n+
    841 // create parse object and read grid on process 0
    \n+
    842 if (factory.comm().rank() == 0)
    \n+
    843 {
    \n+
    844 GmshReaderParser<Grid> parser(factory,verbose,insertBoundarySegments);
    \n+
    845 parser.read(fileName);
    \n+
    846
    \n+
    847 boundarySegmentToPhysicalEntity = std::move(parser.boundaryIdMap());
    \n+
    848 elementToPhysicalEntity = std::move(parser.elementIndexMap());
    \n+
    849 }
    \n+
    850 else
    \n+
    851 {
    \n+
    852 boundarySegmentToPhysicalEntity = {};
    \n+
    853 elementToPhysicalEntity = {};
    \n+
    854 }
    \n+
    855 }
    \n+
    856
    \n+
    858
    \n+
    877 template<class T>
    \n+
    878 static T &discarded(T &&value) { return value; }
    \n+
    879
    \n+
    880 struct DataArg {
    \n+
    881 std::vector<int> *data_ = nullptr;
    \n+
    882 DataArg(std::vector<int> &data) : data_(&data) {}
    \n+
    883 DataArg(const decltype(std::ignore)&) {}
    \n+
    884 DataArg() = default;
    \n+
    885 };
    \n+
    886
    \n+
    887 struct DataFlagArg : DataArg {
    \n+
    888 bool flag_ = false;
    \n+
    889 using DataArg::DataArg;
    \n+
    890 DataFlagArg(bool flag) : flag_(flag) {}
    \n+
    891 };
    \n+
    892
    \n+
    893 public:
    \n+
    894 typedef GridType Grid;
    \n+
    895
    \n+
    902 static std::unique_ptr<Grid> read (const std::string& fileName, bool verbose = true, bool insertBoundarySegments=true)
    \n+
    903 {
    \n+
    904 // make a grid factory
    \n+\n+
    906
    \n+
    907 read(factory, fileName, verbose, insertBoundarySegments);
    \n+
    908
    \n+
    909 return factory.createGrid();
    \n+
    910 }
    \n+
    911
    \n+
    931 static std::unique_ptr<Grid> read (const std::string& fileName,
    \n+
    932 std::vector<int>& boundarySegmentToPhysicalEntity,
    \n+
    933 std::vector<int>& elementToPhysicalEntity,
    \n+
    934 bool verbose = true, bool insertBoundarySegments=true)
    \n+
    935 {
    \n+
    936 // make a grid factory
    \n+\n+
    938
    \n+
    939 doRead(
    \n+
    940 factory, fileName, boundarySegmentToPhysicalEntity,
    \n+
    941 elementToPhysicalEntity, verbose, insertBoundarySegments
    \n+
    942 );
    \n+
    943
    \n+
    944 return factory.createGrid();
    \n+
    945 }
    \n+
    946
    \n+
    948 static void read (Dune::GridFactory<Grid>& factory, const std::string& fileName,
    \n+
    949 bool verbose = true, bool insertBoundarySegments=true)
    \n+
    950 {
    \n+
    951 doRead(
    \n+
    952 factory, fileName, discarded(std::vector<int>{}),
    \n+
    953 discarded(std::vector<int>{}), verbose, insertBoundarySegments
    \n+
    954 );
    \n+
    955 }
    \n+
    956
    \n+
    958
    \n+
    981 static void read (Dune::GridFactory<Grid> &factory,
    \n+
    982 const std::string &fileName,
    \n+
    983 DataFlagArg boundarySegmentData,
    \n+
    984 DataArg elementData,
    \n+
    985 bool verbose=true)
    \n+
    986 {
    \n+
    987 doRead(
    \n+
    988 factory, fileName,
    \n+
    989 boundarySegmentData.data_
    \n+
    990 ? *boundarySegmentData.data_ : discarded(std::vector<int>{}),
    \n+
    991 elementData.data_
    \n+
    992 ? *elementData.data_ : discarded(std::vector<int>{}),
    \n+
    993 verbose,
    \n+
    994 boundarySegmentData.flag_ || boundarySegmentData.data_
    \n+
    995 );
    \n+
    996 }
    \n+
    997
    \n+
    1018 static void read (Dune::GridFactory<Grid>& factory,
    \n+
    1019 const std::string& fileName,
    \n+
    1020 std::vector<int>& boundarySegmentToPhysicalEntity,
    \n+
    1021 std::vector<int>& elementToPhysicalEntity,
    \n+
    1022 bool verbose, bool insertBoundarySegments)
    \n+
    1023 {
    \n+
    1024 doRead(
    \n+
    1025 factory, fileName, boundarySegmentToPhysicalEntity,
    \n+
    1026 elementToPhysicalEntity, verbose, insertBoundarySegments
    \n+
    1027 );
    \n+
    1028 }
    \n+
    1029
    \n+
    1031 //\\{
    \n+
    1032
    \n+
    1033 [[deprecated("Will be removed after 2.8. Either use other constructors or use static methods without constructing an object")]]
    \n+
    1034 GmshReader() = default;
    \n+
    1035
    \n+\n+
    1037
    \n+
    1038 static constexpr Opts defaultOpts =
    \n+
    1039 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | Opts::readBoundaryData;
    \n+
    1040
    \n+
    1042
    \n+
    1065 GmshReader(const std::string& fileName,
    \n+\n+
    1067 {
    \n+
    1068 gridFactory_ = std::make_unique<Dune::GridFactory<Grid>>();
    \n+
    1069 readGridFile(fileName, *gridFactory_, options);
    \n+
    1070 }
    \n+
    1071
    \n+
    1079 GmshReader(const std::string& fileName, GridFactory<Grid>& factory,
    \n+\n+
    1081 {
    \n+
    1082 readGridFile(fileName, factory, options);
    \n+
    1083 }
    \n+
    1084
    \n+
    1086 const std::vector<int>& elementData () const
    \n+
    1087 {
    \n+
    1088 checkElementData();
    \n+
    1089 return elementIndexToGmshPhysicalEntity_;
    \n+
    1090 }
    \n+
    1091
    \n+
    1093 const std::vector<int>& boundaryData () const
    \n+
    1094 {
    \n+
    1095 checkBoundaryData();
    \n+
    1096 return boundarySegmentIndexToGmshPhysicalEntity_;
    \n+
    1097 }
    \n+
    1098
    \n+
    1103 bool hasElementData () const
    \n+
    1104 { return hasElementData_ && !extractedElementData_; }
    \n+
    1105
    \n+
    1110 bool hasBoundaryData () const
    \n+
    1111 { return hasBoundaryData_ && !extractedBoundaryData_; }
    \n+
    1112
    \n+
    1114 std::vector<int> extractElementData ()
    \n+
    1115 {
    \n+
    1116 checkElementData();
    \n+
    1117 extractedElementData_ = true;
    \n+
    1118 return std::move(elementIndexToGmshPhysicalEntity_);
    \n+
    1119 }
    \n+
    1120
    \n+
    1122 std::vector<int> extractBoundaryData ()
    \n+
    1123 {
    \n+
    1124 checkBoundaryData();
    \n+
    1125 extractedBoundaryData_ = true;
    \n+
    1126 return std::move(boundarySegmentIndexToGmshPhysicalEntity_);
    \n+
    1127 }
    \n+
    1128
    \n+
    1130 std::unique_ptr<Grid> createGrid ()
    \n+
    1131 {
    \n+
    1132 if (!gridFactory_)
    \n+
    1133 DUNE_THROW(Dune::InvalidStateException,
    \n+
    1134 "This GmshReader has been constructed with a Dune::GridFactory. "
    \n+
    1135 << "This grid factory has been filled with all information to create a grid. "
    \n+
    1136 << "Please use this factory to create the grid by calling factory.createGrid(). "
    \n+
    1137 << "Alternatively use the constructor without passing the factory in combination with this member function."
    \n+
    1138 );
    \n+
    1139
    \n+
    1140 return gridFactory_->createGrid();
    \n+
    1141 }
    \n+
    1142
    \n+
    1143 //\\}
    \n+
    1144
    \n+
    1145 private:
    \n+
    1146 void checkElementData () const
    \n+
    1147 {
    \n+
    1148 if (!hasElementData_)
    \n+
    1149 DUNE_THROW(Dune::InvalidStateException,
    \n+
    1150 "This GmshReader has been constructed without the option 'readElementData'. "
    \n+
    1151 << "Please enable reading element data by passing the option 'Gmsh::ReaderOpts::readElementData' "
    \n+
    1152 << "to the constructor of this class."
    \n+
    1153 );
    \n+
    1154
    \n+
    1155 if (extractedElementData_)
    \n+
    1156 DUNE_THROW(Dune::InvalidStateException,
    \n+
    1157 "The element data has already been extracted from this GmshReader "
    \n+
    1158 << "via a function call to reader.extractElementData(). Use the extraced data or "
    \n+
    1159 << "read the grid data from file again by constructing a new reader."
    \n+
    1160 );
    \n+
    1161 }
    \n+
    1162
    \n+
    1163 void checkBoundaryData () const
    \n+
    1164 {
    \n+
    1165 if (!hasBoundaryData_)
    \n+
    1166 DUNE_THROW(Dune::InvalidStateException,
    \n+
    1167 "This GmshReader has been constructed without the option 'readBoundaryData'. "
    \n+
    1168 << "Please enable reading boundary data by passing the option 'Gmsh::ReaderOpts::readBoundaryData' "
    \n+
    1169 << "to the constructor of this class."
    \n+
    1170 );
    \n+
    1171
    \n+
    1172 if (extractedBoundaryData_)
    \n+
    1173 DUNE_THROW(Dune::InvalidStateException,
    \n+
    1174 "The boundary data has already been extracted from this GmshReader "
    \n+
    1175 << "via a function call to reader.extractBoundaryData(). Use the extraced data or "
    \n+
    1176 << "read the grid data from file again by constructing a new reader."
    \n+
    1177 );
    \n+
    1178 }
    \n+
    1179
    \n+
    1180 void readGridFile (const std::string& fileName, GridFactory<Grid>& factory, Gmsh::ReaderOptions options)
    \n+
    1181 {
    \n+
    1182 const bool verbose = options & Opts::verbose;
    \n+
    1183 const bool insertBoundarySegments = options & Opts::insertBoundarySegments;
    \n+
    1184 const bool readBoundaryData = options & Opts::readBoundaryData;
    \n+
    1185 const bool readElementData = options & Opts::readElementData;
    \n+
    1186
    \n+
    1187 doRead(
    \n+
    1188 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_,
    \n+
    1189 elementIndexToGmshPhysicalEntity_, verbose,
    \n+
    1190 readBoundaryData || insertBoundarySegments
    \n+
    1191 );
    \n+
    1192
    \n+
    1193 // clear unwanted data
    \n+
    1194 if (!readBoundaryData)
    \n+
    1195 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector<int>{};
    \n+
    1196 if (!readElementData)
    \n+
    1197 elementIndexToGmshPhysicalEntity_ = std::vector<int>{};
    \n+
    1198
    \n+
    1199 hasElementData_ = readElementData;
    \n+
    1200 hasBoundaryData_ = readBoundaryData;
    \n+
    1201 }
    \n+
    1202
    \n+
    1203 std::unique_ptr<Dune::GridFactory<Grid>> gridFactory_;
    \n+
    1204
    \n+
    1205 std::vector<int> elementIndexToGmshPhysicalEntity_;
    \n+
    1206 std::vector<int> boundarySegmentIndexToGmshPhysicalEntity_;
    \n+
    1207
    \n+
    1208 bool hasElementData_;
    \n+
    1209 bool hasBoundaryData_;
    \n+
    1210
    \n+
    1211 // for better error messages, we keep track of these separately
    \n+
    1212 bool extractedElementData_ = false;
    \n+
    1213 bool extractedBoundaryData_ = false;
    \n+
    1214 };
    \n+
    1215
    \n+
    1218} // namespace Dune
    \n+
    1219
    \n+
    1220#endif
    \n+
    Base class for grid boundary segments of arbitrary geometry.
    \n+
    ReaderOptions
    Option for the Gmsh mesh file reader.
    Definition: gmshreader.hh:756
    \n+\n+\n+\n+\n+
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n-
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n-
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n-
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n-
    Definition: basicwriter.hh:35
    \n-
    void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const
    Definition: basicwriter.hh:154
    \n-
    BasicWriter(const IteratorFactory &factory_)
    Definition: basicwriter.hh:67
    \n-
    std::string getSerialPieceName(const std::string &name, const std::string &path) const
    return name of a serial piece file
    Definition: basicwriter.hh:357
    \n-
    void writeCollection(const std::string name, const std::string &piecename, const std::string &piecepath)
    write header file in parallel case to stream
    Definition: basicwriter.hh:240
    \n-
    void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
    Definition: basicwriter.hh:176
    \n-
    void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
    Definition: basicwriter.hh:190
    \n-
    std::string pwrite(const std::string &name, const std::string &path, const std::string &extendpath, OutputType outputType)
    write output; interface might change later
    Definition: basicwriter.hh:395
    \n-
    void clear()
    Definition: basicwriter.hh:84
    \n-
    void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncells) const
    Definition: basicwriter.hh:95
    \n-
    void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncorners) const
    Definition: basicwriter.hh:121
    \n-
    std::string getParallelHeaderName(const std::string &name, const std::string &path) const
    return name of a parallel header file
    Definition: basicwriter.hh:325
    \n-
    void writePointData(VTUWriter &vtuWriter, unsigned npoints) const
    Definition: basicwriter.hh:165
    \n-
    static std::string getFirstVector(const WriterList &data)
    Definition: basicwriter.hh:146
    \n-
    FunctionWriterBase< Cell > FunctionWriter
    Definition: basicwriter.hh:43
    \n-
    void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned npoints) const
    Definition: basicwriter.hh:109
    \n-
    void writePiece(const std::string &filename, OutputType outputType)
    Definition: basicwriter.hh:198
    \n-
    void addCellData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:76
    \n-
    static std::string getFirstScalar(const WriterList &data)
    Definition: basicwriter.hh:138
    \n-
    std::string getParallelPieceName(const std::string &name, const std::string &path, int rank) const
    return name of a parallel piece file
    Definition: basicwriter.hh:295
    \n-
    std::string write(const std::string &name, OutputType outputType)
    write output (interface might change later)
    Definition: basicwriter.hh:436
    \n-
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n-\n-
    virtual void write(const Cell &, const Domain &)
    write at the given position
    Definition: functionwriter.hh:59
    \n-
    virtual void endWrite()=0
    signal end of writing
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
    start writing with the given writer
    \n-
    writer for the Coordinates array
    Definition: functionwriter.hh:147
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:165
    \n-
    writer for the offsets array
    Definition: functionwriter.hh:300
    \n-
    writer for the types array
    Definition: functionwriter.hh:340
    \n-
    Dump a .vtu/.vtp files contents to a stream.
    Definition: pvtuwriter.hh:62
    \n-
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: pvtuwriter.hh:195
    \n-
    void endCellData()
    finish CellData section
    Definition: pvtuwriter.hh:155
    \n-
    void beginMain(unsigned ghostLevel=0)
    start the main PPolyData/PUnstructuredGrid section
    Definition: pvtuwriter.hh:189
    \n-
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: pvtuwriter.hh:146
    \n-
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: pvtuwriter.hh:120
    \n-
    void addPiece(const std::string &filename)
    Add a serial piece to the output file.
    Definition: pvtuwriter.hh:215
    \n-
    void endPointData()
    finish PointData section
    Definition: pvtuwriter.hh:129
    \n-
    void endPoints()
    finish section for the point coordinates
    Definition: pvtuwriter.hh:171
    \n-
    void beginPoints()
    start section for the point coordinates
    Definition: pvtuwriter.hh:166
    \n-
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n-
    bool beginAppended()
    start the appended data section
    Definition: vtuwriter.hh:345
    \n-
    void endAppended()
    finish the appended data section
    Definition: vtuwriter.hh:359
    \n-
    void endCellData()
    finish CellData section
    Definition: vtuwriter.hh:220
    \n-
    void beginMain(unsigned ncells, unsigned npoints)
    start the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:310
    \n-
    void beginCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:274
    \n-
    void endPointData()
    finish PointData section
    Definition: vtuwriter.hh:182
    \n-
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: vtuwriter.hh:205
    \n-
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: vtuwriter.hh:167
    \n-
    void endPoints()
    finish section for the point coordinates
    Definition: vtuwriter.hh:249
    \n-
    void endCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:285
    \n-
    void beginPoints()
    start section for the point coordinates
    Definition: vtuwriter.hh:238
    \n-
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:320
    \n+
    static const int dimWorld
    Definition: misc.hh:46
    \n+
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n+
    constexpr bool operator&(ReaderOptions a, ReaderOptions b)
    query operator for reader options (is b set in a)
    Definition: gmshreader.hh:772
    \n+
    constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)
    composition operator for reader options
    Definition: gmshreader.hh:764
    \n+
    int renumber(const Dune::GeometryType &t, int i)
    renumber VTK <-> Dune
    Definition: common.hh:186
    \n+
    @ line
    Definition: common.hh:134
    \n+
    @ pyramid
    Definition: common.hh:141
    \n+
    @ quadrilateral
    Definition: common.hh:137
    \n+
    @ tetrahedron
    Definition: common.hh:138
    \n+
    @ prism
    Definition: common.hh:140
    \n+
    @ hexahedron
    Definition: common.hh:139
    \n+
    @ triangle
    Definition: common.hh:135
    \n+
    Base class for classes implementing geometries of boundary segments.
    Definition: boundarysegment.hh:94
    \n+
    Communication comm() const
    Return the Communication used by the grid factory.
    Definition: common/gridfactory.hh:297
    \n+
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:314
    \n+
    virtual std::unique_ptr< GridType > createGrid()
    Finalize grid creation and hand over the grid.
    Definition: common/gridfactory.hh:372
    \n+
    Options for read operation.
    Definition: gmshreader.hh:39
    \n+
    GeometryOrder
    Definition: gmshreader.hh:40
    \n+
    @ firstOrder
    edges are straight lines.
    Definition: gmshreader.hh:42
    \n+
    @ secondOrder
    quadratic boundary approximation.
    Definition: gmshreader.hh:44
    \n+
    dimension independent parts for GmshReaderParser
    Definition: gmshreader.hh:302
    \n+
    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:510
    \n+
    static const int dimWorld
    Definition: gmshreader.hh:320
    \n+
    Dune::GridFactory< GridType > & factory
    Definition: gmshreader.hh:305
    \n+
    std::vector< int > & boundaryIdMap()
    Definition: gmshreader.hh:357
    \n+
    std::vector< int > & elementIndexMap()
    Definition: gmshreader.hh:362
    \n+
    unsigned int number_of_real_vertices
    Definition: gmshreader.hh:308
    \n+
    void boundarysegment_insert(const std::vector< FieldVector< double, 3 > > &nodes, const E &elementDofs, const V &vertices)
    Definition: gmshreader.hh:573
    \n+
    GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)
    Definition: gmshreader.hh:354
    \n+
    int element_count
    Definition: gmshreader.hh:310
    \n+
    void read(const std::string &f)
    Definition: gmshreader.hh:367
    \n+
    void skipline(FILE *file)
    Definition: gmshreader.hh:344
    \n+
    void readfile(FILE *file, int cnt, const char *format, void *t1, void *t2=0, void *t3=0, void *t4=0, void *t5=0, void *t6=0, void *t7=0, void *t8=0, void *t9=0, void *t10=0)
    Definition: gmshreader.hh:330
    \n+
    std::vector< int > element_index_to_physical_entity
    Definition: gmshreader.hh:316
    \n+
    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:598
    \n+
    static const int dim
    Definition: gmshreader.hh:319
    \n+
    FieldVector< double, dimWorld > GlobalVector
    Definition: gmshreader.hh:324
    \n+
    std::string fileName
    Definition: gmshreader.hh:313
    \n+
    int boundary_element_count
    Definition: gmshreader.hh:309
    \n+
    void boundarysegment_insert(const V &, const E &, const V2 &)
    Definition: gmshreader.hh:562
    \n+
    bool verbose
    Definition: gmshreader.hh:306
    \n+
    std::vector< int > boundary_id_to_physical_entity
    Definition: gmshreader.hh:315
    \n+
    char buf[512]
    Definition: gmshreader.hh:312
    \n+
    bool insert_boundary_segments
    Definition: gmshreader.hh:307
    \n+
    Read Gmsh mesh file.
    Definition: gmshreader.hh:805
    \n+
    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:931
    \n+
    const std::vector< int > & elementData() const
    Access element data (maps element index to Gmsh physical entity)
    Definition: gmshreader.hh:1086
    \n+
    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:981
    \n+
    static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
    Definition: gmshreader.hh:902
    \n+
    static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
    Definition: gmshreader.hh:948
    \n+
    GridType Grid
    Definition: gmshreader.hh:894
    \n+
    std::unique_ptr< Grid > createGrid()
    Create the grid.
    Definition: gmshreader.hh:1130
    \n+
    std::vector< int > extractBoundaryData()
    Erase boundary data from reader and return the data.
    Definition: gmshreader.hh:1122
    \n+
    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:1018
    \n+
    bool hasElementData() const
    If element data is available.
    Definition: gmshreader.hh:1103
    \n+
    bool hasBoundaryData() const
    If boundary data is available.
    Definition: gmshreader.hh:1110
    \n+
    static constexpr Opts defaultOpts
    Definition: gmshreader.hh:1038
    \n+
    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:1079
    \n+
    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:1065
    \n+
    std::vector< int > extractElementData()
    Erase element data from reader and return the data.
    Definition: gmshreader.hh:1114
    \n+
    const std::vector< int > & boundaryData() const
    Access boundary data (maps boundary segment index to Gmsh physical entity)
    Definition: gmshreader.hh:1093
    \n+
    GmshReader()=default
    Dynamic Gmsh reader interface.
    \n+
    Provide a generic factory class for unstructured grids.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,606 +6,1331 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-basicwriter.hh\n+gmshreader.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH\n+ 6#ifndef DUNE_GMSHREADER_HH\n+ 7#define DUNE_GMSHREADER_HH\n 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15#include \n- 16\n- 17#include \n- 18#include \n- 19\n- 20#include \n- 21\n- 22#include \n- 23#include \n- 24#include \n- 25#include \n- 26\n- 27namespace Dune\n- 28{\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15#include \n+ 16#include \n+ 17#include \n+ 18#include \n+ 19#include \n+ 20\n+ 21#include \n+ 22#include \n+ 23\n+ 24#include \n+ 25\n+ 26#include \n+ 27#include \n+ 28\n+ 29namespace Dune\n+ 30{\n 31\n-32 namespace VTK {\n- 33\n- 34 template\n-35 class BasicWriter {\n- 36 typedef typename IteratorFactory::CellIterator CellIterator;\n- 37 typedef typename IteratorFactory::CornerIterator CornerIterator;\n- 38 typedef typename IteratorFactory::PointIterator PointIterator;\n- 39\n- 40 typedef typename IteratorFactory::Cell Cell;\n- 41\n- 42 public:\n-43 typedef FunctionWriterBase FunctionWriter;\n- 44\n- 45 private:\n- 46 typedef std::list > WriterList;\n- 47 typedef typename WriterList::const_iterator WIterator;\n- 48\n- 49 typedef typename Cell::Geometry::ctype ctype;\n- 50 static const unsigned celldim = Cell::mydimension;\n- 51 typedef ReferenceElements Refelems;\n- 52\n- 53 static const FileType fileType = celldim == 1\n- 54 ? polyData : unstructuredGrid;\n- 55\n- 56 const IteratorFactory& factory;\n- 57\n- 58 WriterList cellData;\n- 59 WriterList pointData;\n- 60\n- 61 CoordinatesWriter coords;\n- 62 typename IteratorFactory::ConnectivityWriter connectivity;\n- 63 OffsetsWriter offsets;\n- 64 TypesWriter types;\n- 65\n- 66 public:\n-67 BasicWriter(const IteratorFactory& factory_)\n- 68 : factory(factory_), connectivity(factory.makeConnectivity())\n- 69 { }\n- 70\n- 72 //\n- 73 // Methods for adding data\n- 74 //\n- 75\n-76 void addCellData(const std::shared_ptr& writer) {\n- 77 cellData.push_back(writer);\n- 78 }\n- 79\n-80 void addPointData(const std::shared_ptr& writer) {\n- 81 pointData.push_back(writer);\n- 82 }\n- 83\n-84 void clear() {\n- 85 cellData.clear();\n- 86 pointData.clear();\n- 87 }\n- 88\n- 89 protected:\n- 91 //\n- 92 // Methods for writing single functions\n- 93 //\n+38 struct GmshReaderOptions\n+ 39 {\n+40 enum GeometryOrder {\n+42 firstOrder,\n+ 44 secondOrder\n+45 };\n+ 46 };\n+ 47\n+ 48 namespace {\n+ 49\n+ 50 // arbitrary dimension, implementation is in specialization\n+ 51 template< int dimension, int dimWorld = dimension >\n+ 52 class GmshReaderQuadraticBoundarySegment\n+ 53 {\n+ 54 public:\n+ 55 // empty function since this class does not implement anything\n+ 56 static void registerFactory() {}\n+ 57 };\n+ 58\n+ 59 // quadratic boundary segments in 1d\n+ 60 /*\n+ 61 Note the points\n+ 62\n+ 63 (0) (alpha) (1)\n+ 64\n+ 65 are mapped to the points in global coordinates\n+ 66\n+ 67 p0 p2 p1\n+ 68\n+ 69 alpha is determined automatically from the given points.\n+ 70 */\n+ 71 template< int dimWorld >\n+ 72 struct GmshReaderQuadraticBoundarySegment< 2, dimWorld >\n+ 73 : public Dune::BoundarySegment< 2, dimWorld >\n+ 74 {\n+ 75 typedef GmshReaderQuadraticBoundarySegment< 2, dimWorld > ThisType;\n+ 76 typedef typename Dune::BoundarySegment<_2,_dimWorld_> :: ObjectStreamType\n+ObjectStreamType;\n+ 77 typedef Dune::FieldVector< double, dimWorld > GlobalVector;\n+ 78\n+ 79 GmshReaderQuadraticBoundarySegment ( const GlobalVector &p0_, const\n+GlobalVector &p1_, const GlobalVector &p2_)\n+ 80 : p0(p0_), p1(p1_), p2(p2_)\n+ 81 {\n+ 82 init();\n+ 83 }\n+ 84\n+ 85 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )\n+ 86 {\n+ 87 // key is read before by the factory\n+ 88 const int bytes = sizeof(double)*dimWorld;\n+ 89 in.read( (char *) &p0[ 0 ], bytes );\n+ 90 in.read( (char *) &p1[ 0 ], bytes );\n+ 91 in.read( (char *) &p2[ 0 ], bytes );\n+ 92 init();\n+ 93 }\n 94\n-95 void writeCellFunction(VTUWriter& vtuWriter,\n- 96 FunctionWriter& functionWriter,\n- 97 unsigned ncells) const\n+ 95 static void registerFactory()\n+ 96 {\n+ 97 if( key() < 0 )\n 98 {\n- 99 if(functionWriter.beginWrite(vtuWriter, ncells)) {\n- 100 const CellIterator& cellend = factory.endCells();\n- 101 for(CellIterator cellit = factory.beginCells(); cellit != cellend;\n- 102 ++cellit)\n- 103 functionWriter.write(*cellit, Refelems::general(cellit->type()).\n- 104 position(0,0));\n- 105 }\n- 106 functionWriter.endWrite();\n- 107 }\n- 108\n-109 void writePointFunction(VTUWriter& vtuWriter,\n- 110 FunctionWriter& functionWriter,\n- 111 unsigned npoints) const\n- 112 {\n- 113 if(functionWriter.beginWrite(vtuWriter, npoints)) {\n- 114 const PointIterator& pend = factory.endPoints();\n- 115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit)\n- 116 functionWriter.write(pit->cell(), pit->duneIndex());\n- 117 }\n- 118 functionWriter.endWrite();\n- 119 }\n- 120\n-121 void writeCornerFunction(VTUWriter& vtuWriter,\n- 122 FunctionWriter& functionWriter,\n- 123 unsigned ncorners) const\n- 124 {\n- 125 if(functionWriter.beginWrite(vtuWriter, ncorners)) {\n- 126 const CornerIterator& cend = factory.endCorners();\n- 127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit)\n- 128 functionWriter.write(cit->cell(), cit->duneIndex());\n- 129 }\n- 130 functionWriter.endWrite();\n- 131 }\n- 132\n- 134 //\n- 135 // Methods for writing whole sections\n- 136 //\n- 137\n-138 static std::string getFirstScalar(const WriterList& data) {\n- 139 const WIterator& wend = data.end();\n- 140 for(WIterator wit = data.begin(); wit != wend; ++wit)\n- 141 if((*wit)->ncomps() == 1)\n- 142 return (*wit)->name();\n- 143 return \"\";\n- 144 }\n- 145\n-146 static std::string getFirstVector(const WriterList& data) {\n- 147 const WIterator& wend = data.end();\n- 148 for(WIterator wit = data.begin(); wit != wend; ++wit)\n- 149 if((*wit)->ncomps() == 3)\n- 150 return (*wit)->name();\n- 151 return \"\";\n- 152 }\n- 153\n-154 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {\n- 155 if(cellData.empty()) return;\n+ 99 key() = Dune::BoundarySegment<_2,_dimWorld_>::template registerFactory<\n+ThisType >();\n+ 100 }\n+ 101 }\n+ 102\n+ 103 virtual GlobalVector operator() ( const Dune::FieldVector &local\n+) const\n+ 104 {\n+ 105 GlobalVector y;\n+ 106 y = 0.0;\n+ 107 y.axpy((local[0]-alpha)*(local[0]-1.0)/alpha,p0);\n+ 108 y.axpy(local[0]*(local[0]-1.0)/(alpha*(alpha-1.0)),p1);\n+ 109 y.axpy(local[0]*(local[0]-alpha)/(1.0-alpha),p2);\n+ 110 return y;\n+ 111 }\n+ 112\n+ 113 void backup( ObjectStreamType& out ) const\n+ 114 {\n+ 115 // backup key to identify object\n+ 116 out.write( (const char *) &key(), sizeof( int ) );\n+ 117 // backup data\n+ 118 const int bytes = sizeof(double)*dimWorld;\n+ 119 out.write( (const char*) &p0[ 0 ], bytes );\n+ 120 out.write( (const char*) &p1[ 0 ], bytes );\n+ 121 out.write( (const char*) &p2[ 0 ], bytes );\n+ 122 }\n+ 123\n+ 124 protected:\n+ 125 void init()\n+ 126 {\n+ 127 GlobalVector d1 = p1;\n+ 128 d1 -= p0;\n+ 129 GlobalVector d2 = p2;\n+ 130 d2 -= p1;\n+ 131\n+ 132 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());\n+ 133 if (alpha<1E-6 || alpha>1-1E-6)\n+ 134 DUNE_THROW(Dune::IOError, \"ration in quadratic boundary segment bad\");\n+ 135 }\n+ 136\n+ 137 static int& key() {\n+ 138 static int k = -1;\n+ 139 return k;\n+ 140 }\n+ 141\n+ 142 private:\n+ 143 GlobalVector p0,p1,p2;\n+ 144 double alpha;\n+ 145 };\n+ 146\n+ 147\n+ 148 // quadratic boundary segments in 2d\n+ 149 /* numbering of points corresponding to gmsh:\n+ 150\n+ 151 2\n+ 152\n+ 153 5 4\n+ 154\n+ 155 0 3 1\n 156\n- 157 vtuWriter.beginCellData(getFirstScalar(cellData),\n- 158 getFirstVector(cellData));\n- 159 const WIterator& wend = cellData.end();\n- 160 for(WIterator wit = cellData.begin(); wit != wend; ++wit)\n- 161 writeCellFunction(vtuWriter, **wit, ncells);\n- 162 vtuWriter.endCellData();\n- 163 }\n- 164\n-165 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {\n- 166 if(pointData.empty()) return;\n+ 157 Note: The vertices 3, 4, 5 are not necessarily at the edge midpoints but\n+can\n+ 158 be placed with parameters alpha, beta , gamma at the following positions\n+ 159 in local coordinates:\n+ 160\n+ 161\n+ 162 2 = (0,1)\n+ 163\n+ 164 5 = (0,beta) 4 = (1-gamma/sqrt(2),gamma/sqrt(2))\n+ 165\n+ 166 0 = (0,0) 3 = (alpha,0) 1 = (1,0)\n 167\n- 168 vtuWriter.beginPointData(getFirstScalar(pointData),\n- 169 getFirstVector(pointData));\n- 170 const WIterator& wend = pointData.end();\n- 171 for(WIterator wit = pointData.begin(); wit != wend; ++wit)\n- 172 writePointFunction(vtuWriter, **wit, npoints);\n- 173 vtuWriter.endPointData();\n- 174 }\n- 175\n-176 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,\n- 177 unsigned ncorners) {\n- 178 vtuWriter.beginPoints();\n- 179 writePointFunction(vtuWriter, coords, npoints);\n- 180 vtuWriter.endPoints();\n- 181\n- 182 vtuWriter.beginCells();\n- 183 writeCornerFunction(vtuWriter, connectivity, ncorners);\n- 184 writeCellFunction(vtuWriter, offsets, ncells);\n- 185 if(fileType != polyData)\n- 186 writeCellFunction(vtuWriter, types, ncells);\n- 187 vtuWriter.endCells();\n- 188 }\n- 189\n-190 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,\n- 191 unsigned ncorners) {\n- 192 writeCellData(vtuWriter, ncells);\n- 193 writePointData(vtuWriter, npoints);\n- 194 writeGrid(vtuWriter, ncells, npoints, ncorners);\n- 195 }\n- 196\n- 197 public:\n-198 void writePiece(const std::string& filename, OutputType outputType) {\n- 199 std::ofstream stream;\n- 200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n- 201 std::ios_base::eofbit);\n- 202 stream.open(filename.c_str(), std::ios::binary);\n- 203\n- 204 VTUWriter vtuWriter(stream, outputType, fileType);\n+ 168 The parameters alpha, beta, gamma are determined from the given vertices\n+in\n+ 169 global coordinates.\n+ 170 */\n+ 171 template<>\n+ 172 class GmshReaderQuadraticBoundarySegment< 3, 3 >\n+ 173 : public Dune::BoundarySegment< 3 >\n+ 174 {\n+ 175 typedef GmshReaderQuadraticBoundarySegment< 3, 3 > ThisType;\n+ 176 typedef typename Dune::BoundarySegment<_3_> :: ObjectStreamType\n+ObjectStreamType;\n+ 177 public:\n+ 178 GmshReaderQuadraticBoundarySegment (Dune::FieldVector p0_,\n+Dune::FieldVector p1_,\n+ 179 Dune::FieldVector p2_, Dune::FieldVector p3_,\n+ 180 Dune::FieldVector p4_, Dune::FieldVector p5_)\n+ 181 : p0(p0_), p1(p1_), p2(p2_), p3(p3_), p4(p4_), p5(p5_)\n+ 182 {\n+ 183 init();\n+ 184 }\n+ 185\n+ 186 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )\n+ 187 {\n+ 188 const int bytes = sizeof(double)*3;\n+ 189 in.read( (char *) &p0[ 0 ], bytes );\n+ 190 in.read( (char *) &p1[ 0 ], bytes );\n+ 191 in.read( (char *) &p2[ 0 ], bytes );\n+ 192 in.read( (char *) &p3[ 0 ], bytes );\n+ 193 in.read( (char *) &p4[ 0 ], bytes );\n+ 194 in.read( (char *) &p5[ 0 ], bytes );\n+ 195 init();\n+ 196 }\n+ 197\n+ 198 static void registerFactory()\n+ 199 {\n+ 200 if( key() < 0 )\n+ 201 {\n+ 202 key() = Dune::BoundarySegment<_3_>::template registerFactory< ThisType >\n+();\n+ 203 }\n+ 204 }\n 205\n- 206 unsigned ncells = std::distance(factory.beginCells(),\n- 207 factory.endCells());\n- 208 unsigned npoints = std::distance(factory.beginPoints(),\n- 209 factory.endPoints());\n- 210 unsigned ncorners = std::distance(factory.beginCorners(),\n- 211 factory.endCorners());\n- 212\n- 213 vtuWriter.beginMain(ncells, npoints);\n- 214 writeAll(vtuWriter, ncells, npoints, ncorners);\n- 215 vtuWriter.endMain();\n- 216\n- 217 if(vtuWriter.beginAppended())\n- 218 writeAll(vtuWriter, ncells, npoints, ncorners);\n- 219 vtuWriter.endAppended();\n- 220\n- 221 }\n- 222\n- 224\n-240 void writeCollection(const std::string name,\n- 241 const std::string& piecename,\n- 242 const std::string& piecepath)\n- 243 {\n- 244 std::ofstream stream;\n- 245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n- 246 std::ios_base::eofbit);\n- 247 stream.open(name.c_str(), std::ios::binary);\n- 248\n- 249 PVTUWriter writer(stream, fileType);\n- 250\n- 251 writer.beginMain();\n- 252\n- 253 // PPointData\n- 254 writer.beginPointData(getFirstScalar(pointData),\n- 255 getFirstVector(pointData));\n- 256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)\n- 257 (*it)->addArray(writer);\n- 258 writer.endPointData();\n- 259\n- 260 // PCellData\n- 261 writer.beginCellData(getFirstScalar(cellData),\n- 262 getFirstVector(cellData));\n- 263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)\n- 264 (*it)->addArray(writer);\n- 265 writer.endCellData();\n- 266\n- 267 // PPoints\n- 268 writer.beginPoints();\n- 269 coords.addArray(writer);\n- 270 writer.endPoints();\n- 271\n- 272 // Pieces\n- 273 for( int i = 0; i < factory.comm().size(); ++i )\n- 274 writer.addPiece(getParallelPieceName(piecename, piecepath, i));\n- 275\n- 276 writer.endMain();\n- 277 }\n- 278\n- 280 //\n- 281 // Filename generators\n- 282 //\n- 283\n- 285\n-295 std::string getParallelPieceName(const std::string& name,\n- 296 const std::string& path, int rank) const\n- 297 {\n- 298 std::ostringstream s;\n- 299 if(path.size() > 0) {\n- 300 s << path;\n- 301 if(path[path.size()-1] != '/')\n- 302 s << '/';\n- 303 }\n- 304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()\n- 305 << ':';\n- 306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';\n- 307 s << name;\n- 308 switch(fileType) {\n- 309 case polyData : s << \".vtp\"; break;\n- 310 case unstructuredGrid : s << \".vtu\"; break;\n- 311 }\n- 312 return s.str();\n- 313 }\n- 314\n- 316\n-325 std::string getParallelHeaderName(const std::string& name,\n- 326 const std::string& path) const\n- 327 {\n- 328 std::ostringstream s;\n- 329 if(path.size() > 0) {\n- 330 s << path;\n- 331 if(path[path.size()-1] != '/')\n- 332 s << '/';\n- 333 }\n- 334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()\n- 335 << ':';\n- 336 s << name;\n- 337 switch(fileType) {\n- 338 case polyData : s << \".pvtp\"; break;\n- 339 case unstructuredGrid : s << \".pvtu\"; break;\n- 340 }\n- 341 return s.str();\n- 342 }\n- 343\n- 345\n-357 std::string getSerialPieceName(const std::string& name,\n- 358 const std::string& path) const\n- 359 {\n- 360 switch(fileType) {\n- 361 case polyData : return concatPaths(path, name+\".vtp\");\n- 362 case unstructuredGrid : return concatPaths(path, name+\".vtu\");\n- 363 }\n- 364 return concatPaths(path, name); // unknown fileType\n+ 206 virtual Dune::FieldVector operator() (const Dune::\n+FieldVector& local) const\n+ 207 {\n+ 208 Dune::FieldVector y;\n+ 209 y = 0.0;\n+ 210 y.axpy(phi0(local),p0);\n+ 211 y.axpy(phi1(local),p1);\n+ 212 y.axpy(phi2(local),p2);\n+ 213 y.axpy(phi3(local),p3);\n+ 214 y.axpy(phi4(local),p4);\n+ 215 y.axpy(phi5(local),p5);\n+ 216 return y;\n+ 217 }\n+ 218\n+ 219 void backup( ObjectStreamType& out ) const\n+ 220 {\n+ 221 // backup key to identify object in factory\n+ 222 out.write( (const char*) &key(), sizeof( int ) );\n+ 223 // backup data\n+ 224 const int bytes = sizeof(double)*3;\n+ 225 out.write( (const char*) &p0[ 0 ], bytes );\n+ 226 out.write( (const char*) &p1[ 0 ], bytes );\n+ 227 out.write( (const char*) &p2[ 0 ], bytes );\n+ 228 out.write( (const char*) &p3[ 0 ], bytes );\n+ 229 out.write( (const char*) &p4[ 0 ], bytes );\n+ 230 out.write( (const char*) &p5[ 0 ], bytes );\n+ 231 }\n+ 232\n+ 233 protected:\n+ 234 void init()\n+ 235 {\n+ 236 using std::sqrt;\n+ 237 sqrt2 = sqrt(2.0);\n+ 238 Dune::FieldVector d1,d2;\n+ 239\n+ 240 d1 = p3; d1 -= p0;\n+ 241 d2 = p1; d2 -= p3;\n+ 242 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());\n+ 243 if (alpha<1E-6 || alpha>1-1E-6)\n+ 244 DUNE_THROW(Dune::IOError, \"alpha in quadratic boundary segment bad\");\n+ 245\n+ 246 d1 = p5; d1 -= p0;\n+ 247 d2 = p2; d2 -= p5;\n+ 248 beta=d1.two_norm()/(d1.two_norm()+d2.two_norm());\n+ 249 if (beta<1E-6 || beta>1-1E-6)\n+ 250 DUNE_THROW(Dune::IOError, \"beta in quadratic boundary segment bad\");\n+ 251\n+ 252 d1 = p4; d1 -= p1;\n+ 253 d2 = p2; d2 -= p4;\n+ 254 gamma=sqrt2*(d1.two_norm()/(d1.two_norm()+d2.two_norm()));\n+ 255 if (gamma<1E-6 || gamma>1-1E-6)\n+ 256 DUNE_THROW(Dune::IOError, \"gamma in quadratic boundary segment bad\");\n+ 257 }\n+ 258\n+ 259 static int& key() {\n+ 260 static int k = -1;\n+ 261 return k;\n+ 262 }\n+ 263\n+ 264 private:\n+ 265 // The six Lagrange basis function on the reference element\n+ 266 // for the points given above\n+ 267\n+ 268 double phi0 (const Dune::FieldVector& local) const\n+ 269 {\n+ 270 return (alpha*beta-beta*local[0]-alpha*local[1])*(1-local[0]-local[1])/\n+(alpha*beta);\n+ 271 }\n+ 272 double phi3 (const Dune::FieldVector& local) const\n+ 273 {\n+ 274 return local[0]*(1-local[0]-local[1])/(alpha*(1-alpha));\n+ 275 }\n+ 276 double phi1 (const Dune::FieldVector& local) const\n+ 277 {\n+ 278 return local[0]*(gamma*local[0]-(sqrt2-gamma-sqrt2*alpha)*local[1]-\n+alpha*gamma)/(gamma*(1-alpha));\n+ 279 }\n+ 280 double phi5 (const Dune::FieldVector& local) const\n+ 281 {\n+ 282 return local[1]*(1-local[0]-local[1])/(beta*(1-beta));\n+ 283 }\n+ 284 double phi4 (const Dune::FieldVector& local) const\n+ 285 {\n+ 286 return local[0]*local[1]/((1-gamma/sqrt2)*gamma/sqrt2);\n+ 287 }\n+ 288 double phi2 (const Dune::FieldVector& local) const\n+ 289 {\n+ 290 return local[1]*(beta*(1-gamma/sqrt2)-local[0]*(beta-gamma/sqrt2)-local\n+[1]*(1-gamma/sqrt2))/((1-gamma/sqrt2)*(beta-1));\n+ 291 }\n+ 292\n+ 293 Dune::FieldVector p0,p1,p2,p3,p4,p5;\n+ 294 double alpha,beta,gamma,sqrt2;\n+ 295 };\n+ 296\n+ 297 } // end empty namespace\n+ 298\n+ 300 template\n+301 class GmshReaderParser\n+ 302 {\n+ 303 protected:\n+ 304 // private data\n+305 Dune::GridFactory& factory;\n+306 bool verbose;\n+307 bool insert_boundary_segments;\n+308 unsigned int number_of_real_vertices;\n+309 int boundary_element_count;\n+310 int element_count;\n+ 311 // read buffer\n+312 char buf[512];\n+313 std::string fileName;\n+ 314 // exported data\n+315 std::vector boundary_id_to_physical_entity;\n+316 std::vector element_index_to_physical_entity;\n+ 317\n+ 318 // static data\n+319 static const int dim = GridType::dimension;\n+320 static const int dimWorld = GridType::dimensionworld;\n+ 321 static_assert( (dimWorld <= 3), \"GmshReader requires dimWorld <= 3.\" );\n+ 322\n+ 323 // typedefs\n+324 typedef FieldVector< double, dimWorld > GlobalVector;\n+ 325\n+ 326 // don't use something like\n+ 327 // readfile(file, 1, \"%s\\n\", buf);\n+ 328 // to skip the rest of of the line -- that will only skip the next\n+ 329 // whitespace-separated word! Use skipline() instead.\n+330 void readfile(FILE * file, int cnt, const char * format,\n+ 331 void* t1, void* t2 = 0, void* t3 = 0, void* t4 = 0,\n+ 332 void* t5 = 0, void* t6 = 0, void* t7 = 0, void* t8 = 0,\n+ 333 void* t9 = 0, void* t10 = 0)\n+ 334 {\n+ 335 off_t pos = ftello(file);\n+ 336 int c = fscanf(file, format, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);\n+ 337 if (c != cnt)\n+ 338 DUNE_THROW(Dune::IOError, \"Error parsing \" << fileName << \" \"\n+ 339 \"file pos \" << pos\n+ 340 << \": Expected '\" << format << \"', only read \" << c << \" entries instead\n+of \" << cnt << \".\");\n+ 341 }\n+ 342\n+ 343 // skip over the rest of the line, including the terminating newline\n+344 void skipline(FILE * file)\n+ 345 {\n+ 346 int c;\n+ 347 do {\n+ 348 c = std::fgetc(file);\n+ 349 } while(c != '\\n' && c != EOF);\n+ 350 }\n+ 351\n+ 352 public:\n+ 353\n+354 GmshReaderParser(Dune::GridFactory& _factory, bool v, bool i) :\n+ 355 factory(_factory), verbose(v), insert_boundary_segments(i) {}\n+ 356\n+357 std::vector & boundaryIdMap()\n+ 358 {\n+ 359 return boundary_id_to_physical_entity;\n+ 360 }\n+ 361\n+362 std::vector & elementIndexMap()\n+ 363 {\n+ 364 return element_index_to_physical_entity;\n 365 }\n 366\n- 368 //\n- 369 // User interface functions for writing\n- 370 //\n- 371\n- 373\n-395 std::string pwrite(const std::string& name, const std::string& path,\n- 396 const std::string& extendpath, OutputType outputType)\n- 397 {\n- 398 MPIGuard guard(factory.comm());\n- 399\n- 400 // do some magic because paraview can only cope with relative paths to\n- 401 // piece files\n- 402 std::ofstream file;\n- 403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n- 404 std::ios_base::eofbit);\n- 405 std::string piecepath = concatPaths(path, extendpath);\n- 406 std::string relpiecepath = relativePath(path, piecepath);\n- 407\n- 408 // write this processes .vtu/.vtp piece file\n- 409 std::string fullname = getParallelPieceName(name, piecepath,\n- 410 factory.comm().rank());\n- 411 writePiece(fullname, outputType);\n- 412\n- 413 // if we are rank 0, write .pvtu/.pvtp parallel header\n- 414 fullname = getParallelHeaderName(name, path);\n- 415 if(factory.comm().rank() == 0)\n- 416 writeCollection(fullname, name, relpiecepath);\n- 417\n- 418 guard.finalize();\n+367 void read (const std::string& f)\n+ 368 {\n+ 369 if (verbose) std::cout << \"Reading \" << dim << \"d Gmsh grid...\" << std::\n+endl;\n+ 370\n+ 371 // open file name, we use C I/O\n+ 372 fileName = f;\n+ 373 FILE* file = fopen(fileName.c_str(),\"rb\");\n+ 374 if (file==0)\n+ 375 DUNE_THROW(Dune::IOError, \"Could not open \" << fileName);\n+ 376\n+ 377 //=========================================\n+ 378 // Header: Read vertices into vector\n+ 379 // Check vertices that are needed\n+ 380 //=========================================\n+ 381\n+ 382 number_of_real_vertices = 0;\n+ 383 boundary_element_count = 0;\n+ 384 element_count = 0;\n+ 385\n+ 386 // process header\n+ 387 double version_number;\n+ 388 int file_type, data_size;\n+ 389\n+ 390 readfile(file,1,\"%s\\n\",buf);\n+ 391 if (strcmp(buf,\"$MeshFormat\")!=0)\n+ 392 DUNE_THROW(Dune::IOError, \"expected $MeshFormat in first line\");\n+ 393 readfile(file,3,\"%lg %d %d\\n\",&version_number,&file_type,&data_size);\n+ 394 if( (version_number < 2.0) || (version_number > 2.2) )\n+ 395 DUNE_THROW(Dune::IOError, \"can only read Gmsh version 2 files\");\n+ 396 if (verbose) std::cout << \"version \" << version_number << \" Gmsh file\n+detected\" << std::endl;\n+ 397 readfile(file,1,\"%s\\n\",buf);\n+ 398 if (strcmp(buf,\"$EndMeshFormat\")!=0)\n+ 399 DUNE_THROW(Dune::IOError, \"expected $EndMeshFormat\");\n+ 400\n+ 401 // node section\n+ 402 int number_of_nodes;\n+ 403\n+ 404 readfile(file,1,\"%s\\n\",buf);\n+ 405 if (strcmp(buf,\"$Nodes\")!=0)\n+ 406 DUNE_THROW(Dune::IOError, \"expected $Nodes\");\n+ 407 readfile(file,1,\"%d\\n\",&number_of_nodes);\n+ 408 if (verbose) std::cout << \"file contains \" << number_of_nodes << \" nodes\"\n+<< std::endl;\n+ 409\n+ 410 // read nodes\n+ 411 // The '+1' is due to the fact that gmsh numbers node starting from 1\n+rather than from 0\n+ 412 std::vector< GlobalVector > nodes( number_of_nodes+1 );\n+ 413 {\n+ 414 int id;\n+ 415 double x[ 3 ];\n+ 416 for( int i = 1; i <= number_of_nodes; ++i )\n+ 417 {\n+ 418 readfile(file,4, \"%d %lg %lg %lg\\n\", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] );\n 419\n- 420 return fullname;\n- 421 }\n- 422\n-436 std::string write(const std::string &name, OutputType outputType)\n- 437 {\n- 438 // in the parallel case, just use pwrite, it has all the necessary\n- 439 // stuff, so we don't need to reimplement it here.\n- 440 if(factory.comm().size() > 1)\n- 441 return pwrite(name, \"\", \"\", outputType);\n+ 420 if (id > number_of_nodes) {\n+ 421 DUNE_THROW(Dune::IOError,\n+ 422 \"Only dense sequences of node indices are currently supported (node index\n+\"\n+ 423 << id << \" is invalid).\");\n+ 424 }\n+ 425\n+ 426 // just store node position\n+ 427 for( int j = 0; j < dimWorld; ++j )\n+ 428 nodes[ id ][ j ] = x[ j ];\n+ 429 }\n+ 430 readfile(file,1,\"%s\\n\",buf);\n+ 431 if (strcmp(buf,\"$EndNodes\")!=0)\n+ 432 DUNE_THROW(Dune::IOError, \"expected $EndNodes\");\n+ 433 }\n+ 434\n+ 435 // element section\n+ 436 readfile(file,1,\"%s\\n\",buf);\n+ 437 if (strcmp(buf,\"$Elements\")!=0)\n+ 438 DUNE_THROW(Dune::IOError, \"expected $Elements\");\n+ 439 int number_of_elements;\n+ 440 readfile(file,1,\"%d\\n\",&number_of_elements);\n+ 441 if (verbose) std::cout << \"file contains \" << number_of_elements << \"\n+elements\" << std::endl;\n 442\n- 443 // generate filename for process data\n- 444 std::string pieceName = getSerialPieceName(name, \"\");\n- 445\n- 446 writePiece(pieceName, outputType);\n+ 443 //=========================================\n+ 444 // Pass 1: Select and insert those vertices in the file that\n+ 445 // actually occur as corners of an element.\n+ 446 //=========================================\n 447\n- 448 return pieceName;\n- 449 }\n- 450\n- 451 };\n- 452\n- 453 } // namespace VTK\n- 454\n- 456\n- 457} // namespace Dune\n- 458\n- 459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH\n-pvtuwriter.hh\n-functionwriter.hh\n-vtuwriter.hh\n-common.hh\n-Common stuff for the VTKWriter.\n+ 448 off_t section_element_offset = ftello(file);\n+ 449 std::map renumber;\n+ 450 for (int i=1; i<=number_of_elements; i++)\n+ 451 {\n+ 452 int id, elm_type, number_of_tags;\n+ 453 readfile(file,3,\"%d %d %d \",&id,&elm_type,&number_of_tags);\n+ 454 for (int k=1; k<=number_of_tags; k++)\n+ 455 {\n+ 456 int blub;\n+ 457 readfile(file,1,\"%d \",&blub);\n+ 458 // k == 1: physical entity (not used here)\n+ 459 // k == 2: elementary entity (not used here either)\n+ 460 // if version_number < 2.2:\n+ 461 // k == 3: mesh partition 0\n+ 462 // else\n+ 463 // k == 3: number of mesh partitions\n+ 464 // k => 4: mesh partition k-4\n+ 465 }\n+ 466 pass1HandleElement(file, elm_type, renumber, nodes);\n+ 467 }\n+ 468 if (verbose) std::cout << \"number of real vertices = \" <<\n+number_of_real_vertices << std::endl;\n+ 469 if (verbose) std::cout << \"number of boundary elements = \" <<\n+boundary_element_count << std::endl;\n+ 470 if (verbose) std::cout << \"number of elements = \" << element_count <<\n+std::endl;\n+ 471 readfile(file,1,\"%s\\n\",buf);\n+ 472 if (strcmp(buf,\"$EndElements\")!=0)\n+ 473 DUNE_THROW(Dune::IOError, \"expected $EndElements\");\n+ 474 boundary_id_to_physical_entity.resize(boundary_element_count);\n+ 475 element_index_to_physical_entity.resize(element_count);\n+ 476\n+ 477 //==============================================\n+ 478 // Pass 2: Insert boundary segments and elements\n+ 479 //==============================================\n+ 480\n+ 481 fseeko(file, section_element_offset, SEEK_SET);\n+ 482 boundary_element_count = 0;\n+ 483 element_count = 0;\n+ 484 for (int i=1; i<=number_of_elements; i++)\n+ 485 {\n+ 486 int id, elm_type, number_of_tags;\n+ 487 readfile(file,3,\"%d %d %d \",&id,&elm_type,&number_of_tags);\n+ 488 int physical_entity = -1;\n+ 489\n+ 490 for (int k=1; k<=number_of_tags; k++)\n+ 491 {\n+ 492 int blub;\n+ 493 readfile(file,1,\"%d \",&blub);\n+ 494 if (k==1) physical_entity = blub;\n+ 495 }\n+ 496 pass2HandleElement(file, elm_type, renumber, nodes, physical_entity);\n+ 497 }\n+ 498 readfile(file,1,\"%s\\n\",buf);\n+ 499 if (strcmp(buf,\"$EndElements\")!=0)\n+ 500 DUNE_THROW(Dune::IOError, \"expected $EndElements\");\n+ 501\n+ 502 fclose(file);\n+ 503 }\n+ 504\n+510 void pass1HandleElement(FILE* file, const int elm_type,\n+ 511 std::map & renumber,\n+ 512 const std::vector< GlobalVector > & nodes)\n+ 513 {\n+ 514 // some data about gmsh elements\n+ 515 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1,\n+1};\n+ 516 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -\n+1, 1};\n+ 517 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1,\n+-1, 0};\n+ 518\n+ 519 // test whether we support the element type\n+ 520 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?\n+ 521 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) /\n+/ real element or boundary element?\n+ 522 {\n+ 523 skipline(file); // skip rest of line if element is unknown\n+ 524 return;\n+ 525 }\n+ 526\n+ 527 // The format string for parsing is n times '%d' in a row\n+ 528 std::string formatString = \"%d\";\n+ 529 for (int i=1; i elementDofs(10);\n+ 535\n+ 536 readfile(file,nDofs[elm_type], formatString.c_str(),\n+ 537 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),\n+ 538 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),\n+ 539 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),\n+ 540 &(elementDofs[9]));\n+ 541\n+ 542 // insert each vertex if it hasn't been inserted already\n+ 543 for (int i=0; i\n+562 void boundarysegment_insert(\n+ 563 const V&,\n+ 564 const E&,\n+ 565 const V2&\n+ 566 )\n+ 567 {\n+ 568 DUNE_THROW(Dune::IOError, \"tried to create a 3D boundary segment in a non-\n+3D Grid\");\n+ 569 }\n+ 570\n+ 571 // 3d-case:\n+ 572 template \n+573 void boundarysegment_insert(\n+ 574 const std::vector >& nodes,\n+ 575 const E& elementDofs,\n+ 576 const V& vertices\n+ 577 )\n+ 578 {\n+ 579 std::array, 6> v;\n+ 580 for (int i=0; i<6; i++)\n+ 581 for (int j=0; j* newBoundarySegment\n+ 585 = (BoundarySegment*) new GmshReaderQuadraticBoundarySegment<\n+3, 3 >( v[0], v[1], v[2],\n+ 586 v[3], v[4], v[5] );\n+ 587\n+ 588 factory.insertBoundarySegment( vertices,\n+ 589 std::shared_ptr >(newBoundarySegment) );\n+ 590 }\n+ 591\n+ 592\n+ 593\n+598 virtual void pass2HandleElement(FILE* file, const int elm_type,\n+ 599 std::map & renumber,\n+ 600 const std::vector< GlobalVector > & nodes,\n+ 601 const int physical_entity)\n+ 602 {\n+ 603 // some data about gmsh elements\n+ 604 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1,\n+1};\n+ 605 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -\n+1, 1};\n+ 606 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1,\n+-1, 0};\n+ 607\n+ 608 // test whether we support the element type\n+ 609 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?\n+ 610 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) /\n+/ real element or boundary element?\n+ 611 {\n+ 612 skipline(file); // skip rest of line if element is unknown\n+ 613 return;\n+ 614 }\n+ 615\n+ 616 // The format string for parsing is n times '%d' in a row\n+ 617 std::string formatString = \"%d\";\n+ 618 for (int i=1; i elementDofs(10);\n+ 624\n+ 625 readfile(file,nDofs[elm_type], formatString.c_str(),\n+ 626 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),\n+ 627 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),\n+ 628 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),\n+ 629 &(elementDofs[9]));\n+ 630\n+ 631 // correct differences between gmsh and Dune in the local vertex numbering\n+ 632 switch (elm_type)\n+ 633 {\n+ 634 case 3 : // 4-node quadrilateral\n+ 635 std::swap(elementDofs[2],elementDofs[3]);\n+ 636 break;\n+ 637 case 5 : // 8-node hexahedron\n+ 638 std::swap(elementDofs[2],elementDofs[3]);\n+ 639 std::swap(elementDofs[6],elementDofs[7]);\n+ 640 break;\n+ 641 case 7 : // 5-node pyramid\n+ 642 std::swap(elementDofs[2],elementDofs[3]);\n+ 643 break;\n+ 644 }\n+ 645\n+ 646 // renumber corners to account for the explicitly given vertex\n+ 647 // numbering in the file\n+ 648 std::vector vertices(nVertices[elm_type]);\n+ 649\n+ 650 for (int i=0; i, 3> v;\n+ 711 for (int i=0; i* newBoundarySegment\n+ 717 = (BoundarySegment*) new GmshReaderQuadraticBoundarySegment<\n+2, dimWorld >(v[0], v[1], v[2]);\n+ 718 factory.insertBoundarySegment(vertices,\n+ 719 std::shared_ptr >(newBoundarySegment));\n+ 720 break;\n+ 721 }\n+ 722 case 9 : { // 6-node triangle\n+ 723 boundarysegment_insert(nodes, elementDofs, vertices);\n+ 724 break;\n+ 725 }\n+ 726 default: {\n+ 727 DUNE_THROW(Dune::IOError, \"GmshReader does not support using element-type\n+\" << elm_type << \" for boundary segments\");\n+ 728 break;\n+ 729 }\n+ 730\n+ 731 }\n+ 732\n+ 733 }\n+ 734 }\n+ 735\n+ 736 // count elements and boundary elements\n+ 737 if (elementDim[elm_type] == dim) {\n+ 738 element_index_to_physical_entity[element_count] = physical_entity;\n+ 739 element_count++;\n+ 740 } else {\n+ 741 boundary_id_to_physical_entity[boundary_element_count] = physical_entity;\n+ 742 boundary_element_count++;\n+ 743 }\n+ 744\n+ 745 }\n+ 746\n+ 747 };\n+ 748\n+749 namespace Gmsh {\n+755 enum class ReaderOptions\n+ 756 {\n+ 757 verbose = 1,\n+ 758 insertBoundarySegments = 2,\n+ 759 readElementData = 4,\n+ 760 readBoundaryData = 8\n+ 761 };\n+ 762\n+764 constexpr ReaderOptions operator_|(ReaderOptions a, ReaderOptions b)\n+ 765 {\n+ 766 return static_cast(\n+ 767 static_cast(a) | static_cast(b)\n+ 768 );\n+ 769 }\n+ 770\n+772 constexpr bool operator_&(ReaderOptions a, ReaderOptions b)\n+ 773 {\n+ 774 return static_cast(a) & static_cast(b);\n+ 775 }\n+ 776\n+ 777 } // end namespace Gmsh\n+ 778\n+ 803 template\n+804 class GmshReader\n+ 805 {\n+ 807\n+ 826 static void doRead(Dune::GridFactory &factory,\n+ 827 const std::string &fileName,\n+ 828 std::vector& boundarySegmentToPhysicalEntity,\n+ 829 std::vector& elementToPhysicalEntity,\n+ 830 bool verbose, bool insertBoundarySegments)\n+ 831 {\n+ 832 // register boundary segment to boundary segment factory for possible load\n+balancing\n+ 833 // this needs to be done on all cores since the type might not be known\n+otherwise\n+ 834 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld\n+>::registerFactory();\n+ 835\n+ 836#ifndef NDEBUG\n+ 837 // check that this method is called on all cores\n+ 838 factory.comm().barrier();\n+ 839#endif\n+ 840\n+ 841 // create parse object and read grid on process 0\n+ 842 if (factory.comm().rank() == 0)\n+ 843 {\n+ 844 GmshReaderParser parser(factory,verbose,insertBoundarySegments);\n+ 845 parser.read(fileName);\n+ 846\n+ 847 boundarySegmentToPhysicalEntity = std::move(parser.boundaryIdMap());\n+ 848 elementToPhysicalEntity = std::move(parser.elementIndexMap());\n+ 849 }\n+ 850 else\n+ 851 {\n+ 852 boundarySegmentToPhysicalEntity = {};\n+ 853 elementToPhysicalEntity = {};\n+ 854 }\n+ 855 }\n+ 856\n+ 858\n+ 877 template\n+ 878 static T &discarded(T &&value) { return value; }\n+ 879\n+ 880 struct DataArg {\n+ 881 std::vector *data_ = nullptr;\n+ 882 DataArg(std::vector &data) : data_(&data) {}\n+ 883 DataArg(const decltype(std::ignore)&) {}\n+ 884 DataArg() = default;\n+ 885 };\n+ 886\n+ 887 struct DataFlagArg : DataArg {\n+ 888 bool flag_ = false;\n+ 889 using DataArg::DataArg;\n+ 890 DataFlagArg(bool flag) : flag_(flag) {}\n+ 891 };\n+ 892\n+ 893 public:\n+894 typedef GridType Grid;\n+ 895\n+902 static std::unique_ptr read (const std::string& fileName, bool\n+verbose = true, bool insertBoundarySegments=true)\n+ 903 {\n+ 904 // make a grid factory\n+ 905 Dune::GridFactory factory;\n+ 906\n+ 907 read(factory, fileName, verbose, insertBoundarySegments);\n+ 908\n+ 909 return factory.createGrid();\n+ 910 }\n+ 911\n+931 static std::unique_ptr read (const std::string& fileName,\n+ 932 std::vector& boundarySegmentToPhysicalEntity,\n+ 933 std::vector& elementToPhysicalEntity,\n+ 934 bool verbose = true, bool insertBoundarySegments=true)\n+ 935 {\n+ 936 // make a grid factory\n+ 937 Dune::GridFactory factory;\n+ 938\n+ 939 doRead(\n+ 940 factory, fileName, boundarySegmentToPhysicalEntity,\n+ 941 elementToPhysicalEntity, verbose, insertBoundarySegments\n+ 942 );\n+ 943\n+ 944 return factory.createGrid();\n+ 945 }\n+ 946\n+948 static void read (Dune::GridFactory& factory, const std::string&\n+fileName,\n+ 949 bool verbose = true, bool insertBoundarySegments=true)\n+ 950 {\n+ 951 doRead(\n+ 952 factory, fileName, discarded(std::vector{}),\n+ 953 discarded(std::vector{}), verbose, insertBoundarySegments\n+ 954 );\n+ 955 }\n+ 956\n+ 958\n+981 static void read (Dune::GridFactory &factory,\n+ 982 const std::string &fileName,\n+ 983 DataFlagArg boundarySegmentData,\n+ 984 DataArg elementData,\n+ 985 bool verbose=true)\n+ 986 {\n+ 987 doRead(\n+ 988 factory, fileName,\n+ 989 boundarySegmentData.data_\n+ 990 ? *boundarySegmentData.data_ : discarded(std::vector{}),\n+ 991 elementData.data_\n+ 992 ? *elementData.data_ : discarded(std::vector{}),\n+ 993 verbose,\n+ 994 boundarySegmentData.flag_ || boundarySegmentData.data_\n+ 995 );\n+ 996 }\n+ 997\n+1018 static void read (Dune::GridFactory& factory,\n+ 1019 const std::string& fileName,\n+ 1020 std::vector& boundarySegmentToPhysicalEntity,\n+ 1021 std::vector& elementToPhysicalEntity,\n+ 1022 bool verbose, bool insertBoundarySegments)\n+ 1023 {\n+ 1024 doRead(\n+ 1025 factory, fileName, boundarySegmentToPhysicalEntity,\n+ 1026 elementToPhysicalEntity, verbose, insertBoundarySegments\n+ 1027 );\n+ 1028 }\n+ 1029\n+ 1031 //\\{\n+ 1032\n+ 1033 [[deprecated(\"Will be removed after 2.8. Either use other constructors or\n+use static methods without constructing an object\")]]\n+1034 GmshReader() = default;\n+ 1035\n+1036 using Opts = Gmsh::ReaderOptions;\n+ 1037\n+1038 static constexpr Opts defaultOpts =\n+ 1039 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData |\n+Opts::readBoundaryData;\n+ 1040\n+ 1042\n+1065 GmshReader(const std::string& fileName,\n+ 1066 Gmsh::ReaderOptions options = defaultOpts)\n+ 1067 {\n+ 1068 gridFactory_ = std::make_unique>();\n+ 1069 readGridFile(fileName, *gridFactory_, options);\n+ 1070 }\n+ 1071\n+1079 GmshReader(const std::string& fileName, GridFactory& factory,\n+ 1080 Gmsh::ReaderOptions options = defaultOpts)\n+ 1081 {\n+ 1082 readGridFile(fileName, factory, options);\n+ 1083 }\n+ 1084\n+1086 const std::vector& elementData () const\n+ 1087 {\n+ 1088 checkElementData();\n+ 1089 return elementIndexToGmshPhysicalEntity_;\n+ 1090 }\n+ 1091\n+1093 const std::vector& boundaryData () const\n+ 1094 {\n+ 1095 checkBoundaryData();\n+ 1096 return boundarySegmentIndexToGmshPhysicalEntity_;\n+ 1097 }\n+ 1098\n+1103 bool hasElementData () const\n+ 1104 { return hasElementData_ && !extractedElementData_; }\n+ 1105\n+1110 bool hasBoundaryData () const\n+ 1111 { return hasBoundaryData_ && !extractedBoundaryData_; }\n+ 1112\n+1114 std::vector extractElementData ()\n+ 1115 {\n+ 1116 checkElementData();\n+ 1117 extractedElementData_ = true;\n+ 1118 return std::move(elementIndexToGmshPhysicalEntity_);\n+ 1119 }\n+ 1120\n+1122 std::vector extractBoundaryData ()\n+ 1123 {\n+ 1124 checkBoundaryData();\n+ 1125 extractedBoundaryData_ = true;\n+ 1126 return std::move(boundarySegmentIndexToGmshPhysicalEntity_);\n+ 1127 }\n+ 1128\n+1130 std::unique_ptr createGrid ()\n+ 1131 {\n+ 1132 if (!gridFactory_)\n+ 1133 DUNE_THROW(Dune::InvalidStateException,\n+ 1134 \"This GmshReader has been constructed with a Dune::GridFactory. \"\n+ 1135 << \"This grid factory has been filled with all information to create a\n+grid. \"\n+ 1136 << \"Please use this factory to create the grid by calling\n+factory.createGrid(). \"\n+ 1137 << \"Alternatively use the constructor without passing the factory in\n+combination with this member function.\"\n+ 1138 );\n+ 1139\n+ 1140 return gridFactory_->createGrid();\n+ 1141 }\n+ 1142\n+ 1143 //\\}\n+ 1144\n+ 1145 private:\n+ 1146 void checkElementData () const\n+ 1147 {\n+ 1148 if (!hasElementData_)\n+ 1149 DUNE_THROW(Dune::InvalidStateException,\n+ 1150 \"This GmshReader has been constructed without the option\n+'readElementData'. \"\n+ 1151 << \"Please enable reading element data by passing the option 'Gmsh::\n+ReaderOpts::readElementData' \"\n+ 1152 << \"to the constructor of this class.\"\n+ 1153 );\n+ 1154\n+ 1155 if (extractedElementData_)\n+ 1156 DUNE_THROW(Dune::InvalidStateException,\n+ 1157 \"The element data has already been extracted from this GmshReader \"\n+ 1158 << \"via a function call to reader.extractElementData(). Use the extraced\n+data or \"\n+ 1159 << \"read the grid data from file again by constructing a new reader.\"\n+ 1160 );\n+ 1161 }\n+ 1162\n+ 1163 void checkBoundaryData () const\n+ 1164 {\n+ 1165 if (!hasBoundaryData_)\n+ 1166 DUNE_THROW(Dune::InvalidStateException,\n+ 1167 \"This GmshReader has been constructed without the option\n+'readBoundaryData'. \"\n+ 1168 << \"Please enable reading boundary data by passing the option 'Gmsh::\n+ReaderOpts::readBoundaryData' \"\n+ 1169 << \"to the constructor of this class.\"\n+ 1170 );\n+ 1171\n+ 1172 if (extractedBoundaryData_)\n+ 1173 DUNE_THROW(Dune::InvalidStateException,\n+ 1174 \"The boundary data has already been extracted from this GmshReader \"\n+ 1175 << \"via a function call to reader.extractBoundaryData(). Use the extraced\n+data or \"\n+ 1176 << \"read the grid data from file again by constructing a new reader.\"\n+ 1177 );\n+ 1178 }\n+ 1179\n+ 1180 void readGridFile (const std::string& fileName, GridFactory&\n+factory, Gmsh::ReaderOptions options)\n+ 1181 {\n+ 1182 const bool verbose = options & Opts::verbose;\n+ 1183 const bool insertBoundarySegments = options & Opts::\n+insertBoundarySegments;\n+ 1184 const bool readBoundaryData = options & Opts::readBoundaryData;\n+ 1185 const bool readElementData = options & Opts::readElementData;\n+ 1186\n+ 1187 doRead(\n+ 1188 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_,\n+ 1189 elementIndexToGmshPhysicalEntity_, verbose,\n+ 1190 readBoundaryData || insertBoundarySegments\n+ 1191 );\n+ 1192\n+ 1193 // clear unwanted data\n+ 1194 if (!readBoundaryData)\n+ 1195 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector{};\n+ 1196 if (!readElementData)\n+ 1197 elementIndexToGmshPhysicalEntity_ = std::vector{};\n+ 1198\n+ 1199 hasElementData_ = readElementData;\n+ 1200 hasBoundaryData_ = readBoundaryData;\n+ 1201 }\n+ 1202\n+ 1203 std::unique_ptr> gridFactory_;\n+ 1204\n+ 1205 std::vector elementIndexToGmshPhysicalEntity_;\n+ 1206 std::vector boundarySegmentIndexToGmshPhysicalEntity_;\n+ 1207\n+ 1208 bool hasElementData_;\n+ 1209 bool hasBoundaryData_;\n+ 1210\n+ 1211 // for better error messages, we keep track of these separately\n+ 1212 bool extractedElementData_ = false;\n+ 1213 bool extractedBoundaryData_ = false;\n+ 1214 };\n+ 1215\n+ 1218} // namespace Dune\n+ 1219\n+ 1220#endif\n+boundarysegment.hh\n+Base class for grid boundary segments of arbitrary geometry.\n+Dune::Gmsh::ReaderOptions\n+ReaderOptions\n+Option for the Gmsh mesh file reader.\n+Definition: gmshreader.hh:756\n+Dune::Gmsh::ReaderOptions::verbose\n+@ verbose\n+Dune::Gmsh::ReaderOptions::readBoundaryData\n+@ readBoundaryData\n+Dune::Gmsh::ReaderOptions::readElementData\n+@ readElementData\n+Dune::Gmsh::ReaderOptions::insertBoundarySegments\n+@ insertBoundarySegments\n+std::swap\n+void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n+> &b)\n+Definition: utility/persistentcontainer.hh:83\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::OutputType\n-OutputType\n-How the bulk data should be stored in the file.\n-Definition: common.hh:43\n-Dune::VTK::FileType\n-FileType\n-which type of VTK file to write\n-Definition: common.hh:252\n-Dune::VTK::polyData\n-@ polyData\n-for .vtp files (PolyData)\n-Definition: common.hh:254\n-Dune::VTK::unstructuredGrid\n-@ unstructuredGrid\n-for .vtu files (UnstructuredGrid)\n-Definition: common.hh:256\n-Dune::VTK::BasicWriter\n-Definition: basicwriter.hh:35\n-Dune::VTK::BasicWriter::writeCellData\n-void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const\n-Definition: basicwriter.hh:154\n-Dune::VTK::BasicWriter::BasicWriter\n-BasicWriter(const IteratorFactory &factory_)\n-Definition: basicwriter.hh:67\n-Dune::VTK::BasicWriter::getSerialPieceName\n-std::string getSerialPieceName(const std::string &name, const std::string\n-&path) const\n-return name of a serial piece file\n-Definition: basicwriter.hh:357\n-Dune::VTK::BasicWriter::writeCollection\n-void writeCollection(const std::string name, const std::string &piecename,\n-const std::string &piecepath)\n-write header file in parallel case to stream\n-Definition: basicwriter.hh:240\n-Dune::VTK::BasicWriter::writeGrid\n-void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints,\n-unsigned ncorners)\n-Definition: basicwriter.hh:176\n-Dune::VTK::BasicWriter::writeAll\n-void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned\n-ncorners)\n-Definition: basicwriter.hh:190\n-Dune::VTK::BasicWriter::pwrite\n-std::string pwrite(const std::string &name, const std::string &path, const\n-std::string &extendpath, OutputType outputType)\n-write output; interface might change later\n-Definition: basicwriter.hh:395\n-Dune::VTK::BasicWriter::clear\n-void clear()\n-Definition: basicwriter.hh:84\n-Dune::VTK::BasicWriter::writeCellFunction\n-void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter,\n-unsigned ncells) const\n-Definition: basicwriter.hh:95\n-Dune::VTK::BasicWriter::writeCornerFunction\n-void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter,\n-unsigned ncorners) const\n-Definition: basicwriter.hh:121\n-Dune::VTK::BasicWriter::getParallelHeaderName\n-std::string getParallelHeaderName(const std::string &name, const std::string\n-&path) const\n-return name of a parallel header file\n-Definition: basicwriter.hh:325\n-Dune::VTK::BasicWriter::writePointData\n-void writePointData(VTUWriter &vtuWriter, unsigned npoints) const\n-Definition: basicwriter.hh:165\n-Dune::VTK::BasicWriter::getFirstVector\n-static std::string getFirstVector(const WriterList &data)\n-Definition: basicwriter.hh:146\n-Dune::VTK::BasicWriter::FunctionWriter\n-FunctionWriterBase< Cell > FunctionWriter\n-Definition: basicwriter.hh:43\n-Dune::VTK::BasicWriter::writePointFunction\n-void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter,\n-unsigned npoints) const\n-Definition: basicwriter.hh:109\n-Dune::VTK::BasicWriter::writePiece\n-void writePiece(const std::string &filename, OutputType outputType)\n-Definition: basicwriter.hh:198\n-Dune::VTK::BasicWriter::addCellData\n-void addCellData(const std::shared_ptr< FunctionWriter > &writer)\n-Definition: basicwriter.hh:76\n-Dune::VTK::BasicWriter::getFirstScalar\n-static std::string getFirstScalar(const WriterList &data)\n-Definition: basicwriter.hh:138\n-Dune::VTK::BasicWriter::getParallelPieceName\n-std::string getParallelPieceName(const std::string &name, const std::string\n-&path, int rank) const\n-return name of a parallel piece file\n-Definition: basicwriter.hh:295\n-Dune::VTK::BasicWriter::write\n-std::string write(const std::string &name, OutputType outputType)\n-write output (interface might change later)\n-Definition: basicwriter.hh:436\n-Dune::VTK::BasicWriter::addPointData\n-void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n-Definition: basicwriter.hh:80\n-Dune::VTK::FunctionWriterBase<_Cell_>\n-Dune::VTK::FunctionWriterBase::write\n-virtual void write(const Cell &, const Domain &)\n-write at the given position\n-Definition: functionwriter.hh:59\n-Dune::VTK::FunctionWriterBase::endWrite\n-virtual void endWrite()=0\n-signal end of writing\n-Dune::VTK::FunctionWriterBase::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0\n-start writing with the given writer\n-Dune::VTK::CoordinatesWriter\n-writer for the Coordinates array\n-Definition: functionwriter.hh:147\n-Dune::VTK::CoordinatesWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: functionwriter.hh:165\n-Dune::VTK::OffsetsWriter\n-writer for the offsets array\n-Definition: functionwriter.hh:300\n-Dune::VTK::TypesWriter\n-writer for the types array\n-Definition: functionwriter.hh:340\n-Dune::VTK::PVTUWriter\n-Dump a .vtu/.vtp files contents to a stream.\n-Definition: pvtuwriter.hh:62\n-Dune::VTK::PVTUWriter::endMain\n-void endMain()\n-finish the main PolyData/UnstructuredGrid section\n-Definition: pvtuwriter.hh:195\n-Dune::VTK::PVTUWriter::endCellData\n-void endCellData()\n-finish CellData section\n-Definition: pvtuwriter.hh:155\n-Dune::VTK::PVTUWriter::beginMain\n-void beginMain(unsigned ghostLevel=0)\n-start the main PPolyData/PUnstructuredGrid section\n-Definition: pvtuwriter.hh:189\n-Dune::VTK::PVTUWriter::beginCellData\n-void beginCellData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start CellData section\n-Definition: pvtuwriter.hh:146\n-Dune::VTK::PVTUWriter::beginPointData\n-void beginPointData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start PointData section\n-Definition: pvtuwriter.hh:120\n-Dune::VTK::PVTUWriter::addPiece\n-void addPiece(const std::string &filename)\n-Add a serial piece to the output file.\n-Definition: pvtuwriter.hh:215\n-Dune::VTK::PVTUWriter::endPointData\n-void endPointData()\n-finish PointData section\n-Definition: pvtuwriter.hh:129\n-Dune::VTK::PVTUWriter::endPoints\n-void endPoints()\n-finish section for the point coordinates\n-Definition: pvtuwriter.hh:171\n-Dune::VTK::PVTUWriter::beginPoints\n-void beginPoints()\n-start section for the point coordinates\n-Definition: pvtuwriter.hh:166\n-Dune::VTK::VTUWriter\n-Dump a .vtu/.vtp files contents to a stream.\n-Definition: vtuwriter.hh:98\n-Dune::VTK::VTUWriter::beginAppended\n-bool beginAppended()\n-start the appended data section\n-Definition: vtuwriter.hh:345\n-Dune::VTK::VTUWriter::endAppended\n-void endAppended()\n-finish the appended data section\n-Definition: vtuwriter.hh:359\n-Dune::VTK::VTUWriter::endCellData\n-void endCellData()\n-finish CellData section\n-Definition: vtuwriter.hh:220\n-Dune::VTK::VTUWriter::beginMain\n-void beginMain(unsigned ncells, unsigned npoints)\n-start the main PolyData/UnstructuredGrid section\n-Definition: vtuwriter.hh:310\n-Dune::VTK::VTUWriter::beginCells\n-void beginCells()\n-start section for the grid cells/PolyData lines\n-Definition: vtuwriter.hh:274\n-Dune::VTK::VTUWriter::endPointData\n-void endPointData()\n-finish PointData section\n-Definition: vtuwriter.hh:182\n-Dune::VTK::VTUWriter::beginCellData\n-void beginCellData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start CellData section\n-Definition: vtuwriter.hh:205\n-Dune::VTK::VTUWriter::beginPointData\n-void beginPointData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start PointData section\n-Definition: vtuwriter.hh:167\n-Dune::VTK::VTUWriter::endPoints\n-void endPoints()\n-finish section for the point coordinates\n-Definition: vtuwriter.hh:249\n-Dune::VTK::VTUWriter::endCells\n-void endCells()\n-start section for the grid cells/PolyData lines\n-Definition: vtuwriter.hh:285\n-Dune::VTK::VTUWriter::beginPoints\n-void beginPoints()\n-start section for the point coordinates\n-Definition: vtuwriter.hh:238\n-Dune::VTK::VTUWriter::endMain\n-void endMain()\n-finish the main PolyData/UnstructuredGrid section\n-Definition: vtuwriter.hh:320\n+Dune::Alberta::dimWorld\n+static const int dimWorld\n+Definition: misc.hh:46\n+Dune::Alberta::GlobalVector\n+ALBERTA REAL_D GlobalVector\n+Definition: misc.hh:50\n+Dune::Gmsh::operator&\n+constexpr bool operator&(ReaderOptions a, ReaderOptions b)\n+query operator for reader options (is b set in a)\n+Definition: gmshreader.hh:772\n+Dune::Gmsh::operator|\n+constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)\n+composition operator for reader options\n+Definition: gmshreader.hh:764\n+Dune::VTK::renumber\n+int renumber(const Dune::GeometryType &t, int i)\n+renumber VTK <-> Dune\n+Definition: common.hh:186\n+Dune::VTK::line\n+@ line\n+Definition: common.hh:134\n+Dune::VTK::pyramid\n+@ pyramid\n+Definition: common.hh:141\n+Dune::VTK::quadrilateral\n+@ quadrilateral\n+Definition: common.hh:137\n+Dune::VTK::tetrahedron\n+@ tetrahedron\n+Definition: common.hh:138\n+Dune::VTK::prism\n+@ prism\n+Definition: common.hh:140\n+Dune::VTK::hexahedron\n+@ hexahedron\n+Definition: common.hh:139\n+Dune::VTK::triangle\n+@ triangle\n+Definition: common.hh:135\n+Dune::BoundarySegment\n+Base class for classes implementing geometries of boundary segments.\n+Definition: boundarysegment.hh:94\n+Dune::GridFactoryInterface::comm\n+Communication comm() const\n+Return the Communication used by the grid factory.\n+Definition: common/gridfactory.hh:297\n+Dune::GridFactory\n+Provide a generic factory class for unstructured grids.\n+Definition: common/gridfactory.hh:314\n+Dune::GridFactory::createGrid\n+virtual std::unique_ptr< GridType > createGrid()\n+Finalize grid creation and hand over the grid.\n+Definition: common/gridfactory.hh:372\n+Dune::GmshReaderOptions\n+Options for read operation.\n+Definition: gmshreader.hh:39\n+Dune::GmshReaderOptions::GeometryOrder\n+GeometryOrder\n+Definition: gmshreader.hh:40\n+Dune::GmshReaderOptions::firstOrder\n+@ firstOrder\n+edges are straight lines.\n+Definition: gmshreader.hh:42\n+Dune::GmshReaderOptions::secondOrder\n+@ secondOrder\n+quadratic boundary approximation.\n+Definition: gmshreader.hh:44\n+Dune::GmshReaderParser\n+dimension independent parts for GmshReaderParser\n+Definition: gmshreader.hh:302\n+Dune::GmshReaderParser::pass1HandleElement\n+void pass1HandleElement(FILE *file, const int elm_type, std::map< int, unsigned\n+int > &renumber, const std::vector< GlobalVector > &nodes)\n+Process one element during the first pass through the list of all elements.\n+Definition: gmshreader.hh:510\n+Dune::GmshReaderParser::dimWorld\n+static const int dimWorld\n+Definition: gmshreader.hh:320\n+Dune::GmshReaderParser::factory\n+Dune::GridFactory< GridType > & factory\n+Definition: gmshreader.hh:305\n+Dune::GmshReaderParser::boundaryIdMap\n+std::vector< int > & boundaryIdMap()\n+Definition: gmshreader.hh:357\n+Dune::GmshReaderParser::elementIndexMap\n+std::vector< int > & elementIndexMap()\n+Definition: gmshreader.hh:362\n+Dune::GmshReaderParser::number_of_real_vertices\n+unsigned int number_of_real_vertices\n+Definition: gmshreader.hh:308\n+Dune::GmshReaderParser::boundarysegment_insert\n+void boundarysegment_insert(const std::vector< FieldVector< double, 3 > >\n+&nodes, const E &elementDofs, const V &vertices)\n+Definition: gmshreader.hh:573\n+Dune::GmshReaderParser::GmshReaderParser\n+GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)\n+Definition: gmshreader.hh:354\n+Dune::GmshReaderParser::element_count\n+int element_count\n+Definition: gmshreader.hh:310\n+Dune::GmshReaderParser::read\n+void read(const std::string &f)\n+Definition: gmshreader.hh:367\n+Dune::GmshReaderParser::skipline\n+void skipline(FILE *file)\n+Definition: gmshreader.hh:344\n+Dune::GmshReaderParser::readfile\n+void readfile(FILE *file, int cnt, const char *format, void *t1, void *t2=0,\n+void *t3=0, void *t4=0, void *t5=0, void *t6=0, void *t7=0, void *t8=0, void\n+*t9=0, void *t10=0)\n+Definition: gmshreader.hh:330\n+Dune::GmshReaderParser::element_index_to_physical_entity\n+std::vector< int > element_index_to_physical_entity\n+Definition: gmshreader.hh:316\n+Dune::GmshReaderParser::pass2HandleElement\n+virtual void pass2HandleElement(FILE *file, const int elm_type, std::map< int,\n+unsigned int > &renumber, const std::vector< GlobalVector > &nodes, const int\n+physical_entity)\n+Process one element during the second pass through the list of all elements.\n+Definition: gmshreader.hh:598\n+Dune::GmshReaderParser::dim\n+static const int dim\n+Definition: gmshreader.hh:319\n+Dune::GmshReaderParser::GlobalVector\n+FieldVector< double, dimWorld > GlobalVector\n+Definition: gmshreader.hh:324\n+Dune::GmshReaderParser::fileName\n+std::string fileName\n+Definition: gmshreader.hh:313\n+Dune::GmshReaderParser::boundary_element_count\n+int boundary_element_count\n+Definition: gmshreader.hh:309\n+Dune::GmshReaderParser::boundarysegment_insert\n+void boundarysegment_insert(const V &, const E &, const V2 &)\n+Definition: gmshreader.hh:562\n+Dune::GmshReaderParser::verbose\n+bool verbose\n+Definition: gmshreader.hh:306\n+Dune::GmshReaderParser::boundary_id_to_physical_entity\n+std::vector< int > boundary_id_to_physical_entity\n+Definition: gmshreader.hh:315\n+Dune::GmshReaderParser::buf\n+char buf[512]\n+Definition: gmshreader.hh:312\n+Dune::GmshReaderParser::insert_boundary_segments\n+bool insert_boundary_segments\n+Definition: gmshreader.hh:307\n+Dune::GmshReader\n+Read Gmsh mesh file.\n+Definition: gmshreader.hh:805\n+Dune::GmshReader::read\n+static std::unique_ptr< Grid > read(const std::string &fileName, std::vector<\n+int > &boundarySegmentToPhysicalEntity, std::vector< int >\n+&elementToPhysicalEntity, bool verbose=true, bool insertBoundarySegments=true)\n+Read Gmsh file, possibly with data.\n+Definition: gmshreader.hh:931\n+Dune::GmshReader::elementData\n+const std::vector< int > & elementData() const\n+Access element data (maps element index to Gmsh physical entity)\n+Definition: gmshreader.hh:1086\n+Dune::GmshReader::read\n+static void read(Dune::GridFactory< Grid > &factory, const std::string\n+&fileName, DataFlagArg boundarySegmentData, DataArg elementData, bool\n+verbose=true)\n+read Gmsh file, possibly with data\n+Definition: gmshreader.hh:981\n+Dune::GmshReader::read\n+static std::unique_ptr< Grid > read(const std::string &fileName, bool\n+verbose=true, bool insertBoundarySegments=true)\n+Definition: gmshreader.hh:902\n+Dune::GmshReader::read\n+static void read(Dune::GridFactory< Grid > &factory, const std::string\n+&fileName, bool verbose=true, bool insertBoundarySegments=true)\n+Definition: gmshreader.hh:948\n+Dune::GmshReader::Grid\n+GridType Grid\n+Definition: gmshreader.hh:894\n+Dune::GmshReader::createGrid\n+std::unique_ptr< Grid > createGrid()\n+Create the grid.\n+Definition: gmshreader.hh:1130\n+Dune::GmshReader::extractBoundaryData\n+std::vector< int > extractBoundaryData()\n+Erase boundary data from reader and return the data.\n+Definition: gmshreader.hh:1122\n+Dune::GmshReader::read\n+static void read(Dune::GridFactory< Grid > &factory, const std::string\n+&fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector<\n+int > &elementToPhysicalEntity, bool verbose, bool insertBoundarySegments)\n+Read Gmsh file, possibly with data.\n+Definition: gmshreader.hh:1018\n+Dune::GmshReader::hasElementData\n+bool hasElementData() const\n+If element data is available.\n+Definition: gmshreader.hh:1103\n+Dune::GmshReader::hasBoundaryData\n+bool hasBoundaryData() const\n+If boundary data is available.\n+Definition: gmshreader.hh:1110\n+Dune::GmshReader::defaultOpts\n+static constexpr Opts defaultOpts\n+Definition: gmshreader.hh:1038\n+Dune::GmshReader::GmshReader\n+GmshReader(const std::string &fileName, GridFactory< Grid > &factory, Gmsh::\n+ReaderOptions options=defaultOpts)\n+Construct a Gmsh reader object from a file name and a grid factory.\n+Definition: gmshreader.hh:1079\n+Dune::GmshReader::GmshReader\n+GmshReader(const std::string &fileName, Gmsh::ReaderOptions\n+options=defaultOpts)\n+Construct a Gmsh reader object (alternatively use one of the static member\n+functions)\n+Definition: gmshreader.hh:1065\n+Dune::GmshReader::extractElementData\n+std::vector< int > extractElementData()\n+Erase element data from reader and return the data.\n+Definition: gmshreader.hh:1114\n+Dune::GmshReader::boundaryData\n+const std::vector< int > & boundaryData() const\n+Access boundary data (maps boundary segment index to Gmsh physical entity)\n+Definition: gmshreader.hh:1093\n+Dune::GmshReader::GmshReader\n+GmshReader()=default\n+Dynamic Gmsh reader interface.\n+gridfactory.hh\n+Provide a generic factory class for unstructured grids.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00773.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00773.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtksequencewriterbase.hh File Reference\n+dune-grid: gnuplot.hh File Reference\n \n \n \n \n \n \n \n@@ -58,48 +58,58 @@\n \n \n \n \n \n
    \n \n-
    vtksequencewriterbase.hh File Reference
    \n+
    gnuplot.hh File Reference
    \n
    \n
    \n+\n+

    Provides gnuplot output for 1D Grids. \n+More...

    \n
    #include <vector>
    \n+#include <string>
    \n #include <iostream>
    \n-#include <sstream>
    \n #include <fstream>
    \n-#include <iomanip>
    \n-#include <memory>
    \n-#include <dune/grid/io/file/vtk/common.hh>
    \n-#include <dune/common/path.hh>
    \n-#include <dune/grid/io/file/vtk/vtkwriter.hh>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include "gnuplot/gnuplot.cc"
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::VTKSequenceWriterBase< GridView >
     Base class to write pvd-files which contains a list of all collected vtk-files. More...
    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...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    Provides gnuplot output for 1D Grids.

    \n+
    Author
    Christian Engwer
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,32 +6,39 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n Classes | Namespaces\n-vtksequencewriterbase.hh File Reference\n+gnuplot.hh File Reference\n+Provides gnuplot output for 1D Grids. More...\n #include \n+#include \n #include \n-#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \"gnuplot/gnuplot.cc\"\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTKSequenceWriterBase<_GridView_>\n-\u00a0 Base class to write pvd-files which contains a list of all collected\n- vtk-files. More...\n+class \u00a0Dune::GnuplotWriter<_GridView_>\n+\u00a0 Writer for 1D grids in gnuplot format. More...\n+\u00a0\n+class \u00a0Dune::LeafGnuplotWriter<_G_>\n+\u00a0 GnuplotWriter on the leaf grid. More...\n+\u00a0\n+class \u00a0Dune::LevelGnuplotWriter<_G_>\n+\u00a0 GnuplotWriter on a given level grid. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+***** Detailed Description *****\n+Provides gnuplot output for 1D Grids.\n+ Author\n+ Christian Engwer\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00773_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtksequencewriterbase.hh Source File\n+dune-grid: gnuplot.hh Source File\n \n \n \n \n \n \n \n@@ -58,187 +58,125 @@\n \n \n \n \n \n
    \n-
    vtksequencewriterbase.hh
    \n+
    gnuplot.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
    \n-
    8
    \n-
    9#include <vector>
    \n-
    10#include <iostream>
    \n-
    11#include <sstream>
    \n-
    12#include <fstream>
    \n-
    13#include <iomanip>
    \n-
    14#include <memory>
    \n-
    15
    \n-\n-
    17#include <dune/common/path.hh>
    \n-
    18
    \n-\n-
    20
    \n-
    21namespace Dune {
    \n-
    22
    \n-
    32 template<class GridView>
    \n-\n-
    34 {
    \n-
    35 std::shared_ptr<VTKWriter<GridView> > vtkWriter_;
    \n-
    36 std::vector<double> timesteps_;
    \n-
    37 std::string name_,path_,extendpath_;
    \n-
    38 int rank_;
    \n-
    39 int size_;
    \n-
    40 public:
    \n-\n-
    48 const std::string& name,
    \n-
    49 const std::string& path,
    \n-
    50 const std::string& extendpath,
    \n-
    51 int rank,
    \n-
    52 int size)
    \n-
    53 : vtkWriter_(vtkWriter),
    \n-
    54 name_(name), path_(path),
    \n-
    55 extendpath_(extendpath),
    \n-
    56 rank_(rank),
    \n-
    57 size_(size)
    \n-
    58 {}
    \n-
    59
    \n-
    63 const std::shared_ptr< VTKWriter<GridView> >& vtkWriter() const
    \n-
    64 {
    \n-
    65 return vtkWriter_;
    \n-
    66 }
    \n-
    67
    \n-
    69 void addCellData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
    \n-
    70 {
    \n-
    71 vtkWriter_->addCellData(p);
    \n-
    72 }
    \n-
    73
    \n-
    79 template<class V >
    \n-
    80 void addCellData (const V &v, const std::string &name, int ncomps=1)
    \n-
    81 {
    \n-
    82 vtkWriter_->addCellData(v, name, ncomps);
    \n-
    83 }
    \n-
    84
    \n-
    86 void addVertexData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
    \n-
    87 {
    \n-
    88 vtkWriter_->addVertexData(p);
    \n-
    89 }
    \n-
    90
    \n-
    96 template<class V >
    \n-
    97 void addVertexData (const V &v, const std::string &name, int ncomps=1)
    \n-
    98 {
    \n-
    99 vtkWriter_->addVertexData(v, name, ncomps);
    \n-
    100 }
    \n-
    101
    \n-
    102
    \n-
    108 void write (double time, VTK::OutputType type = VTK::ascii)
    \n-
    109 {
    \n-
    110 /* remember current time step */
    \n-
    111 unsigned int count = timesteps_.size();
    \n-
    112 timesteps_.push_back(time);
    \n+
    5#ifndef DUNE_IO_GNUPLOT_HH
    \n+
    6#define DUNE_IO_GNUPLOT_HH
    \n+
    7
    \n+
    13#include <vector>
    \n+
    14#include <string>
    \n+
    15#include <iostream>
    \n+
    16#include <fstream>
    \n+
    17
    \n+
    18#include <dune/common/fvector.hh>
    \n+
    19
    \n+\n+
    21
    \n+
    22namespace Dune {
    \n+
    23
    \n+
    29 template<class GridView>
    \n+\n+
    31
    \n+
    32 typedef typename GridView::Grid::ctype ctype;
    \n+
    33
    \n+
    34 constexpr static int dimworld = GridView::dimensionworld;
    \n+
    35
    \n+
    36 public:
    \n+
    37 GnuplotWriter (const GridView & gv) : _is(gv.indexSet()), _gv(gv)
    \n+
    38 {
    \n+
    39 static_assert(dimworld==1 || dimworld==2, "GnuPlot export only works for worlddim==1 and worlddim==2");
    \n+
    40 // allocate _data buffer
    \n+
    41 _data.resize(_is.size(0)*2);
    \n+
    42 }
    \n+
    43
    \n+
    48 template <class DataContainer>
    \n+
    49 void addCellData(const DataContainer& data, const std::string & name)
    \n+
    50 {
    \n+
    51 if (dimworld!=1)
    \n+
    52 DUNE_THROW(IOError, "Gnuplot cell data writing is only supported for grids in a 1d world!");
    \n+
    53 addData(cellData, data, name);
    \n+
    54 }
    \n+
    55
    \n+
    60 template <class DataContainer>
    \n+
    61 void addVertexData(const DataContainer& data, const std::string & name)
    \n+
    62 {
    \n+
    63 addData(vertexData, data, name);
    \n+
    64 }
    \n+
    65
    \n+
    69 void write(const std::string& filename) const;
    \n+
    70
    \n+
    71 private:
    \n+
    72 enum DataType { vertexData, cellData };
    \n+
    73 const typename GridView::IndexSet & _is;
    \n+
    74 const GridView _gv;
    \n+
    75 std::vector< std::vector< float > > _data;
    \n+
    76 std::vector< std::string > _names;
    \n+
    77
    \n+
    78 template <class DataContainer>
    \n+
    79 void addData(DataType t, const DataContainer& data, const std::string & name);
    \n+
    80
    \n+
    81 void writeRow(std::ostream & file,
    \n+
    82 const FieldVector<ctype, dimworld>& position,
    \n+
    83 const std::vector<float> & data) const;
    \n+
    84 };
    \n+
    85
    \n+
    89 template<class G>
    \n+
    90 class LeafGnuplotWriter : public GnuplotWriter<typename G::LeafGridView>
    \n+
    91 {
    \n+
    92 public:
    \n+
    94 LeafGnuplotWriter (const G& grid)
    \n+
    95 : GnuplotWriter<typename G::LeafGridView>(grid.leafGridView())
    \n+
    96 {}
    \n+
    97 };
    \n+
    98
    \n+
    102 template<class G>
    \n+
    103 class LevelGnuplotWriter : public GnuplotWriter<typename G::LevelGridView>
    \n+
    104 {
    \n+
    105 public:
    \n+
    107 LevelGnuplotWriter (const G& grid, int level)
    \n+
    108 : GnuplotWriter<typename G::LevelGridView>(grid.levelGridView(level))
    \n+
    109 {}
    \n+
    110 };
    \n+
    111
    \n+
    112}
    \n
    113
    \n-
    114 /* write VTK file */
    \n-
    115 if(size_==1)
    \n-
    116 vtkWriter_->write(concatPaths(path_,seqName(count)),type);
    \n-
    117 else
    \n-
    118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type);
    \n-
    119
    \n-
    120 /* write pvd file ... only on rank 0 */
    \n-
    121 if (rank_==0) {
    \n-
    122 std::ofstream pvdFile;
    \n-
    123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n-
    124 std::ios_base::eofbit);
    \n-
    125 std::string pvdname = name_ + ".pvd";
    \n-
    126 pvdFile.open(pvdname.c_str());
    \n-
    127 pvdFile << "<?xml version=\\"1.0\\"?> \\n"
    \n-
    128 << "<VTKFile type=\\"Collection\\" version=\\"0.1\\" byte_order=\\"" << VTK::getEndiannessString() << "\\"> \\n"
    \n-
    129 << "<Collection> \\n";
    \n-
    130 for (unsigned int i=0; i<=count; i++)
    \n-
    131 {
    \n-
    132 // filename
    \n-
    133 std::string piecepath;
    \n-
    134 std::string fullname;
    \n-
    135 if(size_==1) {
    \n-
    136 piecepath = path_;
    \n-
    137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath);
    \n-
    138 }
    \n-
    139 else {
    \n-
    140 piecepath = concatPaths(path_, extendpath_);
    \n-
    141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath, size_);
    \n-
    142 }
    \n-
    143 pvdFile << "<DataSet timestep=\\"" << timesteps_[i]
    \n-
    144 << "\\" group=\\"\\" part=\\"0\\" name=\\"\\" file=\\""
    \n-
    145 << fullname << "\\"/> \\n";
    \n-
    146 }
    \n-
    147 pvdFile << "</Collection> \\n"
    \n-
    148 << "</VTKFile> \\n" << std::flush;
    \n-
    149 pvdFile.close();
    \n-
    150 }
    \n-
    151 }
    \n-
    152
    \n-
    156 void clear()
    \n-
    157 {
    \n-
    158 vtkWriter_->clear();
    \n-
    159 }
    \n-
    160
    \n-
    164 const std::vector<double>& getTimeSteps() const
    \n-
    165 {
    \n-
    166 return timesteps_;
    \n-
    167 }
    \n-
    168
    \n-
    174 void setTimeSteps(const std::vector<double>& timesteps)
    \n-
    175 {
    \n-
    176 timesteps_ = timesteps;
    \n-
    177 }
    \n-
    178
    \n-
    179 private:
    \n-
    180
    \n-
    181 // create sequence name
    \n-
    182 std::string seqName(unsigned int count) const
    \n-
    183 {
    \n-
    184 std::stringstream n;
    \n-
    185 n.fill('0');
    \n-
    186 n << name_ << "-" << std::setw(5) << count;
    \n-
    187 return n.str();
    \n-
    188 }
    \n-
    189 };
    \n-
    190
    \n-
    191} // end namespace Dune
    \n-
    192
    \n-
    193#endif
    \n-
    Provides file i/o for the visualization toolkit.
    \n-
    Common stuff for the VTKWriter.
    \n+
    114#include "gnuplot/gnuplot.cc"
    \n+
    115
    \n+
    116#endif // DUNE_IO_GNUPLOT_HH
    \n+
    Implementation of gnuplot output for 1D and 2D grids.
    \n+
    Traits::IndexSet IndexSet
    type of the index set
    Definition: common/gridview.hh:86
    \n+
    Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
    leaf grid view for the given grid
    Definition: common/grid.hh:819
    \n+
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n+
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/gridview.hh:151
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n-
    @ ascii
    Output to the file is in ascii.
    Definition: common.hh:45
    \n-
    std::string getEndiannessString()
    determine endianness of this C++ implementation
    Definition: common.hh:232
    \n-
    A base class for grid functions with any return type and dimension.
    Definition: function.hh:42
    \n-
    Base class to write pvd-files which contains a list of all collected vtk-files.
    Definition: vtksequencewriterbase.hh:34
    \n-
    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
    \n-
    const std::vector< double > & getTimeSteps() const
    Retrieve the current list of time steps.
    Definition: vtksequencewriterbase.hh:164
    \n-
    const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
    Definition: vtksequencewriterbase.hh:63
    \n-
    void write(double time, VTK::OutputType type=VTK::ascii)
    Writes VTK data for the given time,.
    Definition: vtksequencewriterbase.hh:108
    \n-
    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
    \n-
    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
    \n-
    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
    \n-
    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
    \n-
    void setTimeSteps(const std::vector< double > &timesteps)
    Set the current list of time steps.
    Definition: vtksequencewriterbase.hh:174
    \n-
    void clear()
    Clears all VTK data added to the VTK writer.
    Definition: vtksequencewriterbase.hh:156
    \n-
    Writer for the ouput of grid functions in the vtk format.
    Definition: vtkwriter.hh:95
    \n+
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n+
    Writer for 1D grids in gnuplot format.
    Definition: gnuplot.hh:30
    \n+
    void addVertexData(const DataContainer &data, const std::string &name)
    Add vertex data.
    Definition: gnuplot.hh:61
    \n+
    void addCellData(const DataContainer &data, const std::string &name)
    Add cell data.
    Definition: gnuplot.hh:49
    \n+
    void write(const std::string &filename) const
    Write Gnuplot file to disk.
    Definition: gnuplot.cc:19
    \n+
    GnuplotWriter(const GridView &gv)
    Definition: gnuplot.hh:37
    \n+
    GnuplotWriter on the leaf grid.
    Definition: gnuplot.hh:91
    \n+
    LeafGnuplotWriter(const G &grid)
    Construct a Gnuplot writer for the leaf level of a given grid.
    Definition: gnuplot.hh:94
    \n+
    GnuplotWriter on a given level grid.
    Definition: gnuplot.hh:104
    \n+
    LevelGnuplotWriter(const G &grid, int level)
    Construct a Gnuplot writer for a certain level of a given grid.
    Definition: gnuplot.hh:107
    \n+
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,237 +6,163 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * vtk\n-vtksequencewriterbase.hh\n+gnuplot.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH\n- 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15\n- 16#include \n- 17#include \n- 18\n- 19#include \n- 20\n- 21namespace Dune {\n- 22\n- 32 template\n-33 class VTKSequenceWriterBase\n- 34 {\n- 35 std::shared_ptr > vtkWriter_;\n- 36 std::vector timesteps_;\n- 37 std::string name_,path_,extendpath_;\n- 38 int rank_;\n- 39 int size_;\n- 40 public:\n-47 explicit VTKSequenceWriterBase( std::shared_ptr >\n-vtkWriter,\n- 48 const std::string& name,\n- 49 const std::string& path,\n- 50 const std::string& extendpath,\n- 51 int rank,\n- 52 int size)\n- 53 : vtkWriter_(vtkWriter),\n- 54 name_(name), path_(path),\n- 55 extendpath_(extendpath),\n- 56 rank_(rank),\n- 57 size_(size)\n- 58 {}\n- 59\n-63 const std::shared_ptr< VTKWriter >& vtkWriter() const\n- 64 {\n- 65 return vtkWriter_;\n- 66 }\n- 67\n-69 void addCellData (const std::shared_ptr::\n-VTKFunction> &p)\n- 70 {\n- 71 vtkWriter_->addCellData(p);\n- 72 }\n- 73\n- 79 template\n-80 void addCellData (const V &v, const std::string &name, int ncomps=1)\n- 81 {\n- 82 vtkWriter_->addCellData(v, name, ncomps);\n- 83 }\n- 84\n-86 void addVertexData (const std::shared_ptr::VTKFunction> &p)\n- 87 {\n- 88 vtkWriter_->addVertexData(p);\n- 89 }\n- 90\n- 96 template\n-97 void addVertexData (const V &v, const std::string &name, int ncomps=1)\n- 98 {\n- 99 vtkWriter_->addVertexData(v, name, ncomps);\n- 100 }\n- 101\n- 102\n-108 void write (double time, VTK::OutputType type = VTK::ascii)\n- 109 {\n- 110 /* remember current time step */\n- 111 unsigned int count = timesteps_.size();\n- 112 timesteps_.push_back(time);\n+ 5#ifndef DUNE_IO_GNUPLOT_HH\n+ 6#define DUNE_IO_GNUPLOT_HH\n+ 7\n+ 13#include \n+ 14#include \n+ 15#include \n+ 16#include \n+ 17\n+ 18#include \n+ 19\n+ 20#include \n+ 21\n+ 22namespace Dune {\n+ 23\n+ 29 template\n+30 class GnuplotWriter {\n+ 31\n+ 32 typedef typename GridView::Grid::ctype ctype;\n+ 33\n+ 34 constexpr static int dimworld = GridView::dimensionworld;\n+ 35\n+ 36 public:\n+37 GnuplotWriter (const GridView & gv) : _is(gv.indexSet()), _gv(gv)\n+ 38 {\n+ 39 static_assert(dimworld==1 || dimworld==2, \"GnuPlot export only works for\n+worlddim==1 and worlddim==2\");\n+ 40 // allocate _data buffer\n+ 41 _data.resize(_is.size(0)*2);\n+ 42 }\n+ 43\n+ 48 template \n+49 void addCellData(const DataContainer& data, const std::string & name)\n+ 50 {\n+ 51 if (dimworld!=1)\n+ 52 DUNE_THROW(IOError, \"Gnuplot cell data writing is only supported for grids\n+in a 1d world!\");\n+ 53 addData(cellData, data, name);\n+ 54 }\n+ 55\n+ 60 template \n+61 void addVertexData(const DataContainer& data, const std::string & name)\n+ 62 {\n+ 63 addData(vertexData, data, name);\n+ 64 }\n+ 65\n+ 69 void write(const std::string& filename) const;\n+ 70\n+ 71 private:\n+ 72 enum DataType { vertexData, cellData };\n+ 73 const typename GridView::IndexSet & _is;\n+ 74 const GridView _gv;\n+ 75 std::vector< std::vector< float > > _data;\n+ 76 std::vector< std::string > _names;\n+ 77\n+ 78 template \n+ 79 void addData(DataType t, const DataContainer& data, const std::string &\n+name);\n+ 80\n+ 81 void writeRow(std::ostream & file,\n+ 82 const FieldVector& position,\n+ 83 const std::vector & data) const;\n+ 84 };\n+ 85\n+ 89 template\n+90 class LeafGnuplotWriter : public GnuplotWriter\n+ 91 {\n+ 92 public:\n+94 LeafGnuplotWriter (const G& grid)\n+ 95 : GnuplotWriter(grid.leafGridView())\n+ 96 {}\n+ 97 };\n+ 98\n+ 102 template\n+103 class LevelGnuplotWriter : public GnuplotWriter\n+ 104 {\n+ 105 public:\n+107 LevelGnuplotWriter (const G& grid, int level)\n+ 108 : GnuplotWriter(grid.levelGridView(level))\n+ 109 {}\n+ 110 };\n+ 111\n+ 112}\n 113\n- 114 /* write VTK file */\n- 115 if(size_==1)\n- 116 vtkWriter_->write(concatPaths(path_,seqName(count)),type);\n- 117 else\n- 118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type);\n- 119\n- 120 /* write pvd file ... only on rank 0 */\n- 121 if (rank_==0) {\n- 122 std::ofstream pvdFile;\n- 123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n- 124 std::ios_base::eofbit);\n- 125 std::string pvdname = name_ + \".pvd\";\n- 126 pvdFile.open(pvdname.c_str());\n- 127 pvdFile << \" \\n\"\n- 128 << \" \\n\"\n- 129 << \" \\n\";\n- 130 for (unsigned int i=0; i<=count; i++)\n- 131 {\n- 132 // filename\n- 133 std::string piecepath;\n- 134 std::string fullname;\n- 135 if(size_==1) {\n- 136 piecepath = path_;\n- 137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath);\n- 138 }\n- 139 else {\n- 140 piecepath = concatPaths(path_, extendpath_);\n- 141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath,\n-size_);\n- 142 }\n- 143 pvdFile << \" \\n\";\n- 146 }\n- 147 pvdFile << \" \\n\"\n- 148 << \" \\n\" << std::flush;\n- 149 pvdFile.close();\n- 150 }\n- 151 }\n- 152\n-156 void clear()\n- 157 {\n- 158 vtkWriter_->clear();\n- 159 }\n- 160\n-164 const std::vector& getTimeSteps() const\n- 165 {\n- 166 return timesteps_;\n- 167 }\n- 168\n-174 void setTimeSteps(const std::vector& timesteps)\n- 175 {\n- 176 timesteps_ = timesteps;\n- 177 }\n- 178\n- 179 private:\n- 180\n- 181 // create sequence name\n- 182 std::string seqName(unsigned int count) const\n- 183 {\n- 184 std::stringstream n;\n- 185 n.fill('0');\n- 186 n << name_ << \"-\" << std::setw(5) << count;\n- 187 return n.str();\n- 188 }\n- 189 };\n- 190\n- 191} // end namespace Dune\n- 192\n- 193#endif\n-vtkwriter.hh\n-Provides file i/o for the visualization toolkit.\n-common.hh\n-Common stuff for the VTKWriter.\n+ 114#include \"gnuplot/gnuplot.cc\"\n+ 115\n+ 116#endif // DUNE_IO_GNUPLOT_HH\n+gnuplot.cc\n+Implementation of gnuplot output for 1D and 2D grids.\n+Dune::GridView::IndexSet\n+Traits::IndexSet IndexSet\n+type of the index set\n+Definition: common/gridview.hh:86\n+Dune::leafGridView\n+Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid<\n+dim, dimworld, ct, GridFamily > &grid)\n+leaf grid view for the given grid\n+Definition: common/grid.hh:819\n+Dune::levelGridView\n+Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid<\n+dim, dimworld, ct, GridFamily > &grid, int level)\n+level grid view for the given grid and level.\n+Definition: common/grid.hh:802\n+Dune::GridView::dimensionworld\n+static constexpr int dimensionworld\n+The dimension of the world the grid lives in.\n+Definition: common/gridview.hh:151\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::OutputType\n-OutputType\n-How the bulk data should be stored in the file.\n-Definition: common.hh:43\n-Dune::VTK::ascii\n-@ ascii\n-Output to the file is in ascii.\n-Definition: common.hh:45\n-Dune::VTK::getEndiannessString\n-std::string getEndiannessString()\n-determine endianness of this C++ implementation\n-Definition: common.hh:232\n-Dune::VTKFunction\n-A base class for grid functions with any return type and dimension.\n-Definition: function.hh:42\n-Dune::VTKSequenceWriterBase\n-Base class to write pvd-files which contains a list of all collected vtk-files.\n-Definition: vtksequencewriterbase.hh:34\n-Dune::VTKSequenceWriterBase::addVertexData\n-void addVertexData(const V &v, const std::string &name, int ncomps=1)\n-Adds a field of vertex data to the VTK file.\n-Definition: vtksequencewriterbase.hh:97\n-Dune::VTKSequenceWriterBase::getTimeSteps\n-const std::vector< double > & getTimeSteps() const\n-Retrieve the current list of time steps.\n-Definition: vtksequencewriterbase.hh:164\n-Dune::VTKSequenceWriterBase::vtkWriter\n-const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const\n-Definition: vtksequencewriterbase.hh:63\n-Dune::VTKSequenceWriterBase::write\n-void write(double time, VTK::OutputType type=VTK::ascii)\n-Writes VTK data for the given time,.\n-Definition: vtksequencewriterbase.hh:108\n-Dune::VTKSequenceWriterBase::addVertexData\n-void addVertexData(const std::shared_ptr< const typename VTKWriter< GridView\n->::VTKFunction > &p)\n-Adds a field of vertex data to the VTK file.\n-Definition: vtksequencewriterbase.hh:86\n-Dune::VTKSequenceWriterBase::addCellData\n-void addCellData(const V &v, const std::string &name, int ncomps=1)\n-Adds a field of cell data to the VTK file.\n-Definition: vtksequencewriterbase.hh:80\n-Dune::VTKSequenceWriterBase::VTKSequenceWriterBase\n-VTKSequenceWriterBase(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const\n-std::string &name, const std::string &path, const std::string &extendpath, int\n-rank, int size)\n-Set up the VTKSequenceWriterBase class.\n-Definition: vtksequencewriterbase.hh:47\n-Dune::VTKSequenceWriterBase::addCellData\n-void addCellData(const std::shared_ptr< const typename VTKWriter< GridView >::\n-VTKFunction > &p)\n-Adds a field of cell data to the VTK file.\n-Definition: vtksequencewriterbase.hh:69\n-Dune::VTKSequenceWriterBase::setTimeSteps\n-void setTimeSteps(const std::vector< double > ×teps)\n-Set the current list of time steps.\n-Definition: vtksequencewriterbase.hh:174\n-Dune::VTKSequenceWriterBase::clear\n-void clear()\n-Clears all VTK data added to the VTK writer.\n-Definition: vtksequencewriterbase.hh:156\n-Dune::VTKWriter\n-Writer for the ouput of grid functions in the vtk format.\n-Definition: vtkwriter.hh:95\n+Dune::GridView\n+Grid view abstract base class.\n+Definition: common/gridview.hh:66\n+Dune::GnuplotWriter\n+Writer for 1D grids in gnuplot format.\n+Definition: gnuplot.hh:30\n+Dune::GnuplotWriter::addVertexData\n+void addVertexData(const DataContainer &data, const std::string &name)\n+Add vertex data.\n+Definition: gnuplot.hh:61\n+Dune::GnuplotWriter::addCellData\n+void addCellData(const DataContainer &data, const std::string &name)\n+Add cell data.\n+Definition: gnuplot.hh:49\n+Dune::GnuplotWriter::write\n+void write(const std::string &filename) const\n+Write Gnuplot file to disk.\n+Definition: gnuplot.cc:19\n+Dune::GnuplotWriter::GnuplotWriter\n+GnuplotWriter(const GridView &gv)\n+Definition: gnuplot.hh:37\n+Dune::LeafGnuplotWriter\n+GnuplotWriter on the leaf grid.\n+Definition: gnuplot.hh:91\n+Dune::LeafGnuplotWriter::LeafGnuplotWriter\n+LeafGnuplotWriter(const G &grid)\n+Construct a Gnuplot writer for the leaf level of a given grid.\n+Definition: gnuplot.hh:94\n+Dune::LevelGnuplotWriter\n+GnuplotWriter on a given level grid.\n+Definition: gnuplot.hh:104\n+Dune::LevelGnuplotWriter::LevelGnuplotWriter\n+LevelGnuplotWriter(const G &grid, int level)\n+Construct a Gnuplot writer for a certain level of a given grid.\n+Definition: gnuplot.hh:107\n+grid.hh\n+Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00776.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00776.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: volumeiterators.hh File Reference\n+dune-grid: boundarywriter.hh File Reference\n \n \n \n \n \n \n \n@@ -65,30 +65,28 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    volumeiterators.hh File Reference
    \n+
    boundarywriter.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid/common/gridenums.hh>
    \n-#include <dune/grid/io/file/vtk/corner.hh>
    \n-#include <dune/grid/io/file/vtk/corneriterator.hh>
    \n-#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n-#include <dune/grid/io/file/vtk/pointiterator.hh>
    \n+
    #include <memory>
    \n+#include <string>
    \n+#include <dune/grid/io/file/vtk/basicwriter.hh>
    \n+#include <dune/grid/io/file/vtk/boundaryiterators.hh>
    \n+#include <dune/grid/io/file/vtk/skeletonfunction.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::VTK::ConformingVolumeIteratorFactory< GV >
     
    class  Dune::VTK::NonConformingVolumeIteratorFactory< GV >
    class  Dune::VTK::NonConformingBoundaryWriter< GV >
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,25 +8,23 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-volumeiterators.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n+boundarywriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::ConformingVolumeIteratorFactory<_GV_>\n-\u00a0\n-class \u00a0Dune::VTK::NonConformingVolumeIteratorFactory<_GV_>\n+class \u00a0Dune::VTK::NonConformingBoundaryWriter<_GV_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::VTK\n \u00a0\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00776_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: volumeiterators.hh Source File\n+dune-grid: boundarywriter.hh Source File\n \n \n \n \n \n \n \n@@ -62,200 +62,100 @@\n \n \n \n
    \n-
    volumeiterators.hh
    \n+
    boundarywriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
    \n
    8
    \n-\n-
    10
    \n-\n-\n-\n-\n+
    9#include <memory>
    \n+
    10#include <string>
    \n+
    11
    \n+\n+\n+\n
    15
    \n
    16namespace Dune {
    \n
    19
    \n
    20 namespace VTK {
    \n
    21
    \n
    22 template<typename GV>
    \n-\n-
    24 const GV& gv;
    \n-
    25
    \n-
    26 typedef typename GV::IndexSet IndexSet;
    \n-
    27 const IndexSet& indexSet() const { return gv.indexSet(); }
    \n-\n-\n-
    30
    \n-
    31 public:
    \n-
    32 static const unsigned dimCell = GV::dimension;
    \n-
    33
    \n-
    34 typedef typename GV::template Codim<0>::Entity Cell;
    \n-
    35 typedef typename GV::template Codim<0>::
    \n-
    36 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
    \n-
    37
    \n-\n-\n-
    40
    \n-\n-\n-
    43 typename GV::IndexSet> PointIterator;
    \n+\n+\n+
    25 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
    \n+
    26 {
    \n+\n+\n+
    29
    \n+
    30 const GV& gv;
    \n+
    31
    \n+
    32 public:
    \n+\n+
    34 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
    \n+
    35 { }
    \n+
    36
    \n+\n+
    38
    \n+
    39 template<typename Func>
    \n+
    40 void addCellData(const std::shared_ptr<Func>& p, const std::string& name) {
    \n+
    41 addCellData(std::shared_ptr<typename Base::FunctionWriter>
    \n+
    42 (new SkeletonFunctionWriter<Func>(p, name)));
    \n+
    43 }
    \n
    44
    \n-\n-\n-
    47 typedef typename GV::Communication Communication;
    \n-
    48
    \n-
    49 explicit ConformingVolumeIteratorFactory(const GV& gv_)
    \n-
    50 : gv(gv_)
    \n-
    51 { }
    \n-
    52
    \n-\n-
    54 return gv.template begin<0, InteriorBorder_Partition>();
    \n-
    55 }
    \n-\n-
    57 return gv.template end<0, InteriorBorder_Partition>();
    \n-
    58 }
    \n-
    59
    \n-\n-\n-
    62 }
    \n-\n-
    64 return CornerIterator(endCells());
    \n-
    65 }
    \n+
    45 template<typename Func>
    \n+
    46 void addCellData(Func* p, const std::string& name) {
    \n+
    47 addCellData(std::shared_ptr<Func>(p), name);
    \n+
    48 }
    \n+
    49
    \n+\n+
    51
    \n+
    52 template<typename Func>
    \n+
    53 void addPointData(const std::shared_ptr<Func>& p, const std::string& name) {
    \n+
    54 addPointData(std::shared_ptr<typename Base::FunctionWriter>
    \n+
    55 (new SkeletonFunctionWriter<Func>(p, name)));
    \n+
    56 }
    \n+
    57
    \n+
    58 template<typename Func>
    \n+
    59 void addPointData(Func* p, const std::string& name) {
    \n+
    60 addPointData(std::shared_ptr<Func>(p), name);
    \n+
    61 }
    \n+
    62
    \n+
    63 };
    \n+
    64
    \n+
    65 } // namespace VTK
    \n
    66
    \n-\n-
    68 return PointIterator(beginCells(), endCells(), gv.indexSet());
    \n-
    69 }
    \n-\n-
    71 return PointIterator(endCells());
    \n-
    72 }
    \n-
    73
    \n-\n-
    75 return ConnectivityWriter(*this);
    \n-
    76 }
    \n-
    77 const Communication& comm() const {
    \n-
    78 return gv.comm();
    \n-
    79 }
    \n-
    80 };
    \n-
    81
    \n-
    82 template<typename GV>
    \n-\n-
    84 const GV& gv;
    \n-
    85
    \n-
    86 public:
    \n-
    87 static const unsigned dimCell = GV::dimension;
    \n-
    88
    \n-
    89 typedef typename GV::template Codim<0>::Entity Cell;
    \n-
    90 typedef typename GV::template Codim<0>::
    \n-
    91 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
    \n-
    92
    \n-\n-\n-
    95
    \n-
    96 typedef Corner Point;
    \n-\n-
    98
    \n-\n-
    100 typedef typename GV::Communication Communication;
    \n-
    101
    \n-\n-
    103 : gv(gv_)
    \n-
    104 { }
    \n-
    105
    \n-\n-
    107 return gv.template begin<0, InteriorBorder_Partition>();
    \n-
    108 }
    \n-\n-
    110 return gv.template end<0, InteriorBorder_Partition>();
    \n-
    111 }
    \n-
    112
    \n-\n-\n-
    115 }
    \n-\n-
    117 return CornerIterator(endCells());
    \n-
    118 }
    \n-
    119
    \n-\n-
    121 PointIterator endPoints() const { return endCorners(); }
    \n-
    122
    \n-\n-
    124 return ConnectivityWriter();
    \n-
    125 }
    \n-
    126 const Communication& comm() const {
    \n-
    127 return gv.comm();
    \n-
    128 }
    \n-
    129 };
    \n-
    130
    \n-
    131 } // namespace VTK
    \n-
    132
    \n-
    134
    \n-
    135} // namespace Dune
    \n-
    136
    \n-
    137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
    \n-\n-\n-\n-\n-\n+
    68
    \n+
    69} // namespace Dune
    \n+
    70
    \n+
    71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
    \n+
    Functions for VTK output on the skeleton.
    \n+\n+
    Functions for VTK output on the skeleton.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n-
    iterate over the corners of some cell range
    Definition: corneriterator.hh:39
    \n-
    writer for the connectivity array in conforming mode
    Definition: functionwriter.hh:195
    \n-
    writer for the connectivity array in nonconforming mode
    Definition: functionwriter.hh:261
    \n-
    iterate over the points of some corner range
    Definition: pointiterator.hh:58
    \n-
    Definition: volumeiterators.hh:23
    \n-
    CornerIterator endCorners() const
    Definition: volumeiterators.hh:63
    \n-
    VTK::CornerIterator< CellIterator > CornerIterator
    Definition: volumeiterators.hh:39
    \n-
    VTK::Corner< Cell > Corner
    Definition: volumeiterators.hh:38
    \n-
    CellIterator endCells() const
    Definition: volumeiterators.hh:56
    \n-
    GV::Communication Communication
    Definition: volumeiterators.hh:47
    \n-
    VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator
    Definition: volumeiterators.hh:43
    \n-
    ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > ConnectivityWriter
    Definition: volumeiterators.hh:46
    \n-
    CornerIterator beginCorners() const
    Definition: volumeiterators.hh:60
    \n-
    static const unsigned dimCell
    Definition: volumeiterators.hh:32
    \n-
    PointIterator endPoints() const
    Definition: volumeiterators.hh:70
    \n-
    const Communication & comm() const
    Definition: volumeiterators.hh:77
    \n-
    ConformingVolumeIteratorFactory(const GV &gv_)
    Definition: volumeiterators.hh:49
    \n-
    VTK::Corner< Cell > Point
    Definition: volumeiterators.hh:41
    \n-
    ConnectivityWriter makeConnectivity() const
    Definition: volumeiterators.hh:74
    \n-
    CellIterator beginCells() const
    Definition: volumeiterators.hh:53
    \n-
    GV::template Codim< 0 >::Entity Cell
    Definition: volumeiterators.hh:34
    \n-
    PointIterator beginPoints() const
    Definition: volumeiterators.hh:67
    \n-
    GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
    Definition: volumeiterators.hh:36
    \n-
    Definition: volumeiterators.hh:83
    \n-
    const Communication & comm() const
    Definition: volumeiterators.hh:126
    \n-
    PointIterator beginPoints() const
    Definition: volumeiterators.hh:120
    \n-
    GV::Communication Communication
    Definition: volumeiterators.hh:100
    \n-
    CellIterator beginCells() const
    Definition: volumeiterators.hh:106
    \n-
    GV::template Codim< 0 >::Entity Cell
    Definition: volumeiterators.hh:89
    \n-
    NonConformingVolumeIteratorFactory(const GV &gv_)
    Definition: volumeiterators.hh:102
    \n-
    ConnectivityWriter makeConnectivity() const
    Definition: volumeiterators.hh:123
    \n-
    NonConformingConnectivityWriter< Cell > ConnectivityWriter
    Definition: volumeiterators.hh:99
    \n-
    static const unsigned dimCell
    Definition: volumeiterators.hh:87
    \n-
    CellIterator endCells() const
    Definition: volumeiterators.hh:109
    \n-
    CornerIterator endCorners() const
    Definition: volumeiterators.hh:116
    \n-
    VTK::CornerIterator< CellIterator > CornerIterator
    Definition: volumeiterators.hh:94
    \n-
    VTK::Corner< Cell > Corner
    Definition: volumeiterators.hh:93
    \n-
    CornerIterator PointIterator
    Definition: volumeiterators.hh:97
    \n-
    GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
    Definition: volumeiterators.hh:91
    \n-
    PointIterator endPoints() const
    Definition: volumeiterators.hh:121
    \n-
    Corner Point
    Definition: volumeiterators.hh:96
    \n-
    CornerIterator beginCorners() const
    Definition: volumeiterators.hh:113
    \n+
    Definition: basicwriter.hh:35
    \n+
    void addCellData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:76
    \n+
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n+
    Definition: boundaryiterators.hh:159
    \n+
    Definition: boundarywriter.hh:26
    \n+
    void addPointData(const std::shared_ptr< Func > &p, const std::string &name)
    Definition: boundarywriter.hh:53
    \n+
    void addCellData(Func *p, const std::string &name)
    Definition: boundarywriter.hh:46
    \n+
    void addPointData(Func *p, const std::string &name)
    Definition: boundarywriter.hh:59
    \n+
    NonConformingBoundaryWriter(const GV &gv_)
    Definition: boundarywriter.hh:33
    \n+
    void addCellData(const std::shared_ptr< Func > &p, const std::string &name)
    Definition: boundarywriter.hh:40
    \n+
    function writer for skeleton functions
    Definition: skeletonfunction.hh:83
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,286 +7,119 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-volumeiterators.hh\n+boundarywriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH\n 8\n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13#include \n- 14#include \n+ 9#include \n+ 10#include \n+ 11\n+ 12#include \n+ 13#include \n+ 14#include \n 15\n 16namespace Dune {\n 19\n 20 namespace VTK {\n 21\n 22 template\n-23 class ConformingVolumeIteratorFactory {\n- 24 const GV& gv;\n- 25\n- 26 typedef typename GV::IndexSet IndexSet;\n-27 const IndexSet& indexSet() const { return gv.indexSet(); }\n- 28 friend class ConformingConnectivityWriter<\n- 29 ConformingVolumeIteratorFactory >;\n- 30\n- 31 public:\n-32 static const unsigned dimCell = GV::dimension;\n- 33\n-34 typedef typename GV::template Codim<0>::Entity Cell;\n- 35 typedef typename GV::template Codim<0>::\n-36 template Partition::Iterator CellIterator;\n- 37\n-38 typedef VTK::Corner Corner;\n-39 typedef VTK::CornerIterator CornerIterator;\n- 40\n-41 typedef VTK::Corner Point;\n- 42 typedef VTK::PointIterator PointIterator;\n+23 class NonConformingBoundaryWriter\n+ 24 : public NonConformingBoundaryIteratorFactory,\n+ 25 public BasicWriter >\n+ 26 {\n+ 27 typedef NonConformingBoundaryIteratorFactory Factory;\n+ 28 typedef BasicWriter Base;\n+ 29\n+ 30 const GV& gv;\n+ 31\n+ 32 public:\n+33 NonConformingBoundaryWriter(const GV& gv_)\n+ 34 : Factory(gv_), Base(static_cast(*this)), gv(gv_)\n+ 35 { }\n+ 36\n+ 37 using Base::addCellData;\n+ 38\n+ 39 template\n+40 void addCellData(const std::shared_ptr& p, const std::string& name) {\n+ 41 addCellData(std::shared_ptr\n+ 42 (new SkeletonFunctionWriter(p, name)));\n+ 43 }\n 44\n- 45 typedef ConformingConnectivityWriter\n-46 > ConnectivityWriter;\n-47 typedef typename GV::Communication Communication;\n- 48\n-49 explicit ConformingVolumeIteratorFactory(const GV& gv_)\n- 50 : gv(gv_)\n- 51 { }\n- 52\n-53 CellIterator beginCells() const {\n- 54 return gv.template begin<0, InteriorBorder_Partition>();\n- 55 }\n-56 CellIterator endCells() const {\n- 57 return gv.template end<0, InteriorBorder_Partition>();\n- 58 }\n- 59\n-60 CornerIterator beginCorners() const {\n- 61 return CornerIterator(beginCells(), endCells());\n- 62 }\n-63 CornerIterator endCorners() const {\n- 64 return CornerIterator(endCells());\n- 65 }\n+ 45 template\n+46 void addCellData(Func* p, const std::string& name) {\n+ 47 addCellData(std::shared_ptr(p), name);\n+ 48 }\n+ 49\n+ 50 using Base::addPointData;\n+ 51\n+ 52 template\n+53 void addPointData(const std::shared_ptr& p, const std::string& name) {\n+ 54 addPointData(std::shared_ptr\n+ 55 (new SkeletonFunctionWriter(p, name)));\n+ 56 }\n+ 57\n+ 58 template\n+59 void addPointData(Func* p, const std::string& name) {\n+ 60 addPointData(std::shared_ptr(p), name);\n+ 61 }\n+ 62\n+ 63 };\n+ 64\n+ 65 } // namespace VTK\n 66\n-67 PointIterator beginPoints() const {\n- 68 return PointIterator(beginCells(), endCells(), gv.indexSet());\n- 69 }\n-70 PointIterator endPoints() const {\n- 71 return PointIterator(endCells());\n- 72 }\n- 73\n-74 ConnectivityWriter makeConnectivity() const {\n- 75 return ConnectivityWriter(*this);\n- 76 }\n-77 const Communication& comm() const {\n- 78 return gv.comm();\n- 79 }\n- 80 };\n- 81\n- 82 template\n-83 class NonConformingVolumeIteratorFactory {\n- 84 const GV& gv;\n- 85\n- 86 public:\n-87 static const unsigned dimCell = GV::dimension;\n- 88\n-89 typedef typename GV::template Codim<0>::Entity Cell;\n- 90 typedef typename GV::template Codim<0>::\n-91 template Partition::Iterator CellIterator;\n- 92\n-93 typedef VTK::Corner Corner;\n-94 typedef VTK::CornerIterator CornerIterator;\n- 95\n-96 typedef Corner Point;\n-97 typedef CornerIterator PointIterator;\n- 98\n-99 typedef NonConformingConnectivityWriter ConnectivityWriter;\n-100 typedef typename GV::Communication Communication;\n- 101\n-102 explicit NonConformingVolumeIteratorFactory(const GV& gv_)\n- 103 : gv(gv_)\n- 104 { }\n- 105\n-106 CellIterator beginCells() const {\n- 107 return gv.template begin<0, InteriorBorder_Partition>();\n- 108 }\n-109 CellIterator endCells() const {\n- 110 return gv.template end<0, InteriorBorder_Partition>();\n- 111 }\n- 112\n-113 CornerIterator beginCorners() const {\n- 114 return CornerIterator(beginCells(), endCells());\n- 115 }\n-116 CornerIterator endCorners() const {\n- 117 return CornerIterator(endCells());\n- 118 }\n- 119\n-120 PointIterator beginPoints() const { return beginCorners(); }\n-121 PointIterator endPoints() const { return endCorners(); }\n- 122\n-123 ConnectivityWriter makeConnectivity() const {\n- 124 return ConnectivityWriter();\n- 125 }\n-126 const Communication& comm() const {\n- 127 return gv.comm();\n- 128 }\n- 129 };\n- 130\n- 131 } // namespace VTK\n- 132\n- 134\n- 135} // namespace Dune\n- 136\n- 137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH\n-gridenums.hh\n-corneriterator.hh\n-corner.hh\n-functionwriter.hh\n-pointiterator.hh\n+ 68\n+ 69} // namespace Dune\n+ 70\n+ 71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH\n+skeletonfunction.hh\n+Functions for VTK output on the skeleton.\n+basicwriter.hh\n+boundaryiterators.hh\n+Functions for VTK output on the skeleton.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::Corner\n-simple class representing a corner of a cell\n-Definition: corner.hh:25\n-Dune::VTK::CornerIterator\n-iterate over the corners of some cell range\n-Definition: corneriterator.hh:39\n-Dune::VTK::ConformingConnectivityWriter\n-writer for the connectivity array in conforming mode\n-Definition: functionwriter.hh:195\n-Dune::VTK::NonConformingConnectivityWriter\n-writer for the connectivity array in nonconforming mode\n-Definition: functionwriter.hh:261\n-Dune::VTK::PointIterator\n-iterate over the points of some corner range\n-Definition: pointiterator.hh:58\n-Dune::VTK::ConformingVolumeIteratorFactory\n-Definition: volumeiterators.hh:23\n-Dune::VTK::ConformingVolumeIteratorFactory::endCorners\n-CornerIterator endCorners() const\n-Definition: volumeiterators.hh:63\n-Dune::VTK::ConformingVolumeIteratorFactory::CornerIterator\n-VTK::CornerIterator< CellIterator > CornerIterator\n-Definition: volumeiterators.hh:39\n-Dune::VTK::ConformingVolumeIteratorFactory::Corner\n-VTK::Corner< Cell > Corner\n-Definition: volumeiterators.hh:38\n-Dune::VTK::ConformingVolumeIteratorFactory::endCells\n-CellIterator endCells() const\n-Definition: volumeiterators.hh:56\n-Dune::VTK::ConformingVolumeIteratorFactory::Communication\n-GV::Communication Communication\n-Definition: volumeiterators.hh:47\n-Dune::VTK::ConformingVolumeIteratorFactory::PointIterator\n-VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator\n-Definition: volumeiterators.hh:43\n-Dune::VTK::ConformingVolumeIteratorFactory::ConnectivityWriter\n-ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > >\n-ConnectivityWriter\n-Definition: volumeiterators.hh:46\n-Dune::VTK::ConformingVolumeIteratorFactory::beginCorners\n-CornerIterator beginCorners() const\n-Definition: volumeiterators.hh:60\n-Dune::VTK::ConformingVolumeIteratorFactory::dimCell\n-static const unsigned dimCell\n-Definition: volumeiterators.hh:32\n-Dune::VTK::ConformingVolumeIteratorFactory::endPoints\n-PointIterator endPoints() const\n-Definition: volumeiterators.hh:70\n-Dune::VTK::ConformingVolumeIteratorFactory::comm\n-const Communication & comm() const\n-Definition: volumeiterators.hh:77\n-Dune::VTK::ConformingVolumeIteratorFactory::ConformingVolumeIteratorFactory\n-ConformingVolumeIteratorFactory(const GV &gv_)\n-Definition: volumeiterators.hh:49\n-Dune::VTK::ConformingVolumeIteratorFactory::Point\n-VTK::Corner< Cell > Point\n-Definition: volumeiterators.hh:41\n-Dune::VTK::ConformingVolumeIteratorFactory::makeConnectivity\n-ConnectivityWriter makeConnectivity() const\n-Definition: volumeiterators.hh:74\n-Dune::VTK::ConformingVolumeIteratorFactory::beginCells\n-CellIterator beginCells() const\n-Definition: volumeiterators.hh:53\n-Dune::VTK::ConformingVolumeIteratorFactory::Cell\n-GV::template Codim< 0 >::Entity Cell\n-Definition: volumeiterators.hh:34\n-Dune::VTK::ConformingVolumeIteratorFactory::beginPoints\n-PointIterator beginPoints() const\n-Definition: volumeiterators.hh:67\n-Dune::VTK::ConformingVolumeIteratorFactory::CellIterator\n-GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::\n-Iterator CellIterator\n-Definition: volumeiterators.hh:36\n-Dune::VTK::NonConformingVolumeIteratorFactory\n-Definition: volumeiterators.hh:83\n-Dune::VTK::NonConformingVolumeIteratorFactory::comm\n-const Communication & comm() const\n-Definition: volumeiterators.hh:126\n-Dune::VTK::NonConformingVolumeIteratorFactory::beginPoints\n-PointIterator beginPoints() const\n-Definition: volumeiterators.hh:120\n-Dune::VTK::NonConformingVolumeIteratorFactory::Communication\n-GV::Communication Communication\n-Definition: volumeiterators.hh:100\n-Dune::VTK::NonConformingVolumeIteratorFactory::beginCells\n-CellIterator beginCells() const\n-Definition: volumeiterators.hh:106\n-Dune::VTK::NonConformingVolumeIteratorFactory::Cell\n-GV::template Codim< 0 >::Entity Cell\n-Definition: volumeiterators.hh:89\n-Dune::VTK::NonConformingVolumeIteratorFactory::\n-NonConformingVolumeIteratorFactory\n-NonConformingVolumeIteratorFactory(const GV &gv_)\n-Definition: volumeiterators.hh:102\n-Dune::VTK::NonConformingVolumeIteratorFactory::makeConnectivity\n-ConnectivityWriter makeConnectivity() const\n-Definition: volumeiterators.hh:123\n-Dune::VTK::NonConformingVolumeIteratorFactory::ConnectivityWriter\n-NonConformingConnectivityWriter< Cell > ConnectivityWriter\n-Definition: volumeiterators.hh:99\n-Dune::VTK::NonConformingVolumeIteratorFactory::dimCell\n-static const unsigned dimCell\n-Definition: volumeiterators.hh:87\n-Dune::VTK::NonConformingVolumeIteratorFactory::endCells\n-CellIterator endCells() const\n-Definition: volumeiterators.hh:109\n-Dune::VTK::NonConformingVolumeIteratorFactory::endCorners\n-CornerIterator endCorners() const\n-Definition: volumeiterators.hh:116\n-Dune::VTK::NonConformingVolumeIteratorFactory::CornerIterator\n-VTK::CornerIterator< CellIterator > CornerIterator\n-Definition: volumeiterators.hh:94\n-Dune::VTK::NonConformingVolumeIteratorFactory::Corner\n-VTK::Corner< Cell > Corner\n-Definition: volumeiterators.hh:93\n-Dune::VTK::NonConformingVolumeIteratorFactory::PointIterator\n-CornerIterator PointIterator\n-Definition: volumeiterators.hh:97\n-Dune::VTK::NonConformingVolumeIteratorFactory::CellIterator\n-GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::\n-Iterator CellIterator\n-Definition: volumeiterators.hh:91\n-Dune::VTK::NonConformingVolumeIteratorFactory::endPoints\n-PointIterator endPoints() const\n-Definition: volumeiterators.hh:121\n-Dune::VTK::NonConformingVolumeIteratorFactory::Point\n-Corner Point\n-Definition: volumeiterators.hh:96\n-Dune::VTK::NonConformingVolumeIteratorFactory::beginCorners\n-CornerIterator beginCorners() const\n-Definition: volumeiterators.hh:113\n+Dune::VTK::BasicWriter\n+Definition: basicwriter.hh:35\n+Dune::VTK::BasicWriter::addCellData\n+void addCellData(const std::shared_ptr< FunctionWriter > &writer)\n+Definition: basicwriter.hh:76\n+Dune::VTK::BasicWriter::addPointData\n+void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n+Definition: basicwriter.hh:80\n+Dune::VTK::NonConformingBoundaryIteratorFactory\n+Definition: boundaryiterators.hh:159\n+Dune::VTK::NonConformingBoundaryWriter\n+Definition: boundarywriter.hh:26\n+Dune::VTK::NonConformingBoundaryWriter::addPointData\n+void addPointData(const std::shared_ptr< Func > &p, const std::string &name)\n+Definition: boundarywriter.hh:53\n+Dune::VTK::NonConformingBoundaryWriter::addCellData\n+void addCellData(Func *p, const std::string &name)\n+Definition: boundarywriter.hh:46\n+Dune::VTK::NonConformingBoundaryWriter::addPointData\n+void addPointData(Func *p, const std::string &name)\n+Definition: boundarywriter.hh:59\n+Dune::VTK::NonConformingBoundaryWriter::NonConformingBoundaryWriter\n+NonConformingBoundaryWriter(const GV &gv_)\n+Definition: boundarywriter.hh:33\n+Dune::VTK::NonConformingBoundaryWriter::addCellData\n+void addCellData(const std::shared_ptr< Func > &p, const std::string &name)\n+Definition: boundarywriter.hh:40\n+Dune::VTK::SkeletonFunctionWriter\n+function writer for skeleton functions\n+Definition: skeletonfunction.hh:83\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00779.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00779.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: subsamplingvtkwriter.hh File Reference\n+dune-grid: pointiterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,45 +65,40 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    subsamplingvtkwriter.hh File Reference
    \n+
    pointiterator.hh File Reference
    \n
    \n
    \n-\n-

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

    \n-
    #include <ostream>
    \n-#include <memory>
    \n-#include <dune/common/indent.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/geometry/virtualrefinement.hh>
    \n-#include <dune/grid/io/file/vtk/vtkwriter.hh>
    \n-#include <dune/grid/io/file/vtk/vtuwriter.hh>
    \n+
    #include <iterator>
    \n+#include <vector>
    \n+#include <dune/common/iteratorfacades.hh>
    \n+#include <dune/common/typetraits.hh>
    \n+#include <dune/grid/io/file/vtk/corner.hh>
    \n+#include <dune/grid/io/file/vtk/corneriterator.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::SubsamplingVTKWriter< GridView >
     Writer for the output of subsampled grid functions in the vtk format. More...
    class  Dune::VTK::PointIterator< CellIterator, IS >
     iterate over the points of some corner range More...
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-

    Detailed Description

    \n-

    Provides subsampled file i/o for the visualization toolkit.

    \n-
    Author
    J\u00f6 Fahlke
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-utf-8\n+us-ascii\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,33 +8,28 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-subsamplingvtkwriter.hh File Reference\n-Provides subsampled file i/o for the visualization toolkit. More...\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+pointiterator.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::SubsamplingVTKWriter<_GridView_>\n-\u00a0 Writer for the output of subsampled grid functions in the vtk format.\n- More...\n+class \u00a0Dune::VTK::PointIterator<_CellIterator,_IS_>\n+\u00a0 iterate over the points of some corner range More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Provides subsampled file i/o for the visualization toolkit.\n- Author\n- J\u00f6 Fahlke\n+namespace \u00a0Dune::VTK\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00779_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: subsamplingvtkwriter.hh Source File\n+dune-grid: pointiterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,392 +62,133 @@\n \n \n \n
    \n-
    subsamplingvtkwriter.hh
    \n+
    pointiterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_SUBSAMPLINGVTKWRITER_HH
    \n-
    7#define DUNE_SUBSAMPLINGVTKWRITER_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
    \n
    8
    \n-
    9#include <ostream>
    \n-
    10#include <memory>
    \n+
    9#include <iterator>
    \n+
    10#include <vector>
    \n
    11
    \n-
    12#include <dune/common/indent.hh>
    \n-
    13#include <dune/geometry/type.hh>
    \n-
    14#include <dune/geometry/virtualrefinement.hh>
    \n-\n-\n+
    12#include <dune/common/iteratorfacades.hh>
    \n+
    13#include <dune/common/typetraits.hh>
    \n+
    14
    \n+\n+\n
    17
    \n-
    24namespace Dune
    \n-
    25{
    \n-
    37 template< class GridView >
    \n-\n-
    39 : public VTKWriter<GridView>
    \n-
    40 {
    \n-\n-
    42 constexpr static int dim = GridView::dimension;
    \n-
    43 constexpr static int dimw = GridView::dimensionworld;
    \n-
    44 typedef typename GridView::Grid::ctype ctype;
    \n-
    45 typedef typename GridView::template Codim< 0 >::Entity Entity;
    \n-
    46 typedef VirtualRefinement<dim, ctype> Refinement;
    \n-
    47 typedef typename Refinement::IndexVector IndexVector;
    \n-
    48 typedef typename Refinement::ElementIterator SubElementIterator;
    \n-
    49 typedef typename Refinement::VertexIterator SubVertexIterator;
    \n-
    50
    \n-
    51 typedef typename Base::CellIterator CellIterator;
    \n-
    52 typedef typename Base::FunctionIterator FunctionIterator;
    \n-
    53 using Base::cellBegin;
    \n-
    54 using Base::cellEnd;
    \n-
    55 using Base::celldata;
    \n-
    56 using Base::ncells;
    \n-
    57 using Base::ncorners;
    \n-
    58 using Base::nvertices;
    \n-
    59 using Base::outputtype;
    \n-\n-
    61 using Base::vertexEnd;
    \n-
    62 using Base::vertexdata;
    \n-
    63
    \n-
    64 public:
    \n-
    80 explicit SubsamplingVTKWriter (const GridView &gridView,
    \n-
    81 Dune::RefinementIntervals intervals_, bool coerceToSimplex_ = false,
    \n-\n-
    83 : Base(gridView, VTK::nonconforming, coordPrecision)
    \n-
    84 , intervals(intervals_), coerceToSimplex(coerceToSimplex_)
    \n-
    85 {
    \n-
    86 if(intervals_.intervals() < 1) {
    \n-
    87 DUNE_THROW(Dune::IOError,"SubsamplingVTKWriter: Refinement intervals must be larger than zero! (One interval means no subsampling)");
    \n+
    18namespace Dune
    \n+
    19{
    \n+
    22
    \n+
    23 namespace VTK {
    \n+
    24
    \n+
    26
    \n+
    49 template<typename CellIterator, typename IS>
    \n+\n+
    51 : public ForwardIteratorFacade
    \n+
    52 < PointIterator<CellIterator, IS>,
    \n+
    53 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n+
    54 CellIterator>::value_type>::type>,
    \n+
    55 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n+
    56 CellIterator>::value_type>::type>&,
    \n+
    57 typename std::iterator_traits<CellIterator>::difference_type>
    \n+
    58 {
    \n+
    59 public:
    \n+
    60 typedef VTK::Corner<typename std::remove_const<typename std::iterator_traits<
    \n+
    61 CellIterator>::value_type>::type> Corner;
    \n+
    62
    \n+
    63 // reiterate the facades typedefs here
    \n+\n+
    65 typedef const Corner Value;
    \n+
    66 typedef Value& Reference;
    \n+
    67 typedef typename std::iterator_traits<CellIterator>::difference_type
    \n+\n+
    69
    \n+
    70 static const unsigned mydim = std::iterator_traits<CellIterator>::
    \n+
    71 value_type::mydimension;
    \n+
    72
    \n+
    73 private:
    \n+
    74 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
    \n+
    75 DifferenceType> Facade;
    \n+
    76
    \n+\n+
    78 const IS* is;
    \n+
    79 std::vector<bool> seen;
    \n+
    80
    \n+
    81 public:
    \n+\n+
    83 return *cornerit;
    \n+
    84 }
    \n+
    85
    \n+
    86 bool isDereferencable() const {
    \n+
    87 return cornerit.isDereferencable();
    \n
    88 }
    \n-
    89 }
    \n-
    90
    \n-
    91 private:
    \n-
    92 GeometryType subsampledGeometryType(GeometryType geometryType)
    \n-
    93 {
    \n-
    94 return (geometryType.isCube() && !coerceToSimplex ? geometryType : GeometryTypes::simplex(dim));
    \n-
    95 }
    \n-
    96
    \n-
    97 template<typename SubIterator>
    \n-
    98 struct IteratorSelector
    \n-
    99 {};
    \n-
    100
    \n-
    101 SubElementIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
    \n-
    102 {
    \n-
    103 return refinement.eBegin(intervals);
    \n-
    104 }
    \n+
    89
    \n+
    90 bool equals(const DerivedType& other) const {
    \n+
    91 return cornerit == other.cornerit;
    \n+
    92 }
    \n+
    93
    \n+
    94 void increment() {
    \n+
    95 for(++cornerit; isDereferencable(); ++cornerit) {
    \n+
    96 typename IS::IndexType index =
    \n+
    97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), mydim);
    \n+
    98
    \n+
    99 if(!seen[index]) {
    \n+
    100 seen[index] = true;
    \n+
    101 break;
    \n+
    102 }
    \n+
    103 }
    \n+
    104 }
    \n
    105
    \n-
    106 SubVertexIterator refinementBegin(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
    \n-
    107 {
    \n-
    108 return refinement.vBegin(intervals);
    \n-
    109 }
    \n-
    110
    \n-
    111 SubElementIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubElementIterator>)
    \n-
    112 {
    \n-
    113 return refinement.eEnd(intervals);
    \n-
    114 }
    \n-
    115
    \n-
    116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune::RefinementIntervals intervals, IteratorSelector<SubVertexIterator>)
    \n-
    117 {
    \n-
    118 return refinement.vEnd(intervals);
    \n-
    119 }
    \n-
    120
    \n-
    121 template<typename Data, typename Iterator, typename SubIterator>
    \n-
    122 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator begin, const Iterator end, int nentries, IteratorSelector<SubIterator> sis)
    \n-
    123 {
    \n-
    124 for (auto it = data.begin(),
    \n-
    125 iend = data.end();
    \n-
    126 it != iend;
    \n-
    127 ++it)
    \n-
    128 {
    \n-
    129 const auto& f = *it;
    \n-
    130 VTK::FieldInfo fieldInfo = f.fieldInfo();
    \n-
    131 std::size_t writecomps = fieldInfo.size();
    \n-
    132 switch (fieldInfo.type())
    \n-
    133 {
    \n-\n-
    135 break;
    \n-\n-
    137 // vtk file format: a vector data always should have 3 comps (with
    \n-
    138 // 3rd comp = 0 in 2D case)
    \n-
    139 if (writecomps > 3)
    \n-
    140 DUNE_THROW(IOError,"Cannot write VTK vectors with more than 3 components (components was " << writecomps << ")");
    \n-
    141 writecomps = 3;
    \n-
    142 break;
    \n-\n-
    144 DUNE_THROW(NotImplemented,"VTK output for tensors not implemented yet");
    \n-
    145 }
    \n-
    146 std::shared_ptr<VTK::DataArrayWriter> p
    \n-
    147 (writer.makeArrayWriter(f.name(), writecomps, nentries, fieldInfo.precision()));
    \n-
    148 if(!p->writeIsNoop())
    \n-
    149 for (Iterator eit = begin; eit!=end; ++eit)
    \n-
    150 {
    \n-
    151 const Entity & e = *eit;
    \n-
    152 f.bind(e);
    \n-
    153 Refinement &refinement =
    \n-
    154 buildRefinement<dim, ctype>(eit->type(),
    \n-
    155 subsampledGeometryType(eit->type()));
    \n-
    156 for(SubIterator sit = refinementBegin(refinement,intervals,sis),
    \n-
    157 send = refinementEnd(refinement,intervals,sis);
    \n-
    158 sit != send;
    \n-
    159 ++sit)
    \n-
    160 {
    \n-
    161 f.write(sit.coords(),*p);
    \n-
    162 // expand 2D-Vectors to 3D for VTK format
    \n-
    163 for(unsigned j = f.fieldInfo().size(); j < writecomps; j++)
    \n-
    164 p->write(0.0);
    \n-
    165 }
    \n-
    166 f.unbind();
    \n-
    167 }
    \n-
    168 }
    \n-
    169 }
    \n-
    170
    \n-
    171
    \n-
    172 protected:
    \n-
    174 virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_);
    \n-
    175
    \n-
    177 virtual void writeCellData(VTK::VTUWriter& writer);
    \n-
    178
    \n-
    180 virtual void writeVertexData(VTK::VTUWriter& writer);
    \n-
    181
    \n-
    183 virtual void writeGridPoints(VTK::VTUWriter& writer);
    \n-
    184
    \n-
    186 virtual void writeGridCells(VTK::VTUWriter& writer);
    \n-
    187
    \n-
    188 public:
    \n-\n-
    190 using Base::addCellData;
    \n-
    191
    \n-
    192 private:
    \n-
    193 // hide addVertexData -- adding raw data directly without a VTKFunction
    \n-
    194 // currently does not make sense for subsampled meshes, as the higher order
    \n-
    195 // information is missing. See FS#676.
    \n-
    196 template<class V>
    \n-
    197 void addVertexData (const V& v, const std::string &name, int ncomps=1);
    \n-
    198 template<class V>
    \n-
    199 void addCellData (const V& v, const std::string &name, int ncomps=1);
    \n-
    200
    \n-
    201 Dune::RefinementIntervals intervals;
    \n-
    202 bool coerceToSimplex;
    \n-
    203 };
    \n-
    204
    \n-
    206 template <class GridView>
    \n-
    207 void SubsamplingVTKWriter<GridView>::countEntities(int &nvertices_, int &ncells_, int &ncorners_)
    \n-
    208 {
    \n-
    209 nvertices_ = 0;
    \n-
    210 ncells_ = 0;
    \n-
    211 ncorners_ = 0;
    \n-
    212 for (CellIterator it=this->cellBegin(); it!=cellEnd(); ++it)
    \n-
    213 {
    \n-
    214 Refinement &refinement = buildRefinement<dim, ctype>(it->type(), subsampledGeometryType(it->type()));
    \n-
    215
    \n-
    216 ncells_ += refinement.nElements(intervals);
    \n-
    217 nvertices_ += refinement.nVertices(intervals);
    \n-
    218 ncorners_ += refinement.nElements(intervals) * refinement.eBegin(intervals).vertexIndices().size();
    \n-
    219 }
    \n-
    220 }
    \n-
    221
    \n-
    222
    \n-
    224 template <class GridView>
    \n-\n-
    226 {
    \n-
    227 if(celldata.size() == 0)
    \n-
    228 return;
    \n-
    229
    \n-
    230 // Find the names of the first scalar and vector data fields.
    \n-
    231 // These will be marked as the default fields (the ones that ParaView shows
    \n-
    232 // when the file has just been opened).
    \n-
    233 std::string defaultScalarField, defaultVectorField;
    \n-
    234 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames(celldata);
    \n-
    235
    \n-
    236 writer.beginCellData(defaultScalarField, defaultVectorField);
    \n-
    237 writeData(writer,celldata,cellBegin(),cellEnd(),ncells,IteratorSelector<SubElementIterator>());
    \n-
    238 writer.endCellData();
    \n-
    239 }
    \n-
    240
    \n-
    242 template <class GridView>
    \n-\n-
    244 {
    \n-
    245 if(vertexdata.size() == 0)
    \n-
    246 return;
    \n-
    247
    \n-
    248 // Find the names of the first scalar and vector data fields.
    \n-
    249 // These will be marked as the default fields (the ones that ParaView shows
    \n-
    250 // when the file has just been opened).
    \n-
    251 std::string defaultScalarField, defaultVectorField;
    \n-
    252 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames(vertexdata);
    \n-
    253
    \n-
    254 writer.beginPointData(defaultScalarField, defaultVectorField);
    \n-
    255 writeData(writer,vertexdata,cellBegin(),cellEnd(),nvertices,IteratorSelector<SubVertexIterator>());
    \n-
    256 writer.endPointData();
    \n-
    257 }
    \n-
    258
    \n-
    260 template <class GridView>
    \n-\n-
    262 {
    \n-
    263 writer.beginPoints();
    \n-
    264
    \n-
    265 std::shared_ptr<VTK::DataArrayWriter> p
    \n-
    266 (writer.makeArrayWriter("Coordinates", 3, nvertices, this->coordPrecision()));
    \n-
    267 if(!p->writeIsNoop())
    \n-
    268 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
    \n-
    269 {
    \n-
    270 Refinement &refinement =
    \n-
    271 buildRefinement<dim, ctype>(i->type(),
    \n-
    272 subsampledGeometryType(i->type()));
    \n-
    273 for(SubVertexIterator sit = refinement.vBegin(intervals),
    \n-
    274 send = refinement.vEnd(intervals);
    \n-
    275 sit != send; ++sit)
    \n-
    276 {
    \n-
    277 FieldVector<ctype, dimw> coords = i->geometry().global(sit.coords());
    \n-
    278 for (int j=0; j<std::min(int(dimw),3); j++)
    \n-
    279 p->write(coords[j]);
    \n-
    280 for (int j=std::min(int(dimw),3); j<3; j++)
    \n-
    281 p->write(0.0);
    \n-
    282 }
    \n-
    283 }
    \n-
    284 // free the VTK::DataArrayWriter before touching the stream
    \n-
    285 p.reset();
    \n-
    286
    \n-
    287 writer.endPoints();
    \n-
    288 }
    \n-
    289
    \n-
    291 template <class GridView>
    \n-\n-
    293 {
    \n-
    294 writer.beginCells();
    \n-
    295
    \n-
    296 // connectivity
    \n-
    297 {
    \n-
    298 std::shared_ptr<VTK::DataArrayWriter> p1
    \n-
    299 (writer.makeArrayWriter("connectivity", 1, ncorners, VTK::Precision::int32));
    \n-
    300 // The offset within the index numbering
    \n-
    301 if(!p1->writeIsNoop()) {
    \n-
    302 int offset = 0;
    \n-
    303 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
    \n-
    304 {
    \n-
    305 GeometryType coercedToType = subsampledGeometryType(i->type());
    \n-
    306 Refinement &refinement =
    \n-
    307 buildRefinement<dim, ctype>(i->type(), coercedToType);
    \n-
    308 for(SubElementIterator sit = refinement.eBegin(intervals),
    \n-
    309 send = refinement.eEnd(intervals);
    \n-
    310 sit != send; ++sit)
    \n-
    311 {
    \n-
    312 IndexVector indices = sit.vertexIndices();
    \n-
    313 for(unsigned int ii = 0; ii < indices.size(); ++ii)
    \n-
    314 p1->write(offset+indices[VTK::renumber(coercedToType, ii)]);
    \n-
    315 }
    \n-
    316 offset += refinement.nVertices(intervals);
    \n-
    317 }
    \n-
    318 }
    \n-
    319 }
    \n-
    320
    \n-
    321 // offsets
    \n-
    322 {
    \n-
    323 std::shared_ptr<VTK::DataArrayWriter> p2
    \n-
    324 (writer.makeArrayWriter("offsets", 1, ncells, VTK::Precision::int32));
    \n-
    325 if(!p2->writeIsNoop()) {
    \n-
    326 // The offset into the connectivity array
    \n-
    327 int offset = 0;
    \n-
    328 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)
    \n-
    329 {
    \n-
    330 Refinement &refinement =
    \n-
    331 buildRefinement<dim, ctype>(i->type(),
    \n-
    332 subsampledGeometryType(i->type()));
    \n-
    333 unsigned int verticesPerCell =
    \n-
    334 refinement.eBegin(intervals).vertexIndices().size();
    \n-
    335 for(int element = 0; element < refinement.nElements(intervals);
    \n-
    336 ++element)
    \n-
    337 {
    \n-
    338 offset += verticesPerCell;
    \n-
    339 p2->write(offset);
    \n-
    340 }
    \n-
    341 }
    \n-
    342 }
    \n-
    343 }
    \n-
    344
    \n-
    345 // types
    \n-
    346 if (dim>1)
    \n-
    347 {
    \n-
    348 std::shared_ptr<VTK::DataArrayWriter> p3
    \n-
    349 (writer.makeArrayWriter("types", 1, ncells, VTK::Precision::uint8));
    \n-
    350 if(!p3->writeIsNoop())
    \n-
    351 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)
    \n-
    352 {
    \n-
    353 GeometryType coerceTo = subsampledGeometryType(it->type());
    \n-
    354 Refinement &refinement =
    \n-
    355 buildRefinement<dim, ctype>(it->type(), coerceTo);
    \n-
    356 int vtktype = VTK::geometryType(coerceTo);
    \n-
    357 for(int i = 0; i < refinement.nElements(intervals); ++i)
    \n-
    358 p3->write(vtktype);
    \n-
    359 }
    \n-
    360 }
    \n-
    361
    \n-
    362 writer.endCells();
    \n-
    363 }
    \n-
    364}
    \n-
    365
    \n-
    366#endif // DUNE_SUBSAMPLINGVTKWRITER_HH
    \n-
    Provides file i/o for the visualization toolkit.
    \n-\n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n-
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/gridview.hh:151
    \n+
    107
    \n+
    112 PointIterator(const CellIterator& cellit, const CellIterator& cellend,
    \n+
    113 const IS& is_)
    \n+
    114 : cornerit(cellit, cellend), is(&is_), seen(is->size(mydim), false)
    \n+
    115 { }
    \n+
    117
    \n+
    120 PointIterator(const CellIterator& cellend_)
    \n+
    121 : cornerit(cellend_), is(0)
    \n+
    122 { }
    \n+
    123 };
    \n+
    124
    \n+
    125 } // namespace VTK
    \n+
    126
    \n+
    128
    \n+
    129} // namespace Dune
    \n+
    130
    \n+
    131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n-
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-\n-\n-\n-
    int renumber(const Dune::GeometryType &t, int i)
    renumber VTK <-> Dune
    Definition: common.hh:186
    \n-
    @ nonconforming
    Output non-conforming data.
    Definition: common.hh:81
    \n-
    GeometryType geometryType(const Dune::GeometryType &t)
    mapping from GeometryType to VTKGeometryType
    Definition: common.hh:151
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    @ tensor
    tensor field (always 3x3)
    \n-
    @ vector
    vector-valued field (always 3D, will be padded if necessary)
    \n-\n-
    Writer for the output of subsampled grid functions in the vtk format.
    Definition: subsamplingvtkwriter.hh:40
    \n-
    virtual void writeGridPoints(VTK::VTUWriter &writer)
    write the positions of vertices
    Definition: subsamplingvtkwriter.hh:261
    \n-
    virtual void writeVertexData(VTK::VTUWriter &writer)
    write vertex data
    Definition: subsamplingvtkwriter.hh:243
    \n-
    SubsamplingVTKWriter(const GridView &gridView, Dune::RefinementIntervals intervals_, bool coerceToSimplex_=false, VTK::Precision coordPrecision=VTK::Precision::float32)
    Construct a SubsamplingVTKWriter working on a specific GridView.
    Definition: subsamplingvtkwriter.hh:80
    \n-
    virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)
    count the vertices, cells and corners
    Definition: subsamplingvtkwriter.hh:207
    \n-
    virtual void writeCellData(VTK::VTUWriter &writer)
    write cell data
    Definition: subsamplingvtkwriter.hh:225
    \n-
    virtual void writeGridCells(VTK::VTUWriter &writer)
    write the connectivity array
    Definition: subsamplingvtkwriter.hh:292
    \n-
    Writer for the ouput of grid functions in the vtk format.
    Definition: vtkwriter.hh:95
    \n-
    VertexIterator vertexBegin() const
    Definition: vtkwriter.hh:508
    \n-
    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
    \n-
    CellIterator cellEnd() const
    Definition: vtkwriter.hh:402
    \n-
    std::list< VTKLocalFunction > vertexdata
    Definition: vtkwriter.hh:1585
    \n-
    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
    \n-
    CellIterator cellBegin() const
    Definition: vtkwriter.hh:397
    \n-
    VTK::OutputType outputtype
    Definition: vtkwriter.hh:1609
    \n-
    std::list< VTKLocalFunction > celldata
    Definition: vtkwriter.hh:1584
    \n-
    VTK::Precision coordPrecision() const
    get the precision with which coordinates are written out
    Definition: vtkwriter.hh:782
    \n-
    std::list< VTKLocalFunction >::const_iterator FunctionIterator
    Definition: vtkwriter.hh:376
    \n-
    int nvertices
    Definition: vtkwriter.hh:1592
    \n-
    int ncells
    Definition: vtkwriter.hh:1591
    \n-
    VertexIterator vertexEnd() const
    Definition: vtkwriter.hh:515
    \n-
    int ncorners
    Definition: vtkwriter.hh:1593
    \n-
    Iterator over the grids elements.
    Definition: vtkwriter.hh:385
    \n-
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n-
    DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
    acquire a DataArrayWriter
    Definition: vtuwriter.hh:380
    \n-
    void endCellData()
    finish CellData section
    Definition: vtuwriter.hh:220
    \n-
    void beginCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:274
    \n-
    void endPointData()
    finish PointData section
    Definition: vtuwriter.hh:182
    \n-
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: vtuwriter.hh:205
    \n-
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: vtuwriter.hh:167
    \n-
    void endPoints()
    finish section for the point coordinates
    Definition: vtuwriter.hh:249
    \n-
    void endCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:285
    \n-
    void beginPoints()
    start section for the point coordinates
    Definition: vtuwriter.hh:238
    \n+
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n+
    iterate over the corners of some cell range
    Definition: corneriterator.hh:39
    \n+
    bool isDereferencable() const
    Definition: corneriterator.hh:69
    \n+
    iterate over the points of some corner range
    Definition: pointiterator.hh:58
    \n+
    PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS &is_)
    construct a CornerIterator
    Definition: pointiterator.hh:112
    \n+
    void increment()
    Definition: pointiterator.hh:94
    \n+
    VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
    Definition: pointiterator.hh:61
    \n+
    Reference dereference() const
    Definition: pointiterator.hh:82
    \n+
    std::iterator_traits< CellIterator >::difference_type DifferenceType
    Definition: pointiterator.hh:68
    \n+
    static const unsigned mydim
    Definition: pointiterator.hh:70
    \n+
    PointIterator(const CellIterator &cellend_)
    construct a CornerIterator
    Definition: pointiterator.hh:120
    \n+
    bool equals(const DerivedType &other) const
    Definition: pointiterator.hh:90
    \n+
    PointIterator< CellIterator, IS > DerivedType
    Definition: pointiterator.hh:64
    \n+
    const Corner Value
    Definition: pointiterator.hh:65
    \n+
    Value & Reference
    Definition: pointiterator.hh:66
    \n+
    bool isDereferencable() const
    Definition: pointiterator.hh:86
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,537 +7,168 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-subsamplingvtkwriter.hh\n+pointiterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_SUBSAMPLINGVTKWRITER_HH\n- 7#define DUNE_SUBSAMPLINGVTKWRITER_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH\n 8\n- 9#include \n- 10#include \n+ 9#include \n+ 10#include \n 11\n- 12#include \n- 13#include \n- 14#include \n- 15#include \n- 16#include \n+ 12#include \n+ 13#include \n+ 14\n+ 15#include \n+ 16#include \n 17\n- 24namespace Dune\n- 25{\n- 37 template< class GridView >\n-38 class SubsamplingVTKWriter\n- 39 : public VTKWriter\n- 40 {\n- 41 typedef VTKWriter Base;\n- 42 constexpr static int dim = GridView::dimension;\n- 43 constexpr static int dimw = GridView::dimensionworld;\n- 44 typedef typename GridView::Grid::ctype ctype;\n- 45 typedef typename GridView::template Codim< 0 >::Entity Entity;\n- 46 typedef VirtualRefinement Refinement;\n- 47 typedef typename Refinement::IndexVector IndexVector;\n- 48 typedef typename Refinement::ElementIterator SubElementIterator;\n- 49 typedef typename Refinement::VertexIterator SubVertexIterator;\n- 50\n- 51 typedef typename Base::CellIterator CellIterator;\n- 52 typedef typename Base::FunctionIterator FunctionIterator;\n- 53 using Base::cellBegin;\n- 54 using Base::cellEnd;\n- 55 using Base::celldata;\n- 56 using Base::ncells;\n- 57 using Base::ncorners;\n- 58 using Base::nvertices;\n- 59 using Base::outputtype;\n- 60 using Base::vertexBegin;\n- 61 using Base::vertexEnd;\n- 62 using Base::vertexdata;\n- 63\n- 64 public:\n-80 explicit SubsamplingVTKWriter (const GridView &gridView,\n- 81 Dune::RefinementIntervals intervals_, bool coerceToSimplex_ = false,\n- 82 VTK::Precision coordPrecision = VTK::Precision::float32)\n- 83 : Base(gridView, VTK::nonconforming, coordPrecision)\n- 84 , intervals(intervals_), coerceToSimplex(coerceToSimplex_)\n- 85 {\n- 86 if(intervals_.intervals() < 1) {\n- 87 DUNE_THROW(Dune::IOError,\"SubsamplingVTKWriter: Refinement intervals must\n-be larger than zero! (One interval means no subsampling)\");\n+ 18namespace Dune\n+ 19{\n+ 22\n+ 23 namespace VTK {\n+ 24\n+ 26\n+ 49 template\n+50 class PointIterator\n+ 51 : public ForwardIteratorFacade\n+ 52 < PointIterator,\n+ 53 const Corner::value_type>::type>,\n+ 55 const Corner::value_type>::type>&,\n+ 57 typename std::iterator_traits::difference_type>\n+ 58 {\n+ 59 public:\n+ 60 typedef VTK::Corner::value_type>::type> Corner;\n+ 62\n+ 63 // reiterate the facades typedefs here\n+64 typedef PointIterator DerivedType;\n+65 typedef const Corner Value;\n+66 typedef Value& Reference;\n+ 67 typedef typename std::iterator_traits::difference_type\n+68 DifferenceType;\n+ 69\n+70 static const unsigned mydim = std::iterator_traits::\n+ 71 value_type::mydimension;\n+ 72\n+ 73 private:\n+ 74 typedef ForwardIteratorFacade Facade;\n+ 76\n+ 77 CornerIterator cornerit;\n+ 78 const IS* is;\n+ 79 std::vector seen;\n+ 80\n+ 81 public:\n+82 Reference dereference() const {\n+ 83 return *cornerit;\n+ 84 }\n+ 85\n+86 bool isDereferencable() const {\n+ 87 return cornerit.isDereferencable();\n 88 }\n- 89 }\n- 90\n- 91 private:\n- 92 GeometryType subsampledGeometryType(GeometryType geometryType)\n- 93 {\n- 94 return (geometryType.isCube() && !coerceToSimplex ? geometryType :\n-GeometryTypes::simplex(dim));\n- 95 }\n- 96\n- 97 template\n- 98 struct IteratorSelector\n- 99 {};\n- 100\n- 101 SubElementIterator refinementBegin(const Refinement& refinement, Dune::\n-RefinementIntervals intervals, IteratorSelector)\n- 102 {\n- 103 return refinement.eBegin(intervals);\n+ 89\n+90 bool equals(const DerivedType& other) const {\n+ 91 return cornerit == other.cornerit;\n+ 92 }\n+ 93\n+94 void increment() {\n+ 95 for(++cornerit; isDereferencable(); ++cornerit) {\n+ 96 typename IS::IndexType index =\n+ 97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), mydim);\n+ 98\n+ 99 if(!seen[index]) {\n+ 100 seen[index] = true;\n+ 101 break;\n+ 102 }\n+ 103 }\n 104 }\n 105\n- 106 SubVertexIterator refinementBegin(const Refinement& refinement, Dune::\n-RefinementIntervals intervals, IteratorSelector)\n- 107 {\n- 108 return refinement.vBegin(intervals);\n- 109 }\n- 110\n- 111 SubElementIterator refinementEnd(const Refinement& refinement, Dune::\n-RefinementIntervals intervals, IteratorSelector)\n- 112 {\n- 113 return refinement.eEnd(intervals);\n- 114 }\n- 115\n- 116 SubVertexIterator refinementEnd(const Refinement& refinement, Dune::\n-RefinementIntervals intervals, IteratorSelector)\n- 117 {\n- 118 return refinement.vEnd(intervals);\n- 119 }\n- 120\n- 121 template\n- 122 void writeData(VTK::VTUWriter& writer, const Data& data, const Iterator\n-begin, const Iterator end, int nentries, IteratorSelector sis)\n- 123 {\n- 124 for (auto it = data.begin(),\n- 125 iend = data.end();\n- 126 it != iend;\n- 127 ++it)\n- 128 {\n- 129 const auto& f = *it;\n- 130 VTK::FieldInfo fieldInfo = f.fieldInfo();\n- 131 std::size_t writecomps = fieldInfo.size();\n- 132 switch (fieldInfo.type())\n- 133 {\n- 134 case VTK::FieldInfo::Type::scalar:\n- 135 break;\n- 136 case VTK::FieldInfo::Type::vector:\n- 137 // vtk file format: a vector data always should have 3 comps (with\n- 138 // 3rd comp = 0 in 2D case)\n- 139 if (writecomps > 3)\n- 140 DUNE_THROW(IOError,\"Cannot write VTK vectors with more than 3 components\n-(components was \" << writecomps << \")\");\n- 141 writecomps = 3;\n- 142 break;\n- 143 case VTK::FieldInfo::Type::tensor:\n- 144 DUNE_THROW(NotImplemented,\"VTK output for tensors not implemented yet\");\n- 145 }\n- 146 std::shared_ptr p\n- 147 (writer.makeArrayWriter(f.name(), writecomps, nentries,\n-fieldInfo.precision()));\n- 148 if(!p->writeIsNoop())\n- 149 for (Iterator eit = begin; eit!=end; ++eit)\n- 150 {\n- 151 const Entity & e = *eit;\n- 152 f.bind(e);\n- 153 Refinement &refinement =\n- 154 buildRefinement(eit->type(),\n- 155 subsampledGeometryType(eit->type()));\n- 156 for(SubIterator sit = refinementBegin(refinement,intervals,sis),\n- 157 send = refinementEnd(refinement,intervals,sis);\n- 158 sit != send;\n- 159 ++sit)\n- 160 {\n- 161 f.write(sit.coords(),*p);\n- 162 // expand 2D-Vectors to 3D for VTK format\n- 163 for(unsigned j = f.fieldInfo().size(); j < writecomps; j++)\n- 164 p->write(0.0);\n- 165 }\n- 166 f.unbind();\n- 167 }\n- 168 }\n- 169 }\n- 170\n- 171\n- 172 protected:\n- 174 virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_);\n- 175\n- 177 virtual void writeCellData(VTK::VTUWriter& writer);\n- 178\n- 180 virtual void writeVertexData(VTK::VTUWriter& writer);\n- 181\n- 183 virtual void writeGridPoints(VTK::VTUWriter& writer);\n- 184\n- 186 virtual void writeGridCells(VTK::VTUWriter& writer);\n- 187\n- 188 public:\n- 189 using Base::addVertexData;\n- 190 using Base::addCellData;\n- 191\n- 192 private:\n- 193 // hide addVertexData -- adding raw data directly without a VTKFunction\n- 194 // currently does not make sense for subsampled meshes, as the higher\n-order\n- 195 // information is missing. See FS#676.\n- 196 template\n- 197 void addVertexData (const V& v, const std::string &name, int ncomps=1);\n- 198 template\n- 199 void addCellData (const V& v, const std::string &name, int ncomps=1);\n- 200\n- 201 Dune::RefinementIntervals intervals;\n- 202 bool coerceToSimplex;\n- 203 };\n- 204\n- 206 template \n-207 void SubsamplingVTKWriter::countEntities(int &nvertices_, int\n-&ncells_, int &ncorners_)\n- 208 {\n- 209 nvertices_ = 0;\n- 210 ncells_ = 0;\n- 211 ncorners_ = 0;\n- 212 for (CellIterator it=this->cellBegin(); it!=cellEnd(); ++it)\n- 213 {\n- 214 Refinement &refinement = buildRefinement(it->type(),\n-subsampledGeometryType(it->type()));\n- 215\n- 216 ncells_ += refinement.nElements(intervals);\n- 217 nvertices_ += refinement.nVertices(intervals);\n- 218 ncorners_ += refinement.nElements(intervals) * refinement.eBegin\n-(intervals).vertexIndices().size();\n- 219 }\n- 220 }\n- 221\n- 222\n- 224 template \n-225 void SubsamplingVTKWriter::writeCellData(VTK::VTUWriter& writer)\n- 226 {\n- 227 if(celldata.size() == 0)\n- 228 return;\n- 229\n- 230 // Find the names of the first scalar and vector data fields.\n- 231 // These will be marked as the default fields (the ones that ParaView\n-shows\n- 232 // when the file has just been opened).\n- 233 std::string defaultScalarField, defaultVectorField;\n- 234 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames\n-(celldata);\n- 235\n- 236 writer.beginCellData(defaultScalarField, defaultVectorField);\n- 237 writeData(writer,celldata,cellBegin(),cellEnd\n-(),ncells,IteratorSelector());\n- 238 writer.endCellData();\n- 239 }\n- 240\n- 242 template \n-243 void SubsamplingVTKWriter::writeVertexData(VTK::VTUWriter&\n-writer)\n- 244 {\n- 245 if(vertexdata.size() == 0)\n- 246 return;\n- 247\n- 248 // Find the names of the first scalar and vector data fields.\n- 249 // These will be marked as the default fields (the ones that ParaView\n-shows\n- 250 // when the file has just been opened).\n- 251 std::string defaultScalarField, defaultVectorField;\n- 252 std::tie(defaultScalarField, defaultVectorField) = this->getDataNames\n-(vertexdata);\n- 253\n- 254 writer.beginPointData(defaultScalarField, defaultVectorField);\n- 255 writeData(writer,vertexdata,cellBegin(),cellEnd\n-(),nvertices,IteratorSelector());\n- 256 writer.endPointData();\n- 257 }\n- 258\n- 260 template \n-261 void SubsamplingVTKWriter::writeGridPoints(VTK::VTUWriter&\n-writer)\n- 262 {\n- 263 writer.beginPoints();\n- 264\n- 265 std::shared_ptr p\n- 266 (writer.makeArrayWriter(\"Coordinates\", 3, nvertices, this->coordPrecision\n-()));\n- 267 if(!p->writeIsNoop())\n- 268 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)\n- 269 {\n- 270 Refinement &refinement =\n- 271 buildRefinement(i->type(),\n- 272 subsampledGeometryType(i->type()));\n- 273 for(SubVertexIterator sit = refinement.vBegin(intervals),\n- 274 send = refinement.vEnd(intervals);\n- 275 sit != send; ++sit)\n- 276 {\n- 277 FieldVector coords = i->geometry().global(sit.coords());\n- 278 for (int j=0; jwrite(coords[j]);\n- 280 for (int j=std::min(int(dimw),3); j<3; j++)\n- 281 p->write(0.0);\n- 282 }\n- 283 }\n- 284 // free the VTK::DataArrayWriter before touching the stream\n- 285 p.reset();\n- 286\n- 287 writer.endPoints();\n- 288 }\n- 289\n- 291 template \n-292 void SubsamplingVTKWriter::writeGridCells(VTK::VTUWriter& writer)\n- 293 {\n- 294 writer.beginCells();\n- 295\n- 296 // connectivity\n- 297 {\n- 298 std::shared_ptr p1\n- 299 (writer.makeArrayWriter(\"connectivity\", 1, ncorners, VTK::Precision::\n-int32));\n- 300 // The offset within the index numbering\n- 301 if(!p1->writeIsNoop()) {\n- 302 int offset = 0;\n- 303 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)\n- 304 {\n- 305 GeometryType coercedToType = subsampledGeometryType(i->type());\n- 306 Refinement &refinement =\n- 307 buildRefinement(i->type(), coercedToType);\n- 308 for(SubElementIterator sit = refinement.eBegin(intervals),\n- 309 send = refinement.eEnd(intervals);\n- 310 sit != send; ++sit)\n- 311 {\n- 312 IndexVector indices = sit.vertexIndices();\n- 313 for(unsigned int ii = 0; ii < indices.size(); ++ii)\n- 314 p1->write(offset+indices[VTK::renumber(coercedToType, ii)]);\n- 315 }\n- 316 offset += refinement.nVertices(intervals);\n- 317 }\n- 318 }\n- 319 }\n- 320\n- 321 // offsets\n- 322 {\n- 323 std::shared_ptr p2\n- 324 (writer.makeArrayWriter(\"offsets\", 1, ncells, VTK::Precision::int32));\n- 325 if(!p2->writeIsNoop()) {\n- 326 // The offset into the connectivity array\n- 327 int offset = 0;\n- 328 for (CellIterator i=cellBegin(); i!=cellEnd(); ++i)\n- 329 {\n- 330 Refinement &refinement =\n- 331 buildRefinement(i->type(),\n- 332 subsampledGeometryType(i->type()));\n- 333 unsigned int verticesPerCell =\n- 334 refinement.eBegin(intervals).vertexIndices().size();\n- 335 for(int element = 0; element < refinement.nElements(intervals);\n- 336 ++element)\n- 337 {\n- 338 offset += verticesPerCell;\n- 339 p2->write(offset);\n- 340 }\n- 341 }\n- 342 }\n- 343 }\n- 344\n- 345 // types\n- 346 if (dim>1)\n- 347 {\n- 348 std::shared_ptr p3\n- 349 (writer.makeArrayWriter(\"types\", 1, ncells, VTK::Precision::uint8));\n- 350 if(!p3->writeIsNoop())\n- 351 for (CellIterator it=cellBegin(); it!=cellEnd(); ++it)\n- 352 {\n- 353 GeometryType coerceTo = subsampledGeometryType(it->type());\n- 354 Refinement &refinement =\n- 355 buildRefinement(it->type(), coerceTo);\n- 356 int vtktype = VTK::geometryType(coerceTo);\n- 357 for(int i = 0; i < refinement.nElements(intervals); ++i)\n- 358 p3->write(vtktype);\n- 359 }\n- 360 }\n- 361\n- 362 writer.endCells();\n- 363 }\n- 364}\n- 365\n- 366#endif // DUNE_SUBSAMPLINGVTKWRITER_HH\n-vtkwriter.hh\n-Provides file i/o for the visualization toolkit.\n-vtuwriter.hh\n-Dune::GridView::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/gridview.hh:148\n-Dune::GridView::dimensionworld\n-static constexpr int dimensionworld\n-The dimension of the world the grid lives in.\n-Definition: common/gridview.hh:151\n+ 107\n+112 PointIterator(const CellIterator& cellit, const CellIterator& cellend,\n+ 113 const IS& is_)\n+ 114 : cornerit(cellit, cellend), is(&is_), seen(is->size(mydim), false)\n+ 115 { }\n+ 117\n+120 PointIterator(const CellIterator& cellend_)\n+ 121 : cornerit(cellend_), is(0)\n+ 122 { }\n+ 123 };\n+ 124\n+ 125 } // namespace VTK\n+ 126\n+ 128\n+ 129} // namespace Dune\n+ 130\n+ 131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH\n+corner.hh\n+corneriterator.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::min\n-int min(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:348\n-Dune::VTK::Precision\n-Precision\n-which precision to use when writing out data to vtk files\n-Definition: common.hh:271\n-Dune::VTK::Precision::int32\n-@ int32\n-Dune::VTK::Precision::uint8\n-@ uint8\n-Dune::VTK::Precision::float32\n-@ float32\n-Dune::VTK::renumber\n-int renumber(const Dune::GeometryType &t, int i)\n-renumber VTK <-> Dune\n-Definition: common.hh:186\n-Dune::VTK::nonconforming\n-@ nonconforming\n-Output non-conforming data.\n-Definition: common.hh:81\n-Dune::VTK::geometryType\n-GeometryType geometryType(const Dune::GeometryType &t)\n-mapping from GeometryType to VTKGeometryType\n-Definition: common.hh:151\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::VTK::FieldInfo::Type::tensor\n-@ tensor\n-tensor field (always 3x3)\n-Dune::VTK::FieldInfo::Type::vector\n-@ vector\n-vector-valued field (always 3D, will be padded if necessary)\n-Dune::VTK::FieldInfo::Type::scalar\n-@ scalar\n-Dune::SubsamplingVTKWriter\n-Writer for the output of subsampled grid functions in the vtk format.\n-Definition: subsamplingvtkwriter.hh:40\n-Dune::SubsamplingVTKWriter::writeGridPoints\n-virtual void writeGridPoints(VTK::VTUWriter &writer)\n-write the positions of vertices\n-Definition: subsamplingvtkwriter.hh:261\n-Dune::SubsamplingVTKWriter::writeVertexData\n-virtual void writeVertexData(VTK::VTUWriter &writer)\n-write vertex data\n-Definition: subsamplingvtkwriter.hh:243\n-Dune::SubsamplingVTKWriter::SubsamplingVTKWriter\n-SubsamplingVTKWriter(const GridView &gridView, Dune::RefinementIntervals\n-intervals_, bool coerceToSimplex_=false, VTK::Precision coordPrecision=VTK::\n-Precision::float32)\n-Construct a SubsamplingVTKWriter working on a specific GridView.\n-Definition: subsamplingvtkwriter.hh:80\n-Dune::SubsamplingVTKWriter::countEntities\n-virtual void countEntities(int &nvertices_, int &ncells_, int &ncorners_)\n-count the vertices, cells and corners\n-Definition: subsamplingvtkwriter.hh:207\n-Dune::SubsamplingVTKWriter::writeCellData\n-virtual void writeCellData(VTK::VTUWriter &writer)\n-write cell data\n-Definition: subsamplingvtkwriter.hh:225\n-Dune::SubsamplingVTKWriter::writeGridCells\n-virtual void writeGridCells(VTK::VTUWriter &writer)\n-write the connectivity array\n-Definition: subsamplingvtkwriter.hh:292\n-Dune::VTKWriter\n-Writer for the ouput of grid functions in the vtk format.\n-Definition: vtkwriter.hh:95\n-Dune::VTKWriter::vertexBegin\n-VertexIterator vertexBegin() const\n-Definition: vtkwriter.hh:508\n-Dune::VTKWriter::addVertexData\n-void addVertexData(const std::shared_ptr< const VTKFunction > &p)\n-Add a grid function that lives on the vertices of the grid to the\n-visualization.\n-Definition: vtkwriter.hh:713\n-Dune::VTKWriter::cellEnd\n-CellIterator cellEnd() const\n-Definition: vtkwriter.hh:402\n-Dune::VTKWriter::vertexdata\n-std::list< VTKLocalFunction > vertexdata\n-Definition: vtkwriter.hh:1585\n-Dune::VTKWriter::addCellData\n-void addCellData(const std::shared_ptr< const VTKFunction > &p)\n-Add a grid function that lives on the cells of the grid to the visualization.\n-Definition: vtkwriter.hh:649\n-Dune::VTKWriter::cellBegin\n-CellIterator cellBegin() const\n-Definition: vtkwriter.hh:397\n-Dune::VTKWriter::outputtype\n-VTK::OutputType outputtype\n-Definition: vtkwriter.hh:1609\n-Dune::VTKWriter::celldata\n-std::list< VTKLocalFunction > celldata\n-Definition: vtkwriter.hh:1584\n-Dune::VTKWriter::coordPrecision\n-VTK::Precision coordPrecision() const\n-get the precision with which coordinates are written out\n-Definition: vtkwriter.hh:782\n-Dune::VTKWriter::FunctionIterator\n-std::list< VTKLocalFunction >::const_iterator FunctionIterator\n-Definition: vtkwriter.hh:376\n-Dune::VTKWriter::nvertices\n-int nvertices\n-Definition: vtkwriter.hh:1592\n-Dune::VTKWriter::ncells\n-int ncells\n-Definition: vtkwriter.hh:1591\n-Dune::VTKWriter::vertexEnd\n-VertexIterator vertexEnd() const\n-Definition: vtkwriter.hh:515\n-Dune::VTKWriter::ncorners\n-int ncorners\n-Definition: vtkwriter.hh:1593\n-Dune::VTKWriter::CellIterator\n-Iterator over the grids elements.\n-Definition: vtkwriter.hh:385\n-Dune::VTK::VTUWriter\n-Dump a .vtu/.vtp files contents to a stream.\n-Definition: vtuwriter.hh:98\n-Dune::VTK::VTUWriter::makeArrayWriter\n-DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps,\n-unsigned nitems, Precision prec)\n-acquire a DataArrayWriter\n-Definition: vtuwriter.hh:380\n-Dune::VTK::VTUWriter::endCellData\n-void endCellData()\n-finish CellData section\n-Definition: vtuwriter.hh:220\n-Dune::VTK::VTUWriter::beginCells\n-void beginCells()\n-start section for the grid cells/PolyData lines\n-Definition: vtuwriter.hh:274\n-Dune::VTK::VTUWriter::endPointData\n-void endPointData()\n-finish PointData section\n-Definition: vtuwriter.hh:182\n-Dune::VTK::VTUWriter::beginCellData\n-void beginCellData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start CellData section\n-Definition: vtuwriter.hh:205\n-Dune::VTK::VTUWriter::beginPointData\n-void beginPointData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start PointData section\n-Definition: vtuwriter.hh:167\n-Dune::VTK::VTUWriter::endPoints\n-void endPoints()\n-finish section for the point coordinates\n-Definition: vtuwriter.hh:249\n-Dune::VTK::VTUWriter::endCells\n-void endCells()\n-start section for the grid cells/PolyData lines\n-Definition: vtuwriter.hh:285\n-Dune::VTK::VTUWriter::beginPoints\n-void beginPoints()\n-start section for the point coordinates\n-Definition: vtuwriter.hh:238\n+Dune::VTK::Corner\n+simple class representing a corner of a cell\n+Definition: corner.hh:25\n+Dune::VTK::CornerIterator\n+iterate over the corners of some cell range\n+Definition: corneriterator.hh:39\n+Dune::VTK::CornerIterator::isDereferencable\n+bool isDereferencable() const\n+Definition: corneriterator.hh:69\n+Dune::VTK::PointIterator\n+iterate over the points of some corner range\n+Definition: pointiterator.hh:58\n+Dune::VTK::PointIterator::PointIterator\n+PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS\n+&is_)\n+construct a CornerIterator\n+Definition: pointiterator.hh:112\n+Dune::VTK::PointIterator::increment\n+void increment()\n+Definition: pointiterator.hh:94\n+Dune::VTK::PointIterator::Corner\n+VTK::Corner< typename std::remove_const< typename std::iterator_traits<\n+CellIterator >::value_type >::type > Corner\n+Definition: pointiterator.hh:61\n+Dune::VTK::PointIterator::dereference\n+Reference dereference() const\n+Definition: pointiterator.hh:82\n+Dune::VTK::PointIterator::DifferenceType\n+std::iterator_traits< CellIterator >::difference_type DifferenceType\n+Definition: pointiterator.hh:68\n+Dune::VTK::PointIterator::mydim\n+static const unsigned mydim\n+Definition: pointiterator.hh:70\n+Dune::VTK::PointIterator::PointIterator\n+PointIterator(const CellIterator &cellend_)\n+construct a CornerIterator\n+Definition: pointiterator.hh:120\n+Dune::VTK::PointIterator::equals\n+bool equals(const DerivedType &other) const\n+Definition: pointiterator.hh:90\n+Dune::VTK::PointIterator::DerivedType\n+PointIterator< CellIterator, IS > DerivedType\n+Definition: pointiterator.hh:64\n+Dune::VTK::PointIterator::Value\n+const Corner Value\n+Definition: pointiterator.hh:65\n+Dune::VTK::PointIterator::Reference\n+Value & Reference\n+Definition: pointiterator.hh:66\n+Dune::VTK::PointIterator::isDereferencable\n+bool isDereferencable() const\n+Definition: pointiterator.hh:86\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00782.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00782.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: skeletonfunction.hh File Reference\n+dune-grid: streams.hh File Reference\n \n \n \n \n \n \n \n@@ -65,52 +65,37 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    skeletonfunction.hh File Reference
    \n+
    streams.hh File Reference
    \n
    \n
    \n-\n-

    Functions for VTK output on the skeleton. \n-More...

    \n-
    #include <memory>
    \n-#include <string>
    \n-#include <vector>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n-#include <dune/grid/io/file/vtk/pvtuwriter.hh>
    \n-#include <dune/grid/io/file/vtk/vtuwriter.hh>
    \n+
    #include <ostream>
    \n+#include <dune/grid/io/file/vtk/b64enc.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n+\n+\n \n-\n-\n+\n+\n \n

    \n Classes

    struct  Dune::VTK::SkeletonFunctionTraits< GV, RF >
     
    class  Dune::VTK::SkeletonFunctionInterface< GV, RF >
     A prototype for VTKFunctions on the skeleton. More...
    class  Dune::Base64Stream
     class to base64 encode a stream of data More...
     
    class  Dune::VTK::SkeletonFunctionWriter< Func >
     function writer for skeleton functions More...
    class  Dune::RawStream
     write out data in binary More...
     
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-

    Detailed Description

    \n-

    Functions for VTK output on the skeleton.

    \n-
    Author
    J\u00f6 Fahlke
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-utf-8\n+us-ascii\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,40 +8,25 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-skeletonfunction.hh File Reference\n-dune-grid \u00bb I/O \u00bb Visualization_ToolKit_(VTK)\n-Functions for VTK output on the skeleton. More...\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+streams.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::VTK::SkeletonFunctionTraits<_GV,_RF_>\n+class \u00a0Dune::Base64Stream\n+\u00a0 class to base64 encode a stream of data More...\n \u00a0\n- class \u00a0Dune::VTK::SkeletonFunctionInterface<_GV,_RF_>\n-\u00a0 A prototype for VTKFunctions on the skeleton. More...\n-\u00a0\n- class \u00a0Dune::VTK::SkeletonFunctionWriter<_Func_>\n-\u00a0 function writer for skeleton functions More...\n+class \u00a0Dune::RawStream\n+\u00a0 write out data in binary More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::VTK\n-\u00a0\n-***** Detailed Description *****\n-Functions for VTK output on the skeleton.\n- Author\n- J\u00f6 Fahlke\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00782_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: skeletonfunction.hh Source File\n+dune-grid: streams.hh Source File\n \n \n \n \n \n \n \n@@ -62,167 +62,112 @@\n \n \n \n
    \n-
    skeletonfunction.hh
    \n+
    streams.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH
    \n
    8
    \n-
    9#include <memory>
    \n-
    10#include <string>
    \n-
    11#include <vector>
    \n+
    9#include <ostream>
    \n+
    10
    \n+\n
    12
    \n-
    13#include <dune/common/fvector.hh>
    \n+
    13namespace Dune {
    \n
    14
    \n-\n-\n-\n-
    18
    \n-
    19namespace Dune {
    \n+\n+
    17 std::ostream& s;
    \n+
    18 b64chunk chunk;
    \n+
    19 char obuf[4];
    \n
    20
    \n+
    21 public:
    \n
    23
    \n-
    29 namespace VTK {
    \n-
    30
    \n-
    32 //
    \n-
    33 // Prototype for VTKFunktions on the skeleton
    \n-
    34 //
    \n+
    27 Base64Stream(std::ostream& s_)
    \n+
    28 : s(s_)
    \n+
    29 {
    \n+
    30 // reset chunk
    \n+
    31 chunk.reset();
    \n+
    32 }
    \n+
    33
    \n
    35
    \n-
    36 template<typename GV, typename RF>
    \n-\n-
    38 typedef GV GridView;
    \n-
    39 typedef typename GV::Intersection Cell;
    \n-
    40
    \n-
    41 typedef typename GV::ctype DomainField;
    \n-
    42 static const unsigned dimDomain = GV::dimension-1;
    \n-
    43 typedef FieldVector<DomainField, dimDomain> Domain;
    \n-
    44
    \n-
    45 typedef RF RangeField;
    \n-
    46 typedef std::vector<RangeField> Range;
    \n-
    47 };
    \n-
    48
    \n-
    50 template <typename GV, typename RF>
    \n-\n-
    52 public:
    \n-\n-
    54
    \n-
    56 unsigned dimRange() const;
    \n+
    41 template <class X>
    \n+
    42 void write(X & data)
    \n+
    43 {
    \n+
    44 char* p = reinterpret_cast<char*>(&data);
    \n+
    45 for (size_t len = sizeof(X); len > 0; len--,p++)
    \n+
    46 {
    \n+
    47 chunk.put(*p);
    \n+
    48 if (chunk.size == 3)
    \n+
    49 {
    \n+
    50 chunk.write(obuf);
    \n+
    51 s.write(obuf,4);
    \n+
    52 }
    \n+
    53 }
    \n+
    54 }
    \n+
    55
    \n
    57
    \n-
    59
    \n-
    65 void evaluate(const typename Traits::Cell& c,
    \n-
    66 const typename Traits::Domain& xl,
    \n-
    67 typename Traits::Range& result) const;
    \n-
    68 };
    \n-
    69
    \n-
    71 //
    \n-
    72 // Class for writing SkeletonFunctions
    \n-
    73 //
    \n+
    64 void flush()
    \n+
    65 {
    \n+
    66 if (chunk.size > 0)
    \n+
    67 {
    \n+
    68 chunk.write(obuf);
    \n+
    69 s.write(obuf,4);
    \n+
    70 }
    \n+
    71 }
    \n+
    72
    \n
    74
    \n-
    76
    \n-
    80 template<typename Func>
    \n-\n-
    82 : public FunctionWriterBase<typename Func::Traits::Cell>
    \n-
    83 {
    \n-
    84 typedef typename Func::Traits::RangeField RF;
    \n-
    85
    \n-
    86 std::shared_ptr<const Func> func;
    \n-
    87 std::string name_;
    \n-
    88 unsigned dimR;
    \n-
    89 VTK::Precision precision_;
    \n-
    90 std::shared_ptr<DataArrayWriter> arraywriter;
    \n-
    91
    \n-
    92 public:
    \n-
    93 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
    \n-
    94 const std::string& name, unsigned dimR_,
    \n-\n-
    96 : func(func_), name_(name), dimR(dimR_), precision_(prec)
    \n-
    97 { }
    \n-
    98
    \n-
    99 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
    \n-
    100 const std::string& name,
    \n-\n-
    102 : func(func_), name_(name), dimR(func->dimRange()), precision_(prec)
    \n-
    103 { }
    \n-
    104
    \n-
    106 virtual std::string name() const { return name_; }
    \n-
    107
    \n-
    109 virtual unsigned ncomps() const { return dimR; }
    \n-
    110
    \n-
    112 virtual void addArray(PVTUWriter& writer) {
    \n-
    113 writer.addArray(name(), ncomps(), precision_);
    \n-
    114 }
    \n-
    115
    \n-
    117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n-
    118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n-
    119 nitems, precision_));
    \n-
    120 return !arraywriter->writeIsNoop();
    \n-
    121 }
    \n-
    122
    \n-
    124 virtual void write(const typename Func::Traits::Cell& cell,
    \n-
    125 const typename Func::Traits::Domain& xl) {
    \n-
    126 typename Func::Traits::Range result;
    \n-
    127 func->evaluate(cell, xl, result);
    \n-
    128 for(unsigned d = 0; d < result.size() && d < dimR; ++d)
    \n-
    129 arraywriter->write(result[d]);
    \n-
    130 for(unsigned d = result.size(); d < dimR; ++d)
    \n-
    131 arraywriter->write(0);
    \n-
    132 }
    \n-
    133
    \n-
    135 virtual void endWrite() {
    \n-
    136 arraywriter.reset();
    \n-
    137 }
    \n-
    138 };
    \n-
    139
    \n-
    140 } // namespace VTK
    \n-
    141
    \n-
    143
    \n-
    144} // namespace Dune
    \n-
    145
    \n-
    146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
    \n-\n-\n-\n+\n+
    78 flush();
    \n+
    79 }
    \n+
    80 };
    \n+
    81
    \n+\n+
    84 {
    \n+
    85 public:
    \n+
    87 inline RawStream (std::ostream& theStream)
    \n+
    88 : s(theStream)
    \n+
    89 {}
    \n+
    90
    \n+
    92 template<class T>
    \n+
    93 void write (T data)
    \n+
    94 {
    \n+
    95 char* p = reinterpret_cast<char*>(&data);
    \n+
    96 s.write(p,sizeof(T));
    \n+
    97 }
    \n+
    98 private:
    \n+
    99 std::ostream& s;
    \n+
    100 };
    \n+
    101
    \n+
    102} // namespace Dune
    \n+
    103
    \n+
    104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH
    \n+
    Simple base64 encode.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-\n-
    Base class for function writers.
    Definition: functionwriter.hh:34
    \n-
    Dump a .vtu/.vtp files contents to a stream.
    Definition: pvtuwriter.hh:62
    \n-
    void addArray(const std::string &name, unsigned ncomps, Precision prec)
    Add an array to the output file.
    Definition: pvtuwriter.hh:207
    \n-
    Definition: skeletonfunction.hh:37
    \n-
    RF RangeField
    Definition: skeletonfunction.hh:45
    \n-
    FieldVector< DomainField, dimDomain > Domain
    Definition: skeletonfunction.hh:43
    \n-
    GV GridView
    Definition: skeletonfunction.hh:38
    \n-
    std::vector< RangeField > Range
    Definition: skeletonfunction.hh:46
    \n-
    GV::Intersection Cell
    Definition: skeletonfunction.hh:39
    \n-
    GV::ctype DomainField
    Definition: skeletonfunction.hh:41
    \n-
    static const unsigned dimDomain
    Definition: skeletonfunction.hh:42
    \n-
    A prototype for VTKFunctions on the skeleton.
    Definition: skeletonfunction.hh:51
    \n-
    unsigned dimRange() const
    get dimension of the Range
    \n-
    SkeletonFunctionTraits< GV, RF > Traits
    Definition: skeletonfunction.hh:53
    \n-
    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
    \n-
    function writer for skeleton functions
    Definition: skeletonfunction.hh:83
    \n-
    virtual std::string name() const
    return name
    Definition: skeletonfunction.hh:106
    \n-
    SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, VTK::Precision prec=VTK::Precision::float32)
    Definition: skeletonfunction.hh:99
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: skeletonfunction.hh:112
    \n-
    virtual void write(const typename Func::Traits::Cell &cell, const typename Func::Traits::Domain &xl)
    write at the given position
    Definition: skeletonfunction.hh:124
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: skeletonfunction.hh:117
    \n-
    SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32)
    Definition: skeletonfunction.hh:93
    \n-
    virtual void endWrite()
    signal end of writing
    Definition: skeletonfunction.hh:135
    \n-
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: skeletonfunction.hh:109
    \n-
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n-
    DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
    acquire a DataArrayWriter
    Definition: vtuwriter.hh:380
    \n+
    struct representing the three byte text as well as the four 6 bit chunks
    Definition: b64enc.hh:34
    \n+
    void write(char *t)
    Definition: b64enc.hh:60
    \n+
    size_type size
    Definition: b64enc.hh:36
    \n+
    void put(const char c)
    Definition: b64enc.hh:54
    \n+
    void reset()
    Definition: b64enc.hh:39
    \n+
    class to base64 encode a stream of data
    Definition: streams.hh:16
    \n+
    void write(X &data)
    encode a data item
    Definition: streams.hh:42
    \n+
    void flush()
    flush the current unwritten data to the stream.
    Definition: streams.hh:64
    \n+
    Base64Stream(std::ostream &s_)
    Construct a Base64Stream.
    Definition: streams.hh:27
    \n+
    ~Base64Stream()
    destroy the object
    Definition: streams.hh:77
    \n+
    write out data in binary
    Definition: streams.hh:84
    \n+
    void write(T data)
    write data to stream
    Definition: streams.hh:93
    \n+
    RawStream(std::ostream &theStream)
    make a new stream
    Definition: streams.hh:87
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,233 +7,143 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-skeletonfunction.hh\n+streams.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH\n 8\n- 9#include \n- 10#include \n- 11#include \n+ 9#include \n+ 10\n+ 11#include \n 12\n- 13#include \n+ 13namespace Dune {\n 14\n- 15#include \n- 16#include \n- 17#include \n- 18\n- 19namespace Dune {\n+16 class Base64Stream {\n+ 17 std::ostream& s;\n+ 18 b64chunk chunk;\n+ 19 char obuf[4];\n 20\n+ 21 public:\n 23\n- 29 namespace VTK {\n- 30\n- 32 //\n- 33 // Prototype for VTKFunktions on the skeleton\n- 34 //\n+27 Base64Stream(std::ostream& s_)\n+ 28 : s(s_)\n+ 29 {\n+ 30 // reset chunk\n+ 31 chunk.reset();\n+ 32 }\n+ 33\n 35\n- 36 template\n-37 struct SkeletonFunctionTraits {\n-38 typedef GV GridView;\n-39 typedef typename GV::Intersection Cell;\n- 40\n-41 typedef typename GV::ctype DomainField;\n-42 static const unsigned dimDomain = GV::dimension-1;\n-43 typedef FieldVector Domain;\n- 44\n-45 typedef RF RangeField;\n-46 typedef std::vector Range;\n- 47 };\n- 48\n- 50 template \n-51 class SkeletonFunctionInterface {\n- 52 public:\n-53 typedef SkeletonFunctionTraits Traits;\n- 54\n-56 unsigned dimRange() const;\n+ 41 template \n+42 void write(X & data)\n+ 43 {\n+ 44 char* p = reinterpret_cast(&data);\n+ 45 for (size_t len = sizeof(X); len > 0; len--,p++)\n+ 46 {\n+ 47 chunk.put(*p);\n+ 48 if (chunk.size == 3)\n+ 49 {\n+ 50 chunk.write(obuf);\n+ 51 s.write(obuf,4);\n+ 52 }\n+ 53 }\n+ 54 }\n+ 55\n 57\n- 59\n-65 void evaluate(const typename Traits::Cell& c,\n- 66 const typename Traits::Domain& xl,\n- 67 typename Traits::Range& result) const;\n- 68 };\n- 69\n- 71 //\n- 72 // Class for writing SkeletonFunctions\n- 73 //\n+64 void flush()\n+ 65 {\n+ 66 if (chunk.size > 0)\n+ 67 {\n+ 68 chunk.write(obuf);\n+ 69 s.write(obuf,4);\n+ 70 }\n+ 71 }\n+ 72\n 74\n- 76\n- 80 template\n-81 class SkeletonFunctionWriter\n- 82 : public FunctionWriterBase\n- 83 {\n- 84 typedef typename Func::Traits::RangeField RF;\n- 85\n- 86 std::shared_ptr func;\n- 87 std::string name_;\n- 88 unsigned dimR;\n- 89 VTK::Precision precision_;\n- 90 std::shared_ptr arraywriter;\n- 91\n- 92 public:\n-93 SkeletonFunctionWriter(const std::shared_ptr& func_,\n- 94 const std::string& name, unsigned dimR_,\n- 95 VTK::Precision prec = VTK::Precision::float32)\n- 96 : func(func_), name_(name), dimR(dimR_), precision_(prec)\n- 97 { }\n- 98\n-99 SkeletonFunctionWriter(const std::shared_ptr& func_,\n- 100 const std::string& name,\n- 101 VTK::Precision prec = VTK::Precision::float32)\n- 102 : func(func_), name_(name), dimR(func->dimRange()), precision_(prec)\n- 103 { }\n- 104\n-106 virtual std::string name() const { return name_; }\n- 107\n-109 virtual unsigned ncomps() const { return dimR; }\n- 110\n-112 virtual void addArray(PVTUWriter& writer) {\n- 113 writer.addArray(name(), ncomps(), precision_);\n- 114 }\n- 115\n-117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n- 118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n- 119 nitems, precision_));\n- 120 return !arraywriter->writeIsNoop();\n- 121 }\n- 122\n-124 virtual void write(const typename Func::Traits::Cell& cell,\n- 125 const typename Func::Traits::Domain& xl) {\n- 126 typename Func::Traits::Range result;\n- 127 func->evaluate(cell, xl, result);\n- 128 for(unsigned d = 0; d < result.size() && d < dimR; ++d)\n- 129 arraywriter->write(result[d]);\n- 130 for(unsigned d = result.size(); d < dimR; ++d)\n- 131 arraywriter->write(0);\n- 132 }\n- 133\n-135 virtual void endWrite() {\n- 136 arraywriter.reset();\n- 137 }\n- 138 };\n- 139\n- 140 } // namespace VTK\n- 141\n- 143\n- 144} // namespace Dune\n- 145\n- 146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH\n-pvtuwriter.hh\n-functionwriter.hh\n-vtuwriter.hh\n+77 ~Base64Stream() {\n+ 78 flush();\n+ 79 }\n+ 80 };\n+ 81\n+83 class RawStream\n+ 84 {\n+ 85 public:\n+87 inline RawStream (std::ostream& theStream)\n+ 88 : s(theStream)\n+ 89 {}\n+ 90\n+ 92 template\n+93 void write (T data)\n+ 94 {\n+ 95 char* p = reinterpret_cast(&data);\n+ 96 s.write(p,sizeof(T));\n+ 97 }\n+ 98 private:\n+ 99 std::ostream& s;\n+ 100 };\n+ 101\n+ 102} // namespace Dune\n+ 103\n+ 104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH\n+b64enc.hh\n+Simple base64 encode.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::Precision\n-Precision\n-which precision to use when writing out data to vtk files\n-Definition: common.hh:271\n-Dune::VTK::Precision::float32\n-@ float32\n-Dune::VTK::FunctionWriterBase\n-Base class for function writers.\n-Definition: functionwriter.hh:34\n-Dune::VTK::PVTUWriter\n-Dump a .vtu/.vtp files contents to a stream.\n-Definition: pvtuwriter.hh:62\n-Dune::VTK::PVTUWriter::addArray\n-void addArray(const std::string &name, unsigned ncomps, Precision prec)\n-Add an array to the output file.\n-Definition: pvtuwriter.hh:207\n-Dune::VTK::SkeletonFunctionTraits\n-Definition: skeletonfunction.hh:37\n-Dune::VTK::SkeletonFunctionTraits::RangeField\n-RF RangeField\n-Definition: skeletonfunction.hh:45\n-Dune::VTK::SkeletonFunctionTraits::Domain\n-FieldVector< DomainField, dimDomain > Domain\n-Definition: skeletonfunction.hh:43\n-Dune::VTK::SkeletonFunctionTraits::GridView\n-GV GridView\n-Definition: skeletonfunction.hh:38\n-Dune::VTK::SkeletonFunctionTraits::Range\n-std::vector< RangeField > Range\n-Definition: skeletonfunction.hh:46\n-Dune::VTK::SkeletonFunctionTraits::Cell\n-GV::Intersection Cell\n-Definition: skeletonfunction.hh:39\n-Dune::VTK::SkeletonFunctionTraits::DomainField\n-GV::ctype DomainField\n-Definition: skeletonfunction.hh:41\n-Dune::VTK::SkeletonFunctionTraits::dimDomain\n-static const unsigned dimDomain\n-Definition: skeletonfunction.hh:42\n-Dune::VTK::SkeletonFunctionInterface\n-A prototype for VTKFunctions on the skeleton.\n-Definition: skeletonfunction.hh:51\n-Dune::VTK::SkeletonFunctionInterface::dimRange\n-unsigned dimRange() const\n-get dimension of the Range\n-Dune::VTK::SkeletonFunctionInterface::Traits\n-SkeletonFunctionTraits< GV, RF > Traits\n-Definition: skeletonfunction.hh:53\n-Dune::VTK::SkeletonFunctionInterface::evaluate\n-void evaluate(const typename Traits::Cell &c, const typename Traits::Domain\n-&xl, typename Traits::Range &result) const\n-evaluate at local point xl in Cell c, store in result\n-Dune::VTK::SkeletonFunctionWriter\n-function writer for skeleton functions\n-Definition: skeletonfunction.hh:83\n-Dune::VTK::SkeletonFunctionWriter::name\n-virtual std::string name() const\n-return name\n-Definition: skeletonfunction.hh:106\n-Dune::VTK::SkeletonFunctionWriter::SkeletonFunctionWriter\n-SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::\n-string &name, VTK::Precision prec=VTK::Precision::float32)\n-Definition: skeletonfunction.hh:99\n-Dune::VTK::SkeletonFunctionWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: skeletonfunction.hh:112\n-Dune::VTK::SkeletonFunctionWriter::write\n-virtual void write(const typename Func::Traits::Cell &cell, const typename\n-Func::Traits::Domain &xl)\n-write at the given position\n-Definition: skeletonfunction.hh:124\n-Dune::VTK::SkeletonFunctionWriter::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n-start writing with the given writer\n-Definition: skeletonfunction.hh:117\n-Dune::VTK::SkeletonFunctionWriter::SkeletonFunctionWriter\n-SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::\n-string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32)\n-Definition: skeletonfunction.hh:93\n-Dune::VTK::SkeletonFunctionWriter::endWrite\n-virtual void endWrite()\n-signal end of writing\n-Definition: skeletonfunction.hh:135\n-Dune::VTK::SkeletonFunctionWriter::ncomps\n-virtual unsigned ncomps() const\n-return number of components of the vector\n-Definition: skeletonfunction.hh:109\n-Dune::VTK::VTUWriter\n-Dump a .vtu/.vtp files contents to a stream.\n-Definition: vtuwriter.hh:98\n-Dune::VTK::VTUWriter::makeArrayWriter\n-DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps,\n-unsigned nitems, Precision prec)\n-acquire a DataArrayWriter\n-Definition: vtuwriter.hh:380\n+Dune::b64chunk\n+struct representing the three byte text as well as the four 6 bit chunks\n+Definition: b64enc.hh:34\n+Dune::b64chunk::write\n+void write(char *t)\n+Definition: b64enc.hh:60\n+Dune::b64chunk::size\n+size_type size\n+Definition: b64enc.hh:36\n+Dune::b64chunk::put\n+void put(const char c)\n+Definition: b64enc.hh:54\n+Dune::b64chunk::reset\n+void reset()\n+Definition: b64enc.hh:39\n+Dune::Base64Stream\n+class to base64 encode a stream of data\n+Definition: streams.hh:16\n+Dune::Base64Stream::write\n+void write(X &data)\n+encode a data item\n+Definition: streams.hh:42\n+Dune::Base64Stream::flush\n+void flush()\n+flush the current unwritten data to the stream.\n+Definition: streams.hh:64\n+Dune::Base64Stream::Base64Stream\n+Base64Stream(std::ostream &s_)\n+Construct a Base64Stream.\n+Definition: streams.hh:27\n+Dune::Base64Stream::~Base64Stream\n+~Base64Stream()\n+destroy the object\n+Definition: streams.hh:77\n+Dune::RawStream\n+write out data in binary\n+Definition: streams.hh:84\n+Dune::RawStream::write\n+void write(T data)\n+write data to stream\n+Definition: streams.hh:93\n+Dune::RawStream::RawStream\n+RawStream(std::ostream &theStream)\n+make a new stream\n+Definition: streams.hh:87\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00785.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00785.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: pvtuwriter.hh File Reference\n+dune-grid: dataarraywriter.hh File Reference\n \n \n \n \n \n \n \n@@ -65,39 +65,71 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    pvtuwriter.hh File Reference
    \n+
    dataarraywriter.hh File Reference
    \n
    \n
    \n-
    #include <ostream>
    \n+\n+

    Data array writers for the VTKWriter. \n+More...

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

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::VTK::PVTUWriter
     Dump a .vtu/.vtp files contents to a stream. More...
    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...
     
    \n \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-
    \n+

    Detailed Description

    \n+

    Data array writers for the VTKWriter.

    \n+
    Author
    Peter Bastian, Christian Engwer
    \n+

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

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,27 +8,64 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-pvtuwriter.hh File Reference\n-#include \n+dataarraywriter.hh File Reference\n+Data array writers for the VTKWriter. More...\n+#include \n+#include \n #include \n+#include \n+#include \n #include \n #include \n+#include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::PVTUWriter\n-\u00a0 Dump a .vtu/.vtp files contents to a stream. More...\n+class \u00a0Dune::VTK::DataArrayWriter\n+\u00a0 base class for data array writers More...\n+\u00a0\n+class \u00a0Dune::VTK::AsciiDataArrayWriter\n+\u00a0 a streaming writer for data array tags, uses ASCII inline format\n+ More...\n+\u00a0\n+class \u00a0Dune::VTK::BinaryDataArrayWriter\n+\u00a0 a streaming writer for data array tags, uses binary inline format\n+ More...\n+\u00a0\n+class \u00a0Dune::VTK::AppendedRawDataArrayWriter\n+\u00a0 a streaming writer for data array tags, uses appended raw format\n+ More...\n+\u00a0\n+class \u00a0Dune::VTK::AppendedBase64DataArrayWriter\n+\u00a0 a streaming writer for data array tags, uses appended base64 format\n+ More...\n+\u00a0\n+class \u00a0Dune::VTK::NakedBase64DataArrayWriter\n+\u00a0 a streaming writer for appended data array tags, uses base64 format\n+ More...\n+\u00a0\n+class \u00a0Dune::VTK::NakedRawDataArrayWriter\n+\u00a0 a streaming writer for appended data arrays, uses raw format More...\n+\u00a0\n+class \u00a0Dune::VTK::DataArrayWriterFactory\n+\u00a0 a factory for DataArrayWriters More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::VTK\n \u00a0\n+***** Detailed Description *****\n+Data array writers for the VTKWriter.\n+ Author\n+ Peter Bastian, Christian Engwer\n+This file contains classes to help writing data in the difeerent VTK output\n+modes\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00785_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: pvtuwriter.hh Source File\n+dune-grid: dataarraywriter.hh Source File\n \n \n \n \n \n \n \n@@ -62,167 +62,478 @@\n \n \n \n
    \n-
    pvtuwriter.hh
    \n+
    dataarraywriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
    \n
    8
    \n-
    9#include <ostream>
    \n-
    10#include <string>
    \n-
    11
    \n-
    12#include <dune/common/exceptions.hh>
    \n-
    13#include <dune/common/indent.hh>
    \n-
    14
    \n-\n-
    16
    \n-
    17namespace Dune {
    \n+
    9#include <cstdint>
    \n+
    10#include <iostream>
    \n+
    11#include <string>
    \n+
    12#include <iomanip>
    \n+
    13#include <cstdint>
    \n+
    14#include <cmath>
    \n+
    15
    \n+
    16#include <dune/common/exceptions.hh>
    \n+
    17#include <dune/common/indent.hh>
    \n
    18
    \n+\n+\n
    21
    \n-
    22 namespace VTK {
    \n-
    23
    \n-
    25
    \n-
    62 class PVTUWriter {
    \n-
    63 std::ostream& stream;
    \n-
    64
    \n-
    65 std::string fileType;
    \n+
    30namespace Dune
    \n+
    31{
    \n+
    34
    \n+
    35 namespace VTK {
    \n+
    36
    \n+
    38
    \n+\n+
    56 {
    \n+
    57 public:
    \n+
    59
    \n+\n+
    64 : prec(_prec)
    \n+
    65 {}
    \n
    66
    \n-
    67 Indent indent;
    \n-
    68
    \n-
    69 public:
    \n-
    71
    \n-
    78 inline PVTUWriter(std::ostream& stream_, FileType fileType_)
    \n-
    79 : stream(stream_)
    \n-
    80 {
    \n-
    81 switch(fileType_) {
    \n-
    82 case polyData :
    \n-
    83 fileType = "PPolyData";
    \n-
    84 break;
    \n-
    85 case unstructuredGrid :
    \n-
    86 fileType = "PUnstructuredGrid";
    \n-
    87 break;
    \n-
    88 default :
    \n-
    89 DUNE_THROW(IOError, "PVTUWriter: Unknown fileType: " << fileType_);
    \n-
    90 }
    \n-
    91 const std::string& byteOrder = getEndiannessString();
    \n+
    68 template<class T>
    \n+
    69 void write(T data)
    \n+
    70 {
    \n+
    71 switch(prec)
    \n+
    72 {
    \n+\n+
    74 writeFloat32(data); break;
    \n+\n+
    76 writeFloat64(data); break;
    \n+\n+
    78 writeUInt32(data); break;
    \n+\n+
    80 writeUInt8(data); break;
    \n+\n+
    82 writeInt32(data); break;
    \n+
    83 default:
    \n+
    84 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
    \n+
    85 }
    \n+
    86 }
    \n+
    87
    \n+
    89 virtual bool writeIsNoop() const { return false; }
    \n+
    91 virtual ~DataArrayWriter () {}
    \n
    92
    \n-
    93 stream << indent << "<?xml version=\\"1.0\\"?>\\n";
    \n-
    94 stream << indent << "<VTKFile"
    \n-
    95 << " type=\\"" << fileType << "\\""
    \n-
    96 << " version=\\"0.1\\""
    \n-
    97 << " byte_order=\\"" << byteOrder << "\\">\\n";
    \n-
    98 ++indent;
    \n-
    99 }
    \n-
    100
    \n-
    102 inline ~PVTUWriter() {
    \n-
    103 --indent;
    \n-
    104 stream << indent << "</VTKFile>\\n"
    \n-
    105 << std::flush;
    \n-
    106 }
    \n+
    93 private:
    \n+
    95 virtual void writeFloat32 (float data) = 0;
    \n+
    97 virtual void writeFloat64 (double data) = 0;
    \n+
    99 virtual void writeInt32 (std::int32_t data) = 0;
    \n+
    101 virtual void writeUInt8 (std::uint8_t data) = 0;
    \n+
    103 virtual void writeUInt32 (std::uint32_t data) = 0;
    \n+
    104
    \n+
    105 Precision prec;
    \n+
    106 };
    \n
    107
    \n-
    109
    \n-
    120 inline void beginPointData(const std::string& scalars = "",
    \n-
    121 const std::string& vectors = "") {
    \n-
    122 stream << indent << "<PPointData";
    \n-
    123 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n-
    124 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n-
    125 stream << ">\\n";
    \n-
    126 ++indent;
    \n-
    127 }
    \n-
    129 inline void endPointData() {
    \n-
    130 --indent;
    \n-
    131 stream << indent << "</PPointData>\\n";
    \n-
    132 }
    \n-
    133
    \n-
    135
    \n-
    146 inline void beginCellData(const std::string& scalars = "",
    \n-
    147 const std::string& vectors = "") {
    \n-
    148 stream << indent << "<PCellData";
    \n-
    149 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n-
    150 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n-
    151 stream << ">\\n";
    \n-
    152 ++indent;
    \n-
    153 }
    \n-
    155 inline void endCellData() {
    \n-
    156 --indent;
    \n-
    157 stream << indent << "</PCellData>\\n";
    \n-
    158 }
    \n-
    159
    \n-
    161
    \n-
    166 inline void beginPoints() {
    \n-
    167 stream << indent << "<PPoints>\\n";
    \n-
    168 ++indent;
    \n-
    169 }
    \n-
    171 inline void endPoints() {
    \n-
    172 --indent;
    \n-
    173 stream << indent << "</PPoints>\\n";
    \n-
    174 }
    \n-
    175
    \n-
    177
    \n-
    189 inline void beginMain(unsigned ghostLevel = 0) {
    \n-
    190 stream << indent << "<" << fileType
    \n-
    191 << " GhostLevel=\\"" << ghostLevel << "\\">\\n";
    \n-
    192 ++indent;
    \n-
    193 }
    \n-
    195 inline void endMain() {
    \n-
    196 --indent;
    \n-
    197 stream << indent << "</" << fileType << ">\\n";
    \n-
    198 }
    \n-
    199
    \n-
    201
    \n-
    207 void addArray(const std::string& name, unsigned ncomps, Precision prec) {
    \n-
    208 stream << indent << "<PDataArray"
    \n-
    209 << " type=\\"" << toString(prec) << "\\""
    \n-
    210 << " Name=\\"" << name << "\\""
    \n-
    211 << " NumberOfComponents=\\"" << ncomps << "\\"/>\\n";
    \n-
    212 }
    \n-
    213
    \n-
    215 inline void addPiece(const std::string& filename) {
    \n-
    216 stream << indent << "<Piece "
    \n-
    217 << " Source=\\"" << filename << "\\"/>\\n";
    \n-
    218 }
    \n-
    219 };
    \n-
    220
    \n-
    221 } // namespace VTK
    \n-
    222
    \n-
    224
    \n-
    225} // namespace Dune
    \n+\n+
    110 {
    \n+
    111 public:
    \n+
    113
    \n+
    121 AsciiDataArrayWriter(std::ostream& theStream, std::string name,
    \n+
    122 int ncomps, const Indent& indent_, Precision prec_)
    \n+
    123 : DataArrayWriter(prec_), s(theStream), counter(0), numPerLine(12), indent(indent_)
    \n+
    124 {
    \n+
    125 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n+
    126 << "Name=\\"" << name << "\\" ";
    \n+
    127 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n+
    128 s << "format=\\"ascii\\">\\n";
    \n+
    129 ++indent;
    \n+
    130 }
    \n+
    131
    \n+\n+
    134 {
    \n+
    135 if (counter%numPerLine!=0) s << "\\n";
    \n+
    136 --indent;
    \n+
    137 s << indent << "</DataArray>\\n";
    \n+
    138 }
    \n+
    139
    \n+
    140 private:
    \n+
    142 void writeFloat64 (double data) final
    \n+
    143 { write_float(data); }
    \n+
    145 void writeFloat32 (float data) final
    \n+
    146 { write_float(data); }
    \n+
    148 void writeInt32 (std::int32_t data) final
    \n+
    149 { write_(data); }
    \n+
    151 void writeUInt32 (std::uint32_t data) final
    \n+
    152 { write_(data); }
    \n+
    154 void writeUInt8 (std::uint8_t data) final
    \n+
    155 { write_(data); }
    \n+
    156
    \n+
    157 template<class T>
    \n+
    158 void write_(T data)
    \n+
    159 {
    \n+
    160 typedef typename PrintType<T>::Type PT;
    \n+
    161 if(counter%numPerLine==0) s << indent;
    \n+
    162 else s << " ";
    \n+
    163 const auto original_precision = std::cout.precision();
    \n+
    164 s << std::setprecision(std::numeric_limits<PT>::digits10) << (PT) data;
    \n+
    165 std::cout.precision(original_precision);
    \n+
    166 counter++;
    \n+
    167 if (counter%numPerLine==0) s << "\\n";
    \n+
    168 }
    \n+
    169
    \n+
    170 template<class T>
    \n+
    171 void write_float(T data)
    \n+
    172 {
    \n+
    173 typedef typename PrintType<T>::Type PT;
    \n+
    174 if(counter%numPerLine==0) s << indent;
    \n+
    175 else s << " ";
    \n+
    176 PT out_data = (PT) data;
    \n+
    177 if (std::fpclassify(out_data) == FP_SUBNORMAL)
    \n+
    178 {
    \n+
    179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS
    \n+
    180 out_data = 0;
    \n+
    181 }
    \n+
    182 const auto original_precision = std::cout.precision();
    \n+
    183 s << std::setprecision(std::numeric_limits<PT>::digits10) << out_data;
    \n+
    184 std::cout.precision(original_precision);
    \n+
    185 counter++;
    \n+
    186 if (counter%numPerLine==0) s << "\\n";
    \n+
    187 }
    \n+
    188
    \n+
    189 std::ostream& s;
    \n+
    190 int counter;
    \n+
    191 int numPerLine;
    \n+
    192 Indent indent;
    \n+
    193 };
    \n+
    194
    \n+\n+
    197 {
    \n+
    198 public:
    \n+
    200
    \n+
    210 BinaryDataArrayWriter(std::ostream& theStream, std::string name,
    \n+
    211 int ncomps, int nitems, const Indent& indent_, Precision prec_)
    \n+
    212 : DataArrayWriter(prec_), s(theStream), b64(theStream), indent(indent_)
    \n+
    213 {
    \n+
    214 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n+
    215 << "Name=\\"" << name << "\\" ";
    \n+
    216 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n+
    217 s << "format=\\"binary\\">\\n";
    \n+
    218
    \n+
    219 // write indentation for the data chunk
    \n+
    220 s << indent+1;
    \n+
    221 // store size, needs to be exactly 32 bit
    \n+
    222 std::uint32_t size = ncomps*nitems*typeSize(prec_);
    \n+
    223 b64.write(size);
    \n+
    224 b64.flush();
    \n+
    225 }
    \n
    226
    \n-
    227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
    \n-
    Common stuff for the VTKWriter.
    \n+\n+
    229 {
    \n+
    230 b64.flush();
    \n+
    231 // append newline to written data
    \n+
    232 s << "\\n";
    \n+
    233 s << indent << "</DataArray>\\n";
    \n+
    234 s.flush();
    \n+
    235 }
    \n+
    236
    \n+
    237 private:
    \n+
    239 void writeFloat64 (double data) final
    \n+
    240 { write_(data); }
    \n+
    242 void writeFloat32 (float data) final
    \n+
    243 { write_(data); }
    \n+
    245 void writeInt32 (std::int32_t data) final
    \n+
    246 { write_(data); }
    \n+
    248 void writeUInt32 (std::uint32_t data) final
    \n+
    249 { write_(data); }
    \n+
    251 void writeUInt8 (std::uint8_t data) final
    \n+
    252 { write_(data); }
    \n+
    253
    \n+
    255 template<class T>
    \n+
    256 void write_(T data)
    \n+
    257 {
    \n+
    258 b64.write(data);
    \n+
    259 }
    \n+
    260
    \n+
    261 std::ostream& s;
    \n+
    262 Base64Stream b64;
    \n+
    263 const Indent& indent;
    \n+
    264 };
    \n+
    265
    \n+\n+
    268 {
    \n+
    269 public:
    \n+
    271
    \n+
    283 AppendedRawDataArrayWriter(std::ostream& s, std::string name,
    \n+
    284 int ncomps, unsigned nitems, unsigned& offset,
    \n+
    285 const Indent& indent, Precision prec_)
    \n+
    286 : DataArrayWriter(prec_)
    \n+
    287 {
    \n+
    288 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n+
    289 << "Name=\\"" << name << "\\" ";
    \n+
    290 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n+
    291 s << "format=\\"appended\\" offset=\\""<< offset << "\\" />\\n";
    \n+
    292 offset += 4; // header
    \n+
    293 offset += ncomps*nitems*typeSize(prec_);
    \n+
    294 }
    \n+
    295
    \n+
    297 bool writeIsNoop() const { return true; }
    \n+
    298
    \n+
    299 private:
    \n+
    301 void writeFloat64 (double) final {}
    \n+
    302 void writeFloat32 (float) final {}
    \n+
    303 void writeInt32 (std::int32_t) final {}
    \n+
    304 void writeUInt32 (std::uint32_t) final {}
    \n+
    305 void writeUInt8 (std::uint8_t) final {}
    \n+
    306 };
    \n+
    307
    \n+\n+
    310 {
    \n+
    311 public:
    \n+
    313
    \n+
    325 AppendedBase64DataArrayWriter(std::ostream& s, std::string name,
    \n+
    326 int ncomps, unsigned nitems,
    \n+
    327 unsigned& offset, const Indent& indent, Precision prec_)
    \n+
    328 : DataArrayWriter(prec_)
    \n+
    329 {
    \n+
    330 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n+
    331 << "Name=\\"" << name << "\\" ";
    \n+
    332 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n+
    333 s << "format=\\"appended\\" offset=\\""<< offset << "\\" />\\n";
    \n+
    334 offset += 8; // header
    \n+
    335 std::size_t bytes = ncomps*nitems*typeSize(prec_);
    \n+
    336 offset += bytes/3*4;
    \n+
    337 if(bytes%3 != 0)
    \n+
    338 offset += 4;
    \n+
    339 }
    \n+
    340
    \n+
    342 bool writeIsNoop() const { return true; }
    \n+
    343
    \n+
    344 private:
    \n+
    346 void writeFloat64 (double) final {}
    \n+
    347 void writeFloat32 (float) final {}
    \n+
    348 void writeInt32 (std::int32_t) final {}
    \n+
    349 void writeUInt32 (std::uint32_t) final {}
    \n+
    350 void writeUInt8 (std::uint8_t) final {}
    \n+
    351 };
    \n+
    352
    \n+
    354 //
    \n+
    355 // Naked ArrayWriters for the appended section
    \n+
    356 //
    \n+
    357
    \n+\n+
    360 {
    \n+
    361 public:
    \n+
    363
    \n+
    369 NakedBase64DataArrayWriter(std::ostream& theStream, int ncomps,
    \n+
    370 int nitems, Precision prec_)
    \n+
    371 : DataArrayWriter(prec_), b64(theStream)
    \n+
    372 {
    \n+
    373 // store size
    \n+
    374 std::uint32_t size = ncomps*nitems*typeSize(prec_);
    \n+
    375 b64.write(size);
    \n+
    376 b64.flush();
    \n+
    377 }
    \n+
    378
    \n+
    379 private:
    \n+
    381 void writeFloat64 (double data) final
    \n+
    382 { write_(data); }
    \n+
    384 void writeFloat32 (float data) final
    \n+
    385 { write_(data); }
    \n+
    387 void writeInt32 (std::int32_t data) final
    \n+
    388 { write_(data); }
    \n+
    390 void writeUInt32 (std::uint32_t data) final
    \n+
    391 { write_(data); }
    \n+
    393 void writeUInt8 (std::uint8_t data) final
    \n+
    394 { write_(data); }
    \n+
    395
    \n+
    397 template<class T>
    \n+
    398 void write_(T data)
    \n+
    399 {
    \n+
    400 b64.write(data);
    \n+
    401 }
    \n+
    402
    \n+
    403 Base64Stream b64;
    \n+
    404 };
    \n+
    405
    \n+\n+
    408 {
    \n+
    409 RawStream s;
    \n+
    410
    \n+
    411 public:
    \n+
    413
    \n+
    419 NakedRawDataArrayWriter(std::ostream& theStream, int ncomps,
    \n+
    420 int nitems, Precision prec_)
    \n+
    421 : DataArrayWriter(prec_), s(theStream)
    \n+
    422 {
    \n+
    423 s.write((unsigned int)(ncomps*nitems*typeSize(prec_)));
    \n+
    424 }
    \n+
    425
    \n+
    426 private:
    \n+
    428 void writeFloat64 (double data) final
    \n+
    429 { write_(data); }
    \n+
    431 void writeFloat32 (float data) final
    \n+
    432 { write_(data); }
    \n+
    434 void writeInt32 (std::int32_t data) final
    \n+
    435 { write_(data); }
    \n+
    437 void writeUInt32 (std::uint32_t data) final
    \n+
    438 { write_(data); }
    \n+
    440 void writeUInt8 (std::uint8_t data) final
    \n+
    441 { write_(data); }
    \n+
    442
    \n+
    444 template<class T>
    \n+
    445 void write_(T data)
    \n+
    446 {
    \n+
    447 s.write(data);
    \n+
    448 }
    \n+
    449 };
    \n+
    450
    \n+
    452 //
    \n+
    453 // Factory
    \n+
    454 //
    \n+
    455
    \n+
    457
    \n+\n+
    463 enum Phase { main, appended };
    \n+
    464
    \n+
    465 OutputType type;
    \n+
    466 std::ostream& stream;
    \n+
    467 unsigned offset;
    \n+
    469 Phase phase;
    \n+
    470
    \n+
    471 public:
    \n+
    473
    \n+
    482 inline DataArrayWriterFactory(OutputType type_, std::ostream& stream_)
    \n+
    483 : type(type_), stream(stream_), offset(0), phase(main)
    \n+
    484 { }
    \n+
    485
    \n+
    487
    \n+
    497 inline bool beginAppended() {
    \n+
    498 phase = appended;
    \n+
    499 switch(type) {
    \n+
    500 case ascii : return false;
    \n+
    501 case base64 : return false;
    \n+
    502 case appendedraw : return true;
    \n+
    503 case appendedbase64 : return true;
    \n+
    504 }
    \n+
    505 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
    \n+
    506 "OutputType " << type);
    \n+
    507 }
    \n+
    508
    \n+
    510 const std::string& appendedEncoding() const {
    \n+
    511 static const std::string rawString = "raw";
    \n+
    512 static const std::string base64String = "base64";
    \n+
    513
    \n+
    514 switch(type) {
    \n+
    515 case ascii :
    \n+
    516 case base64 :
    \n+
    517 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): No "
    \n+
    518 "appended encoding for OutputType " << type);
    \n+
    519 case appendedraw : return rawString;
    \n+
    520 case appendedbase64 : return base64String;
    \n+
    521 }
    \n+
    522 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): "
    \n+
    523 "unsupported OutputType " << type);
    \n+
    524 }
    \n+
    525
    \n+
    527
    \n+
    541 DataArrayWriter* make(const std::string& name, unsigned ncomps,
    \n+
    542 unsigned nitems, const Indent& indent,
    \n+
    543 Precision prec)
    \n+
    544 {
    \n+
    545 switch(phase) {
    \n+
    546 case main :
    \n+
    547 switch(type) {
    \n+
    548 case ascii :
    \n+
    549 return new AsciiDataArrayWriter(stream, name, ncomps, indent, prec);
    \n+
    550 case base64 :
    \n+
    551 return new BinaryDataArrayWriter(stream, name, ncomps, nitems,
    \n+
    552 indent, prec);
    \n+
    553 case appendedraw :
    \n+
    554 return new AppendedRawDataArrayWriter(stream, name, ncomps,
    \n+
    555 nitems, offset, indent, prec);
    \n+
    556 case appendedbase64 :
    \n+
    557 return new AppendedBase64DataArrayWriter(stream, name, ncomps,
    \n+
    558 nitems, offset,
    \n+
    559 indent, prec);
    \n+
    560 }
    \n+
    561 break;
    \n+
    562 case appended :
    \n+
    563 switch(type) {
    \n+
    564 case ascii :
    \n+
    565 case base64 :
    \n+
    566 break; // invlid in appended mode
    \n+
    567 case appendedraw :
    \n+
    568 return new NakedRawDataArrayWriter(stream, ncomps, nitems, prec);
    \n+
    569 case appendedbase64 :
    \n+
    570 return new NakedBase64DataArrayWriter(stream, ncomps, nitems, prec);
    \n+
    571 }
    \n+
    572 break;
    \n+
    573 }
    \n+
    574 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
    \n+
    575 "OutputType " << type << " in phase " << phase);
    \n+
    576 }
    \n+
    577 };
    \n+
    578
    \n+
    579 } // namespace VTK
    \n+
    580
    \n+
    582
    \n+
    583} // namespace Dune
    \n+
    584
    \n+
    585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
    \n+\n+
    Common stuff for the VTKWriter.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n-
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n-
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n+\n+\n+\n+\n+\n+
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n+
    @ ascii
    Output to the file is in ascii.
    Definition: common.hh:45
    \n+
    @ appendedraw
    Output is to the file is appended raw binary.
    Definition: common.hh:49
    \n+
    @ appendedbase64
    Output is to the file is appended base64 binary.
    Definition: common.hh:51
    \n+
    @ base64
    Output to the file is inline base64 binary.
    Definition: common.hh:47
    \n
    std::string toString(Precision p)
    map precision to VTK type name
    Definition: common.hh:280
    \n-
    std::string getEndiannessString()
    determine endianness of this C++ implementation
    Definition: common.hh:232
    \n-
    Dump a .vtu/.vtp files contents to a stream.
    Definition: pvtuwriter.hh:62
    \n-
    ~PVTUWriter()
    write footer
    Definition: pvtuwriter.hh:102
    \n-
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: pvtuwriter.hh:195
    \n-
    void endCellData()
    finish CellData section
    Definition: pvtuwriter.hh:155
    \n-
    void addArray(const std::string &name, unsigned ncomps, Precision prec)
    Add an array to the output file.
    Definition: pvtuwriter.hh:207
    \n-
    void beginMain(unsigned ghostLevel=0)
    start the main PPolyData/PUnstructuredGrid section
    Definition: pvtuwriter.hh:189
    \n-
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: pvtuwriter.hh:146
    \n-
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: pvtuwriter.hh:120
    \n-
    void addPiece(const std::string &filename)
    Add a serial piece to the output file.
    Definition: pvtuwriter.hh:215
    \n-
    PVTUWriter(std::ostream &stream_, FileType fileType_)
    create a PVTUWriter object
    Definition: pvtuwriter.hh:78
    \n-
    void endPointData()
    finish PointData section
    Definition: pvtuwriter.hh:129
    \n-
    void endPoints()
    finish section for the point coordinates
    Definition: pvtuwriter.hh:171
    \n-
    void beginPoints()
    start section for the point coordinates
    Definition: pvtuwriter.hh:166
    \n+
    std::size_t typeSize(Precision p)
    map precision to byte size
    Definition: common.hh:300
    \n+
    T Type
    type to convert T to before putting it into a stream with <<
    Definition: common.hh:97
    \n+
    base class for data array writers
    Definition: dataarraywriter.hh:56
    \n+
    void write(T data)
    write one element of data
    Definition: dataarraywriter.hh:69
    \n+
    DataArrayWriter(Precision _prec)
    construct a data array writer
    Definition: dataarraywriter.hh:63
    \n+
    virtual bool writeIsNoop() const
    whether calls to write may be skipped
    Definition: dataarraywriter.hh:89
    \n+
    virtual ~DataArrayWriter()
    virtual destructor
    Definition: dataarraywriter.hh:91
    \n+
    a streaming writer for data array tags, uses ASCII inline format
    Definition: dataarraywriter.hh:110
    \n+
    ~AsciiDataArrayWriter()
    finish output; writes end tag
    Definition: dataarraywriter.hh:133
    \n+
    AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, const Indent &indent_, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:121
    \n+
    a streaming writer for data array tags, uses binary inline format
    Definition: dataarraywriter.hh:197
    \n+
    ~BinaryDataArrayWriter()
    finish output; writes end tag
    Definition: dataarraywriter.hh:228
    \n+
    BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, int nitems, const Indent &indent_, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:210
    \n+
    a streaming writer for data array tags, uses appended raw format
    Definition: dataarraywriter.hh:268
    \n+
    AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:283
    \n+
    bool writeIsNoop() const
    whether calls to write may be skipped
    Definition: dataarraywriter.hh:297
    \n+
    a streaming writer for data array tags, uses appended base64 format
    Definition: dataarraywriter.hh:310
    \n+
    AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:325
    \n+
    bool writeIsNoop() const
    whether calls to write may be skipped
    Definition: dataarraywriter.hh:342
    \n+
    a streaming writer for appended data array tags, uses base64 format
    Definition: dataarraywriter.hh:360
    \n+
    NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:369
    \n+
    a streaming writer for appended data arrays, uses raw format
    Definition: dataarraywriter.hh:408
    \n+
    NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:419
    \n+
    a factory for DataArrayWriters
    Definition: dataarraywriter.hh:462
    \n+
    bool beginAppended()
    signal start of the appended section
    Definition: dataarraywriter.hh:497
    \n+
    DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
    create a DataArrayWriter
    Definition: dataarraywriter.hh:541
    \n+
    DataArrayWriterFactory(OutputType type_, std::ostream &stream_)
    create a DataArrayWriterFactory
    Definition: dataarraywriter.hh:482
    \n+
    const std::string & appendedEncoding() const
    query encoding string for appended data
    Definition: dataarraywriter.hh:510
    \n+
    void write(X &data)
    encode a data item
    Definition: streams.hh:42
    \n+
    void flush()
    flush the current unwritten data to the stream.
    Definition: streams.hh:64
    \n+
    write out data in binary
    Definition: streams.hh:84
    \n+
    void write(T data)
    write data to stream
    Definition: streams.hh:93
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,224 +7,598 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-pvtuwriter.hh\n+dataarraywriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH\n 8\n- 9#include \n- 10#include \n- 11\n- 12#include \n- 13#include \n- 14\n- 15#include \n- 16\n- 17namespace Dune {\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15\n+ 16#include \n+ 17#include \n 18\n+ 19#include \n+ 20#include \n 21\n- 22 namespace VTK {\n- 23\n- 25\n-62 class PVTUWriter {\n- 63 std::ostream& stream;\n- 64\n- 65 std::string fileType;\n+ 30namespace Dune\n+ 31{\n+ 34\n+ 35 namespace VTK {\n+ 36\n+ 38\n+55 class DataArrayWriter\n+ 56 {\n+ 57 public:\n+ 59\n+63 DataArrayWriter(Precision _prec)\n+ 64 : prec(_prec)\n+ 65 {}\n 66\n- 67 Indent indent;\n- 68\n- 69 public:\n- 71\n-78 inline PVTUWriter(std::ostream& stream_, FileType fileType_)\n- 79 : stream(stream_)\n- 80 {\n- 81 switch(fileType_) {\n- 82 case polyData :\n- 83 fileType = \"PPolyData\";\n- 84 break;\n- 85 case unstructuredGrid :\n- 86 fileType = \"PUnstructuredGrid\";\n- 87 break;\n- 88 default :\n- 89 DUNE_THROW(IOError, \"PVTUWriter: Unknown fileType: \" << fileType_);\n- 90 }\n- 91 const std::string& byteOrder = getEndiannessString();\n+ 68 template\n+69 void write(T data)\n+ 70 {\n+ 71 switch(prec)\n+ 72 {\n+ 73 case Precision::float32:\n+ 74 writeFloat32(data); break;\n+ 75 case Precision::float64:\n+ 76 writeFloat64(data); break;\n+ 77 case Precision::uint32:\n+ 78 writeUInt32(data); break;\n+ 79 case Precision::uint8:\n+ 80 writeUInt8(data); break;\n+ 81 case Precision::int32:\n+ 82 writeInt32(data); break;\n+ 83 default:\n+ 84 DUNE_THROW(Dune::NotImplemented, \"Unknown precision type\");\n+ 85 }\n+ 86 }\n+ 87\n+89 virtual bool writeIsNoop() const { return false; }\n+91 virtual ~DataArrayWriter () {}\n 92\n- 93 stream << indent << \"\\n\";\n- 94 stream << indent << \"\\n\";\n- 98 ++indent;\n- 99 }\n- 100\n-102 inline ~PVTUWriter() {\n- 103 --indent;\n- 104 stream << indent << \"\\n\"\n- 105 << std::flush;\n- 106 }\n+ 93 private:\n+ 95 virtual void writeFloat32 (float data) = 0;\n+ 97 virtual void writeFloat64 (double data) = 0;\n+ 99 virtual void writeInt32 (std::int32_t data) = 0;\n+ 101 virtual void writeUInt8 (std::uint8_t data) = 0;\n+ 103 virtual void writeUInt32 (std::uint32_t data) = 0;\n+ 104\n+ 105 Precision prec;\n+ 106 };\n 107\n- 109\n-120 inline void beginPointData(const std::string& scalars = \"\",\n- 121 const std::string& vectors = \"\") {\n- 122 stream << indent << \"\\n\";\n- 126 ++indent;\n- 127 }\n-129 inline void endPointData() {\n- 130 --indent;\n- 131 stream << indent << \"\\n\";\n- 132 }\n- 133\n- 135\n-146 inline void beginCellData(const std::string& scalars = \"\",\n- 147 const std::string& vectors = \"\") {\n- 148 stream << indent << \"\\n\";\n- 152 ++indent;\n- 153 }\n-155 inline void endCellData() {\n- 156 --indent;\n- 157 stream << indent << \"\\n\";\n- 158 }\n- 159\n- 161\n-166 inline void beginPoints() {\n- 167 stream << indent << \"\\n\";\n- 168 ++indent;\n- 169 }\n-171 inline void endPoints() {\n- 172 --indent;\n- 173 stream << indent << \"\\n\";\n- 174 }\n- 175\n- 177\n-189 inline void beginMain(unsigned ghostLevel = 0) {\n- 190 stream << indent << \"<\" << fileType\n- 191 << \" GhostLevel=\\\"\" << ghostLevel << \"\\\">\\n\";\n- 192 ++indent;\n- 193 }\n-195 inline void endMain() {\n- 196 --indent;\n- 197 stream << indent << \"\\n\";\n- 198 }\n- 199\n- 201\n-207 void addArray(const std::string& name, unsigned ncomps, Precision prec) {\n- 208 stream << indent << \"\\n\";\n- 212 }\n- 213\n-215 inline void addPiece(const std::string& filename) {\n- 216 stream << indent << \"\\n\";\n- 218 }\n- 219 };\n- 220\n- 221 } // namespace VTK\n- 222\n- 224\n- 225} // namespace Dune\n+109 class AsciiDataArrayWriter : public DataArrayWriter\n+ 110 {\n+ 111 public:\n+ 113\n+121 AsciiDataArrayWriter(std::ostream& theStream, std::string name,\n+ 122 int ncomps, const Indent& indent_, Precision prec_)\n+ 123 : DataArrayWriter(prec_), s(theStream), counter(0), numPerLine(12), indent\n+(indent_)\n+ 124 {\n+ 125 s << indent << \"\\n\";\n+ 129 ++indent;\n+ 130 }\n+ 131\n+133 ~AsciiDataArrayWriter ()\n+ 134 {\n+ 135 if (counter%numPerLine!=0) s << \"\\n\";\n+ 136 --indent;\n+ 137 s << indent << \"\\n\";\n+ 138 }\n+ 139\n+ 140 private:\n+ 142 void writeFloat64 (double data) final\n+ 143 { write_float(data); }\n+ 145 void writeFloat32 (float data) final\n+ 146 { write_float(data); }\n+ 148 void writeInt32 (std::int32_t data) final\n+ 149 { write_(data); }\n+ 151 void writeUInt32 (std::uint32_t data) final\n+ 152 { write_(data); }\n+ 154 void writeUInt8 (std::uint8_t data) final\n+ 155 { write_(data); }\n+ 156\n+ 157 template\n+ 158 void write_(T data)\n+ 159 {\n+ 160 typedef typename PrintType::Type PT;\n+ 161 if(counter%numPerLine==0) s << indent;\n+ 162 else s << \" \";\n+ 163 const auto original_precision = std::cout.precision();\n+ 164 s << std::setprecision(std::numeric_limits::digits10) << (PT) data;\n+ 165 std::cout.precision(original_precision);\n+ 166 counter++;\n+ 167 if (counter%numPerLine==0) s << \"\\n\";\n+ 168 }\n+ 169\n+ 170 template\n+ 171 void write_float(T data)\n+ 172 {\n+ 173 typedef typename PrintType::Type PT;\n+ 174 if(counter%numPerLine==0) s << indent;\n+ 175 else s << \" \";\n+ 176 PT out_data = (PT) data;\n+ 177 if (std::fpclassify(out_data) == FP_SUBNORMAL)\n+ 178 {\n+ 179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS\n+ 180 out_data = 0;\n+ 181 }\n+ 182 const auto original_precision = std::cout.precision();\n+ 183 s << std::setprecision(std::numeric_limits::digits10) << out_data;\n+ 184 std::cout.precision(original_precision);\n+ 185 counter++;\n+ 186 if (counter%numPerLine==0) s << \"\\n\";\n+ 187 }\n+ 188\n+ 189 std::ostream& s;\n+ 190 int counter;\n+ 191 int numPerLine;\n+ 192 Indent indent;\n+ 193 };\n+ 194\n+196 class BinaryDataArrayWriter : public DataArrayWriter\n+ 197 {\n+ 198 public:\n+ 200\n+210 BinaryDataArrayWriter(std::ostream& theStream, std::string name,\n+ 211 int ncomps, int nitems, const Indent& indent_, Precision prec_)\n+ 212 : DataArrayWriter(prec_), s(theStream), b64(theStream), indent(indent_)\n+ 213 {\n+ 214 s << indent << \"\\n\";\n+ 218\n+ 219 // write indentation for the data chunk\n+ 220 s << indent+1;\n+ 221 // store size, needs to be exactly 32 bit\n+ 222 std::uint32_t size = ncomps*nitems*typeSize(prec_);\n+ 223 b64.write(size);\n+ 224 b64.flush();\n+ 225 }\n 226\n- 227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH\n+228 ~BinaryDataArrayWriter ()\n+ 229 {\n+ 230 b64.flush();\n+ 231 // append newline to written data\n+ 232 s << \"\\n\";\n+ 233 s << indent << \"\\n\";\n+ 234 s.flush();\n+ 235 }\n+ 236\n+ 237 private:\n+ 239 void writeFloat64 (double data) final\n+ 240 { write_(data); }\n+ 242 void writeFloat32 (float data) final\n+ 243 { write_(data); }\n+ 245 void writeInt32 (std::int32_t data) final\n+ 246 { write_(data); }\n+ 248 void writeUInt32 (std::uint32_t data) final\n+ 249 { write_(data); }\n+ 251 void writeUInt8 (std::uint8_t data) final\n+ 252 { write_(data); }\n+ 253\n+ 255 template\n+ 256 void write_(T data)\n+ 257 {\n+ 258 b64.write(data);\n+ 259 }\n+ 260\n+ 261 std::ostream& s;\n+ 262 Base64Stream b64;\n+ 263 const Indent& indent;\n+ 264 };\n+ 265\n+267 class AppendedRawDataArrayWriter : public DataArrayWriter\n+ 268 {\n+ 269 public:\n+ 271\n+283 AppendedRawDataArrayWriter(std::ostream& s, std::string name,\n+ 284 int ncomps, unsigned nitems, unsigned& offset,\n+ 285 const Indent& indent, Precision prec_)\n+ 286 : DataArrayWriter(prec_)\n+ 287 {\n+ 288 s << indent << \"\\n\";\n+ 292 offset += 4; // header\n+ 293 offset += ncomps*nitems*typeSize(prec_);\n+ 294 }\n+ 295\n+297 bool writeIsNoop() const { return true; }\n+ 298\n+ 299 private:\n+ 301 void writeFloat64 (double) final {}\n+ 302 void writeFloat32 (float) final {}\n+ 303 void writeInt32 (std::int32_t) final {}\n+ 304 void writeUInt32 (std::uint32_t) final {}\n+ 305 void writeUInt8 (std::uint8_t) final {}\n+ 306 };\n+ 307\n+309 class AppendedBase64DataArrayWriter : public DataArrayWriter\n+ 310 {\n+ 311 public:\n+ 313\n+325 AppendedBase64DataArrayWriter(std::ostream& s, std::string name,\n+ 326 int ncomps, unsigned nitems,\n+ 327 unsigned& offset, const Indent& indent, Precision prec_)\n+ 328 : DataArrayWriter(prec_)\n+ 329 {\n+ 330 s << indent << \"\\n\";\n+ 334 offset += 8; // header\n+ 335 std::size_t bytes = ncomps*nitems*typeSize(prec_);\n+ 336 offset += bytes/3*4;\n+ 337 if(bytes%3 != 0)\n+ 338 offset += 4;\n+ 339 }\n+ 340\n+342 bool writeIsNoop() const { return true; }\n+ 343\n+ 344 private:\n+ 346 void writeFloat64 (double) final {}\n+ 347 void writeFloat32 (float) final {}\n+ 348 void writeInt32 (std::int32_t) final {}\n+ 349 void writeUInt32 (std::uint32_t) final {}\n+ 350 void writeUInt8 (std::uint8_t) final {}\n+ 351 };\n+ 352\n+ 354 //\n+ 355 // Naked ArrayWriters for the appended section\n+ 356 //\n+ 357\n+359 class NakedBase64DataArrayWriter : public DataArrayWriter\n+ 360 {\n+ 361 public:\n+ 363\n+369 NakedBase64DataArrayWriter(std::ostream& theStream, int ncomps,\n+ 370 int nitems, Precision prec_)\n+ 371 : DataArrayWriter(prec_), b64(theStream)\n+ 372 {\n+ 373 // store size\n+ 374 std::uint32_t size = ncomps*nitems*typeSize(prec_);\n+ 375 b64.write(size);\n+ 376 b64.flush();\n+ 377 }\n+ 378\n+ 379 private:\n+ 381 void writeFloat64 (double data) final\n+ 382 { write_(data); }\n+ 384 void writeFloat32 (float data) final\n+ 385 { write_(data); }\n+ 387 void writeInt32 (std::int32_t data) final\n+ 388 { write_(data); }\n+ 390 void writeUInt32 (std::uint32_t data) final\n+ 391 { write_(data); }\n+ 393 void writeUInt8 (std::uint8_t data) final\n+ 394 { write_(data); }\n+ 395\n+ 397 template\n+ 398 void write_(T data)\n+ 399 {\n+ 400 b64.write(data);\n+ 401 }\n+ 402\n+ 403 Base64Stream b64;\n+ 404 };\n+ 405\n+407 class NakedRawDataArrayWriter : public DataArrayWriter\n+ 408 {\n+ 409 RawStream s;\n+ 410\n+ 411 public:\n+ 413\n+419 NakedRawDataArrayWriter(std::ostream& theStream, int ncomps,\n+ 420 int nitems, Precision prec_)\n+ 421 : DataArrayWriter(prec_), s(theStream)\n+ 422 {\n+ 423 s.write((unsigned int)(ncomps*nitems*typeSize(prec_)));\n+ 424 }\n+ 425\n+ 426 private:\n+ 428 void writeFloat64 (double data) final\n+ 429 { write_(data); }\n+ 431 void writeFloat32 (float data) final\n+ 432 { write_(data); }\n+ 434 void writeInt32 (std::int32_t data) final\n+ 435 { write_(data); }\n+ 437 void writeUInt32 (std::uint32_t data) final\n+ 438 { write_(data); }\n+ 440 void writeUInt8 (std::uint8_t data) final\n+ 441 { write_(data); }\n+ 442\n+ 444 template\n+ 445 void write_(T data)\n+ 446 {\n+ 447 s.write(data);\n+ 448 }\n+ 449 };\n+ 450\n+ 452 //\n+ 453 // Factory\n+ 454 //\n+ 455\n+ 457\n+462 class DataArrayWriterFactory {\n+ 463 enum Phase { main, appended };\n+ 464\n+ 465 OutputType type;\n+ 466 std::ostream& stream;\n+ 467 unsigned offset;\n+ 469 Phase phase;\n+ 470\n+ 471 public:\n+ 473\n+482 inline DataArrayWriterFactory(OutputType type_, std::ostream& stream_)\n+ 483 : type(type_), stream(stream_), offset(0), phase(main)\n+ 484 { }\n+ 485\n+ 487\n+497 inline bool beginAppended() {\n+ 498 phase = appended;\n+ 499 switch(type) {\n+ 500 case ascii : return false;\n+ 501 case base64 : return false;\n+ 502 case appendedraw : return true;\n+ 503 case appendedbase64 : return true;\n+ 504 }\n+ 505 DUNE_THROW(IOError, \"Dune::VTK::DataArrayWriter: unsupported \"\n+ 506 \"OutputType \" << type);\n+ 507 }\n+ 508\n+510 const std::string& appendedEncoding() const {\n+ 511 static const std::string rawString = \"raw\";\n+ 512 static const std::string base64String = \"base64\";\n+ 513\n+ 514 switch(type) {\n+ 515 case ascii :\n+ 516 case base64 :\n+ 517 DUNE_THROW(IOError, \"DataArrayWriterFactory::appendedEncoding(): No \"\n+ 518 \"appended encoding for OutputType \" << type);\n+ 519 case appendedraw : return rawString;\n+ 520 case appendedbase64 : return base64String;\n+ 521 }\n+ 522 DUNE_THROW(IOError, \"DataArrayWriterFactory::appendedEncoding(): \"\n+ 523 \"unsupported OutputType \" << type);\n+ 524 }\n+ 525\n+ 527\n+541 DataArrayWriter* make(const std::string& name, unsigned ncomps,\n+ 542 unsigned nitems, const Indent& indent,\n+ 543 Precision prec)\n+ 544 {\n+ 545 switch(phase) {\n+ 546 case main :\n+ 547 switch(type) {\n+ 548 case ascii :\n+ 549 return new AsciiDataArrayWriter(stream, name, ncomps, indent, prec);\n+ 550 case base64 :\n+ 551 return new BinaryDataArrayWriter(stream, name, ncomps, nitems,\n+ 552 indent, prec);\n+ 553 case appendedraw :\n+ 554 return new AppendedRawDataArrayWriter(stream, name, ncomps,\n+ 555 nitems, offset, indent, prec);\n+ 556 case appendedbase64 :\n+ 557 return new AppendedBase64DataArrayWriter(stream, name, ncomps,\n+ 558 nitems, offset,\n+ 559 indent, prec);\n+ 560 }\n+ 561 break;\n+ 562 case appended :\n+ 563 switch(type) {\n+ 564 case ascii :\n+ 565 case base64 :\n+ 566 break; // invlid in appended mode\n+ 567 case appendedraw :\n+ 568 return new NakedRawDataArrayWriter(stream, ncomps, nitems, prec);\n+ 569 case appendedbase64 :\n+ 570 return new NakedBase64DataArrayWriter(stream, ncomps, nitems, prec);\n+ 571 }\n+ 572 break;\n+ 573 }\n+ 574 DUNE_THROW(IOError, \"Dune::VTK::DataArrayWriter: unsupported \"\n+ 575 \"OutputType \" << type << \" in phase \" << phase);\n+ 576 }\n+ 577 };\n+ 578\n+ 579 } // namespace VTK\n+ 580\n+ 582\n+ 583} // namespace Dune\n+ 584\n+ 585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH\n+streams.hh\n common.hh\n Common stuff for the VTKWriter.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::VTK::Precision\n Precision\n which precision to use when writing out data to vtk files\n Definition: common.hh:271\n-Dune::VTK::FileType\n-FileType\n-which type of VTK file to write\n-Definition: common.hh:252\n-Dune::VTK::polyData\n-@ polyData\n-for .vtp files (PolyData)\n-Definition: common.hh:254\n-Dune::VTK::unstructuredGrid\n-@ unstructuredGrid\n-for .vtu files (UnstructuredGrid)\n-Definition: common.hh:256\n+Dune::VTK::Precision::int32\n+@ int32\n+Dune::VTK::Precision::uint32\n+@ uint32\n+Dune::VTK::Precision::uint8\n+@ uint8\n+Dune::VTK::Precision::float32\n+@ float32\n+Dune::VTK::Precision::float64\n+@ float64\n+Dune::VTK::OutputType\n+OutputType\n+How the bulk data should be stored in the file.\n+Definition: common.hh:43\n+Dune::VTK::ascii\n+@ ascii\n+Output to the file is in ascii.\n+Definition: common.hh:45\n+Dune::VTK::appendedraw\n+@ appendedraw\n+Output is to the file is appended raw binary.\n+Definition: common.hh:49\n+Dune::VTK::appendedbase64\n+@ appendedbase64\n+Output is to the file is appended base64 binary.\n+Definition: common.hh:51\n+Dune::VTK::base64\n+@ base64\n+Output to the file is inline base64 binary.\n+Definition: common.hh:47\n Dune::VTK::toString\n std::string toString(Precision p)\n map precision to VTK type name\n Definition: common.hh:280\n-Dune::VTK::getEndiannessString\n-std::string getEndiannessString()\n-determine endianness of this C++ implementation\n-Definition: common.hh:232\n-Dune::VTK::PVTUWriter\n-Dump a .vtu/.vtp files contents to a stream.\n-Definition: pvtuwriter.hh:62\n-Dune::VTK::PVTUWriter::~PVTUWriter\n-~PVTUWriter()\n-write footer\n-Definition: pvtuwriter.hh:102\n-Dune::VTK::PVTUWriter::endMain\n-void endMain()\n-finish the main PolyData/UnstructuredGrid section\n-Definition: pvtuwriter.hh:195\n-Dune::VTK::PVTUWriter::endCellData\n-void endCellData()\n-finish CellData section\n-Definition: pvtuwriter.hh:155\n-Dune::VTK::PVTUWriter::addArray\n-void addArray(const std::string &name, unsigned ncomps, Precision prec)\n-Add an array to the output file.\n-Definition: pvtuwriter.hh:207\n-Dune::VTK::PVTUWriter::beginMain\n-void beginMain(unsigned ghostLevel=0)\n-start the main PPolyData/PUnstructuredGrid section\n-Definition: pvtuwriter.hh:189\n-Dune::VTK::PVTUWriter::beginCellData\n-void beginCellData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start CellData section\n-Definition: pvtuwriter.hh:146\n-Dune::VTK::PVTUWriter::beginPointData\n-void beginPointData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start PointData section\n-Definition: pvtuwriter.hh:120\n-Dune::VTK::PVTUWriter::addPiece\n-void addPiece(const std::string &filename)\n-Add a serial piece to the output file.\n-Definition: pvtuwriter.hh:215\n-Dune::VTK::PVTUWriter::PVTUWriter\n-PVTUWriter(std::ostream &stream_, FileType fileType_)\n-create a PVTUWriter object\n-Definition: pvtuwriter.hh:78\n-Dune::VTK::PVTUWriter::endPointData\n-void endPointData()\n-finish PointData section\n-Definition: pvtuwriter.hh:129\n-Dune::VTK::PVTUWriter::endPoints\n-void endPoints()\n-finish section for the point coordinates\n-Definition: pvtuwriter.hh:171\n-Dune::VTK::PVTUWriter::beginPoints\n-void beginPoints()\n-start section for the point coordinates\n-Definition: pvtuwriter.hh:166\n+Dune::VTK::typeSize\n+std::size_t typeSize(Precision p)\n+map precision to byte size\n+Definition: common.hh:300\n+Dune::VTK::PrintType::Type\n+T Type\n+type to convert T to before putting it into a stream with <<\n+Definition: common.hh:97\n+Dune::VTK::DataArrayWriter\n+base class for data array writers\n+Definition: dataarraywriter.hh:56\n+Dune::VTK::DataArrayWriter::write\n+void write(T data)\n+write one element of data\n+Definition: dataarraywriter.hh:69\n+Dune::VTK::DataArrayWriter::DataArrayWriter\n+DataArrayWriter(Precision _prec)\n+construct a data array writer\n+Definition: dataarraywriter.hh:63\n+Dune::VTK::DataArrayWriter::writeIsNoop\n+virtual bool writeIsNoop() const\n+whether calls to write may be skipped\n+Definition: dataarraywriter.hh:89\n+Dune::VTK::DataArrayWriter::~DataArrayWriter\n+virtual ~DataArrayWriter()\n+virtual destructor\n+Definition: dataarraywriter.hh:91\n+Dune::VTK::AsciiDataArrayWriter\n+a streaming writer for data array tags, uses ASCII inline format\n+Definition: dataarraywriter.hh:110\n+Dune::VTK::AsciiDataArrayWriter::~AsciiDataArrayWriter\n+~AsciiDataArrayWriter()\n+finish output; writes end tag\n+Definition: dataarraywriter.hh:133\n+Dune::VTK::AsciiDataArrayWriter::AsciiDataArrayWriter\n+AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps,\n+const Indent &indent_, Precision prec_)\n+make a new data array writer\n+Definition: dataarraywriter.hh:121\n+Dune::VTK::BinaryDataArrayWriter\n+a streaming writer for data array tags, uses binary inline format\n+Definition: dataarraywriter.hh:197\n+Dune::VTK::BinaryDataArrayWriter::~BinaryDataArrayWriter\n+~BinaryDataArrayWriter()\n+finish output; writes end tag\n+Definition: dataarraywriter.hh:228\n+Dune::VTK::BinaryDataArrayWriter::BinaryDataArrayWriter\n+BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps,\n+int nitems, const Indent &indent_, Precision prec_)\n+make a new data array writer\n+Definition: dataarraywriter.hh:210\n+Dune::VTK::AppendedRawDataArrayWriter\n+a streaming writer for data array tags, uses appended raw format\n+Definition: dataarraywriter.hh:268\n+Dune::VTK::AppendedRawDataArrayWriter::AppendedRawDataArrayWriter\n+AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps,\n+unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)\n+make a new data array writer\n+Definition: dataarraywriter.hh:283\n+Dune::VTK::AppendedRawDataArrayWriter::writeIsNoop\n+bool writeIsNoop() const\n+whether calls to write may be skipped\n+Definition: dataarraywriter.hh:297\n+Dune::VTK::AppendedBase64DataArrayWriter\n+a streaming writer for data array tags, uses appended base64 format\n+Definition: dataarraywriter.hh:310\n+Dune::VTK::AppendedBase64DataArrayWriter::AppendedBase64DataArrayWriter\n+AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps,\n+unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)\n+make a new data array writer\n+Definition: dataarraywriter.hh:325\n+Dune::VTK::AppendedBase64DataArrayWriter::writeIsNoop\n+bool writeIsNoop() const\n+whether calls to write may be skipped\n+Definition: dataarraywriter.hh:342\n+Dune::VTK::NakedBase64DataArrayWriter\n+a streaming writer for appended data array tags, uses base64 format\n+Definition: dataarraywriter.hh:360\n+Dune::VTK::NakedBase64DataArrayWriter::NakedBase64DataArrayWriter\n+NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems,\n+Precision prec_)\n+make a new data array writer\n+Definition: dataarraywriter.hh:369\n+Dune::VTK::NakedRawDataArrayWriter\n+a streaming writer for appended data arrays, uses raw format\n+Definition: dataarraywriter.hh:408\n+Dune::VTK::NakedRawDataArrayWriter::NakedRawDataArrayWriter\n+NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems,\n+Precision prec_)\n+make a new data array writer\n+Definition: dataarraywriter.hh:419\n+Dune::VTK::DataArrayWriterFactory\n+a factory for DataArrayWriters\n+Definition: dataarraywriter.hh:462\n+Dune::VTK::DataArrayWriterFactory::beginAppended\n+bool beginAppended()\n+signal start of the appended section\n+Definition: dataarraywriter.hh:497\n+Dune::VTK::DataArrayWriterFactory::make\n+DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned\n+nitems, const Indent &indent, Precision prec)\n+create a DataArrayWriter\n+Definition: dataarraywriter.hh:541\n+Dune::VTK::DataArrayWriterFactory::DataArrayWriterFactory\n+DataArrayWriterFactory(OutputType type_, std::ostream &stream_)\n+create a DataArrayWriterFactory\n+Definition: dataarraywriter.hh:482\n+Dune::VTK::DataArrayWriterFactory::appendedEncoding\n+const std::string & appendedEncoding() const\n+query encoding string for appended data\n+Definition: dataarraywriter.hh:510\n+Dune::Base64Stream::write\n+void write(X &data)\n+encode a data item\n+Definition: streams.hh:42\n+Dune::Base64Stream::flush\n+void flush()\n+flush the current unwritten data to the stream.\n+Definition: streams.hh:64\n+Dune::RawStream\n+write out data in binary\n+Definition: streams.hh:84\n+Dune::RawStream::write\n+void write(T data)\n+write data to stream\n+Definition: streams.hh:93\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00788.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00788.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: streams.hh File Reference\n+dune-grid: corner.hh File Reference\n \n \n \n \n \n \n \n@@ -65,36 +65,34 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    streams.hh File Reference
    \n+
    corner.hh File Reference
    \n
    \n
    \n-
    #include <ostream>
    \n-#include <dune/grid/io/file/vtk/b64enc.hh>
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::Base64Stream
     class to base64 encode a stream of data More...
     
    class  Dune::RawStream
     write out data in binary More...
    class  Dune::VTK::Corner< Cell >
     simple class representing a corner of a cell More...
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,25 +8,23 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-streams.hh File Reference\n-#include \n-#include \n+corner.hh File Reference\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::Base64Stream\n-\u00a0 class to base64 encode a stream of data More...\n-\u00a0\n-class \u00a0Dune::RawStream\n-\u00a0 write out data in binary More...\n+class \u00a0Dune::VTK::Corner<_Cell_>\n+\u00a0 simple class representing a corner of a cell More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::VTK\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00788_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: streams.hh Source File\n+dune-grid: corner.hh Source File\n \n \n \n \n \n \n \n@@ -62,112 +62,79 @@\n \n \n
    \n
    \n-
    streams.hh
    \n+
    corner.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH
    \n
    8
    \n-
    9#include <ostream>
    \n+\n
    10
    \n-\n-
    12
    \n-
    13namespace Dune {
    \n-
    14
    \n-\n-
    17 std::ostream& s;
    \n-
    18 b64chunk chunk;
    \n-
    19 char obuf[4];
    \n-
    20
    \n-
    21 public:
    \n-
    23
    \n-
    27 Base64Stream(std::ostream& s_)
    \n-
    28 : s(s_)
    \n-
    29 {
    \n-
    30 // reset chunk
    \n-
    31 chunk.reset();
    \n-
    32 }
    \n+
    11namespace Dune
    \n+
    12{
    \n+
    15
    \n+
    16 namespace VTK {
    \n+
    17
    \n+
    19
    \n+
    24 template<typename Cell>
    \n+
    25 class Corner {
    \n+
    26 // store a pointer to the element
    \n+
    27 const Cell* cell_;
    \n+
    28 // store index of the corner within element (Dune numbering)
    \n+
    29 unsigned index;
    \n+
    30
    \n+
    31 public:
    \n
    33
    \n-
    35
    \n-
    41 template <class X>
    \n-
    42 void write(X & data)
    \n-
    43 {
    \n-
    44 char* p = reinterpret_cast<char*>(&data);
    \n-
    45 for (size_t len = sizeof(X); len > 0; len--,p++)
    \n-
    46 {
    \n-
    47 chunk.put(*p);
    \n-
    48 if (chunk.size == 3)
    \n-
    49 {
    \n-
    50 chunk.write(obuf);
    \n-
    51 s.write(obuf,4);
    \n-
    52 }
    \n-
    53 }
    \n-
    54 }
    \n-
    55
    \n-
    57
    \n-
    64 void flush()
    \n-
    65 {
    \n-
    66 if (chunk.size > 0)
    \n-
    67 {
    \n-
    68 chunk.write(obuf);
    \n-
    69 s.write(obuf,4);
    \n-
    70 }
    \n-
    71 }
    \n+
    38 Corner(const Cell& cell, unsigned duneIndex)
    \n+
    39 : cell_(&cell), index(duneIndex)
    \n+
    40 { }
    \n+
    41
    \n+
    43 Corner() { }
    \n+
    44
    \n+
    46 const Cell& cell() const { return *cell_; }
    \n+
    48
    \n+
    52 void cell(const Cell& cell__) { cell_ = &cell__; index = 0; }
    \n+
    53
    \n+
    55 unsigned duneIndex() const { return index; }
    \n+
    57 void duneIndex(unsigned i) { index = i; }
    \n+
    58
    \n+
    60
    \n+
    63 unsigned vtkIndex() const { return renumber(cell_->type(), index); }
    \n+
    65
    \n+
    68 void vtkIndex(unsigned i) { index = renumber(cell_->type(), i); }
    \n+
    69 };
    \n+
    70
    \n+
    71 } // namespace VTK
    \n
    72
    \n
    74
    \n-\n-
    78 flush();
    \n-
    79 }
    \n-
    80 };
    \n-
    81
    \n-\n-
    84 {
    \n-
    85 public:
    \n-
    87 inline RawStream (std::ostream& theStream)
    \n-
    88 : s(theStream)
    \n-
    89 {}
    \n-
    90
    \n-
    92 template<class T>
    \n-
    93 void write (T data)
    \n-
    94 {
    \n-
    95 char* p = reinterpret_cast<char*>(&data);
    \n-
    96 s.write(p,sizeof(T));
    \n-
    97 }
    \n-
    98 private:
    \n-
    99 std::ostream& s;
    \n-
    100 };
    \n-
    101
    \n-
    102} // namespace Dune
    \n-
    103
    \n-
    104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH
    \n-
    Simple base64 encode.
    \n+
    75} // namespace Dune
    \n+
    76
    \n+
    77#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH
    \n+
    Common stuff for the VTKWriter.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    struct representing the three byte text as well as the four 6 bit chunks
    Definition: b64enc.hh:34
    \n-
    void write(char *t)
    Definition: b64enc.hh:60
    \n-
    size_type size
    Definition: b64enc.hh:36
    \n-
    void put(const char c)
    Definition: b64enc.hh:54
    \n-
    void reset()
    Definition: b64enc.hh:39
    \n-
    class to base64 encode a stream of data
    Definition: streams.hh:16
    \n-
    void write(X &data)
    encode a data item
    Definition: streams.hh:42
    \n-
    void flush()
    flush the current unwritten data to the stream.
    Definition: streams.hh:64
    \n-
    Base64Stream(std::ostream &s_)
    Construct a Base64Stream.
    Definition: streams.hh:27
    \n-
    ~Base64Stream()
    destroy the object
    Definition: streams.hh:77
    \n-
    write out data in binary
    Definition: streams.hh:84
    \n-
    void write(T data)
    write data to stream
    Definition: streams.hh:93
    \n-
    RawStream(std::ostream &theStream)
    make a new stream
    Definition: streams.hh:87
    \n+
    int renumber(const Dune::GeometryType &t, int i)
    renumber VTK <-> Dune
    Definition: common.hh:186
    \n+
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n+
    unsigned vtkIndex() const
    get the index of the corner within the cell in VTK-numbering
    Definition: corner.hh:63
    \n+
    void vtkIndex(unsigned i)
    set the index of the corner within the cell in VTK-numbering
    Definition: corner.hh:68
    \n+
    Corner(const Cell &cell, unsigned duneIndex)
    construct a Corner
    Definition: corner.hh:38
    \n+
    void cell(const Cell &cell__)
    set a new cell
    Definition: corner.hh:52
    \n+
    void duneIndex(unsigned i)
    set the index of the corner within the cell in Dune-numbering
    Definition: corner.hh:57
    \n+
    unsigned duneIndex() const
    get the index of the corner within the cell in Dune-numbering
    Definition: corner.hh:55
    \n+
    const Cell & cell() const
    get reference to the cell
    Definition: corner.hh:46
    \n+
    Corner()
    construct an invalid Corner
    Definition: corner.hh:43
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,143 +7,107 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-streams.hh\n+corner.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_STREAMS_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_STREAMS_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH\n 8\n- 9#include \n+ 9#include \n 10\n- 11#include \n- 12\n- 13namespace Dune {\n- 14\n-16 class Base64Stream {\n- 17 std::ostream& s;\n- 18 b64chunk chunk;\n- 19 char obuf[4];\n- 20\n- 21 public:\n- 23\n-27 Base64Stream(std::ostream& s_)\n- 28 : s(s_)\n- 29 {\n- 30 // reset chunk\n- 31 chunk.reset();\n- 32 }\n+ 11namespace Dune\n+ 12{\n+ 15\n+ 16 namespace VTK {\n+ 17\n+ 19\n+ 24 template\n+25 class Corner {\n+ 26 // store a pointer to the element\n+ 27 const Cell* cell_;\n+ 28 // store index of the corner within element (Dune numbering)\n+ 29 unsigned index;\n+ 30\n+ 31 public:\n 33\n- 35\n- 41 template \n-42 void write(X & data)\n- 43 {\n- 44 char* p = reinterpret_cast(&data);\n- 45 for (size_t len = sizeof(X); len > 0; len--,p++)\n- 46 {\n- 47 chunk.put(*p);\n- 48 if (chunk.size == 3)\n- 49 {\n- 50 chunk.write(obuf);\n- 51 s.write(obuf,4);\n- 52 }\n- 53 }\n- 54 }\n- 55\n- 57\n-64 void flush()\n- 65 {\n- 66 if (chunk.size > 0)\n- 67 {\n- 68 chunk.write(obuf);\n- 69 s.write(obuf,4);\n- 70 }\n- 71 }\n+38 Corner(const Cell& cell, unsigned duneIndex)\n+ 39 : cell_(&cell), index(duneIndex)\n+ 40 { }\n+ 41\n+43 Corner() { }\n+ 44\n+46 const Cell& cell() const { return *cell_; }\n+ 48\n+52 void cell(const Cell& cell__) { cell_ = &cell__; index = 0; }\n+ 53\n+55 unsigned duneIndex() const { return index; }\n+57 void duneIndex(unsigned i) { index = i; }\n+ 58\n+ 60\n+63 unsigned vtkIndex() const { return renumber(cell_->type(), index); }\n+ 65\n+68 void vtkIndex(unsigned i) { index = renumber(cell_->type(), i); }\n+ 69 };\n+ 70\n+ 71 } // namespace VTK\n 72\n 74\n-77 ~Base64Stream() {\n- 78 flush();\n- 79 }\n- 80 };\n- 81\n-83 class RawStream\n- 84 {\n- 85 public:\n-87 inline RawStream (std::ostream& theStream)\n- 88 : s(theStream)\n- 89 {}\n- 90\n- 92 template\n-93 void write (T data)\n- 94 {\n- 95 char* p = reinterpret_cast(&data);\n- 96 s.write(p,sizeof(T));\n- 97 }\n- 98 private:\n- 99 std::ostream& s;\n- 100 };\n- 101\n- 102} // namespace Dune\n- 103\n- 104#endif // DUNE_GRID_IO_FILE_VTK_STREAMS_HH\n-b64enc.hh\n-Simple base64 encode.\n+ 75} // namespace Dune\n+ 76\n+ 77#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH\n+common.hh\n+Common stuff for the VTKWriter.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::b64chunk\n-struct representing the three byte text as well as the four 6 bit chunks\n-Definition: b64enc.hh:34\n-Dune::b64chunk::write\n-void write(char *t)\n-Definition: b64enc.hh:60\n-Dune::b64chunk::size\n-size_type size\n-Definition: b64enc.hh:36\n-Dune::b64chunk::put\n-void put(const char c)\n-Definition: b64enc.hh:54\n-Dune::b64chunk::reset\n-void reset()\n-Definition: b64enc.hh:39\n-Dune::Base64Stream\n-class to base64 encode a stream of data\n-Definition: streams.hh:16\n-Dune::Base64Stream::write\n-void write(X &data)\n-encode a data item\n-Definition: streams.hh:42\n-Dune::Base64Stream::flush\n-void flush()\n-flush the current unwritten data to the stream.\n-Definition: streams.hh:64\n-Dune::Base64Stream::Base64Stream\n-Base64Stream(std::ostream &s_)\n-Construct a Base64Stream.\n-Definition: streams.hh:27\n-Dune::Base64Stream::~Base64Stream\n-~Base64Stream()\n-destroy the object\n-Definition: streams.hh:77\n-Dune::RawStream\n-write out data in binary\n-Definition: streams.hh:84\n-Dune::RawStream::write\n-void write(T data)\n-write data to stream\n-Definition: streams.hh:93\n-Dune::RawStream::RawStream\n-RawStream(std::ostream &theStream)\n-make a new stream\n-Definition: streams.hh:87\n+Dune::VTK::renumber\n+int renumber(const Dune::GeometryType &t, int i)\n+renumber VTK <-> Dune\n+Definition: common.hh:186\n+Dune::VTK::Corner\n+simple class representing a corner of a cell\n+Definition: corner.hh:25\n+Dune::VTK::Corner::vtkIndex\n+unsigned vtkIndex() const\n+get the index of the corner within the cell in VTK-numbering\n+Definition: corner.hh:63\n+Dune::VTK::Corner::vtkIndex\n+void vtkIndex(unsigned i)\n+set the index of the corner within the cell in VTK-numbering\n+Definition: corner.hh:68\n+Dune::VTK::Corner::Corner\n+Corner(const Cell &cell, unsigned duneIndex)\n+construct a Corner\n+Definition: corner.hh:38\n+Dune::VTK::Corner::cell\n+void cell(const Cell &cell__)\n+set a new cell\n+Definition: corner.hh:52\n+Dune::VTK::Corner::duneIndex\n+void duneIndex(unsigned i)\n+set the index of the corner within the cell in Dune-numbering\n+Definition: corner.hh:57\n+Dune::VTK::Corner::duneIndex\n+unsigned duneIndex() const\n+get the index of the corner within the cell in Dune-numbering\n+Definition: corner.hh:55\n+Dune::VTK::Corner::cell\n+const Cell & cell() const\n+get reference to the cell\n+Definition: corner.hh:46\n+Dune::VTK::Corner::Corner\n+Corner()\n+construct an invalid Corner\n+Definition: corner.hh:43\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00791.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00791.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundaryiterators.hh File Reference\n+dune-grid: corneriterator.hh File Reference\n \n \n \n \n \n \n \n@@ -65,50 +65,39 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    boundaryiterators.hh File Reference
    \n+
    corneriterator.hh File Reference
    \n
    \n
    \n-\n-

    Functions for VTK output on the skeleton. \n-More...

    \n
    #include <iterator>
    \n-#include <memory>
    \n #include <dune/common/iteratorfacades.hh>
    \n-#include <dune/grid/io/file/vtk/corner.hh>
    \n-#include <dune/grid/io/file/vtk/corneriterator.hh>
    \n-#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n+#include <dune/common/typetraits.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid/io/file/vtk/corner.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::VTK::BoundaryIterator< GV >
     iterate over the GridViews boundary intersections More...
     
    class  Dune::VTK::IntersectionIndexSet< ElementIndexSet >
     
    class  Dune::VTK::NonConformingBoundaryIteratorFactory< GV >
    class  Dune::VTK::CornerIterator< CellIterator >
     iterate over the corners of some cell range More...
     
    \n \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-

    Detailed Description

    \n-

    Functions for VTK output on the skeleton.

    \n-
    Author
    J\u00f6 Fahlke
    \n-
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-utf-8\n+us-ascii\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,38 +8,27 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-boundaryiterators.hh File Reference\n-dune-grid \u00bb I/O \u00bb Visualization_ToolKit_(VTK)\n-Functions for VTK output on the skeleton. More...\n+corneriterator.hh File Reference\n #include \n-#include \n #include \n+#include \n+#include \n #include \n-#include \n-#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::BoundaryIterator<_GV_>\n-\u00a0 iterate over the GridViews boundary intersections More...\n-\u00a0\n-class \u00a0Dune::VTK::IntersectionIndexSet<_ElementIndexSet_>\n-\u00a0\n-class \u00a0Dune::VTK::NonConformingBoundaryIteratorFactory<_GV_>\n+class \u00a0Dune::VTK::CornerIterator<_CellIterator_>\n+\u00a0 iterate over the corners of some cell range More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::VTK\n \u00a0\n-***** Detailed Description *****\n-Functions for VTK output on the skeleton.\n- Author\n- J\u00f6 Fahlke\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00791_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundaryiterators.hh Source File\n+dune-grid: corneriterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,245 +62,152 @@\n \n \n \n
    \n-
    boundaryiterators.hh
    \n+
    corneriterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
    \n
    8
    \n
    9#include <iterator>
    \n-
    10#include <memory>
    \n-
    11
    \n-
    12#include <dune/common/iteratorfacades.hh>
    \n+
    10
    \n+
    11#include <dune/common/iteratorfacades.hh>
    \n+
    12#include <dune/common/typetraits.hh>
    \n
    13
    \n-\n-\n-\n+
    14#include <dune/geometry/referenceelements.hh>
    \n+
    15
    \n+\n
    17
    \n-
    18namespace Dune {
    \n-
    19
    \n+
    18namespace Dune
    \n+
    19{
    \n
    22
    \n-
    28 namespace VTK {
    \n-
    29
    \n-
    31
    \n-
    35 template<typename GV>
    \n-\n-
    37 : public ForwardIteratorFacade
    \n-
    38 < BoundaryIterator<GV>,
    \n-
    39 const typename GV::Intersection,
    \n-
    40 const typename GV::Intersection&,
    \n-
    41 typename std::iterator_traits<typename GV::template Codim<0>::
    \n-
    42 Iterator>::difference_type>
    \n-
    43 {
    \n-
    44 public:
    \n-
    45 // reiterator the facades typedefs here
    \n-\n-
    47 typedef const typename GV::Intersection Value;
    \n-
    48 typedef Value& Reference;
    \n-
    49 typedef typename GV::template Codim<0>::Iterator ElementIterator;
    \n-
    50 typedef typename GV::IntersectionIterator IntersectionIterator;
    \n-
    51 typedef typename std::iterator_traits<ElementIterator>::difference_type
    \n-\n-
    53
    \n-
    54 private:
    \n-
    55 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
    \n-
    56 DifferenceType> Facade;
    \n-
    57
    \n-
    58 const GV* gv;
    \n-\n-
    60 std::shared_ptr<IntersectionIterator> iit;
    \n-
    61
    \n-
    62 bool valid() const {
    \n-
    63 // we're valid if we're passed-the-end
    \n-
    64 if(eit == gv->template end<0>()) return true;
    \n-
    65 // or if we're on a boundary
    \n-
    66 if((*iit)->boundary() && !(*iit)->neighbor()) return true;
    \n-
    67 // otherwise we're invalid
    \n-
    68 return false;
    \n-
    69 }
    \n-
    70
    \n-
    71 void basic_increment() {
    \n-
    72 ++*iit;
    \n-
    73 if(*iit == gv->iend(*eit)) {
    \n-
    74 iit.reset();
    \n-
    75 ++eit;
    \n-
    76 if(eit != gv->template end<0>())
    \n-
    77 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
    \n-
    78 }
    \n-
    79 }
    \n-
    80
    \n-
    81 public:
    \n-\n-
    83 return **iit;
    \n-
    84 }
    \n-
    85 bool equals(const DerivedType& other) const {
    \n-
    86 if(eit != other.eit) return false;
    \n-
    87
    \n-
    88 // this is a bit tricky, since we may not compare iit if we are
    \n-
    89 // passed-the-end
    \n-
    90 bool mePassedTheEnd = eit == gv->template end<0>();
    \n-
    91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();
    \n-
    92
    \n-
    93 // both passed-the-end => consider them equal
    \n-
    94 if(mePassedTheEnd && otherPassedTheEnd) return true;
    \n-
    95
    \n-
    96 // one passed the end => not equal
    \n-
    97 if(mePassedTheEnd || otherPassedTheEnd) return false;
    \n+
    23 namespace VTK {
    \n+
    24
    \n+
    26
    \n+
    30 template<typename CellIterator>
    \n+\n+
    32 : public ForwardIteratorFacade
    \n+
    33 < CornerIterator<CellIterator>,
    \n+
    34 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n+
    35 CellIterator>::value_type>::type>,
    \n+
    36 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n+
    37 CellIterator>::value_type>::type>&,
    \n+
    38 typename std::iterator_traits<CellIterator>::difference_type>
    \n+
    39 {
    \n+
    40 public:
    \n+
    41 // reiterate the facades typedefs here
    \n+\n+
    43 typedef VTK::Corner<typename std::remove_const<typename std::iterator_traits<
    \n+
    44 CellIterator>::value_type>::type> Corner;
    \n+
    45 typedef const Corner Value;
    \n+
    46 typedef Value& Reference;
    \n+
    47 typedef typename std::iterator_traits<CellIterator>::difference_type
    \n+\n+
    49
    \n+
    50 typedef typename std::iterator_traits<CellIterator>::value_type::Geometry::ctype
    \n+\n+
    52 static const unsigned dim = std::iterator_traits<CellIterator>::
    \n+
    53 value_type::mydimension;
    \n+
    54 typedef ReferenceElements<ctype, dim> Refelems;
    \n+
    55
    \n+
    56 private:
    \n+
    57 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
    \n+
    58 DifferenceType> Facade;
    \n+
    59
    \n+
    60 CellIterator cellit;
    \n+
    61 CellIterator cellend;
    \n+
    62 Corner corner;
    \n+
    63
    \n+
    64 public:
    \n+\n+
    66 return corner;
    \n+
    67 }
    \n+
    68
    \n+
    69 bool isDereferencable() const {
    \n+
    70 return cellit != cellend;
    \n+
    71 }
    \n+
    72
    \n+
    73 bool equals(const DerivedType& other) const {
    \n+
    74 bool mePassedTheEnd = !isDereferencable();
    \n+
    75 bool otherPassedTheEnd = !other.isDereferencable();
    \n+
    76 // both are passed the end => return true
    \n+
    77 if(mePassedTheEnd && otherPassedTheEnd) return true;
    \n+
    78 // one is passed the end => return false
    \n+
    79 if(mePassedTheEnd || otherPassedTheEnd) return false;
    \n+
    80 // none is passed the end, do their iterators and indices match?
    \n+
    81 return cellit == other.cellit &&
    \n+
    82 corner.duneIndex() == other.corner.duneIndex();
    \n+
    83 }
    \n+
    84
    \n+
    85 void increment() {
    \n+
    86 int index = corner.vtkIndex();
    \n+
    87 ++index;
    \n+
    88 if(index == Refelems::general(cellit->type()).size(dim)) {
    \n+
    89 ++cellit;
    \n+
    90 if(cellit != cellend) {
    \n+
    91 corner.cell(*cellit);
    \n+
    92 corner.vtkIndex(0);
    \n+
    93 }
    \n+
    94 }
    \n+
    95 else
    \n+
    96 corner.vtkIndex(index);
    \n+
    97 }
    \n
    98
    \n-
    99 // none passed-the-end => do their iit iterators match?
    \n-
    100 return *iit == *other.iit;
    \n-
    101 }
    \n-
    102
    \n-
    103 void increment() {
    \n-
    104 basic_increment();
    \n-
    105 while(!valid()) basic_increment();
    \n-
    106 }
    \n-
    107
    \n-
    109
    \n-
    113 BoundaryIterator(const GV& gv_, const ElementIterator& eit_,
    \n-
    114 const IntersectionIterator& iit_)
    \n-
    115 : gv(&gv_), eit(eit_), iit(new IntersectionIterator(iit_))
    \n-
    116 {
    \n-
    117 while(!valid()) basic_increment();
    \n-
    118 }
    \n-
    120
    \n-
    125 BoundaryIterator(const GV& gv_, const ElementIterator& eit_)
    \n-
    126 : gv(&gv_), eit(eit_)
    \n-
    127 {
    \n-
    128 if(eit != gv->template end<0>())
    \n-
    129 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
    \n-
    130
    \n-
    131 while(!valid()) basic_increment();
    \n-
    132 }
    \n-
    134
    \n-
    138 BoundaryIterator(const GV& gv_, bool end = false)
    \n-
    139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())
    \n-
    140 {
    \n-
    141 if(eit != gv->template end<0>())
    \n-
    142 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
    \n-
    143
    \n-
    144 while(!valid()) basic_increment();
    \n-
    145 }
    \n-
    146 };
    \n-
    147
    \n-
    148 template<typename ElementIndexSet>
    \n-\n-
    150 const ElementIndexSet& eis;
    \n-
    151
    \n-
    152 public:
    \n-
    153 IntersectionIndexSet(const ElementIndexSet& eis_)
    \n-
    154 : eis(eis_)
    \n-
    155 { }
    \n-
    156 };
    \n-
    157
    \n-
    158 template<typename GV>
    \n-\n-
    160 const GV& gv;
    \n-
    161
    \n-
    162 public:
    \n-
    163 static const unsigned dimCell = GV::dimension-1;
    \n-
    164
    \n-
    165 typedef typename GV::Intersection Cell;
    \n-\n-
    167
    \n-\n-\n-
    170
    \n-
    171 typedef Corner Point;
    \n-\n-
    173
    \n-\n-
    175 typedef typename GV::Communication Communication;
    \n-
    176
    \n-\n-
    178 : gv(gv_)
    \n-
    179 { }
    \n-
    180
    \n-\n-
    182 return CellIterator(gv);
    \n-
    183 }
    \n-\n-
    185 return CellIterator(gv, true);
    \n-
    186 }
    \n-
    187
    \n-\n-\n-
    190 }
    \n-\n-
    192 return CornerIterator(endCells());
    \n-
    193 }
    \n-
    194
    \n-\n-
    196 PointIterator endPoints() const { return endCorners(); }
    \n-
    197
    \n-\n-
    199 return ConnectivityWriter();
    \n-
    200 }
    \n-
    201 const Communication& comm() const {
    \n-
    202 return gv.comm();
    \n-
    203 }
    \n-
    204 };
    \n-
    205
    \n-
    206 } // namespace VTK
    \n-
    207
    \n-
    209
    \n-
    210} // namespace Dune
    \n-
    211
    \n-
    212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
    \n-\n-\n-\n+
    100
    \n+
    105 CornerIterator(const CellIterator& cellit_, const CellIterator& cellend_,
    \n+
    106 unsigned vtkIndex = 0)
    \n+
    107 : cellit(cellit_), cellend(cellend_)
    \n+
    108 {
    \n+
    109 if(cellit != cellend) {
    \n+
    110 corner.cell(*cellit);
    \n+
    111 corner.vtkIndex(vtkIndex);
    \n+
    112 }
    \n+
    113 }
    \n+
    115
    \n+
    118 CornerIterator(const CellIterator& cellend_)
    \n+
    119 : cellit(cellend_), cellend(cellend_)
    \n+
    120 { }
    \n+
    121 };
    \n+
    122
    \n+
    123 } // namespace VTK
    \n+
    124
    \n+
    126
    \n+
    127} // namespace Dune
    \n+
    128
    \n+
    129#endif // DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    iterate over the GridViews boundary intersections
    Definition: boundaryiterators.hh:43
    \n-
    BoundaryIterator< GV > DerivedType
    Definition: boundaryiterators.hh:46
    \n-
    BoundaryIterator(const GV &gv_, const ElementIterator &eit_)
    construct a BoundaryIterator
    Definition: boundaryiterators.hh:125
    \n-
    Reference dereference() const
    Definition: boundaryiterators.hh:82
    \n-
    const GV::Intersection Value
    Definition: boundaryiterators.hh:47
    \n-
    BoundaryIterator(const GV &gv_, bool end=false)
    construct a BoundaryIterator
    Definition: boundaryiterators.hh:138
    \n-
    BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const IntersectionIterator &iit_)
    construct a BoundaryIterator
    Definition: boundaryiterators.hh:113
    \n-
    GV::template Codim< 0 >::Iterator ElementIterator
    Definition: boundaryiterators.hh:49
    \n-
    Value & Reference
    Definition: boundaryiterators.hh:48
    \n-
    GV::IntersectionIterator IntersectionIterator
    Definition: boundaryiterators.hh:50
    \n-
    bool equals(const DerivedType &other) const
    Definition: boundaryiterators.hh:85
    \n-
    std::iterator_traits< ElementIterator >::difference_type DifferenceType
    Definition: boundaryiterators.hh:52
    \n-
    void increment()
    Definition: boundaryiterators.hh:103
    \n-
    Definition: boundaryiterators.hh:149
    \n-
    IntersectionIndexSet(const ElementIndexSet &eis_)
    Definition: boundaryiterators.hh:153
    \n-
    Definition: boundaryiterators.hh:159
    \n-
    PointIterator beginPoints() const
    Definition: boundaryiterators.hh:195
    \n-
    ConnectivityWriter makeConnectivity() const
    Definition: boundaryiterators.hh:198
    \n-
    GV::Communication Communication
    Definition: boundaryiterators.hh:175
    \n-
    static const unsigned dimCell
    Definition: boundaryiterators.hh:163
    \n-
    VTK::CornerIterator< CellIterator > CornerIterator
    Definition: boundaryiterators.hh:169
    \n-
    BoundaryIterator< GV > CellIterator
    Definition: boundaryiterators.hh:166
    \n-
    Corner Point
    Definition: boundaryiterators.hh:171
    \n-
    CornerIterator beginCorners() const
    Definition: boundaryiterators.hh:188
    \n-
    CellIterator beginCells() const
    Definition: boundaryiterators.hh:181
    \n-
    NonConformingConnectivityWriter< Cell > ConnectivityWriter
    Definition: boundaryiterators.hh:174
    \n-
    CornerIterator endCorners() const
    Definition: boundaryiterators.hh:191
    \n-
    VTK::Corner< Cell > Corner
    Definition: boundaryiterators.hh:168
    \n-
    GV::Intersection Cell
    Definition: boundaryiterators.hh:165
    \n-
    CornerIterator PointIterator
    Definition: boundaryiterators.hh:172
    \n-
    NonConformingBoundaryIteratorFactory(const GV &gv_)
    Definition: boundaryiterators.hh:177
    \n-
    CellIterator endCells() const
    Definition: boundaryiterators.hh:184
    \n-
    const Communication & comm() const
    Definition: boundaryiterators.hh:201
    \n-
    PointIterator endPoints() const
    Definition: boundaryiterators.hh:196
    \n
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n+
    unsigned vtkIndex() const
    get the index of the corner within the cell in VTK-numbering
    Definition: corner.hh:63
    \n+
    unsigned duneIndex() const
    get the index of the corner within the cell in Dune-numbering
    Definition: corner.hh:55
    \n+
    const Cell & cell() const
    get reference to the cell
    Definition: corner.hh:46
    \n
    iterate over the corners of some cell range
    Definition: corneriterator.hh:39
    \n-
    writer for the connectivity array in nonconforming mode
    Definition: functionwriter.hh:261
    \n+
    Value & Reference
    Definition: corneriterator.hh:46
    \n+
    VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
    Definition: corneriterator.hh:44
    \n+
    void increment()
    Definition: corneriterator.hh:85
    \n+
    Reference dereference() const
    Definition: corneriterator.hh:65
    \n+
    std::iterator_traits< CellIterator >::difference_type DifferenceType
    Definition: corneriterator.hh:48
    \n+
    static const unsigned dim
    Definition: corneriterator.hh:52
    \n+
    ReferenceElements< ctype, dim > Refelems
    Definition: corneriterator.hh:54
    \n+
    const Corner Value
    Definition: corneriterator.hh:45
    \n+
    CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_, unsigned vtkIndex=0)
    construct a CornerIterator
    Definition: corneriterator.hh:105
    \n+
    CornerIterator(const CellIterator &cellend_)
    construct a CornerIterator
    Definition: corneriterator.hh:118
    \n+
    bool equals(const DerivedType &other) const
    Definition: corneriterator.hh:73
    \n+
    CornerIterator< CellIterator > DerivedType
    Definition: corneriterator.hh:42
    \n+
    std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype
    Definition: corneriterator.hh:51
    \n+
    bool isDereferencable() const
    Definition: corneriterator.hh:69
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,320 +7,197 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-boundaryiterators.hh\n+corneriterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH\n 8\n 9#include \n- 10#include \n- 11\n- 12#include \n+ 10\n+ 11#include \n+ 12#include \n 13\n- 14#include \n- 15#include \n- 16#include \n+ 14#include \n+ 15\n+ 16#include \n 17\n- 18namespace Dune {\n- 19\n+ 18namespace Dune\n+ 19{\n 22\n- 28 namespace VTK {\n- 29\n- 31\n- 35 template\n-36 class BoundaryIterator\n- 37 : public ForwardIteratorFacade\n- 38 < BoundaryIterator,\n- 39 const typename GV::Intersection,\n- 40 const typename GV::Intersection&,\n- 41 typename std::iterator_traits::\n- 42 Iterator>::difference_type>\n- 43 {\n- 44 public:\n- 45 // reiterator the facades typedefs here\n-46 typedef BoundaryIterator DerivedType;\n-47 typedef const typename GV::Intersection Value;\n-48 typedef Value& Reference;\n-49 typedef typename GV::template Codim<0>::Iterator ElementIterator;\n-50 typedef typename GV::IntersectionIterator IntersectionIterator;\n- 51 typedef typename std::iterator_traits::difference_type\n-52 DifferenceType;\n- 53\n- 54 private:\n- 55 typedef ForwardIteratorFacade Facade;\n- 57\n- 58 const GV* gv;\n- 59 ElementIterator eit;\n- 60 std::shared_ptr iit;\n- 61\n- 62 bool valid() const {\n- 63 // we're valid if we're passed-the-end\n- 64 if(eit == gv->template end<0>()) return true;\n- 65 // or if we're on a boundary\n- 66 if((*iit)->boundary() && !(*iit)->neighbor()) return true;\n- 67 // otherwise we're invalid\n- 68 return false;\n- 69 }\n- 70\n- 71 void basic_increment() {\n- 72 ++*iit;\n- 73 if(*iit == gv->iend(*eit)) {\n- 74 iit.reset();\n- 75 ++eit;\n- 76 if(eit != gv->template end<0>())\n- 77 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));\n- 78 }\n- 79 }\n- 80\n- 81 public:\n-82 Reference dereference() const {\n- 83 return **iit;\n- 84 }\n-85 bool equals(const DerivedType& other) const {\n- 86 if(eit != other.eit) return false;\n- 87\n- 88 // this is a bit tricky, since we may not compare iit if we are\n- 89 // passed-the-end\n- 90 bool mePassedTheEnd = eit == gv->template end<0>();\n- 91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();\n- 92\n- 93 // both passed-the-end => consider them equal\n- 94 if(mePassedTheEnd && otherPassedTheEnd) return true;\n- 95\n- 96 // one passed the end => not equal\n- 97 if(mePassedTheEnd || otherPassedTheEnd) return false;\n+ 23 namespace VTK {\n+ 24\n+ 26\n+ 30 template\n+31 class CornerIterator\n+ 32 : public ForwardIteratorFacade\n+ 33 < CornerIterator,\n+ 34 const Corner::value_type>::type>,\n+ 36 const Corner::value_type>::type>&,\n+ 38 typename std::iterator_traits::difference_type>\n+ 39 {\n+ 40 public:\n+ 41 // reiterate the facades typedefs here\n+42 typedef CornerIterator DerivedType;\n+ 43 typedef VTK::Corner::value_type>::type> Corner;\n+45 typedef const Corner Value;\n+46 typedef Value& Reference;\n+ 47 typedef typename std::iterator_traits::difference_type\n+48 DifferenceType;\n+ 49\n+ 50 typedef typename std::iterator_traits::value_type::Geometry::\n+ctype\n+51 ctype;\n+52 static const unsigned dim = std::iterator_traits::\n+ 53 value_type::mydimension;\n+54 typedef ReferenceElements Refelems;\n+ 55\n+ 56 private:\n+ 57 typedef ForwardIteratorFacade Facade;\n+ 59\n+ 60 CellIterator cellit;\n+ 61 CellIterator cellend;\n+ 62 Corner corner;\n+ 63\n+ 64 public:\n+65 Reference dereference() const {\n+ 66 return corner;\n+ 67 }\n+ 68\n+69 bool isDereferencable() const {\n+ 70 return cellit != cellend;\n+ 71 }\n+ 72\n+73 bool equals(const DerivedType& other) const {\n+ 74 bool mePassedTheEnd = !isDereferencable();\n+ 75 bool otherPassedTheEnd = !other.isDereferencable();\n+ 76 // both are passed the end => return true\n+ 77 if(mePassedTheEnd && otherPassedTheEnd) return true;\n+ 78 // one is passed the end => return false\n+ 79 if(mePassedTheEnd || otherPassedTheEnd) return false;\n+ 80 // none is passed the end, do their iterators and indices match?\n+ 81 return cellit == other.cellit &&\n+ 82 corner.duneIndex() == other.corner.duneIndex();\n+ 83 }\n+ 84\n+85 void increment() {\n+ 86 int index = corner.vtkIndex();\n+ 87 ++index;\n+ 88 if(index == Refelems::general(cellit->type()).size(dim)) {\n+ 89 ++cellit;\n+ 90 if(cellit != cellend) {\n+ 91 corner.cell(*cellit);\n+ 92 corner.vtkIndex(0);\n+ 93 }\n+ 94 }\n+ 95 else\n+ 96 corner.vtkIndex(index);\n+ 97 }\n 98\n- 99 // none passed-the-end => do their iit iterators match?\n- 100 return *iit == *other.iit;\n- 101 }\n- 102\n-103 void increment() {\n- 104 basic_increment();\n- 105 while(!valid()) basic_increment();\n- 106 }\n- 107\n- 109\n-113 BoundaryIterator(const GV& gv_, const ElementIterator& eit_,\n- 114 const IntersectionIterator& iit_)\n- 115 : gv(&gv_), eit(eit_), iit(new IntersectionIterator(iit_))\n- 116 {\n- 117 while(!valid()) basic_increment();\n- 118 }\n- 120\n-125 BoundaryIterator(const GV& gv_, const ElementIterator& eit_)\n- 126 : gv(&gv_), eit(eit_)\n- 127 {\n- 128 if(eit != gv->template end<0>())\n- 129 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));\n- 130\n- 131 while(!valid()) basic_increment();\n- 132 }\n- 134\n-138 BoundaryIterator(const GV& gv_, bool end = false)\n- 139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())\n- 140 {\n- 141 if(eit != gv->template end<0>())\n- 142 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));\n- 143\n- 144 while(!valid()) basic_increment();\n- 145 }\n- 146 };\n- 147\n- 148 template\n-149 class IntersectionIndexSet {\n- 150 const ElementIndexSet& eis;\n- 151\n- 152 public:\n-153 IntersectionIndexSet(const ElementIndexSet& eis_)\n- 154 : eis(eis_)\n- 155 { }\n- 156 };\n- 157\n- 158 template\n-159 class NonConformingBoundaryIteratorFactory {\n- 160 const GV& gv;\n- 161\n- 162 public:\n-163 static const unsigned dimCell = GV::dimension-1;\n- 164\n-165 typedef typename GV::Intersection Cell;\n-166 typedef BoundaryIterator CellIterator;\n- 167\n-168 typedef VTK::Corner Corner;\n-169 typedef VTK::CornerIterator CornerIterator;\n- 170\n-171 typedef Corner Point;\n-172 typedef CornerIterator PointIterator;\n- 173\n-174 typedef NonConformingConnectivityWriter ConnectivityWriter;\n-175 typedef typename GV::Communication Communication;\n- 176\n-177 explicit NonConformingBoundaryIteratorFactory(const GV& gv_)\n- 178 : gv(gv_)\n- 179 { }\n- 180\n-181 CellIterator beginCells() const {\n- 182 return CellIterator(gv);\n- 183 }\n-184 CellIterator endCells() const {\n- 185 return CellIterator(gv, true);\n- 186 }\n- 187\n-188 CornerIterator beginCorners() const {\n- 189 return CornerIterator(beginCells(), endCells());\n- 190 }\n-191 CornerIterator endCorners() const {\n- 192 return CornerIterator(endCells());\n- 193 }\n- 194\n-195 PointIterator beginPoints() const { return beginCorners(); }\n-196 PointIterator endPoints() const { return endCorners(); }\n- 197\n-198 ConnectivityWriter makeConnectivity() const {\n- 199 return ConnectivityWriter();\n- 200 }\n-201 const Communication& comm() const {\n- 202 return gv.comm();\n- 203 }\n- 204 };\n- 205\n- 206 } // namespace VTK\n- 207\n- 209\n- 210} // namespace Dune\n- 211\n- 212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH\n-corneriterator.hh\n+ 100\n+105 CornerIterator(const CellIterator& cellit_, const CellIterator& cellend_,\n+ 106 unsigned vtkIndex = 0)\n+ 107 : cellit(cellit_), cellend(cellend_)\n+ 108 {\n+ 109 if(cellit != cellend) {\n+ 110 corner.cell(*cellit);\n+ 111 corner.vtkIndex(vtkIndex);\n+ 112 }\n+ 113 }\n+ 115\n+118 CornerIterator(const CellIterator& cellend_)\n+ 119 : cellit(cellend_), cellend(cellend_)\n+ 120 { }\n+ 121 };\n+ 122\n+ 123 } // namespace VTK\n+ 124\n+ 126\n+ 127} // namespace Dune\n+ 128\n+ 129#endif // DUNE_GRID_IO_FILE_VTK_CORNERITERATOR_HH\n corner.hh\n-functionwriter.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::BoundaryIterator\n-iterate over the GridViews boundary intersections\n-Definition: boundaryiterators.hh:43\n-Dune::VTK::BoundaryIterator::DerivedType\n-BoundaryIterator< GV > DerivedType\n-Definition: boundaryiterators.hh:46\n-Dune::VTK::BoundaryIterator::BoundaryIterator\n-BoundaryIterator(const GV &gv_, const ElementIterator &eit_)\n-construct a BoundaryIterator\n-Definition: boundaryiterators.hh:125\n-Dune::VTK::BoundaryIterator::dereference\n-Reference dereference() const\n-Definition: boundaryiterators.hh:82\n-Dune::VTK::BoundaryIterator::Value\n-const GV::Intersection Value\n-Definition: boundaryiterators.hh:47\n-Dune::VTK::BoundaryIterator::BoundaryIterator\n-BoundaryIterator(const GV &gv_, bool end=false)\n-construct a BoundaryIterator\n-Definition: boundaryiterators.hh:138\n-Dune::VTK::BoundaryIterator::BoundaryIterator\n-BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const\n-IntersectionIterator &iit_)\n-construct a BoundaryIterator\n-Definition: boundaryiterators.hh:113\n-Dune::VTK::BoundaryIterator::ElementIterator\n-GV::template Codim< 0 >::Iterator ElementIterator\n-Definition: boundaryiterators.hh:49\n-Dune::VTK::BoundaryIterator::Reference\n-Value & Reference\n-Definition: boundaryiterators.hh:48\n-Dune::VTK::BoundaryIterator::IntersectionIterator\n-GV::IntersectionIterator IntersectionIterator\n-Definition: boundaryiterators.hh:50\n-Dune::VTK::BoundaryIterator::equals\n-bool equals(const DerivedType &other) const\n-Definition: boundaryiterators.hh:85\n-Dune::VTK::BoundaryIterator::DifferenceType\n-std::iterator_traits< ElementIterator >::difference_type DifferenceType\n-Definition: boundaryiterators.hh:52\n-Dune::VTK::BoundaryIterator::increment\n-void increment()\n-Definition: boundaryiterators.hh:103\n-Dune::VTK::IntersectionIndexSet\n-Definition: boundaryiterators.hh:149\n-Dune::VTK::IntersectionIndexSet::IntersectionIndexSet\n-IntersectionIndexSet(const ElementIndexSet &eis_)\n-Definition: boundaryiterators.hh:153\n-Dune::VTK::NonConformingBoundaryIteratorFactory\n-Definition: boundaryiterators.hh:159\n-Dune::VTK::NonConformingBoundaryIteratorFactory::beginPoints\n-PointIterator beginPoints() const\n-Definition: boundaryiterators.hh:195\n-Dune::VTK::NonConformingBoundaryIteratorFactory::makeConnectivity\n-ConnectivityWriter makeConnectivity() const\n-Definition: boundaryiterators.hh:198\n-Dune::VTK::NonConformingBoundaryIteratorFactory::Communication\n-GV::Communication Communication\n-Definition: boundaryiterators.hh:175\n-Dune::VTK::NonConformingBoundaryIteratorFactory::dimCell\n-static const unsigned dimCell\n-Definition: boundaryiterators.hh:163\n-Dune::VTK::NonConformingBoundaryIteratorFactory::CornerIterator\n-VTK::CornerIterator< CellIterator > CornerIterator\n-Definition: boundaryiterators.hh:169\n-Dune::VTK::NonConformingBoundaryIteratorFactory::CellIterator\n-BoundaryIterator< GV > CellIterator\n-Definition: boundaryiterators.hh:166\n-Dune::VTK::NonConformingBoundaryIteratorFactory::Point\n-Corner Point\n-Definition: boundaryiterators.hh:171\n-Dune::VTK::NonConformingBoundaryIteratorFactory::beginCorners\n-CornerIterator beginCorners() const\n-Definition: boundaryiterators.hh:188\n-Dune::VTK::NonConformingBoundaryIteratorFactory::beginCells\n-CellIterator beginCells() const\n-Definition: boundaryiterators.hh:181\n-Dune::VTK::NonConformingBoundaryIteratorFactory::ConnectivityWriter\n-NonConformingConnectivityWriter< Cell > ConnectivityWriter\n-Definition: boundaryiterators.hh:174\n-Dune::VTK::NonConformingBoundaryIteratorFactory::endCorners\n-CornerIterator endCorners() const\n-Definition: boundaryiterators.hh:191\n-Dune::VTK::NonConformingBoundaryIteratorFactory::Corner\n-VTK::Corner< Cell > Corner\n-Definition: boundaryiterators.hh:168\n-Dune::VTK::NonConformingBoundaryIteratorFactory::Cell\n-GV::Intersection Cell\n-Definition: boundaryiterators.hh:165\n-Dune::VTK::NonConformingBoundaryIteratorFactory::PointIterator\n-CornerIterator PointIterator\n-Definition: boundaryiterators.hh:172\n-Dune::VTK::NonConformingBoundaryIteratorFactory::\n-NonConformingBoundaryIteratorFactory\n-NonConformingBoundaryIteratorFactory(const GV &gv_)\n-Definition: boundaryiterators.hh:177\n-Dune::VTK::NonConformingBoundaryIteratorFactory::endCells\n-CellIterator endCells() const\n-Definition: boundaryiterators.hh:184\n-Dune::VTK::NonConformingBoundaryIteratorFactory::comm\n-const Communication & comm() const\n-Definition: boundaryiterators.hh:201\n-Dune::VTK::NonConformingBoundaryIteratorFactory::endPoints\n-PointIterator endPoints() const\n-Definition: boundaryiterators.hh:196\n Dune::VTK::Corner\n simple class representing a corner of a cell\n Definition: corner.hh:25\n+Dune::VTK::Corner::vtkIndex\n+unsigned vtkIndex() const\n+get the index of the corner within the cell in VTK-numbering\n+Definition: corner.hh:63\n+Dune::VTK::Corner::duneIndex\n+unsigned duneIndex() const\n+get the index of the corner within the cell in Dune-numbering\n+Definition: corner.hh:55\n+Dune::VTK::Corner::cell\n+const Cell & cell() const\n+get reference to the cell\n+Definition: corner.hh:46\n Dune::VTK::CornerIterator\n iterate over the corners of some cell range\n Definition: corneriterator.hh:39\n-Dune::VTK::NonConformingConnectivityWriter\n-writer for the connectivity array in nonconforming mode\n-Definition: functionwriter.hh:261\n+Dune::VTK::CornerIterator::Reference\n+Value & Reference\n+Definition: corneriterator.hh:46\n+Dune::VTK::CornerIterator::Corner\n+VTK::Corner< typename std::remove_const< typename std::iterator_traits<\n+CellIterator >::value_type >::type > Corner\n+Definition: corneriterator.hh:44\n+Dune::VTK::CornerIterator::increment\n+void increment()\n+Definition: corneriterator.hh:85\n+Dune::VTK::CornerIterator::dereference\n+Reference dereference() const\n+Definition: corneriterator.hh:65\n+Dune::VTK::CornerIterator::DifferenceType\n+std::iterator_traits< CellIterator >::difference_type DifferenceType\n+Definition: corneriterator.hh:48\n+Dune::VTK::CornerIterator::dim\n+static const unsigned dim\n+Definition: corneriterator.hh:52\n+Dune::VTK::CornerIterator::Refelems\n+ReferenceElements< ctype, dim > Refelems\n+Definition: corneriterator.hh:54\n+Dune::VTK::CornerIterator::Value\n+const Corner Value\n+Definition: corneriterator.hh:45\n+Dune::VTK::CornerIterator::CornerIterator\n+CornerIterator(const CellIterator &cellit_, const CellIterator &cellend_,\n+unsigned vtkIndex=0)\n+construct a CornerIterator\n+Definition: corneriterator.hh:105\n+Dune::VTK::CornerIterator::CornerIterator\n+CornerIterator(const CellIterator &cellend_)\n+construct a CornerIterator\n+Definition: corneriterator.hh:118\n+Dune::VTK::CornerIterator::equals\n+bool equals(const DerivedType &other) const\n+Definition: corneriterator.hh:73\n+Dune::VTK::CornerIterator::DerivedType\n+CornerIterator< CellIterator > DerivedType\n+Definition: corneriterator.hh:42\n+Dune::VTK::CornerIterator::ctype\n+std::iterator_traits< CellIterator >::value_type::Geometry::ctype ctype\n+Definition: corneriterator.hh:51\n+Dune::VTK::CornerIterator::isDereferencable\n+bool isDereferencable() const\n+Definition: corneriterator.hh:69\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00794.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00794.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: functionwriter.hh File Reference\n+dune-grid: skeletonfunction.hh File Reference\n \n \n \n \n \n \n \n@@ -65,64 +65,52 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    functionwriter.hh File Reference
    \n+
    skeletonfunction.hh File Reference
    \n
    \n
    \n-
    #include <cstddef>
    \n-#include <memory>
    \n+\n+

    Functions for VTK output on the skeleton. \n+More...

    \n+
    #include <memory>
    \n #include <string>
    \n-#include <typeinfo>
    \n #include <vector>
    \n-#include <dune/common/exceptions.hh>
    \n #include <dune/common/fvector.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/io/file/vtk/common.hh>
    \n-#include <dune/grid/io/file/vtk/dataarraywriter.hh>
    \n-#include <dune/grid/io/file/vtk/pvtuwriter.hh>
    \n-#include <dune/grid/io/file/vtk/vtuwriter.hh>
    \n+#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n+#include <dune/grid/io/file/vtk/pvtuwriter.hh>
    \n+#include <dune/grid/io/file/vtk/vtuwriter.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n

    \n 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...
    struct  Dune::VTK::SkeletonFunctionTraits< GV, RF >
     
    class  Dune::VTK::OffsetsWriter< Cell >
     writer for the offsets array More...
    class  Dune::VTK::SkeletonFunctionInterface< GV, RF >
     A prototype for VTKFunctions on the skeleton. More...
     
    class  Dune::VTK::TypesWriter< Cell >
     writer for the types array More...
    class  Dune::VTK::SkeletonFunctionWriter< Func >
     function writer for skeleton functions More...
     
    \n \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-
    \n+

    Detailed Description

    \n+

    Functions for VTK output on the skeleton.

    \n+
    Author
    J\u00f6 Fahlke
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-us-ascii\n+utf-8\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,52 +8,40 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-functionwriter.hh File Reference\n-#include \n+skeletonfunction.hh File Reference\n+dune-grid \u00bb I/O \u00bb Visualization_ToolKit_(VTK)\n+Functions for VTK output on the skeleton. More...\n #include \n #include \n-#include \n #include \n-#include \n #include \n-#include \n-#include \n-#include \n+#include \n #include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::FunctionWriterBase<_Cell__>\n-\u00a0 Base class for function writers. More...\n+struct \u00a0Dune::VTK::SkeletonFunctionTraits<_GV,_RF_>\n \u00a0\n-class \u00a0Dune::VTK::VTKFunctionWriter<_Func_>\n-\u00a0 Base class for function writers. More...\n+ class \u00a0Dune::VTK::SkeletonFunctionInterface<_GV,_RF_>\n+\u00a0 A prototype for VTKFunctions on the skeleton. More...\n \u00a0\n-class \u00a0Dune::VTK::CoordinatesWriter<_Cell_>\n-\u00a0 writer for the Coordinates array More...\n-\u00a0\n-class \u00a0Dune::VTK::ConformingConnectivityWriter<_IteratorFactory_>\n-\u00a0 writer for the connectivity array in conforming mode More...\n-\u00a0\n-class \u00a0Dune::VTK::NonConformingConnectivityWriter<_Cell_>\n-\u00a0 writer for the connectivity array in nonconforming mode More...\n-\u00a0\n-class \u00a0Dune::VTK::OffsetsWriter<_Cell_>\n-\u00a0 writer for the offsets array More...\n-\u00a0\n-class \u00a0Dune::VTK::TypesWriter<_Cell_>\n-\u00a0 writer for the types array More...\n+ class \u00a0Dune::VTK::SkeletonFunctionWriter<_Func_>\n+\u00a0 function writer for skeleton functions More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::VTK\n \u00a0\n+***** Detailed Description *****\n+Functions for VTK output on the skeleton.\n+ Author\n+ J\u00f6 Fahlke\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00794_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: functionwriter.hh Source File\n+dune-grid: skeletonfunction.hh Source File\n \n \n \n \n \n \n \n@@ -62,399 +62,165 @@\n \n \n \n
    \n-
    functionwriter.hh
    \n+
    skeletonfunction.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
    \n
    8
    \n-
    9#include <cstddef>
    \n-
    10#include <memory>
    \n-
    11#include <string>
    \n-
    12#include <typeinfo>
    \n-
    13#include <vector>
    \n+
    9#include <memory>
    \n+
    10#include <string>
    \n+
    11#include <vector>
    \n+
    12
    \n+
    13#include <dune/common/fvector.hh>
    \n
    14
    \n-
    15#include <dune/common/exceptions.hh>
    \n-
    16#include <dune/common/fvector.hh>
    \n-
    17
    \n-
    18#include <dune/geometry/referenceelements.hh>
    \n-
    19
    \n-\n-\n-\n-\n-
    24
    \n-
    25namespace Dune
    \n-
    26{
    \n-
    29
    \n-
    30 namespace VTK {
    \n-
    31
    \n-
    33 template<typename Cell_>
    \n-\n-
    35 typedef typename Cell_::Geometry::ctype DF;
    \n-
    36 static const unsigned mydim = Cell_::mydimension;
    \n-
    37 typedef ReferenceElements<DF, mydim> Refelems;
    \n-
    38
    \n-
    39 public:
    \n-
    40 typedef FieldVector<DF, mydim> Domain;
    \n-
    41 typedef Cell_ Cell;
    \n-
    42
    \n-
    44 virtual std::string name() const = 0;
    \n-
    45
    \n-
    47 virtual unsigned ncomps() const = 0;
    \n+\n+\n+\n+
    18
    \n+
    19namespace Dune {
    \n+
    20
    \n+
    23
    \n+
    29 namespace VTK {
    \n+
    30
    \n+
    32 //
    \n+
    33 // Prototype for VTKFunktions on the skeleton
    \n+
    34 //
    \n+
    35
    \n+
    36 template<typename GV, typename RF>
    \n+\n+
    38 typedef GV GridView;
    \n+
    39 typedef typename GV::Intersection Cell;
    \n+
    40
    \n+
    41 typedef typename GV::ctype DomainField;
    \n+
    42 static const unsigned dimDomain = GV::dimension-1;
    \n+
    43 typedef FieldVector<DomainField, dimDomain> Domain;
    \n+
    44
    \n+
    45 typedef RF RangeField;
    \n+
    46 typedef std::vector<RangeField> Range;
    \n+
    47 };
    \n
    48
    \n-
    50 virtual void addArray(PVTUWriter& writer) = 0;
    \n-
    52 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) = 0;
    \n+
    50 template <typename GV, typename RF>
    \n+\n+
    52 public:
    \n+\n
    54
    \n-
    59 virtual void write(const Cell& /* cell */, const Domain& /* xl */) {
    \n-
    60 DUNE_THROW(NotImplemented, "FunctionWriterBase::write(const Cell&, "
    \n-
    61 "const Domain&): Either the derived class " <<
    \n-
    62 typeid(*this).name() << " failed to implement this method "
    \n-
    63 "or this method is not meant to be called on the derived "
    \n-
    64 "class and was called in error.");
    \n-
    65 }
    \n-
    67
    \n-
    71 virtual void write(const Cell& cell, unsigned cornerIndex) {
    \n-
    72 write(cell,
    \n-
    73 Refelems::general(cell.type()).position(cornerIndex, mydim));
    \n-
    74 }
    \n-
    76 virtual void endWrite() = 0;
    \n-\n-
    79 };
    \n-
    80
    \n-
    82 //
    \n-
    83 // A Generic Function writer for VTKFunctions
    \n-
    84 //
    \n+
    56 unsigned dimRange() const;
    \n+
    57
    \n+
    59
    \n+
    65 void evaluate(const typename Traits::Cell& c,
    \n+
    66 const typename Traits::Domain& xl,
    \n+
    67 typename Traits::Range& result) const;
    \n+
    68 };
    \n+
    69
    \n+
    71 //
    \n+
    72 // Class for writing SkeletonFunctions
    \n+
    73 //
    \n+
    74
    \n+
    76
    \n+
    80 template<typename Func>
    \n+\n+
    82 : public FunctionWriterBase<typename Func::Traits::Cell>
    \n+
    83 {
    \n+
    84 typedef typename Func::Traits::RangeField RF;
    \n
    85
    \n-
    87 template<typename Func>
    \n-\n-
    89 : public FunctionWriterBase<typename Func::Entity>
    \n-
    90 {
    \n-\n-
    92 std::shared_ptr<const Func> func;
    \n-
    93 VTK::Precision precision_;
    \n-
    94 std::shared_ptr<DataArrayWriter> arraywriter;
    \n-
    95
    \n-
    96 public:
    \n-
    97 VTKFunctionWriter(const std::shared_ptr<const Func>& func_,
    \n-\n-
    99 : func(func_), precision_(prec)
    \n-
    100 { }
    \n-
    101
    \n-
    103 virtual std::string name() const { return func->name(); }
    \n+
    86 std::shared_ptr<const Func> func;
    \n+
    87 std::string name_;
    \n+
    88 unsigned dimR;
    \n+
    89 VTK::Precision precision_;
    \n+
    90 std::shared_ptr<DataArrayWriter> arraywriter;
    \n+
    91
    \n+
    92 public:
    \n+
    93 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
    \n+
    94 const std::string& name, unsigned dimR_,
    \n+\n+
    96 : func(func_), name_(name), dimR(dimR_), precision_(prec)
    \n+
    97 { }
    \n+
    98
    \n+
    99 SkeletonFunctionWriter(const std::shared_ptr<const Func>& func_,
    \n+
    100 const std::string& name,
    \n+\n+
    102 : func(func_), name_(name), dimR(func->dimRange()), precision_(prec)
    \n+
    103 { }
    \n
    104
    \n-
    106 virtual unsigned ncomps() const {
    \n-
    107 if(func->ncomps() == 2) return 3;
    \n-
    108 else return func->ncomps();
    \n-
    109 }
    \n+
    106 virtual std::string name() const { return name_; }
    \n+
    107
    \n+
    109 virtual unsigned ncomps() const { return dimR; }
    \n
    110
    \n-
    112 virtual void addArray(PVTUWriter& writer) {
    \n-
    113 writer.addArray(name(), ncomps(), precision_);
    \n+
    112 virtual void addArray(PVTUWriter& writer) {
    \n+
    113 writer.addArray(name(), ncomps(), precision_);
    \n
    114 }
    \n
    115
    \n-
    117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n-
    118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n+
    117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n+
    118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n
    119 nitems, precision_));
    \n
    120 return !arraywriter->writeIsNoop();
    \n
    121 }
    \n
    122
    \n-
    124 virtual void write(const typename Base::Cell& cell,
    \n-
    125 const typename Base::Domain& xl) {
    \n-
    126 for(int d = 0; d < func->ncomps(); ++d)
    \n-
    127 arraywriter->write(func->evaluate(d, cell, xl));
    \n-
    128 for(unsigned d = func->ncomps(); d < ncomps(); ++d)
    \n-
    129 arraywriter->write(0);
    \n-
    130 }
    \n-
    131
    \n-
    133 virtual void endWrite() {
    \n-
    134 arraywriter.reset();
    \n-
    135 }
    \n-
    136 };
    \n-
    137
    \n-
    139 //
    \n-
    140 // Writers for the grid information
    \n-
    141 //
    \n-
    142
    \n-
    144 template<typename Cell>
    \n-\n-
    146 : public FunctionWriterBase<Cell>
    \n-
    147 {
    \n-\n-
    149
    \n-
    150 VTK::Precision precision_;
    \n-
    151 std::shared_ptr<DataArrayWriter> arraywriter;
    \n-
    152
    \n-
    153 public:
    \n-\n-
    155 : precision_(prec)
    \n-
    156 {}
    \n-
    157
    \n-
    159 virtual std::string name() const { return "Coordinates"; }
    \n-
    160
    \n-
    162 virtual unsigned ncomps() const { return 3; }
    \n-
    163
    \n-
    165 virtual void addArray(PVTUWriter& writer) {
    \n-
    166 writer.addArray(name(), ncomps(), precision_);
    \n-
    167 }
    \n-
    168
    \n-
    170 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n-
    171 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n-
    172 nitems, precision_));
    \n-
    173 return !arraywriter->writeIsNoop();
    \n-
    174 }
    \n-
    176 virtual void write(const typename Base::Cell& cell,
    \n-
    177 const typename Base::Domain& xl) {
    \n-
    178 FieldVector<typename Base::Cell::Geometry::ctype, Base::Cell::Geometry::coorddimension> xg
    \n-
    179 = cell.geometry().global(xl);
    \n-
    180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d)
    \n-
    181 arraywriter->write(xg[d]);
    \n-
    182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d)
    \n-
    183 arraywriter->write(0);
    \n-
    184 }
    \n-
    186 virtual void endWrite() {
    \n-
    187 arraywriter.reset();
    \n-
    188 }
    \n-
    189 };
    \n-
    190
    \n-
    192 template<typename IteratorFactory>
    \n-\n-
    194 : public FunctionWriterBase<typename IteratorFactory::Cell>
    \n-
    195 {
    \n-\n-
    197 static const unsigned mydim = Base::Cell::mydimension;
    \n-
    198
    \n-
    199 const IteratorFactory& factory;
    \n-
    200 std::shared_ptr<DataArrayWriter> arraywriter;
    \n-
    201 std::vector<unsigned> pointIndices;
    \n-
    202
    \n-
    203 public:
    \n-
    205 ConformingConnectivityWriter(const IteratorFactory& factory_)
    \n-
    206 : factory(factory_)
    \n-
    207 { }
    \n-
    208
    \n-
    210 virtual std::string name() const { return "connectivity"; }
    \n-
    211
    \n-
    213 virtual unsigned ncomps() const { return 1; }
    \n-
    214
    \n-
    216 virtual void addArray(PVTUWriter& writer) {
    \n-
    217 writer.addArray(name(), ncomps(), Precision::int32);
    \n-
    218 }
    \n-
    219
    \n-
    221 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n-
    222 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n-
    223 nitems, Precision::int32));
    \n-
    224 if(arraywriter->writeIsNoop())
    \n-
    225 return false;
    \n-
    226
    \n-
    228 pointIndices.resize(factory.indexSet().size(mydim));
    \n-
    229 const typename IteratorFactory::PointIterator& pend =
    \n-
    230 factory.endPoints();
    \n-
    231 typename IteratorFactory::PointIterator pit = factory.beginPoints();
    \n-
    232 unsigned counter = 0;
    \n-
    233 while(pit != pend) {
    \n-
    234 pointIndices[factory.indexSet().subIndex
    \n-
    235 (pit->cell(), pit->duneIndex(), mydim)] = counter;
    \n-
    236 ++counter;
    \n-
    237 ++pit;
    \n-
    238 }
    \n-
    239 return true;
    \n-
    240 }
    \n-
    242 virtual void write(const typename Base::Cell& cell, unsigned cornerIndex)
    \n-
    243 {
    \n-
    244 // if pointIndices is empty, we're in writeIsNoop mode
    \n-
    245 if(pointIndices.size() == 0)
    \n-
    246 return;
    \n-
    247 arraywriter->write(pointIndices[factory.indexSet().subIndex
    \n-
    248 (cell, cornerIndex, mydim)]);
    \n-
    249 }
    \n-
    251 virtual void endWrite() {
    \n-
    252 arraywriter.reset();
    \n-
    253 pointIndices.clear();
    \n-
    254 }
    \n-
    255 };
    \n-
    256
    \n-
    258 template<typename Cell>
    \n-\n-
    260 : public FunctionWriterBase<Cell>
    \n-
    261 {
    \n-
    262 std::shared_ptr<DataArrayWriter> arraywriter;
    \n-
    263 unsigned counter;
    \n-
    264
    \n-
    265 public:
    \n-
    267 virtual std::string name() const { return "connectivity"; }
    \n-
    268
    \n-
    270 virtual unsigned ncomps() const { return 1; }
    \n-
    271
    \n-
    273 virtual void addArray(PVTUWriter& writer) {
    \n-
    274 writer.addArray(name(), ncomps(), Precision::int32);
    \n-
    275 }
    \n-
    276
    \n-
    278 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n-
    279 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n-
    280 nitems, Precision::int32));
    \n-
    281 counter = 0;
    \n-
    282 return !arraywriter->writeIsNoop();
    \n-
    283 }
    \n-
    285 virtual void write(const Cell& /* cell */, unsigned /* cornerIndex */)
    \n-
    286 {
    \n-
    287 arraywriter->write(counter);
    \n-
    288 ++counter;
    \n-
    289 }
    \n-
    291 virtual void endWrite() {
    \n-
    292 arraywriter.reset();
    \n-
    293 }
    \n-
    294 };
    \n-
    295
    \n-
    297 template<typename Cell>
    \n-\n-
    299 : public FunctionWriterBase<Cell>
    \n-
    300 {
    \n-\n-
    302
    \n-
    303 std::shared_ptr<DataArrayWriter> arraywriter;
    \n-
    304 unsigned offset;
    \n-
    305
    \n-
    306 public:
    \n-
    308 virtual std::string name() const { return "offsets"; }
    \n-
    309
    \n-
    311 virtual unsigned ncomps() const { return 1; }
    \n-
    312
    \n-
    314 virtual void addArray(PVTUWriter& writer) {
    \n-
    315 writer.addArray(name(), ncomps(), Precision::int32);
    \n-
    316 }
    \n-
    317
    \n-
    319 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n-
    320 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n-
    321 nitems, Precision::int32));
    \n-
    322 offset = 0;
    \n-
    323 return !arraywriter->writeIsNoop();
    \n-
    324 }
    \n-
    326 virtual void write(const Cell& cell, const typename Base::Domain&) {
    \n-
    327 offset += cell.geometry().corners();
    \n-
    328 arraywriter->write(offset);
    \n-
    329 }
    \n-
    331 virtual void endWrite() {
    \n-
    332 arraywriter.reset();
    \n-
    333 }
    \n-
    334 };
    \n-
    335
    \n-
    337 template<typename Cell>
    \n-\n-
    339 : public FunctionWriterBase<Cell>
    \n-
    340 {
    \n-\n-
    342
    \n-
    343 std::shared_ptr<DataArrayWriter> arraywriter;
    \n-
    344
    \n-
    345 public:
    \n-
    347 virtual std::string name() const { return "types"; }
    \n-
    348
    \n-
    350 virtual unsigned ncomps() const { return 1; }
    \n-
    351
    \n-
    353 virtual void addArray(PVTUWriter& writer) {
    \n-
    354 writer.addArray(name(), ncomps(), Precision::uint8);
    \n-
    355 }
    \n-
    356
    \n-
    358 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n-
    359 arraywriter.reset(writer.makeArrayWriter
    \n-
    360 ( name(), ncomps(), nitems, Precision::uint8));
    \n-
    361 return !arraywriter->writeIsNoop();
    \n-
    362 }
    \n-
    364 virtual void write(const Cell& cell, const typename Base::Domain&) {
    \n-
    365 arraywriter->write(geometryType(cell.type()));
    \n-
    366 }
    \n-
    368 virtual void endWrite() {
    \n-
    369 arraywriter.reset();
    \n-
    370 }
    \n-
    371 };
    \n-
    372
    \n-
    373 } // namespace VTK
    \n-
    374
    \n-
    376
    \n-
    377} // namespace Dune
    \n-
    378
    \n-
    379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
    \n-\n-
    Data array writers for the VTKWriter.
    \n-\n-
    Common stuff for the VTKWriter.
    \n+
    124 virtual void write(const typename Func::Traits::Cell& cell,
    \n+
    125 const typename Func::Traits::Domain& xl) {
    \n+
    126 typename Func::Traits::Range result;
    \n+
    127 func->evaluate(cell, xl, result);
    \n+
    128 for(unsigned d = 0; d < result.size() && d < dimR; ++d)
    \n+
    129 arraywriter->write(result[d]);
    \n+
    130 for(unsigned d = result.size(); d < dimR; ++d)
    \n+
    131 arraywriter->write(0);
    \n+
    132 }
    \n+
    133
    \n+
    135 virtual void endWrite() {
    \n+
    136 arraywriter.reset();
    \n+
    137 }
    \n+
    138 };
    \n+
    139
    \n+
    140 } // namespace VTK
    \n+
    141
    \n+
    143
    \n+
    144} // namespace Dune
    \n+
    145
    \n+
    146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH
    \n+\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-\n-\n \n-
    GeometryType geometryType(const Dune::GeometryType &t)
    mapping from GeometryType to VTKGeometryType
    Definition: common.hh:151
    \n
    Base class for function writers.
    Definition: functionwriter.hh:34
    \n-
    virtual std::string name() const =0
    return name
    \n-
    virtual unsigned ncomps() const =0
    return number of components of the vector
    \n-
    virtual void write(const Cell &, const Domain &)
    write at the given position
    Definition: functionwriter.hh:59
    \n-
    Cell_ Cell
    Definition: functionwriter.hh:41
    \n-
    virtual void addArray(PVTUWriter &writer)=0
    add this field to the given parallel writer
    \n-
    virtual void endWrite()=0
    signal end of writing
    \n-
    FieldVector< DF, mydim > Domain
    Definition: functionwriter.hh:40
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
    start writing with the given writer
    \n-
    virtual ~FunctionWriterBase()
    destructor
    Definition: functionwriter.hh:78
    \n-
    virtual void write(const Cell &cell, unsigned cornerIndex)
    write at the given corner
    Definition: functionwriter.hh:71
    \n-
    Base class for function writers.
    Definition: functionwriter.hh:90
    \n-
    VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision prec=VTK::Precision::float32)
    Definition: functionwriter.hh:97
    \n-
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:103
    \n-
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:106
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:117
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:112
    \n-
    virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
    write at the given position
    Definition: functionwriter.hh:124
    \n-
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:133
    \n-
    writer for the Coordinates array
    Definition: functionwriter.hh:147
    \n-
    virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
    write at the given position
    Definition: functionwriter.hh:176
    \n-
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:159
    \n-
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:186
    \n-
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:162
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:165
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:170
    \n-
    CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32)
    Definition: functionwriter.hh:154
    \n-
    writer for the connectivity array in conforming mode
    Definition: functionwriter.hh:195
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:216
    \n-
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:210
    \n-
    virtual void write(const typename Base::Cell &cell, unsigned cornerIndex)
    write at the given corner
    Definition: functionwriter.hh:242
    \n-
    ConformingConnectivityWriter(const IteratorFactory &factory_)
    create a writer with the given iteratorfactory
    Definition: functionwriter.hh:205
    \n-
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:213
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:221
    \n-
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:251
    \n-
    writer for the connectivity array in nonconforming mode
    Definition: functionwriter.hh:261
    \n-
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:270
    \n-
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:267
    \n-
    virtual void write(const Cell &, unsigned)
    write at the given corner
    Definition: functionwriter.hh:285
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:273
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:278
    \n-
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:291
    \n-
    writer for the offsets array
    Definition: functionwriter.hh:300
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:314
    \n-
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:331
    \n-
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:308
    \n-
    virtual void write(const Cell &cell, const typename Base::Domain &)
    write at the given position
    Definition: functionwriter.hh:326
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:319
    \n-
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:311
    \n-
    writer for the types array
    Definition: functionwriter.hh:340
    \n-
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:350
    \n-
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:358
    \n-
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:347
    \n-
    virtual void write(const Cell &cell, const typename Base::Domain &)
    write at the given position
    Definition: functionwriter.hh:364
    \n-
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:353
    \n-
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:368
    \n
    Dump a .vtu/.vtp files contents to a stream.
    Definition: pvtuwriter.hh:62
    \n
    void addArray(const std::string &name, unsigned ncomps, Precision prec)
    Add an array to the output file.
    Definition: pvtuwriter.hh:207
    \n+
    Definition: skeletonfunction.hh:37
    \n+
    RF RangeField
    Definition: skeletonfunction.hh:45
    \n+
    FieldVector< DomainField, dimDomain > Domain
    Definition: skeletonfunction.hh:43
    \n+
    GV GridView
    Definition: skeletonfunction.hh:38
    \n+
    std::vector< RangeField > Range
    Definition: skeletonfunction.hh:46
    \n+
    GV::Intersection Cell
    Definition: skeletonfunction.hh:39
    \n+
    GV::ctype DomainField
    Definition: skeletonfunction.hh:41
    \n+
    static const unsigned dimDomain
    Definition: skeletonfunction.hh:42
    \n+
    A prototype for VTKFunctions on the skeleton.
    Definition: skeletonfunction.hh:51
    \n+
    unsigned dimRange() const
    get dimension of the Range
    \n+
    SkeletonFunctionTraits< GV, RF > Traits
    Definition: skeletonfunction.hh:53
    \n+
    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
    \n+
    function writer for skeleton functions
    Definition: skeletonfunction.hh:83
    \n+
    virtual std::string name() const
    return name
    Definition: skeletonfunction.hh:106
    \n+
    SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, VTK::Precision prec=VTK::Precision::float32)
    Definition: skeletonfunction.hh:99
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: skeletonfunction.hh:112
    \n+
    virtual void write(const typename Func::Traits::Cell &cell, const typename Func::Traits::Domain &xl)
    write at the given position
    Definition: skeletonfunction.hh:124
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: skeletonfunction.hh:117
    \n+
    SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32)
    Definition: skeletonfunction.hh:93
    \n+
    virtual void endWrite()
    signal end of writing
    Definition: skeletonfunction.hh:135
    \n+
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: skeletonfunction.hh:109
    \n
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n
    DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
    acquire a DataArrayWriter
    Definition: vtuwriter.hh:380
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,574 +7,229 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-functionwriter.hh\n+skeletonfunction.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH\n 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12\n+ 13#include \n 14\n- 15#include \n- 16#include \n- 17\n- 18#include \n- 19\n- 20#include \n- 21#include \n- 22#include \n- 23#include \n- 24\n- 25namespace Dune\n- 26{\n- 29\n- 30 namespace VTK {\n- 31\n- 33 template\n-34 class FunctionWriterBase {\n- 35 typedef typename Cell_::Geometry::ctype DF;\n- 36 static const unsigned mydim = Cell_::mydimension;\n- 37 typedef ReferenceElements Refelems;\n- 38\n- 39 public:\n-40 typedef FieldVector Domain;\n-41 typedef Cell_ Cell;\n- 42\n-44 virtual std::string name() const = 0;\n- 45\n-47 virtual unsigned ncomps() const = 0;\n+ 15#include \n+ 16#include \n+ 17#include \n+ 18\n+ 19namespace Dune {\n+ 20\n+ 23\n+ 29 namespace VTK {\n+ 30\n+ 32 //\n+ 33 // Prototype for VTKFunktions on the skeleton\n+ 34 //\n+ 35\n+ 36 template\n+37 struct SkeletonFunctionTraits {\n+38 typedef GV GridView;\n+39 typedef typename GV::Intersection Cell;\n+ 40\n+41 typedef typename GV::ctype DomainField;\n+42 static const unsigned dimDomain = GV::dimension-1;\n+43 typedef FieldVector Domain;\n+ 44\n+45 typedef RF RangeField;\n+46 typedef std::vector Range;\n+ 47 };\n 48\n-50 virtual void addArray(PVTUWriter& writer) = 0;\n-52 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) = 0;\n+ 50 template \n+51 class SkeletonFunctionInterface {\n+ 52 public:\n+53 typedef SkeletonFunctionTraits Traits;\n 54\n-59 virtual void write(const Cell& /* cell */, const Domain& /* xl */) {\n- 60 DUNE_THROW(NotImplemented, \"FunctionWriterBase::write(const Cell&, \"\n- 61 \"const Domain&): Either the derived class \" <<\n- 62 typeid(*this).name() << \" failed to implement this method \"\n- 63 \"or this method is not meant to be called on the derived \"\n- 64 \"class and was called in error.\");\n- 65 }\n- 67\n-71 virtual void write(const Cell& cell, unsigned cornerIndex) {\n- 72 write(cell,\n- 73 Refelems::general(cell.type()).position(cornerIndex, mydim));\n- 74 }\n-76 virtual void endWrite() = 0;\n-78 virtual ~FunctionWriterBase() {}\n- 79 };\n- 80\n- 82 //\n- 83 // A Generic Function writer for VTKFunctions\n- 84 //\n+56 unsigned dimRange() const;\n+ 57\n+ 59\n+65 void evaluate(const typename Traits::Cell& c,\n+ 66 const typename Traits::Domain& xl,\n+ 67 typename Traits::Range& result) const;\n+ 68 };\n+ 69\n+ 71 //\n+ 72 // Class for writing SkeletonFunctions\n+ 73 //\n+ 74\n+ 76\n+ 80 template\n+81 class SkeletonFunctionWriter\n+ 82 : public FunctionWriterBase\n+ 83 {\n+ 84 typedef typename Func::Traits::RangeField RF;\n 85\n- 87 template\n-88 class VTKFunctionWriter\n- 89 : public FunctionWriterBase\n- 90 {\n- 91 typedef FunctionWriterBase Base;\n- 92 std::shared_ptr func;\n- 93 VTK::Precision precision_;\n- 94 std::shared_ptr arraywriter;\n- 95\n- 96 public:\n-97 VTKFunctionWriter(const std::shared_ptr& func_,\n- 98 VTK::Precision prec = VTK::Precision::float32)\n- 99 : func(func_), precision_(prec)\n- 100 { }\n- 101\n-103 virtual std::string name() const { return func->name(); }\n+ 86 std::shared_ptr func;\n+ 87 std::string name_;\n+ 88 unsigned dimR;\n+ 89 VTK::Precision precision_;\n+ 90 std::shared_ptr arraywriter;\n+ 91\n+ 92 public:\n+93 SkeletonFunctionWriter(const std::shared_ptr& func_,\n+ 94 const std::string& name, unsigned dimR_,\n+ 95 VTK::Precision prec = VTK::Precision::float32)\n+ 96 : func(func_), name_(name), dimR(dimR_), precision_(prec)\n+ 97 { }\n+ 98\n+99 SkeletonFunctionWriter(const std::shared_ptr& func_,\n+ 100 const std::string& name,\n+ 101 VTK::Precision prec = VTK::Precision::float32)\n+ 102 : func(func_), name_(name), dimR(func->dimRange()), precision_(prec)\n+ 103 { }\n 104\n-106 virtual unsigned ncomps() const {\n- 107 if(func->ncomps() == 2) return 3;\n- 108 else return func->ncomps();\n- 109 }\n+106 virtual std::string name() const { return name_; }\n+ 107\n+109 virtual unsigned ncomps() const { return dimR; }\n 110\n 112 virtual void addArray(PVTUWriter& writer) {\n 113 writer.addArray(name(), ncomps(), precision_);\n 114 }\n 115\n 117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n 118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n 119 nitems, precision_));\n 120 return !arraywriter->writeIsNoop();\n 121 }\n 122\n-124 virtual void write(const typename Base::Cell& cell,\n- 125 const typename Base::Domain& xl) {\n- 126 for(int d = 0; d < func->ncomps(); ++d)\n- 127 arraywriter->write(func->evaluate(d, cell, xl));\n- 128 for(unsigned d = func->ncomps(); d < ncomps(); ++d)\n- 129 arraywriter->write(0);\n- 130 }\n- 131\n-133 virtual void endWrite() {\n- 134 arraywriter.reset();\n- 135 }\n- 136 };\n- 137\n- 139 //\n- 140 // Writers for the grid information\n- 141 //\n- 142\n- 144 template\n-145 class CoordinatesWriter\n- 146 : public FunctionWriterBase\n- 147 {\n- 148 typedef FunctionWriterBase Base;\n- 149\n- 150 VTK::Precision precision_;\n- 151 std::shared_ptr arraywriter;\n- 152\n- 153 public:\n-154 explicit CoordinatesWriter(VTK::Precision prec = VTK::Precision::float32)\n- 155 : precision_(prec)\n- 156 {}\n- 157\n-159 virtual std::string name() const { return \"Coordinates\"; }\n- 160\n-162 virtual unsigned ncomps() const { return 3; }\n- 163\n-165 virtual void addArray(PVTUWriter& writer) {\n- 166 writer.addArray(name(), ncomps(), precision_);\n- 167 }\n- 168\n-170 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n- 171 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n- 172 nitems, precision_));\n- 173 return !arraywriter->writeIsNoop();\n- 174 }\n-176 virtual void write(const typename Base::Cell& cell,\n- 177 const typename Base::Domain& xl) {\n- 178 FieldVector xg\n- 179 = cell.geometry().global(xl);\n- 180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension;\n-++d)\n- 181 arraywriter->write(xg[d]);\n- 182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d)\n- 183 arraywriter->write(0);\n- 184 }\n-186 virtual void endWrite() {\n- 187 arraywriter.reset();\n- 188 }\n- 189 };\n- 190\n- 192 template\n-193 class ConformingConnectivityWriter\n- 194 : public FunctionWriterBase\n- 195 {\n- 196 typedef FunctionWriterBase Base;\n- 197 static const unsigned mydim = Base::Cell::mydimension;\n- 198\n- 199 const IteratorFactory& factory;\n- 200 std::shared_ptr arraywriter;\n- 201 std::vector pointIndices;\n- 202\n- 203 public:\n-205 ConformingConnectivityWriter(const IteratorFactory& factory_)\n- 206 : factory(factory_)\n- 207 { }\n- 208\n-210 virtual std::string name() const { return \"connectivity\"; }\n- 211\n-213 virtual unsigned ncomps() const { return 1; }\n- 214\n-216 virtual void addArray(PVTUWriter& writer) {\n- 217 writer.addArray(name(), ncomps(), Precision::int32);\n- 218 }\n- 219\n-221 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n- 222 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n- 223 nitems, Precision::int32));\n- 224 if(arraywriter->writeIsNoop())\n- 225 return false;\n- 226\n- 228 pointIndices.resize(factory.indexSet().size(mydim));\n- 229 const typename IteratorFactory::PointIterator& pend =\n- 230 factory.endPoints();\n- 231 typename IteratorFactory::PointIterator pit = factory.beginPoints();\n- 232 unsigned counter = 0;\n- 233 while(pit != pend) {\n- 234 pointIndices[factory.indexSet().subIndex\n- 235 (pit->cell(), pit->duneIndex(), mydim)] = counter;\n- 236 ++counter;\n- 237 ++pit;\n- 238 }\n- 239 return true;\n- 240 }\n-242 virtual void write(const typename Base::Cell& cell, unsigned cornerIndex)\n- 243 {\n- 244 // if pointIndices is empty, we're in writeIsNoop mode\n- 245 if(pointIndices.size() == 0)\n- 246 return;\n- 247 arraywriter->write(pointIndices[factory.indexSet().subIndex\n- 248 (cell, cornerIndex, mydim)]);\n- 249 }\n-251 virtual void endWrite() {\n- 252 arraywriter.reset();\n- 253 pointIndices.clear();\n- 254 }\n- 255 };\n- 256\n- 258 template\n-259 class NonConformingConnectivityWriter\n- 260 : public FunctionWriterBase\n- 261 {\n- 262 std::shared_ptr arraywriter;\n- 263 unsigned counter;\n- 264\n- 265 public:\n-267 virtual std::string name() const { return \"connectivity\"; }\n- 268\n-270 virtual unsigned ncomps() const { return 1; }\n- 271\n-273 virtual void addArray(PVTUWriter& writer) {\n- 274 writer.addArray(name(), ncomps(), Precision::int32);\n- 275 }\n- 276\n-278 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n- 279 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n- 280 nitems, Precision::int32));\n- 281 counter = 0;\n- 282 return !arraywriter->writeIsNoop();\n- 283 }\n-285 virtual void write(const Cell& /* cell */, unsigned /* cornerIndex */)\n- 286 {\n- 287 arraywriter->write(counter);\n- 288 ++counter;\n- 289 }\n-291 virtual void endWrite() {\n- 292 arraywriter.reset();\n- 293 }\n- 294 };\n- 295\n- 297 template\n-298 class OffsetsWriter\n- 299 : public FunctionWriterBase\n- 300 {\n- 301 typedef FunctionWriterBase Base;\n- 302\n- 303 std::shared_ptr arraywriter;\n- 304 unsigned offset;\n- 305\n- 306 public:\n-308 virtual std::string name() const { return \"offsets\"; }\n- 309\n-311 virtual unsigned ncomps() const { return 1; }\n- 312\n-314 virtual void addArray(PVTUWriter& writer) {\n- 315 writer.addArray(name(), ncomps(), Precision::int32);\n- 316 }\n- 317\n-319 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n- 320 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n- 321 nitems, Precision::int32));\n- 322 offset = 0;\n- 323 return !arraywriter->writeIsNoop();\n- 324 }\n-326 virtual void write(const Cell& cell, const typename Base::Domain&) {\n- 327 offset += cell.geometry().corners();\n- 328 arraywriter->write(offset);\n- 329 }\n-331 virtual void endWrite() {\n- 332 arraywriter.reset();\n- 333 }\n- 334 };\n- 335\n- 337 template\n-338 class TypesWriter\n- 339 : public FunctionWriterBase\n- 340 {\n- 341 typedef FunctionWriterBase Base;\n- 342\n- 343 std::shared_ptr arraywriter;\n- 344\n- 345 public:\n-347 virtual std::string name() const { return \"types\"; }\n- 348\n-350 virtual unsigned ncomps() const { return 1; }\n- 351\n-353 virtual void addArray(PVTUWriter& writer) {\n- 354 writer.addArray(name(), ncomps(), Precision::uint8);\n- 355 }\n- 356\n-358 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n- 359 arraywriter.reset(writer.makeArrayWriter\n- 360 ( name(), ncomps(), nitems, Precision::uint8));\n- 361 return !arraywriter->writeIsNoop();\n- 362 }\n-364 virtual void write(const Cell& cell, const typename Base::Domain&) {\n- 365 arraywriter->write(geometryType(cell.type()));\n- 366 }\n-368 virtual void endWrite() {\n- 369 arraywriter.reset();\n- 370 }\n- 371 };\n- 372\n- 373 } // namespace VTK\n- 374\n- 376\n- 377} // namespace Dune\n- 378\n- 379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH\n-pvtuwriter.hh\n-dataarraywriter.hh\n-Data array writers for the VTKWriter.\n+124 virtual void write(const typename Func::Traits::Cell& cell,\n+ 125 const typename Func::Traits::Domain& xl) {\n+ 126 typename Func::Traits::Range result;\n+ 127 func->evaluate(cell, xl, result);\n+ 128 for(unsigned d = 0; d < result.size() && d < dimR; ++d)\n+ 129 arraywriter->write(result[d]);\n+ 130 for(unsigned d = result.size(); d < dimR; ++d)\n+ 131 arraywriter->write(0);\n+ 132 }\n+ 133\n+135 virtual void endWrite() {\n+ 136 arraywriter.reset();\n+ 137 }\n+ 138 };\n+ 139\n+ 140 } // namespace VTK\n+ 141\n+ 143\n+ 144} // namespace Dune\n+ 145\n+ 146#endif // DUNE_GRID_IO_FILE_VTK_SKELETONFUNCTION_HH\n vtuwriter.hh\n-common.hh\n-Common stuff for the VTKWriter.\n+functionwriter.hh\n+pvtuwriter.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::VTK::Precision\n Precision\n which precision to use when writing out data to vtk files\n Definition: common.hh:271\n-Dune::VTK::Precision::int32\n-@ int32\n-Dune::VTK::Precision::uint8\n-@ uint8\n Dune::VTK::Precision::float32\n @ float32\n-Dune::VTK::geometryType\n-GeometryType geometryType(const Dune::GeometryType &t)\n-mapping from GeometryType to VTKGeometryType\n-Definition: common.hh:151\n Dune::VTK::FunctionWriterBase\n Base class for function writers.\n Definition: functionwriter.hh:34\n-Dune::VTK::FunctionWriterBase::name\n-virtual std::string name() const =0\n-return name\n-Dune::VTK::FunctionWriterBase::ncomps\n-virtual unsigned ncomps() const =0\n-return number of components of the vector\n-Dune::VTK::FunctionWriterBase::write\n-virtual void write(const Cell &, const Domain &)\n-write at the given position\n-Definition: functionwriter.hh:59\n-Dune::VTK::FunctionWriterBase::Cell\n-Cell_ Cell\n-Definition: functionwriter.hh:41\n-Dune::VTK::FunctionWriterBase::addArray\n-virtual void addArray(PVTUWriter &writer)=0\n-add this field to the given parallel writer\n-Dune::VTK::FunctionWriterBase::endWrite\n-virtual void endWrite()=0\n-signal end of writing\n-Dune::VTK::FunctionWriterBase::Domain\n-FieldVector< DF, mydim > Domain\n-Definition: functionwriter.hh:40\n-Dune::VTK::FunctionWriterBase::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0\n-start writing with the given writer\n-Dune::VTK::FunctionWriterBase::~FunctionWriterBase\n-virtual ~FunctionWriterBase()\n-destructor\n-Definition: functionwriter.hh:78\n-Dune::VTK::FunctionWriterBase::write\n-virtual void write(const Cell &cell, unsigned cornerIndex)\n-write at the given corner\n-Definition: functionwriter.hh:71\n-Dune::VTK::VTKFunctionWriter\n-Base class for function writers.\n-Definition: functionwriter.hh:90\n-Dune::VTK::VTKFunctionWriter::VTKFunctionWriter\n-VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision\n-prec=VTK::Precision::float32)\n-Definition: functionwriter.hh:97\n-Dune::VTK::VTKFunctionWriter::name\n-virtual std::string name() const\n-return name\n-Definition: functionwriter.hh:103\n-Dune::VTK::VTKFunctionWriter::ncomps\n-virtual unsigned ncomps() const\n-return number of components of the vector\n-Definition: functionwriter.hh:106\n-Dune::VTK::VTKFunctionWriter::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n-start writing with the given writer\n-Definition: functionwriter.hh:117\n-Dune::VTK::VTKFunctionWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: functionwriter.hh:112\n-Dune::VTK::VTKFunctionWriter::write\n-virtual void write(const typename Base::Cell &cell, const typename Base::Domain\n-&xl)\n-write at the given position\n-Definition: functionwriter.hh:124\n-Dune::VTK::VTKFunctionWriter::endWrite\n-virtual void endWrite()\n-signal end of writing\n-Definition: functionwriter.hh:133\n-Dune::VTK::CoordinatesWriter\n-writer for the Coordinates array\n-Definition: functionwriter.hh:147\n-Dune::VTK::CoordinatesWriter::write\n-virtual void write(const typename Base::Cell &cell, const typename Base::Domain\n-&xl)\n-write at the given position\n-Definition: functionwriter.hh:176\n-Dune::VTK::CoordinatesWriter::name\n-virtual std::string name() const\n-return name\n-Definition: functionwriter.hh:159\n-Dune::VTK::CoordinatesWriter::endWrite\n-virtual void endWrite()\n-signal end of writing\n-Definition: functionwriter.hh:186\n-Dune::VTK::CoordinatesWriter::ncomps\n-virtual unsigned ncomps() const\n-return number of components of the vector\n-Definition: functionwriter.hh:162\n-Dune::VTK::CoordinatesWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: functionwriter.hh:165\n-Dune::VTK::CoordinatesWriter::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n-start writing with the given writer\n-Definition: functionwriter.hh:170\n-Dune::VTK::CoordinatesWriter::CoordinatesWriter\n-CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32)\n-Definition: functionwriter.hh:154\n-Dune::VTK::ConformingConnectivityWriter\n-writer for the connectivity array in conforming mode\n-Definition: functionwriter.hh:195\n-Dune::VTK::ConformingConnectivityWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: functionwriter.hh:216\n-Dune::VTK::ConformingConnectivityWriter::name\n-virtual std::string name() const\n-return name\n-Definition: functionwriter.hh:210\n-Dune::VTK::ConformingConnectivityWriter::write\n-virtual void write(const typename Base::Cell &cell, unsigned cornerIndex)\n-write at the given corner\n-Definition: functionwriter.hh:242\n-Dune::VTK::ConformingConnectivityWriter::ConformingConnectivityWriter\n-ConformingConnectivityWriter(const IteratorFactory &factory_)\n-create a writer with the given iteratorfactory\n-Definition: functionwriter.hh:205\n-Dune::VTK::ConformingConnectivityWriter::ncomps\n-virtual unsigned ncomps() const\n-return number of components of the vector\n-Definition: functionwriter.hh:213\n-Dune::VTK::ConformingConnectivityWriter::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n-start writing with the given writer\n-Definition: functionwriter.hh:221\n-Dune::VTK::ConformingConnectivityWriter::endWrite\n-virtual void endWrite()\n-signal end of writing\n-Definition: functionwriter.hh:251\n-Dune::VTK::NonConformingConnectivityWriter\n-writer for the connectivity array in nonconforming mode\n-Definition: functionwriter.hh:261\n-Dune::VTK::NonConformingConnectivityWriter::ncomps\n-virtual unsigned ncomps() const\n-return number of components of the vector\n-Definition: functionwriter.hh:270\n-Dune::VTK::NonConformingConnectivityWriter::name\n-virtual std::string name() const\n-return name\n-Definition: functionwriter.hh:267\n-Dune::VTK::NonConformingConnectivityWriter::write\n-virtual void write(const Cell &, unsigned)\n-write at the given corner\n-Definition: functionwriter.hh:285\n-Dune::VTK::NonConformingConnectivityWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: functionwriter.hh:273\n-Dune::VTK::NonConformingConnectivityWriter::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n-start writing with the given writer\n-Definition: functionwriter.hh:278\n-Dune::VTK::NonConformingConnectivityWriter::endWrite\n-virtual void endWrite()\n-signal end of writing\n-Definition: functionwriter.hh:291\n-Dune::VTK::OffsetsWriter\n-writer for the offsets array\n-Definition: functionwriter.hh:300\n-Dune::VTK::OffsetsWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: functionwriter.hh:314\n-Dune::VTK::OffsetsWriter::endWrite\n-virtual void endWrite()\n-signal end of writing\n-Definition: functionwriter.hh:331\n-Dune::VTK::OffsetsWriter::name\n-virtual std::string name() const\n-return name\n-Definition: functionwriter.hh:308\n-Dune::VTK::OffsetsWriter::write\n-virtual void write(const Cell &cell, const typename Base::Domain &)\n-write at the given position\n-Definition: functionwriter.hh:326\n-Dune::VTK::OffsetsWriter::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n-start writing with the given writer\n-Definition: functionwriter.hh:319\n-Dune::VTK::OffsetsWriter::ncomps\n-virtual unsigned ncomps() const\n-return number of components of the vector\n-Definition: functionwriter.hh:311\n-Dune::VTK::TypesWriter\n-writer for the types array\n-Definition: functionwriter.hh:340\n-Dune::VTK::TypesWriter::ncomps\n-virtual unsigned ncomps() const\n-return number of components of the vector\n-Definition: functionwriter.hh:350\n-Dune::VTK::TypesWriter::beginWrite\n-virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n-start writing with the given writer\n-Definition: functionwriter.hh:358\n-Dune::VTK::TypesWriter::name\n-virtual std::string name() const\n-return name\n-Definition: functionwriter.hh:347\n-Dune::VTK::TypesWriter::write\n-virtual void write(const Cell &cell, const typename Base::Domain &)\n-write at the given position\n-Definition: functionwriter.hh:364\n-Dune::VTK::TypesWriter::addArray\n-virtual void addArray(PVTUWriter &writer)\n-add this field to the given parallel writer\n-Definition: functionwriter.hh:353\n-Dune::VTK::TypesWriter::endWrite\n-virtual void endWrite()\n-signal end of writing\n-Definition: functionwriter.hh:368\n Dune::VTK::PVTUWriter\n Dump a .vtu/.vtp files contents to a stream.\n Definition: pvtuwriter.hh:62\n Dune::VTK::PVTUWriter::addArray\n void addArray(const std::string &name, unsigned ncomps, Precision prec)\n Add an array to the output file.\n Definition: pvtuwriter.hh:207\n+Dune::VTK::SkeletonFunctionTraits\n+Definition: skeletonfunction.hh:37\n+Dune::VTK::SkeletonFunctionTraits::RangeField\n+RF RangeField\n+Definition: skeletonfunction.hh:45\n+Dune::VTK::SkeletonFunctionTraits::Domain\n+FieldVector< DomainField, dimDomain > Domain\n+Definition: skeletonfunction.hh:43\n+Dune::VTK::SkeletonFunctionTraits::GridView\n+GV GridView\n+Definition: skeletonfunction.hh:38\n+Dune::VTK::SkeletonFunctionTraits::Range\n+std::vector< RangeField > Range\n+Definition: skeletonfunction.hh:46\n+Dune::VTK::SkeletonFunctionTraits::Cell\n+GV::Intersection Cell\n+Definition: skeletonfunction.hh:39\n+Dune::VTK::SkeletonFunctionTraits::DomainField\n+GV::ctype DomainField\n+Definition: skeletonfunction.hh:41\n+Dune::VTK::SkeletonFunctionTraits::dimDomain\n+static const unsigned dimDomain\n+Definition: skeletonfunction.hh:42\n+Dune::VTK::SkeletonFunctionInterface\n+A prototype for VTKFunctions on the skeleton.\n+Definition: skeletonfunction.hh:51\n+Dune::VTK::SkeletonFunctionInterface::dimRange\n+unsigned dimRange() const\n+get dimension of the Range\n+Dune::VTK::SkeletonFunctionInterface::Traits\n+SkeletonFunctionTraits< GV, RF > Traits\n+Definition: skeletonfunction.hh:53\n+Dune::VTK::SkeletonFunctionInterface::evaluate\n+void evaluate(const typename Traits::Cell &c, const typename Traits::Domain\n+&xl, typename Traits::Range &result) const\n+evaluate at local point xl in Cell c, store in result\n+Dune::VTK::SkeletonFunctionWriter\n+function writer for skeleton functions\n+Definition: skeletonfunction.hh:83\n+Dune::VTK::SkeletonFunctionWriter::name\n+virtual std::string name() const\n+return name\n+Definition: skeletonfunction.hh:106\n+Dune::VTK::SkeletonFunctionWriter::SkeletonFunctionWriter\n+SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::\n+string &name, VTK::Precision prec=VTK::Precision::float32)\n+Definition: skeletonfunction.hh:99\n+Dune::VTK::SkeletonFunctionWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: skeletonfunction.hh:112\n+Dune::VTK::SkeletonFunctionWriter::write\n+virtual void write(const typename Func::Traits::Cell &cell, const typename\n+Func::Traits::Domain &xl)\n+write at the given position\n+Definition: skeletonfunction.hh:124\n+Dune::VTK::SkeletonFunctionWriter::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n+start writing with the given writer\n+Definition: skeletonfunction.hh:117\n+Dune::VTK::SkeletonFunctionWriter::SkeletonFunctionWriter\n+SkeletonFunctionWriter(const std::shared_ptr< const Func > &func_, const std::\n+string &name, unsigned dimR_, VTK::Precision prec=VTK::Precision::float32)\n+Definition: skeletonfunction.hh:93\n+Dune::VTK::SkeletonFunctionWriter::endWrite\n+virtual void endWrite()\n+signal end of writing\n+Definition: skeletonfunction.hh:135\n+Dune::VTK::SkeletonFunctionWriter::ncomps\n+virtual unsigned ncomps() const\n+return number of components of the vector\n+Definition: skeletonfunction.hh:109\n Dune::VTK::VTUWriter\n Dump a .vtu/.vtp files contents to a stream.\n Definition: vtuwriter.hh:98\n Dune::VTK::VTUWriter::makeArrayWriter\n DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps,\n unsigned nitems, Precision prec)\n acquire a DataArrayWriter\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00797.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00797.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundarywriter.hh File Reference\n+dune-grid: common.hh File Reference\n \n \n \n \n \n \n \n@@ -64,39 +64,130 @@\n \n \n \n
    \n \n-
    boundarywriter.hh File Reference
    \n+Namespaces |\n+Enumerations |\n+Functions
    \n+
    common.hh File Reference
    \n \n
    \n-
    #include <memory>
    \n+\n+

    Common stuff for the VTKWriter. \n+More...

    \n+
    #include <limits>
    \n+#include <sstream>
    \n #include <string>
    \n-#include <dune/grid/io/file/vtk/basicwriter.hh>
    \n-#include <dune/grid/io/file/vtk/boundaryiterators.hh>
    \n-#include <dune/grid/io/file/vtk/skeletonfunction.hh>
    \n+#include <cstdint>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/common/typetraits.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::VTK::NonConformingBoundaryWriter< GV >
    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...
     
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+

    \n+Enumerations

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

    \n+Functions

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

    Detailed Description

    \n+

    Common stuff for the VTKWriter.

    \n+
    Author
    Peter Bastian, Christian Engwer
    \n+

    This file contains common stuff for all instances of VTKWriter.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,27 +7,92 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-Classes | Namespaces\n-boundarywriter.hh File Reference\n-#include \n+Classes | Namespaces | Enumerations | Functions\n+common.hh File Reference\n+Common stuff for the VTKWriter. More...\n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::NonConformingBoundaryWriter<_GV_>\n+struct \u00a0Dune::VTK::PrintType<_T_>\n+\u00a0 determine a type to safely put another type into a stream More...\n+\u00a0\n+struct \u00a0Dune::VTK::PrintType<_unsigned_char_>\n+\u00a0\n+struct \u00a0Dune::VTK::PrintType<_signed_char_>\n+\u00a0\n+struct \u00a0Dune::VTK::PrintType<_char_>\n+\u00a0\n+ class \u00a0Dune::VTK::FieldInfo\n+\u00a0 Descriptor struct for VTK fields. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::VTK\n \u00a0\n+ Enumerations\n+ enum \u00a0Dune::VTK::OutputType { Dune::VTK::ascii , Dune::VTK::base64 , Dune::VTK::\n+ appendedraw , Dune::VTK::appendedbase64 }\n+\u00a0 How the bulk data should be stored in the file. More...\n+\u00a0\n+ enum \u00a0Dune::VTK::DataMode { Dune::VTK::conforming , Dune::VTK::nonconforming }\n+\u00a0 Whether to produce conforming or non-conforming output. More...\n+\u00a0\n+ enum \u00a0Dune::VTK::GeometryType {\n+ \u00a0\u00a0Dune::VTK::vertex = 1 , Dune::VTK::line = 3 , Dune::VTK::triangle = 5 , Dune::\n+ VTK::polygon = 7 ,\n+ \u00a0\u00a0Dune::VTK::quadrilateral = 9 , Dune::VTK::tetrahedron = 10 , Dune::VTK::\n+ hexahedron = 12 , Dune::VTK::prism = 13 ,\n+ \u00a0\u00a0Dune::VTK::pyramid = 14 , Dune::VTK::polyhedron = 42\n+ }\n+\u00a0 Type representing VTK's entity geometry types. More...\n+\u00a0\n+ enum \u00a0Dune::VTK::FileType { Dune::VTK::polyData , Dune::VTK::unstructuredGrid }\n+\u00a0 which type of VTK file to write More...\n+\u00a0\n+ enum Dune::VTK::Precision {\n+ class \u00a0\u00a0\u00a0Dune::VTK::int32 , Dune::VTK::uint8 , Dune::VTK::uint32 , Dune::VTK::float32 ,\n+\n+ \u00a0\u00a0Dune::VTK::float64\n+ }\n+\u00a0 which precision to use when writing out data to vtk files More...\n+\u00a0\n+ Functions\n+GeometryType\u00a0Dune::VTK::geometryType (const Dune::GeometryType &t)\n+\u00a0 mapping from GeometryType to VTKGeometryType More...\n+\u00a0\n+ int\u00a0Dune::VTK::renumber (const Dune::GeometryType &t, int i)\n+\u00a0 renumber VTK <-> Dune More...\n+\u00a0\n+template\n+ int\u00a0Dune::VTK::renumber (const T &t, int i)\n+\u00a0 renumber VTK <-> Dune More...\n+\u00a0\n+ std::string\u00a0Dune::VTK::getEndiannessString ()\n+\u00a0 determine endianness of this C++ implementation More...\n+\u00a0\n+ std::string\u00a0Dune::VTK::toString (Precision p)\n+\u00a0 map precision to VTK type name More...\n+\u00a0\n+ std::size_t\u00a0Dune::VTK::typeSize (Precision p)\n+\u00a0 map precision to byte size More...\n+\u00a0\n+***** Detailed Description *****\n+Common stuff for the VTKWriter.\n+ Author\n+ Peter Bastian, Christian Engwer\n+This file contains common stuff for all instances of VTKWriter.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00797_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundarywriter.hh Source File\n+dune-grid: common.hh Source File\n \n \n \n \n \n \n \n@@ -62,100 +62,333 @@\n \n \n \n
    \n-
    boundarywriter.hh
    \n+
    common.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH
    \n
    8
    \n-
    9#include <memory>
    \n-
    10#include <string>
    \n-
    11
    \n-\n-\n-\n-
    15
    \n-
    16namespace Dune {
    \n-
    19
    \n-
    20 namespace VTK {
    \n-
    21
    \n-
    22 template<typename GV>
    \n-\n-\n-
    25 public BasicWriter<NonConformingBoundaryIteratorFactory<GV> >
    \n-
    26 {
    \n-\n-\n+
    9#include <limits>
    \n+
    10#include <sstream>
    \n+
    11#include <string>
    \n+
    12#include <cstdint>
    \n+
    13
    \n+
    14#include <dune/common/exceptions.hh>
    \n+
    15#include <dune/geometry/type.hh>
    \n+
    16#include <dune/common/typetraits.hh>
    \n+
    17
    \n+
    25namespace Dune
    \n+
    26{
    \n
    29
    \n-
    30 const GV& gv;
    \n+
    30 namespace VTK {
    \n
    31
    \n-
    32 public:
    \n-\n-
    34 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
    \n-
    35 { }
    \n+
    33 //
    \n+
    34 // VTKOptions
    \n+
    35 //
    \n
    36
    \n-\n
    38
    \n-
    39 template<typename Func>
    \n-
    40 void addCellData(const std::shared_ptr<Func>& p, const std::string& name) {
    \n-
    41 addCellData(std::shared_ptr<typename Base::FunctionWriter>
    \n-
    42 (new SkeletonFunctionWriter<Func>(p, name)));
    \n-
    43 }
    \n-
    44
    \n-
    45 template<typename Func>
    \n-
    46 void addCellData(Func* p, const std::string& name) {
    \n-
    47 addCellData(std::shared_ptr<Func>(p), name);
    \n-
    48 }
    \n-
    49
    \n-\n-
    51
    \n-
    52 template<typename Func>
    \n-
    53 void addPointData(const std::shared_ptr<Func>& p, const std::string& name) {
    \n-
    54 addPointData(std::shared_ptr<typename Base::FunctionWriter>
    \n-
    55 (new SkeletonFunctionWriter<Func>(p, name)));
    \n-
    56 }
    \n-
    57
    \n-
    58 template<typename Func>
    \n-
    59 void addPointData(Func* p, const std::string& name) {
    \n-
    60 addPointData(std::shared_ptr<Func>(p), name);
    \n-
    61 }
    \n-
    62
    \n-
    63 };
    \n-
    64
    \n-
    65 } // namespace VTK
    \n-
    66
    \n-
    68
    \n-
    69} // namespace Dune
    \n-
    70
    \n-
    71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH
    \n-\n-
    Functions for VTK output on the skeleton.
    \n-
    Functions for VTK output on the skeleton.
    \n+\n+\n+\n+\n+\n+
    52 // //! Output to the file is compressed inline binary.
    \n+
    53 // binarycompressed,
    \n+
    54 // //! Output is compressed and appended to the file.
    \n+
    55 // compressedappended
    \n+
    56 };
    \n+
    58
    \n+
    67 enum DataMode {
    \n+
    69
    \n+\n+
    75
    \n+\n+
    82 };
    \n+
    83
    \n+
    85 //
    \n+
    86 // PrintType
    \n+
    87 //
    \n+
    88
    \n+
    90
    \n+
    94 template<typename T>
    \n+
    95 struct PrintType {
    \n+
    97 typedef T Type;
    \n+
    98 };
    \n+
    99
    \n+
    100 template<>
    \n+
    101 struct PrintType<unsigned char> {
    \n+
    102 typedef unsigned Type;
    \n+
    103 };
    \n+
    104
    \n+
    105 template<>
    \n+
    106 struct PrintType<signed char> {
    \n+
    107 typedef int Type;
    \n+
    108 };
    \n+
    109
    \n+
    110 template<>
    \n+
    111 struct PrintType<char> {
    \n+
    112 typedef std::conditional<std::numeric_limits<char>::is_signed,
    \n+
    113 int, unsigned>::type
    \n+\n+
    115 };
    \n+
    116
    \n+
    118 //
    \n+
    119 // VTK::GeometryType related stuff
    \n+
    120 //
    \n+
    121
    \n+
    123
    \n+\n+\n+
    134 line = 3,
    \n+\n+\n+\n+\n+\n+
    140 prism = 13,
    \n+\n+
    142 polyhedron = 42
    \n+
    143 };
    \n+
    144
    \n+
    146
    \n+\n+
    152 {
    \n+
    153 if (t.isVertex()) return vertex;
    \n+
    154 if (t.isLine()) return line;
    \n+
    155 if (t.isTriangle()) return triangle;
    \n+
    156 if (t.isQuadrilateral()) return quadrilateral;
    \n+
    157 if (t.isTetrahedron()) return tetrahedron;
    \n+
    158 if (t.isPyramid()) return pyramid;
    \n+
    159 if (t.isPrism()) return prism;
    \n+
    160 if (t.isHexahedron()) return hexahedron;
    \n+
    161
    \n+
    162 if (t.isNone() )
    \n+
    163 {
    \n+
    164 if( t.dim() == 2 ) return polygon;
    \n+
    165 if( t.dim() == 3 ) return polyhedron;
    \n+
    166 }
    \n+
    167
    \n+
    168 DUNE_THROW(IOError,"VTKWriter: unsupported GeometryType " << t);
    \n+
    169 }
    \n+
    170
    \n+
    172 //
    \n+
    173 // Functions for transforming the index of a corner inside an entity
    \n+
    174 // between Dune and VTK
    \n+
    175 //
    \n+
    176
    \n+
    178
    \n+
    186 inline int renumber(const Dune::GeometryType &t, int i)
    \n+
    187 {
    \n+
    188 static const int quadRenumbering[4] = {0,1,3,2};
    \n+
    189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6};
    \n+
    190 static const int prismRenumbering[6] = {0,2,1,3,5,4};
    \n+
    191 static const int pyramidRenumbering[5] = {0,1,3,2,4};
    \n+
    192
    \n+
    193 if (t.isQuadrilateral()) return quadRenumbering[i];
    \n+
    194 if (t.isPyramid()) return pyramidRenumbering[i];
    \n+
    195 if (t.isPrism()) return prismRenumbering[i];
    \n+
    196 if (t.isHexahedron()) return cubeRenumbering[i];
    \n+
    197
    \n+
    198 return i;
    \n+
    199 }
    \n+
    200
    \n+
    202
    \n+
    216 template<typename T>
    \n+
    217 int renumber(const T& t, int i)
    \n+
    218 {
    \n+
    219 return renumber(t.type(), i);
    \n+
    220 }
    \n+
    221
    \n+
    223 //
    \n+
    224 // Determine Endianness
    \n+
    225 //
    \n+
    226
    \n+
    228
    \n+
    232 inline std::string getEndiannessString()
    \n+
    233 {
    \n+
    234 short i = 1;
    \n+
    235 if (reinterpret_cast<char*>(&i)[1] == 1)
    \n+
    236 return "BigEndian";
    \n+
    237 else
    \n+
    238 return "LittleEndian";
    \n+
    239 }
    \n+
    240
    \n+
    242 //
    \n+
    243 // which type of vtkfile to write
    \n+
    244 //
    \n+
    245
    \n+
    247
    \n+
    252 enum FileType {
    \n+\n+\n+
    257 };
    \n+
    258
    \n+
    259
    \n+
    261 //
    \n+
    262 // which precision to use when writing out data
    \n+
    263 //
    \n+
    264
    \n+
    266
    \n+
    271 enum class Precision {
    \n+
    272 int32,
    \n+
    273 uint8,
    \n+
    274 uint32,
    \n+
    275 float32,
    \n+
    276 float64
    \n+
    277 };
    \n+
    278
    \n+
    280 inline std::string toString(Precision p)
    \n+
    281 {
    \n+
    282 switch(p)
    \n+
    283 {
    \n+\n+
    285 return "Float32";
    \n+\n+
    287 return "Float64";
    \n+\n+
    289 return "UInt32";
    \n+
    290 case Precision::uint8:
    \n+
    291 return "UInt8";
    \n+
    292 case Precision::int32:
    \n+
    293 return "Int32";
    \n+
    294 default:
    \n+
    295 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
    \n+
    296 }
    \n+
    297 }
    \n+
    298
    \n+
    300 inline std::size_t typeSize(Precision p)
    \n+
    301 {
    \n+
    302 switch(p)
    \n+
    303 {
    \n+\n+
    305 return sizeof(float);
    \n+\n+
    307 return sizeof(double);
    \n+\n+
    309 return sizeof(std::uint32_t);
    \n+
    310 case Precision::uint8:
    \n+
    311 return sizeof(std::uint8_t);
    \n+
    312 case Precision::int32:
    \n+
    313 return sizeof(std::int32_t);
    \n+
    314 default:
    \n+
    315 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
    \n+
    316 }
    \n+
    317 }
    \n+
    318
    \n+
    320
    \n+\n+
    328 {
    \n+
    329
    \n+
    330 public:
    \n+
    331
    \n+
    333 enum class Type {
    \n+
    336 scalar,
    \n+
    338 vector,
    \n+
    340 tensor
    \n+
    341 };
    \n+
    342
    \n+
    344 FieldInfo(std::string name, Type type, std::size_t size, Precision prec = Precision::float32)
    \n+
    345 : _name(name)
    \n+
    346 , _type(type)
    \n+
    347 , _size(size)
    \n+
    348 , _prec(prec)
    \n+
    349 {}
    \n+
    350
    \n+
    352 std::string name() const
    \n+
    353 {
    \n+
    354 return _name;
    \n+
    355 }
    \n+
    356
    \n+
    358 Type type() const
    \n+
    359 {
    \n+
    360 return _type;
    \n+
    361 }
    \n+
    362
    \n+
    364 std::size_t size() const
    \n+
    365 {
    \n+
    366 return _size;
    \n+
    367 }
    \n+
    368
    \n+\n+
    371 {
    \n+
    372 return _prec;
    \n+
    373 }
    \n+
    374
    \n+
    375 private:
    \n+
    376
    \n+
    377 std::string _name;
    \n+
    378 Type _type;
    \n+
    379 std::size_t _size;
    \n+
    380 Precision _prec;
    \n+
    381
    \n+
    382 };
    \n+
    383
    \n+
    384
    \n+
    385 } // namespace VTK
    \n+
    386
    \n+
    388
    \n+
    389} // namespace Dune
    \n+
    390
    \n+
    391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: basicwriter.hh:35
    \n-
    void addCellData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:76
    \n-
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n-
    Definition: boundaryiterators.hh:159
    \n-
    Definition: boundarywriter.hh:26
    \n-
    void addPointData(const std::shared_ptr< Func > &p, const std::string &name)
    Definition: boundarywriter.hh:53
    \n-
    void addCellData(Func *p, const std::string &name)
    Definition: boundarywriter.hh:46
    \n-
    void addPointData(Func *p, const std::string &name)
    Definition: boundarywriter.hh:59
    \n-
    NonConformingBoundaryWriter(const GV &gv_)
    Definition: boundarywriter.hh:33
    \n-
    void addCellData(const std::shared_ptr< Func > &p, const std::string &name)
    Definition: boundarywriter.hh:40
    \n-
    function writer for skeleton functions
    Definition: skeletonfunction.hh:83
    \n+
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n+\n+\n+\n+\n+\n+
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n+
    @ ascii
    Output to the file is in ascii.
    Definition: common.hh:45
    \n+
    @ appendedraw
    Output is to the file is appended raw binary.
    Definition: common.hh:49
    \n+
    @ appendedbase64
    Output is to the file is appended base64 binary.
    Definition: common.hh:51
    \n+
    @ base64
    Output to the file is inline base64 binary.
    Definition: common.hh:47
    \n+
    int renumber(const Dune::GeometryType &t, int i)
    renumber VTK <-> Dune
    Definition: common.hh:186
    \n+
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n+
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n+
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n+
    std::string toString(Precision p)
    map precision to VTK type name
    Definition: common.hh:280
    \n+
    DataMode
    Whether to produce conforming or non-conforming output.
    Definition: common.hh:67
    \n+
    @ conforming
    Output conforming data.
    Definition: common.hh:73
    \n+
    @ nonconforming
    Output non-conforming data.
    Definition: common.hh:81
    \n+
    std::size_t typeSize(Precision p)
    map precision to byte size
    Definition: common.hh:300
    \n+
    GeometryType geometryType(const Dune::GeometryType &t)
    mapping from GeometryType to VTKGeometryType
    Definition: common.hh:151
    \n+
    std::string getEndiannessString()
    determine endianness of this C++ implementation
    Definition: common.hh:232
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    @ line
    Definition: common.hh:134
    \n+
    @ pyramid
    Definition: common.hh:141
    \n+
    @ polyhedron
    Definition: common.hh:142
    \n+
    @ quadrilateral
    Definition: common.hh:137
    \n+
    @ vertex
    Definition: common.hh:133
    \n+
    @ tetrahedron
    Definition: common.hh:138
    \n+
    @ prism
    Definition: common.hh:140
    \n+
    @ hexahedron
    Definition: common.hh:139
    \n+
    @ triangle
    Definition: common.hh:135
    \n+
    @ polygon
    Definition: common.hh:136
    \n+
    determine a type to safely put another type into a stream
    Definition: common.hh:95
    \n+
    T Type
    type to convert T to before putting it into a stream with <<
    Definition: common.hh:97
    \n+
    unsigned Type
    Definition: common.hh:102
    \n+
    int Type
    Definition: common.hh:107
    \n+
    std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type Type
    Definition: common.hh:114
    \n+
    Descriptor struct for VTK fields.
    Definition: common.hh:328
    \n+
    std::size_t size() const
    The number of components in the data field.
    Definition: common.hh:364
    \n+
    Precision precision() const
    The precision used for the output of the data field.
    Definition: common.hh:370
    \n+
    Type
    VTK data type.
    Definition: common.hh:333
    \n+
    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
    \n+
    Type type() const
    The type of the data field.
    Definition: common.hh:358
    \n+
    std::string name() const
    The name of the data field.
    Definition: common.hh:352
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,119 +7,444 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-boundarywriter.hh\n+common.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH\n 8\n- 9#include \n- 10#include \n- 11\n- 12#include \n- 13#include \n- 14#include \n- 15\n- 16namespace Dune {\n- 19\n- 20 namespace VTK {\n- 21\n- 22 template\n-23 class NonConformingBoundaryWriter\n- 24 : public NonConformingBoundaryIteratorFactory,\n- 25 public BasicWriter >\n- 26 {\n- 27 typedef NonConformingBoundaryIteratorFactory Factory;\n- 28 typedef BasicWriter Base;\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16#include \n+ 17\n+ 25namespace Dune\n+ 26{\n 29\n- 30 const GV& gv;\n+ 30 namespace VTK {\n 31\n- 32 public:\n-33 NonConformingBoundaryWriter(const GV& gv_)\n- 34 : Factory(gv_), Base(static_cast(*this)), gv(gv_)\n- 35 { }\n+ 33 //\n+ 34 // VTKOptions\n+ 35 //\n 36\n- 37 using Base::addCellData;\n 38\n- 39 template\n-40 void addCellData(const std::shared_ptr& p, const std::string& name) {\n- 41 addCellData(std::shared_ptr\n- 42 (new SkeletonFunctionWriter(p, name)));\n- 43 }\n- 44\n- 45 template\n-46 void addCellData(Func* p, const std::string& name) {\n- 47 addCellData(std::shared_ptr(p), name);\n- 48 }\n- 49\n- 50 using Base::addPointData;\n- 51\n- 52 template\n-53 void addPointData(const std::shared_ptr& p, const std::string& name) {\n- 54 addPointData(std::shared_ptr\n- 55 (new SkeletonFunctionWriter(p, name)));\n- 56 }\n- 57\n- 58 template\n-59 void addPointData(Func* p, const std::string& name) {\n- 60 addPointData(std::shared_ptr(p), name);\n- 61 }\n- 62\n- 63 };\n- 64\n- 65 } // namespace VTK\n- 66\n- 68\n- 69} // namespace Dune\n- 70\n- 71#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYWRITER_HH\n-basicwriter.hh\n-skeletonfunction.hh\n-Functions for VTK output on the skeleton.\n-boundaryiterators.hh\n-Functions for VTK output on the skeleton.\n+43 enum OutputType {\n+45 ascii,\n+47 base64,\n+49 appendedraw,\n+ 51 appendedbase64\n+ 52 // //! Output to the file is compressed inline binary.\n+ 53 // binarycompressed,\n+ 54 // //! Output is compressed and appended to the file.\n+ 55 // compressedappended\n+56 };\n+ 58\n+67 enum DataMode {\n+ 69\n+73 conforming,\n+ 75\n+ 81 nonconforming\n+82 };\n+ 83\n+ 85 //\n+ 86 // PrintType\n+ 87 //\n+ 88\n+ 90\n+ 94 template\n+95 struct PrintType {\n+97 typedef T Type;\n+ 98 };\n+ 99\n+ 100 template<>\n+101 struct PrintType {\n+102 typedef unsigned Type;\n+ 103 };\n+ 104\n+ 105 template<>\n+106 struct PrintType {\n+107 typedef int Type;\n+ 108 };\n+ 109\n+ 110 template<>\n+111 struct PrintType {\n+ 112 typedef std::conditional::is_signed,\n+ 113 int, unsigned>::type\n+114 Type;\n+ 115 };\n+ 116\n+ 118 //\n+ 119 // VTK::GeometryType related stuff\n+ 120 //\n+ 121\n+ 123\n+132 enum GeometryType {\n+133 vertex = 1,\n+134 line = 3,\n+135 triangle = 5,\n+136 polygon = 7,\n+137 quadrilateral = 9,\n+138 tetrahedron = 10,\n+139 hexahedron = 12,\n+140 prism = 13,\n+141 pyramid = 14,\n+ 142 polyhedron = 42\n+143 };\n+ 144\n+ 146\n+151 inline GeometryType geometryType(const Dune::GeometryType& t)\n+ 152 {\n+ 153 if (t.isVertex()) return vertex;\n+ 154 if (t.isLine()) return line;\n+ 155 if (t.isTriangle()) return triangle;\n+ 156 if (t.isQuadrilateral()) return quadrilateral;\n+ 157 if (t.isTetrahedron()) return tetrahedron;\n+ 158 if (t.isPyramid()) return pyramid;\n+ 159 if (t.isPrism()) return prism;\n+ 160 if (t.isHexahedron()) return hexahedron;\n+ 161\n+ 162 if (t.isNone() )\n+ 163 {\n+ 164 if( t.dim() == 2 ) return polygon;\n+ 165 if( t.dim() == 3 ) return polyhedron;\n+ 166 }\n+ 167\n+ 168 DUNE_THROW(IOError,\"VTKWriter: unsupported GeometryType \" << t);\n+ 169 }\n+ 170\n+ 172 //\n+ 173 // Functions for transforming the index of a corner inside an entity\n+ 174 // between Dune and VTK\n+ 175 //\n+ 176\n+ 178\n+186 inline int renumber(const Dune::GeometryType &t, int i)\n+ 187 {\n+ 188 static const int quadRenumbering[4] = {0,1,3,2};\n+ 189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6};\n+ 190 static const int prismRenumbering[6] = {0,2,1,3,5,4};\n+ 191 static const int pyramidRenumbering[5] = {0,1,3,2,4};\n+ 192\n+ 193 if (t.isQuadrilateral()) return quadRenumbering[i];\n+ 194 if (t.isPyramid()) return pyramidRenumbering[i];\n+ 195 if (t.isPrism()) return prismRenumbering[i];\n+ 196 if (t.isHexahedron()) return cubeRenumbering[i];\n+ 197\n+ 198 return i;\n+ 199 }\n+ 200\n+ 202\n+ 216 template\n+217 int renumber(const T& t, int i)\n+ 218 {\n+ 219 return renumber(t.type(), i);\n+ 220 }\n+ 221\n+ 223 //\n+ 224 // Determine Endianness\n+ 225 //\n+ 226\n+ 228\n+232 inline std::string getEndiannessString()\n+ 233 {\n+ 234 short i = 1;\n+ 235 if (reinterpret_cast(&i)[1] == 1)\n+ 236 return \"BigEndian\";\n+ 237 else\n+ 238 return \"LittleEndian\";\n+ 239 }\n+ 240\n+ 242 //\n+ 243 // which type of vtkfile to write\n+ 244 //\n+ 245\n+ 247\n+252 enum FileType {\n+254 polyData,\n+ 256 unstructuredGrid\n+257 };\n+ 258\n+ 259\n+ 261 //\n+ 262 // which precision to use when writing out data\n+ 263 //\n+ 264\n+ 266\n+271 enum class Precision {\n+ 272 int32,\n+ 273 uint8,\n+ 274 uint32,\n+ 275 float32,\n+ 276 float64\n+ 277 };\n+ 278\n+280 inline std::string toString(Precision p)\n+ 281 {\n+ 282 switch(p)\n+ 283 {\n+ 284 case Precision::float32:\n+ 285 return \"Float32\";\n+ 286 case Precision::float64:\n+ 287 return \"Float64\";\n+ 288 case Precision::uint32:\n+ 289 return \"UInt32\";\n+ 290 case Precision::uint8:\n+ 291 return \"UInt8\";\n+ 292 case Precision::int32:\n+ 293 return \"Int32\";\n+ 294 default:\n+ 295 DUNE_THROW(Dune::NotImplemented, \"Unknown precision type\");\n+ 296 }\n+ 297 }\n+ 298\n+300 inline std::size_t typeSize(Precision p)\n+ 301 {\n+ 302 switch(p)\n+ 303 {\n+ 304 case Precision::float32:\n+ 305 return sizeof(float);\n+ 306 case Precision::float64:\n+ 307 return sizeof(double);\n+ 308 case Precision::uint32:\n+ 309 return sizeof(std::uint32_t);\n+ 310 case Precision::uint8:\n+ 311 return sizeof(std::uint8_t);\n+ 312 case Precision::int32:\n+ 313 return sizeof(std::int32_t);\n+ 314 default:\n+ 315 DUNE_THROW(Dune::NotImplemented, \"Unknown precision type\");\n+ 316 }\n+ 317 }\n+ 318\n+ 320\n+327 class FieldInfo\n+ 328 {\n+ 329\n+ 330 public:\n+ 331\n+333 enum class Type {\n+ 336 scalar,\n+ 338 vector,\n+ 340 tensor\n+ 341 };\n+ 342\n+344 FieldInfo(std::string name, Type type, std::size_t size, Precision prec =\n+Precision::float32)\n+ 345 : _name(name)\n+ 346 , _type(type)\n+ 347 , _size(size)\n+ 348 , _prec(prec)\n+ 349 {}\n+ 350\n+352 std::string name() const\n+ 353 {\n+ 354 return _name;\n+ 355 }\n+ 356\n+358 Type type() const\n+ 359 {\n+ 360 return _type;\n+ 361 }\n+ 362\n+364 std::size_t size() const\n+ 365 {\n+ 366 return _size;\n+ 367 }\n+ 368\n+370 Precision precision() const\n+ 371 {\n+ 372 return _prec;\n+ 373 }\n+ 374\n+ 375 private:\n+ 376\n+ 377 std::string _name;\n+ 378 Type _type;\n+ 379 std::size_t _size;\n+ 380 Precision _prec;\n+ 381\n+ 382 };\n+ 383\n+ 384\n+ 385 } // namespace VTK\n+ 386\n+ 388\n+ 389} // namespace Dune\n+ 390\n+ 391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::BasicWriter\n-Definition: basicwriter.hh:35\n-Dune::VTK::BasicWriter::addCellData\n-void addCellData(const std::shared_ptr< FunctionWriter > &writer)\n-Definition: basicwriter.hh:76\n-Dune::VTK::BasicWriter::addPointData\n-void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n-Definition: basicwriter.hh:80\n-Dune::VTK::NonConformingBoundaryIteratorFactory\n-Definition: boundaryiterators.hh:159\n-Dune::VTK::NonConformingBoundaryWriter\n-Definition: boundarywriter.hh:26\n-Dune::VTK::NonConformingBoundaryWriter::addPointData\n-void addPointData(const std::shared_ptr< Func > &p, const std::string &name)\n-Definition: boundarywriter.hh:53\n-Dune::VTK::NonConformingBoundaryWriter::addCellData\n-void addCellData(Func *p, const std::string &name)\n-Definition: boundarywriter.hh:46\n-Dune::VTK::NonConformingBoundaryWriter::addPointData\n-void addPointData(Func *p, const std::string &name)\n-Definition: boundarywriter.hh:59\n-Dune::VTK::NonConformingBoundaryWriter::NonConformingBoundaryWriter\n-NonConformingBoundaryWriter(const GV &gv_)\n-Definition: boundarywriter.hh:33\n-Dune::VTK::NonConformingBoundaryWriter::addCellData\n-void addCellData(const std::shared_ptr< Func > &p, const std::string &name)\n-Definition: boundarywriter.hh:40\n-Dune::VTK::SkeletonFunctionWriter\n-function writer for skeleton functions\n-Definition: skeletonfunction.hh:83\n+Dune::VTK::Precision\n+Precision\n+which precision to use when writing out data to vtk files\n+Definition: common.hh:271\n+Dune::VTK::Precision::int32\n+@ int32\n+Dune::VTK::Precision::uint32\n+@ uint32\n+Dune::VTK::Precision::uint8\n+@ uint8\n+Dune::VTK::Precision::float32\n+@ float32\n+Dune::VTK::Precision::float64\n+@ float64\n+Dune::VTK::OutputType\n+OutputType\n+How the bulk data should be stored in the file.\n+Definition: common.hh:43\n+Dune::VTK::ascii\n+@ ascii\n+Output to the file is in ascii.\n+Definition: common.hh:45\n+Dune::VTK::appendedraw\n+@ appendedraw\n+Output is to the file is appended raw binary.\n+Definition: common.hh:49\n+Dune::VTK::appendedbase64\n+@ appendedbase64\n+Output is to the file is appended base64 binary.\n+Definition: common.hh:51\n+Dune::VTK::base64\n+@ base64\n+Output to the file is inline base64 binary.\n+Definition: common.hh:47\n+Dune::VTK::renumber\n+int renumber(const Dune::GeometryType &t, int i)\n+renumber VTK <-> Dune\n+Definition: common.hh:186\n+Dune::VTK::FileType\n+FileType\n+which type of VTK file to write\n+Definition: common.hh:252\n+Dune::VTK::polyData\n+@ polyData\n+for .vtp files (PolyData)\n+Definition: common.hh:254\n+Dune::VTK::unstructuredGrid\n+@ unstructuredGrid\n+for .vtu files (UnstructuredGrid)\n+Definition: common.hh:256\n+Dune::VTK::toString\n+std::string toString(Precision p)\n+map precision to VTK type name\n+Definition: common.hh:280\n+Dune::VTK::DataMode\n+DataMode\n+Whether to produce conforming or non-conforming output.\n+Definition: common.hh:67\n+Dune::VTK::conforming\n+@ conforming\n+Output conforming data.\n+Definition: common.hh:73\n+Dune::VTK::nonconforming\n+@ nonconforming\n+Output non-conforming data.\n+Definition: common.hh:81\n+Dune::VTK::typeSize\n+std::size_t typeSize(Precision p)\n+map precision to byte size\n+Definition: common.hh:300\n+Dune::VTK::geometryType\n+GeometryType geometryType(const Dune::GeometryType &t)\n+mapping from GeometryType to VTKGeometryType\n+Definition: common.hh:151\n+Dune::VTK::getEndiannessString\n+std::string getEndiannessString()\n+determine endianness of this C++ implementation\n+Definition: common.hh:232\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::VTK::line\n+@ line\n+Definition: common.hh:134\n+Dune::VTK::pyramid\n+@ pyramid\n+Definition: common.hh:141\n+Dune::VTK::polyhedron\n+@ polyhedron\n+Definition: common.hh:142\n+Dune::VTK::quadrilateral\n+@ quadrilateral\n+Definition: common.hh:137\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n+Dune::VTK::tetrahedron\n+@ tetrahedron\n+Definition: common.hh:138\n+Dune::VTK::prism\n+@ prism\n+Definition: common.hh:140\n+Dune::VTK::hexahedron\n+@ hexahedron\n+Definition: common.hh:139\n+Dune::VTK::triangle\n+@ triangle\n+Definition: common.hh:135\n+Dune::VTK::polygon\n+@ polygon\n+Definition: common.hh:136\n+Dune::VTK::PrintType\n+determine a type to safely put another type into a stream\n+Definition: common.hh:95\n+Dune::VTK::PrintType::Type\n+T Type\n+type to convert T to before putting it into a stream with <<\n+Definition: common.hh:97\n+Dune::VTK::PrintType<_unsigned_char_>::Type\n+unsigned Type\n+Definition: common.hh:102\n+Dune::VTK::PrintType<_signed_char_>::Type\n+int Type\n+Definition: common.hh:107\n+Dune::VTK::PrintType<_char_>::Type\n+std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type\n+Type\n+Definition: common.hh:114\n+Dune::VTK::FieldInfo\n+Descriptor struct for VTK fields.\n+Definition: common.hh:328\n+Dune::VTK::FieldInfo::size\n+std::size_t size() const\n+The number of components in the data field.\n+Definition: common.hh:364\n+Dune::VTK::FieldInfo::precision\n+Precision precision() const\n+The precision used for the output of the data field.\n+Definition: common.hh:370\n+Dune::VTK::FieldInfo::Type\n+Type\n+VTK data type.\n+Definition: common.hh:333\n+Dune::VTK::FieldInfo::FieldInfo\n+FieldInfo(std::string name, Type type, std::size_t size, Precision\n+prec=Precision::float32)\n+Create a FieldInfo instance with the given name, type and size.\n+Definition: common.hh:344\n+Dune::VTK::FieldInfo::type\n+Type type() const\n+The type of the data field.\n+Definition: common.hh:358\n+Dune::VTK::FieldInfo::name\n+std::string name() const\n+The name of the data field.\n+Definition: common.hh:352\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00800.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00800.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: function.hh File Reference\n+dune-grid: basicwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -65,52 +65,47 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    function.hh File Reference
    \n+
    basicwriter.hh File Reference
    \n
    \n
    \n-\n-

    Functions for VTK output. \n-More...

    \n-
    #include <string>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/geometry/type.hh>
    \n+
    #include <fstream>
    \n+#include <iomanip>
    \n+#include <iterator>
    \n+#include <list>
    \n+#include <memory>
    \n+#include <sstream>
    \n+#include <string>
    \n+#include <dune/common/parallel/mpiguard.hh>
    \n+#include <dune/common/path.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n-#include <dune/geometry/multilineargeometry.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n-#include <dune/grid/io/file/vtk/common.hh>
    \n+#include <dune/grid/io/file/vtk/common.hh>
    \n+#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n+#include <dune/grid/io/file/vtk/pvtuwriter.hh>
    \n+#include <dune/grid/io/file/vtk/vtuwriter.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n+\n \n

    \n 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::VTK::BasicWriter< IteratorFactory >
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-

    Detailed Description

    \n-

    Functions for VTK output.

    \n-
    Author
    Peter Bastian, Christian Engwer
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,40 +8,35 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-function.hh File Reference\n-Functions for VTK output. More...\n+basicwriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n+#include \n+#include \n #include \n-#include \n-#include \n #include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTKFunction<_GridView_>\n-\u00a0 A base class for grid functions with any return type and dimension.\n- More...\n-\u00a0\n-class \u00a0Dune::P0VTKFunction<_GV,_V_>\n-\u00a0 Take a vector and interpret it as cell data for the VTKWriter. More...\n-\u00a0\n-class \u00a0Dune::P1VTKFunction<_GV,_V_>\n-\u00a0 Take a vector and interpret it as point data for the VTKWriter. More...\n+class \u00a0Dune::VTK::BasicWriter<_IteratorFactory_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Functions for VTK output.\n- Author\n- Peter Bastian, Christian Engwer\n+namespace \u00a0Dune::VTK\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00800_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: function.hh Source File\n+dune-grid: basicwriter.hh Source File\n \n \n \n \n \n \n \n@@ -62,244 +62,448 @@\n \n \n \n
    \n-
    function.hh
    \n+
    basicwriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
    \n
    8
    \n-
    9#include <string>
    \n-
    10
    \n-
    11#include <dune/common/exceptions.hh>
    \n-
    12#include <dune/common/fvector.hh>
    \n-
    13
    \n-
    14#include <dune/geometry/type.hh>
    \n-
    15#include <dune/geometry/referenceelements.hh>
    \n-
    16#include <dune/geometry/multilineargeometry.hh>
    \n-
    17
    \n-\n-\n-
    20
    \n-
    26namespace Dune
    \n-
    27{
    \n-
    30
    \n-
    32 //
    \n-
    33 // Base VTKFunction
    \n-
    34 //
    \n-
    35
    \n-
    40 template< class GridView >
    \n-\n-
    42 {
    \n-
    43 public:
    \n-
    44 typedef typename GridView::ctype ctype;
    \n-
    45 constexpr static int dim = GridView::dimension;
    \n-
    46 typedef typename GridView::template Codim< 0 >::Entity Entity;
    \n-
    47
    \n-
    50 virtual int ncomps () const = 0;
    \n-
    51
    \n-
    53
    \n-
    60 virtual double evaluate (int comp, const Entity& e,
    \n-
    61 const Dune::FieldVector<ctype,dim>& xi) const = 0;
    \n-
    62
    \n-
    64 virtual std::string name () const = 0;
    \n+
    9#include <fstream>
    \n+
    10#include <iomanip>
    \n+
    11#include <iterator>
    \n+
    12#include <list>
    \n+
    13#include <memory>
    \n+
    14#include <sstream>
    \n+
    15#include <string>
    \n+
    16
    \n+
    17#include <dune/common/parallel/mpiguard.hh>
    \n+
    18#include <dune/common/path.hh>
    \n+
    19
    \n+
    20#include <dune/geometry/referenceelements.hh>
    \n+
    21
    \n+\n+\n+\n+\n+
    26
    \n+
    27namespace Dune
    \n+
    28{
    \n+
    31
    \n+
    32 namespace VTK {
    \n+
    33
    \n+
    34 template<typename IteratorFactory>
    \n+\n+
    36 typedef typename IteratorFactory::CellIterator CellIterator;
    \n+
    37 typedef typename IteratorFactory::CornerIterator CornerIterator;
    \n+
    38 typedef typename IteratorFactory::PointIterator PointIterator;
    \n+
    39
    \n+
    40 typedef typename IteratorFactory::Cell Cell;
    \n+
    41
    \n+
    42 public:
    \n+\n+
    44
    \n+
    45 private:
    \n+
    46 typedef std::list<std::shared_ptr<FunctionWriter> > WriterList;
    \n+
    47 typedef typename WriterList::const_iterator WIterator;
    \n+
    48
    \n+
    49 typedef typename Cell::Geometry::ctype ctype;
    \n+
    50 static const unsigned celldim = Cell::mydimension;
    \n+
    51 typedef ReferenceElements<ctype, celldim> Refelems;
    \n+
    52
    \n+
    53 static const FileType fileType = celldim == 1
    \n+\n+
    55
    \n+
    56 const IteratorFactory& factory;
    \n+
    57
    \n+
    58 WriterList cellData;
    \n+
    59 WriterList pointData;
    \n+
    60
    \n+\n+
    62 typename IteratorFactory::ConnectivityWriter connectivity;
    \n+
    63 OffsetsWriter<Cell> offsets;
    \n+\n
    65
    \n-
    67 virtual VTK::Precision precision() const
    \n-
    68 { return VTK::Precision::float32; }
    \n-
    69
    \n-
    71 virtual ~VTKFunction () {}
    \n-
    72 };
    \n-
    73
    \n-
    75 //
    \n-
    76 // P0VTKFunction
    \n-
    77 //
    \n-
    78
    \n-
    80
    \n-
    94 template<typename GV, typename V>
    \n-\n-
    96 : public VTKFunction< GV >
    \n-
    97 {
    \n-
    99 typedef VTKFunction< GV > Base;
    \n-\n-
    102
    \n-
    104 const V& v;
    \n-
    106 std::string s;
    \n-
    108 int ncomps_;
    \n-
    111 int mycomp_;
    \n-
    113 VTK::Precision prec_;
    \n-
    115 Mapper mapper;
    \n-
    116
    \n-
    117 public:
    \n-
    118 typedef typename Base::Entity Entity;
    \n-
    119 typedef typename Base::ctype ctype;
    \n-
    120 using Base::dim;
    \n-
    121
    \n-
    123 int ncomps () const override
    \n-
    124 {
    \n-
    125 return 1;
    \n-
    126 }
    \n-
    127
    \n-
    129 double evaluate (int, const Entity& e,
    \n-
    130 const Dune::FieldVector<ctype,dim>&) const override
    \n-
    131 {
    \n-
    132 return v[mapper.index(e)*ncomps_+mycomp_];
    \n-
    133 }
    \n-
    134
    \n-
    136 std::string name () const override
    \n-
    137 {
    \n-
    138 return s;
    \n-
    139 }
    \n-
    140
    \n-
    142 VTK::Precision precision() const override
    \n-
    143 {
    \n-
    144 return prec_;
    \n-
    145 }
    \n-
    146
    \n-
    148
    \n-
    165 P0VTKFunction(const GV &gv, const V &v_, const std::string &s_,
    \n-
    166 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
    \n-
    167 : v( v_ ),
    \n-
    168 s( s_ ),
    \n-
    169 ncomps_(ncomps),
    \n-
    170 mycomp_(mycomp),
    \n-
    171 prec_(prec),
    \n-
    172 mapper( gv, mcmgElementLayout() )
    \n-
    173 {
    \n-
    174 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
    \n-
    175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch");
    \n-
    176 }
    \n-
    177
    \n-
    179 virtual ~P0VTKFunction() {}
    \n-
    180 };
    \n+
    66 public:
    \n+
    67 BasicWriter(const IteratorFactory& factory_)
    \n+
    68 : factory(factory_), connectivity(factory.makeConnectivity())
    \n+
    69 { }
    \n+
    70
    \n+
    72 //
    \n+
    73 // Methods for adding data
    \n+
    74 //
    \n+
    75
    \n+
    76 void addCellData(const std::shared_ptr<FunctionWriter>& writer) {
    \n+
    77 cellData.push_back(writer);
    \n+
    78 }
    \n+
    79
    \n+
    80 void addPointData(const std::shared_ptr<FunctionWriter>& writer) {
    \n+
    81 pointData.push_back(writer);
    \n+
    82 }
    \n+
    83
    \n+
    84 void clear() {
    \n+
    85 cellData.clear();
    \n+
    86 pointData.clear();
    \n+
    87 }
    \n+
    88
    \n+
    89 protected:
    \n+
    91 //
    \n+
    92 // Methods for writing single functions
    \n+
    93 //
    \n+
    94
    \n+\n+
    96 FunctionWriter& functionWriter,
    \n+
    97 unsigned ncells) const
    \n+
    98 {
    \n+
    99 if(functionWriter.beginWrite(vtuWriter, ncells)) {
    \n+
    100 const CellIterator& cellend = factory.endCells();
    \n+
    101 for(CellIterator cellit = factory.beginCells(); cellit != cellend;
    \n+
    102 ++cellit)
    \n+
    103 functionWriter.write(*cellit, Refelems::general(cellit->type()).
    \n+
    104 position(0,0));
    \n+
    105 }
    \n+
    106 functionWriter.endWrite();
    \n+
    107 }
    \n+
    108
    \n+\n+
    110 FunctionWriter& functionWriter,
    \n+
    111 unsigned npoints) const
    \n+
    112 {
    \n+
    113 if(functionWriter.beginWrite(vtuWriter, npoints)) {
    \n+
    114 const PointIterator& pend = factory.endPoints();
    \n+
    115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit)
    \n+
    116 functionWriter.write(pit->cell(), pit->duneIndex());
    \n+
    117 }
    \n+
    118 functionWriter.endWrite();
    \n+
    119 }
    \n+
    120
    \n+\n+
    122 FunctionWriter& functionWriter,
    \n+
    123 unsigned ncorners) const
    \n+
    124 {
    \n+
    125 if(functionWriter.beginWrite(vtuWriter, ncorners)) {
    \n+
    126 const CornerIterator& cend = factory.endCorners();
    \n+
    127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit)
    \n+
    128 functionWriter.write(cit->cell(), cit->duneIndex());
    \n+
    129 }
    \n+
    130 functionWriter.endWrite();
    \n+
    131 }
    \n+
    132
    \n+
    134 //
    \n+
    135 // Methods for writing whole sections
    \n+
    136 //
    \n+
    137
    \n+
    138 static std::string getFirstScalar(const WriterList& data) {
    \n+
    139 const WIterator& wend = data.end();
    \n+
    140 for(WIterator wit = data.begin(); wit != wend; ++wit)
    \n+
    141 if((*wit)->ncomps() == 1)
    \n+
    142 return (*wit)->name();
    \n+
    143 return "";
    \n+
    144 }
    \n+
    145
    \n+
    146 static std::string getFirstVector(const WriterList& data) {
    \n+
    147 const WIterator& wend = data.end();
    \n+
    148 for(WIterator wit = data.begin(); wit != wend; ++wit)
    \n+
    149 if((*wit)->ncomps() == 3)
    \n+
    150 return (*wit)->name();
    \n+
    151 return "";
    \n+
    152 }
    \n+
    153
    \n+
    154 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {
    \n+
    155 if(cellData.empty()) return;
    \n+
    156
    \n+
    157 vtuWriter.beginCellData(getFirstScalar(cellData),
    \n+
    158 getFirstVector(cellData));
    \n+
    159 const WIterator& wend = cellData.end();
    \n+
    160 for(WIterator wit = cellData.begin(); wit != wend; ++wit)
    \n+
    161 writeCellFunction(vtuWriter, **wit, ncells);
    \n+
    162 vtuWriter.endCellData();
    \n+
    163 }
    \n+
    164
    \n+
    165 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {
    \n+
    166 if(pointData.empty()) return;
    \n+
    167
    \n+
    168 vtuWriter.beginPointData(getFirstScalar(pointData),
    \n+
    169 getFirstVector(pointData));
    \n+
    170 const WIterator& wend = pointData.end();
    \n+
    171 for(WIterator wit = pointData.begin(); wit != wend; ++wit)
    \n+
    172 writePointFunction(vtuWriter, **wit, npoints);
    \n+
    173 vtuWriter.endPointData();
    \n+
    174 }
    \n+
    175
    \n+
    176 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
    \n+
    177 unsigned ncorners) {
    \n+
    178 vtuWriter.beginPoints();
    \n+
    179 writePointFunction(vtuWriter, coords, npoints);
    \n+
    180 vtuWriter.endPoints();
    \n
    181
    \n-
    183 //
    \n-
    184 // P1VTKFunction
    \n-
    185 //
    \n-
    186
    \n-
    188
    \n-
    202 template<typename GV, typename V>
    \n-\n-
    204 : public VTKFunction< GV >
    \n-
    205 {
    \n-
    207 typedef VTKFunction< GV > Base;
    \n-\n-
    210
    \n-
    212 const V& v;
    \n-
    214 std::string s;
    \n-
    216 int ncomps_;
    \n-
    219 int mycomp_;
    \n-
    221 VTK::Precision prec_;
    \n-
    223 Mapper mapper;
    \n+
    182 vtuWriter.beginCells();
    \n+
    183 writeCornerFunction(vtuWriter, connectivity, ncorners);
    \n+
    184 writeCellFunction(vtuWriter, offsets, ncells);
    \n+
    185 if(fileType != polyData)
    \n+
    186 writeCellFunction(vtuWriter, types, ncells);
    \n+
    187 vtuWriter.endCells();
    \n+
    188 }
    \n+
    189
    \n+
    190 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,
    \n+
    191 unsigned ncorners) {
    \n+
    192 writeCellData(vtuWriter, ncells);
    \n+
    193 writePointData(vtuWriter, npoints);
    \n+
    194 writeGrid(vtuWriter, ncells, npoints, ncorners);
    \n+
    195 }
    \n+
    196
    \n+
    197 public:
    \n+
    198 void writePiece(const std::string& filename, OutputType outputType) {
    \n+
    199 std::ofstream stream;
    \n+
    200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n+
    201 std::ios_base::eofbit);
    \n+
    202 stream.open(filename.c_str(), std::ios::binary);
    \n+
    203
    \n+
    204 VTUWriter vtuWriter(stream, outputType, fileType);
    \n+
    205
    \n+
    206 unsigned ncells = std::distance(factory.beginCells(),
    \n+
    207 factory.endCells());
    \n+
    208 unsigned npoints = std::distance(factory.beginPoints(),
    \n+
    209 factory.endPoints());
    \n+
    210 unsigned ncorners = std::distance(factory.beginCorners(),
    \n+
    211 factory.endCorners());
    \n+
    212
    \n+
    213 vtuWriter.beginMain(ncells, npoints);
    \n+
    214 writeAll(vtuWriter, ncells, npoints, ncorners);
    \n+
    215 vtuWriter.endMain();
    \n+
    216
    \n+
    217 if(vtuWriter.beginAppended())
    \n+
    218 writeAll(vtuWriter, ncells, npoints, ncorners);
    \n+
    219 vtuWriter.endAppended();
    \n+
    220
    \n+
    221 }
    \n+
    222
    \n
    224
    \n-
    225 public:
    \n-
    226 typedef typename Base::Entity Entity;
    \n-
    227 typedef typename Base::ctype ctype;
    \n-
    228 using Base::dim;
    \n-
    229
    \n-
    231 int ncomps () const override
    \n-
    232 {
    \n-
    233 return 1;
    \n-
    234 }
    \n-
    235
    \n-
    237 double evaluate ([[maybe_unused]] int comp, const Entity& e,
    \n-
    238 const Dune::FieldVector<ctype,dim>& xi) const override
    \n-
    239 {
    \n-
    240 const unsigned int myDim = Entity::mydimension;
    \n-
    241 const unsigned int nVertices = e.subEntities(dim);
    \n-
    242
    \n-
    243 std::vector<FieldVector<ctype,1> > cornerValues(nVertices);
    \n-
    244 for (unsigned i=0; i<nVertices; ++i)
    \n-
    245 cornerValues[i] = v[mapper.subIndex(e,i,myDim)*ncomps_+mycomp_];
    \n-
    246
    \n-
    247 // (Ab)use the MultiLinearGeometry class to do multi-linear interpolation between scalars
    \n-
    248 const MultiLinearGeometry<ctype,dim,1> interpolation(e.type(), cornerValues);
    \n-
    249 return interpolation.global(xi);
    \n-
    250 }
    \n-
    251
    \n-
    253 std::string name () const override
    \n-
    254 {
    \n-
    255 return s;
    \n-
    256 }
    \n-
    257
    \n-
    259 VTK::Precision precision() const override
    \n-
    260 {
    \n-
    261 return prec_;
    \n-
    262 }
    \n-
    263
    \n-
    265
    \n-
    282 P1VTKFunction(const GV& gv, const V &v_, const std::string &s_,
    \n-
    283 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
    \n-
    284 : v( v_ ),
    \n-
    285 s( s_ ),
    \n-
    286 ncomps_(ncomps),
    \n-
    287 mycomp_(mycomp),
    \n-
    288 prec_(prec),
    \n-
    289 mapper( gv, mcmgVertexLayout() )
    \n-
    290 {
    \n-
    291 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
    \n-
    292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch");
    \n-
    293 }
    \n-
    294
    \n-
    296 virtual ~P1VTKFunction() {}
    \n-
    297 };
    \n-
    298
    \n-
    300
    \n-
    301} // namespace Dune
    \n-
    302
    \n-
    303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
    \n-
    Mapper for multiple codim and multiple geometry types.
    \n-
    Common stuff for the VTKWriter.
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n-
    Grid::ctype ctype
    type used for coordinates in grid
    Definition: common/gridview.hh:145
    \n-
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n-
    MCMGLayout mcmgVertexLayout()
    layout for vertices (dim-0 entities)
    Definition: mcmgmapper.hh:107
    \n+
    240 void writeCollection(const std::string name,
    \n+
    241 const std::string& piecename,
    \n+
    242 const std::string& piecepath)
    \n+
    243 {
    \n+
    244 std::ofstream stream;
    \n+
    245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n+
    246 std::ios_base::eofbit);
    \n+
    247 stream.open(name.c_str(), std::ios::binary);
    \n+
    248
    \n+
    249 PVTUWriter writer(stream, fileType);
    \n+
    250
    \n+
    251 writer.beginMain();
    \n+
    252
    \n+
    253 // PPointData
    \n+
    254 writer.beginPointData(getFirstScalar(pointData),
    \n+
    255 getFirstVector(pointData));
    \n+
    256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)
    \n+
    257 (*it)->addArray(writer);
    \n+
    258 writer.endPointData();
    \n+
    259
    \n+
    260 // PCellData
    \n+
    261 writer.beginCellData(getFirstScalar(cellData),
    \n+
    262 getFirstVector(cellData));
    \n+
    263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)
    \n+
    264 (*it)->addArray(writer);
    \n+
    265 writer.endCellData();
    \n+
    266
    \n+
    267 // PPoints
    \n+
    268 writer.beginPoints();
    \n+
    269 coords.addArray(writer);
    \n+
    270 writer.endPoints();
    \n+
    271
    \n+
    272 // Pieces
    \n+
    273 for( int i = 0; i < factory.comm().size(); ++i )
    \n+
    274 writer.addPiece(getParallelPieceName(piecename, piecepath, i));
    \n+
    275
    \n+
    276 writer.endMain();
    \n+
    277 }
    \n+
    278
    \n+
    280 //
    \n+
    281 // Filename generators
    \n+
    282 //
    \n+
    283
    \n+
    285
    \n+
    295 std::string getParallelPieceName(const std::string& name,
    \n+
    296 const std::string& path, int rank) const
    \n+
    297 {
    \n+
    298 std::ostringstream s;
    \n+
    299 if(path.size() > 0) {
    \n+
    300 s << path;
    \n+
    301 if(path[path.size()-1] != '/')
    \n+
    302 s << '/';
    \n+
    303 }
    \n+
    304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
    \n+
    305 << ':';
    \n+
    306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';
    \n+
    307 s << name;
    \n+
    308 switch(fileType) {
    \n+
    309 case polyData : s << ".vtp"; break;
    \n+
    310 case unstructuredGrid : s << ".vtu"; break;
    \n+
    311 }
    \n+
    312 return s.str();
    \n+
    313 }
    \n+
    314
    \n+
    316
    \n+
    325 std::string getParallelHeaderName(const std::string& name,
    \n+
    326 const std::string& path) const
    \n+
    327 {
    \n+
    328 std::ostringstream s;
    \n+
    329 if(path.size() > 0) {
    \n+
    330 s << path;
    \n+
    331 if(path[path.size()-1] != '/')
    \n+
    332 s << '/';
    \n+
    333 }
    \n+
    334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()
    \n+
    335 << ':';
    \n+
    336 s << name;
    \n+
    337 switch(fileType) {
    \n+
    338 case polyData : s << ".pvtp"; break;
    \n+
    339 case unstructuredGrid : s << ".pvtu"; break;
    \n+
    340 }
    \n+
    341 return s.str();
    \n+
    342 }
    \n+
    343
    \n+
    345
    \n+
    357 std::string getSerialPieceName(const std::string& name,
    \n+
    358 const std::string& path) const
    \n+
    359 {
    \n+
    360 switch(fileType) {
    \n+
    361 case polyData : return concatPaths(path, name+".vtp");
    \n+
    362 case unstructuredGrid : return concatPaths(path, name+".vtu");
    \n+
    363 }
    \n+
    364 return concatPaths(path, name); // unknown fileType
    \n+
    365 }
    \n+
    366
    \n+
    368 //
    \n+
    369 // User interface functions for writing
    \n+
    370 //
    \n+
    371
    \n+
    373
    \n+
    395 std::string pwrite(const std::string& name, const std::string& path,
    \n+
    396 const std::string& extendpath, OutputType outputType)
    \n+
    397 {
    \n+
    398 MPIGuard guard(factory.comm());
    \n+
    399
    \n+
    400 // do some magic because paraview can only cope with relative paths to
    \n+
    401 // piece files
    \n+
    402 std::ofstream file;
    \n+
    403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n+
    404 std::ios_base::eofbit);
    \n+
    405 std::string piecepath = concatPaths(path, extendpath);
    \n+
    406 std::string relpiecepath = relativePath(path, piecepath);
    \n+
    407
    \n+
    408 // write this processes .vtu/.vtp piece file
    \n+
    409 std::string fullname = getParallelPieceName(name, piecepath,
    \n+
    410 factory.comm().rank());
    \n+
    411 writePiece(fullname, outputType);
    \n+
    412
    \n+
    413 // if we are rank 0, write .pvtu/.pvtp parallel header
    \n+
    414 fullname = getParallelHeaderName(name, path);
    \n+
    415 if(factory.comm().rank() == 0)
    \n+
    416 writeCollection(fullname, name, relpiecepath);
    \n+
    417
    \n+
    418 guard.finalize();
    \n+
    419
    \n+
    420 return fullname;
    \n+
    421 }
    \n+
    422
    \n+
    436 std::string write(const std::string &name, OutputType outputType)
    \n+
    437 {
    \n+
    438 // in the parallel case, just use pwrite, it has all the necessary
    \n+
    439 // stuff, so we don't need to reimplement it here.
    \n+
    440 if(factory.comm().size() > 1)
    \n+
    441 return pwrite(name, "", "", outputType);
    \n+
    442
    \n+
    443 // generate filename for process data
    \n+
    444 std::string pieceName = getSerialPieceName(name, "");
    \n+
    445
    \n+
    446 writePiece(pieceName, outputType);
    \n+
    447
    \n+
    448 return pieceName;
    \n+
    449 }
    \n+
    450
    \n+
    451 };
    \n+
    452
    \n+
    453 } // namespace VTK
    \n+
    454
    \n+
    456
    \n+
    457} // namespace Dune
    \n+
    458
    \n+
    459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH
    \n+
    Common stuff for the VTKWriter.
    \n+\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-\n-
    static constexpr int mydimension
    Dimensionality of the reference element of the entity.
    Definition: common/entity.hh:112
    \n-
    Implementation class for a multiple codim and multiple geometry type mapper.
    Definition: mcmgmapper.hh:129
    \n-
    size_type size() const
    Return total number of entities in the entity set managed by the mapper.
    Definition: mcmgmapper.hh:204
    \n-
    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
    \n-
    Index index(const EntityType &e) const
    Map entity to starting index in array for dof block.
    Definition: mcmgmapper.hh:171
    \n-
    A base class for grid functions with any return type and dimension.
    Definition: function.hh:42
    \n-
    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
    \n-
    GridView::ctype ctype
    Definition: function.hh:44
    \n-
    GridView::template Codim< 0 >::Entity Entity
    Definition: function.hh:46
    \n-
    static constexpr int dim
    Definition: function.hh:45
    \n-
    virtual std::string name() const =0
    get name
    \n-
    virtual VTK::Precision precision() const
    get output precision for the field
    Definition: function.hh:67
    \n-
    virtual int ncomps() const =0
    \n-
    virtual ~VTKFunction()
    virtual destructor
    Definition: function.hh:71
    \n-
    Take a vector and interpret it as cell data for the VTKWriter.
    Definition: function.hh:97
    \n-
    std::string name() const override
    get name
    Definition: function.hh:136
    \n-
    Base::ctype ctype
    Definition: function.hh:119
    \n-
    double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) const override
    evaluate
    Definition: function.hh:129
    \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
    Definition: function.hh:165
    \n-
    VTK::Precision precision() const override
    get output precision for the field
    Definition: function.hh:142
    \n-
    Base::Entity Entity
    Definition: function.hh:118
    \n-
    virtual ~P0VTKFunction()
    destructor
    Definition: function.hh:179
    \n-
    int ncomps() const override
    return number of components
    Definition: function.hh:123
    \n-
    Take a vector and interpret it as point data for the VTKWriter.
    Definition: function.hh:205
    \n-
    std::string name() const override
    get name
    Definition: function.hh:253
    \n-
    virtual ~P1VTKFunction()
    destructor
    Definition: function.hh:296
    \n-
    Base::Entity Entity
    Definition: function.hh:226
    \n-
    Base::ctype ctype
    Definition: function.hh:227
    \n-
    VTK::Precision precision() const override
    get output precision for the field
    Definition: function.hh:259
    \n-
    double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const override
    evaluate
    Definition: function.hh:237
    \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
    Definition: function.hh:282
    \n-
    int ncomps() const override
    return number of components
    Definition: function.hh:231
    \n+
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n+
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n+
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n+
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n+
    Definition: basicwriter.hh:35
    \n+
    void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const
    Definition: basicwriter.hh:154
    \n+
    BasicWriter(const IteratorFactory &factory_)
    Definition: basicwriter.hh:67
    \n+
    std::string getSerialPieceName(const std::string &name, const std::string &path) const
    return name of a serial piece file
    Definition: basicwriter.hh:357
    \n+
    void writeCollection(const std::string name, const std::string &piecename, const std::string &piecepath)
    write header file in parallel case to stream
    Definition: basicwriter.hh:240
    \n+
    void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
    Definition: basicwriter.hh:176
    \n+
    void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned ncorners)
    Definition: basicwriter.hh:190
    \n+
    std::string pwrite(const std::string &name, const std::string &path, const std::string &extendpath, OutputType outputType)
    write output; interface might change later
    Definition: basicwriter.hh:395
    \n+
    void clear()
    Definition: basicwriter.hh:84
    \n+
    void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncells) const
    Definition: basicwriter.hh:95
    \n+
    void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned ncorners) const
    Definition: basicwriter.hh:121
    \n+
    std::string getParallelHeaderName(const std::string &name, const std::string &path) const
    return name of a parallel header file
    Definition: basicwriter.hh:325
    \n+
    void writePointData(VTUWriter &vtuWriter, unsigned npoints) const
    Definition: basicwriter.hh:165
    \n+
    static std::string getFirstVector(const WriterList &data)
    Definition: basicwriter.hh:146
    \n+
    FunctionWriterBase< Cell > FunctionWriter
    Definition: basicwriter.hh:43
    \n+
    void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter, unsigned npoints) const
    Definition: basicwriter.hh:109
    \n+
    void writePiece(const std::string &filename, OutputType outputType)
    Definition: basicwriter.hh:198
    \n+
    void addCellData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:76
    \n+
    static std::string getFirstScalar(const WriterList &data)
    Definition: basicwriter.hh:138
    \n+
    std::string getParallelPieceName(const std::string &name, const std::string &path, int rank) const
    return name of a parallel piece file
    Definition: basicwriter.hh:295
    \n+
    std::string write(const std::string &name, OutputType outputType)
    write output (interface might change later)
    Definition: basicwriter.hh:436
    \n+
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n+\n+
    virtual void write(const Cell &, const Domain &)
    write at the given position
    Definition: functionwriter.hh:59
    \n+
    virtual void endWrite()=0
    signal end of writing
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
    start writing with the given writer
    \n+
    writer for the Coordinates array
    Definition: functionwriter.hh:147
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:165
    \n+
    writer for the offsets array
    Definition: functionwriter.hh:300
    \n+
    writer for the types array
    Definition: functionwriter.hh:340
    \n+
    Dump a .vtu/.vtp files contents to a stream.
    Definition: pvtuwriter.hh:62
    \n+
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: pvtuwriter.hh:195
    \n+
    void endCellData()
    finish CellData section
    Definition: pvtuwriter.hh:155
    \n+
    void beginMain(unsigned ghostLevel=0)
    start the main PPolyData/PUnstructuredGrid section
    Definition: pvtuwriter.hh:189
    \n+
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: pvtuwriter.hh:146
    \n+
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: pvtuwriter.hh:120
    \n+
    void addPiece(const std::string &filename)
    Add a serial piece to the output file.
    Definition: pvtuwriter.hh:215
    \n+
    void endPointData()
    finish PointData section
    Definition: pvtuwriter.hh:129
    \n+
    void endPoints()
    finish section for the point coordinates
    Definition: pvtuwriter.hh:171
    \n+
    void beginPoints()
    start section for the point coordinates
    Definition: pvtuwriter.hh:166
    \n+
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n+
    bool beginAppended()
    start the appended data section
    Definition: vtuwriter.hh:345
    \n+
    void endAppended()
    finish the appended data section
    Definition: vtuwriter.hh:359
    \n+
    void endCellData()
    finish CellData section
    Definition: vtuwriter.hh:220
    \n+
    void beginMain(unsigned ncells, unsigned npoints)
    start the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:310
    \n+
    void beginCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:274
    \n+
    void endPointData()
    finish PointData section
    Definition: vtuwriter.hh:182
    \n+
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: vtuwriter.hh:205
    \n+
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: vtuwriter.hh:167
    \n+
    void endPoints()
    finish section for the point coordinates
    Definition: vtuwriter.hh:249
    \n+
    void endCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:285
    \n+
    void beginPoints()
    start section for the point coordinates
    Definition: vtuwriter.hh:238
    \n+
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:320
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,349 +7,605 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-function.hh\n+basicwriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH\n 8\n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13\n- 14#include \n- 15#include \n- 16#include \n- 17\n- 18#include \n- 19#include \n- 20\n- 26namespace Dune\n- 27{\n- 30\n- 32 //\n- 33 // Base VTKFunction\n- 34 //\n- 35\n- 40 template< class GridView >\n-41 class VTKFunction\n- 42 {\n- 43 public:\n-44 typedef typename GridView::ctype ctype;\n-45 constexpr static int dim = GridView::dimension;\n-46 typedef typename GridView::template Codim< 0 >::Entity Entity;\n- 47\n-50 virtual int ncomps () const = 0;\n- 51\n- 53\n-60 virtual double evaluate (int comp, const Entity& e,\n- 61 const Dune::FieldVector& xi) const = 0;\n- 62\n-64 virtual std::string name () const = 0;\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15#include \n+ 16\n+ 17#include \n+ 18#include \n+ 19\n+ 20#include \n+ 21\n+ 22#include \n+ 23#include \n+ 24#include \n+ 25#include \n+ 26\n+ 27namespace Dune\n+ 28{\n+ 31\n+32 namespace VTK {\n+ 33\n+ 34 template\n+35 class BasicWriter {\n+ 36 typedef typename IteratorFactory::CellIterator CellIterator;\n+ 37 typedef typename IteratorFactory::CornerIterator CornerIterator;\n+ 38 typedef typename IteratorFactory::PointIterator PointIterator;\n+ 39\n+ 40 typedef typename IteratorFactory::Cell Cell;\n+ 41\n+ 42 public:\n+43 typedef FunctionWriterBase FunctionWriter;\n+ 44\n+ 45 private:\n+ 46 typedef std::list > WriterList;\n+ 47 typedef typename WriterList::const_iterator WIterator;\n+ 48\n+ 49 typedef typename Cell::Geometry::ctype ctype;\n+ 50 static const unsigned celldim = Cell::mydimension;\n+ 51 typedef ReferenceElements Refelems;\n+ 52\n+ 53 static const FileType fileType = celldim == 1\n+ 54 ? polyData : unstructuredGrid;\n+ 55\n+ 56 const IteratorFactory& factory;\n+ 57\n+ 58 WriterList cellData;\n+ 59 WriterList pointData;\n+ 60\n+ 61 CoordinatesWriter coords;\n+ 62 typename IteratorFactory::ConnectivityWriter connectivity;\n+ 63 OffsetsWriter offsets;\n+ 64 TypesWriter types;\n 65\n-67 virtual VTK::Precision precision() const\n- 68 { return VTK::Precision::float32; }\n- 69\n-71 virtual ~VTKFunction () {}\n- 72 };\n- 73\n- 75 //\n- 76 // P0VTKFunction\n- 77 //\n- 78\n- 80\n- 94 template\n-95 class P0VTKFunction\n- 96 : public VTKFunction< GV >\n- 97 {\n- 99 typedef VTKFunction<_GV_> Base;\n- 101 typedef MultipleCodimMultipleGeomTypeMapper Mapper;\n- 102\n- 104 const V& v;\n- 106 std::string s;\n- 108 int ncomps_;\n- 111 int mycomp_;\n- 113 VTK::Precision prec_;\n- 115 Mapper mapper;\n- 116\n- 117 public:\n-118 typedef typename Base::Entity Entity;\n-119 typedef typename Base::ctype ctype;\n- 120 using Base::dim;\n- 121\n-123 int ncomps () const override\n+ 66 public:\n+67 BasicWriter(const IteratorFactory& factory_)\n+ 68 : factory(factory_), connectivity(factory.makeConnectivity())\n+ 69 { }\n+ 70\n+ 72 //\n+ 73 // Methods for adding data\n+ 74 //\n+ 75\n+76 void addCellData(const std::shared_ptr& writer) {\n+ 77 cellData.push_back(writer);\n+ 78 }\n+ 79\n+80 void addPointData(const std::shared_ptr& writer) {\n+ 81 pointData.push_back(writer);\n+ 82 }\n+ 83\n+84 void clear() {\n+ 85 cellData.clear();\n+ 86 pointData.clear();\n+ 87 }\n+ 88\n+ 89 protected:\n+ 91 //\n+ 92 // Methods for writing single functions\n+ 93 //\n+ 94\n+95 void writeCellFunction(VTUWriter& vtuWriter,\n+ 96 FunctionWriter& functionWriter,\n+ 97 unsigned ncells) const\n+ 98 {\n+ 99 if(functionWriter.beginWrite(vtuWriter, ncells)) {\n+ 100 const CellIterator& cellend = factory.endCells();\n+ 101 for(CellIterator cellit = factory.beginCells(); cellit != cellend;\n+ 102 ++cellit)\n+ 103 functionWriter.write(*cellit, Refelems::general(cellit->type()).\n+ 104 position(0,0));\n+ 105 }\n+ 106 functionWriter.endWrite();\n+ 107 }\n+ 108\n+109 void writePointFunction(VTUWriter& vtuWriter,\n+ 110 FunctionWriter& functionWriter,\n+ 111 unsigned npoints) const\n+ 112 {\n+ 113 if(functionWriter.beginWrite(vtuWriter, npoints)) {\n+ 114 const PointIterator& pend = factory.endPoints();\n+ 115 for(PointIterator pit = factory.beginPoints(); pit != pend; ++pit)\n+ 116 functionWriter.write(pit->cell(), pit->duneIndex());\n+ 117 }\n+ 118 functionWriter.endWrite();\n+ 119 }\n+ 120\n+121 void writeCornerFunction(VTUWriter& vtuWriter,\n+ 122 FunctionWriter& functionWriter,\n+ 123 unsigned ncorners) const\n 124 {\n- 125 return 1;\n- 126 }\n- 127\n-129 double evaluate (int, const Entity& e,\n- 130 const Dune::FieldVector&) const override\n- 131 {\n- 132 return v[mapper.index(e)*ncomps_+mycomp_];\n- 133 }\n- 134\n-136 std::string name () const override\n- 137 {\n- 138 return s;\n- 139 }\n- 140\n-142 VTK::Precision precision() const override\n- 143 {\n- 144 return prec_;\n- 145 }\n- 146\n- 148\n-165 P0VTKFunction(const GV &gv, const V &v_, const std::string &s_,\n- 166 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)\n- 167 : v( v_ ),\n- 168 s( s_ ),\n- 169 ncomps_(ncomps),\n- 170 mycomp_(mycomp),\n- 171 prec_(prec),\n- 172 mapper( gv, mcmgElementLayout() )\n- 173 {\n- 174 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))\n- 175 DUNE_THROW(IOError, \"P0VTKFunction: size mismatch\");\n- 176 }\n- 177\n-179 virtual ~P0VTKFunction() {}\n- 180 };\n+ 125 if(functionWriter.beginWrite(vtuWriter, ncorners)) {\n+ 126 const CornerIterator& cend = factory.endCorners();\n+ 127 for(CornerIterator cit = factory.beginCorners(); cit != cend; ++cit)\n+ 128 functionWriter.write(cit->cell(), cit->duneIndex());\n+ 129 }\n+ 130 functionWriter.endWrite();\n+ 131 }\n+ 132\n+ 134 //\n+ 135 // Methods for writing whole sections\n+ 136 //\n+ 137\n+138 static std::string getFirstScalar(const WriterList& data) {\n+ 139 const WIterator& wend = data.end();\n+ 140 for(WIterator wit = data.begin(); wit != wend; ++wit)\n+ 141 if((*wit)->ncomps() == 1)\n+ 142 return (*wit)->name();\n+ 143 return \"\";\n+ 144 }\n+ 145\n+146 static std::string getFirstVector(const WriterList& data) {\n+ 147 const WIterator& wend = data.end();\n+ 148 for(WIterator wit = data.begin(); wit != wend; ++wit)\n+ 149 if((*wit)->ncomps() == 3)\n+ 150 return (*wit)->name();\n+ 151 return \"\";\n+ 152 }\n+ 153\n+154 void writeCellData(VTUWriter& vtuWriter, unsigned ncells) const {\n+ 155 if(cellData.empty()) return;\n+ 156\n+ 157 vtuWriter.beginCellData(getFirstScalar(cellData),\n+ 158 getFirstVector(cellData));\n+ 159 const WIterator& wend = cellData.end();\n+ 160 for(WIterator wit = cellData.begin(); wit != wend; ++wit)\n+ 161 writeCellFunction(vtuWriter, **wit, ncells);\n+ 162 vtuWriter.endCellData();\n+ 163 }\n+ 164\n+165 void writePointData(VTUWriter& vtuWriter, unsigned npoints) const {\n+ 166 if(pointData.empty()) return;\n+ 167\n+ 168 vtuWriter.beginPointData(getFirstScalar(pointData),\n+ 169 getFirstVector(pointData));\n+ 170 const WIterator& wend = pointData.end();\n+ 171 for(WIterator wit = pointData.begin(); wit != wend; ++wit)\n+ 172 writePointFunction(vtuWriter, **wit, npoints);\n+ 173 vtuWriter.endPointData();\n+ 174 }\n+ 175\n+176 void writeGrid(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,\n+ 177 unsigned ncorners) {\n+ 178 vtuWriter.beginPoints();\n+ 179 writePointFunction(vtuWriter, coords, npoints);\n+ 180 vtuWriter.endPoints();\n 181\n- 183 //\n- 184 // P1VTKFunction\n- 185 //\n- 186\n- 188\n- 202 template\n-203 class P1VTKFunction\n- 204 : public VTKFunction< GV >\n- 205 {\n- 207 typedef VTKFunction<_GV_> Base;\n- 209 typedef MultipleCodimMultipleGeomTypeMapper Mapper;\n- 210\n- 212 const V& v;\n- 214 std::string s;\n- 216 int ncomps_;\n- 219 int mycomp_;\n- 221 VTK::Precision prec_;\n- 223 Mapper mapper;\n+ 182 vtuWriter.beginCells();\n+ 183 writeCornerFunction(vtuWriter, connectivity, ncorners);\n+ 184 writeCellFunction(vtuWriter, offsets, ncells);\n+ 185 if(fileType != polyData)\n+ 186 writeCellFunction(vtuWriter, types, ncells);\n+ 187 vtuWriter.endCells();\n+ 188 }\n+ 189\n+190 void writeAll(VTUWriter& vtuWriter, unsigned ncells, unsigned npoints,\n+ 191 unsigned ncorners) {\n+ 192 writeCellData(vtuWriter, ncells);\n+ 193 writePointData(vtuWriter, npoints);\n+ 194 writeGrid(vtuWriter, ncells, npoints, ncorners);\n+ 195 }\n+ 196\n+ 197 public:\n+198 void writePiece(const std::string& filename, OutputType outputType) {\n+ 199 std::ofstream stream;\n+ 200 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n+ 201 std::ios_base::eofbit);\n+ 202 stream.open(filename.c_str(), std::ios::binary);\n+ 203\n+ 204 VTUWriter vtuWriter(stream, outputType, fileType);\n+ 205\n+ 206 unsigned ncells = std::distance(factory.beginCells(),\n+ 207 factory.endCells());\n+ 208 unsigned npoints = std::distance(factory.beginPoints(),\n+ 209 factory.endPoints());\n+ 210 unsigned ncorners = std::distance(factory.beginCorners(),\n+ 211 factory.endCorners());\n+ 212\n+ 213 vtuWriter.beginMain(ncells, npoints);\n+ 214 writeAll(vtuWriter, ncells, npoints, ncorners);\n+ 215 vtuWriter.endMain();\n+ 216\n+ 217 if(vtuWriter.beginAppended())\n+ 218 writeAll(vtuWriter, ncells, npoints, ncorners);\n+ 219 vtuWriter.endAppended();\n+ 220\n+ 221 }\n+ 222\n 224\n- 225 public:\n-226 typedef typename Base::Entity Entity;\n-227 typedef typename Base::ctype ctype;\n- 228 using Base::dim;\n- 229\n-231 int ncomps () const override\n- 232 {\n- 233 return 1;\n- 234 }\n- 235\n-237 double evaluate ([[maybe_unused]] int comp, const Entity& e,\n- 238 const Dune::FieldVector& xi) const override\n- 239 {\n- 240 const unsigned int myDim = Entity::mydimension;\n- 241 const unsigned int nVertices = e.subEntities(dim);\n- 242\n- 243 std::vector > cornerValues(nVertices);\n- 244 for (unsigned i=0; i interpolation(e.type(),\n-cornerValues);\n- 249 return interpolation.global(xi);\n- 250 }\n- 251\n-253 std::string name () const override\n- 254 {\n- 255 return s;\n- 256 }\n- 257\n-259 VTK::Precision precision() const override\n- 260 {\n- 261 return prec_;\n- 262 }\n- 263\n- 265\n-282 P1VTKFunction(const GV& gv, const V &v_, const std::string &s_,\n- 283 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)\n- 284 : v( v_ ),\n- 285 s( s_ ),\n- 286 ncomps_(ncomps),\n- 287 mycomp_(mycomp),\n- 288 prec_(prec),\n- 289 mapper( gv, mcmgVertexLayout() )\n- 290 {\n- 291 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))\n- 292 DUNE_THROW(IOError,\"P1VTKFunction: size mismatch\");\n- 293 }\n- 294\n-296 virtual ~P1VTKFunction() {}\n- 297 };\n- 298\n- 300\n- 301} // namespace Dune\n- 302\n- 303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH\n-mcmgmapper.hh\n-Mapper for multiple codim and multiple geometry types.\n+240 void writeCollection(const std::string name,\n+ 241 const std::string& piecename,\n+ 242 const std::string& piecepath)\n+ 243 {\n+ 244 std::ofstream stream;\n+ 245 stream.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n+ 246 std::ios_base::eofbit);\n+ 247 stream.open(name.c_str(), std::ios::binary);\n+ 248\n+ 249 PVTUWriter writer(stream, fileType);\n+ 250\n+ 251 writer.beginMain();\n+ 252\n+ 253 // PPointData\n+ 254 writer.beginPointData(getFirstScalar(pointData),\n+ 255 getFirstVector(pointData));\n+ 256 for(WIterator it=pointData.begin(); it!=pointData.end(); ++it)\n+ 257 (*it)->addArray(writer);\n+ 258 writer.endPointData();\n+ 259\n+ 260 // PCellData\n+ 261 writer.beginCellData(getFirstScalar(cellData),\n+ 262 getFirstVector(cellData));\n+ 263 for(WIterator it=cellData.begin(); it!=cellData.end(); ++it)\n+ 264 (*it)->addArray(writer);\n+ 265 writer.endCellData();\n+ 266\n+ 267 // PPoints\n+ 268 writer.beginPoints();\n+ 269 coords.addArray(writer);\n+ 270 writer.endPoints();\n+ 271\n+ 272 // Pieces\n+ 273 for( int i = 0; i < factory.comm().size(); ++i )\n+ 274 writer.addPiece(getParallelPieceName(piecename, piecepath, i));\n+ 275\n+ 276 writer.endMain();\n+ 277 }\n+ 278\n+ 280 //\n+ 281 // Filename generators\n+ 282 //\n+ 283\n+ 285\n+295 std::string getParallelPieceName(const std::string& name,\n+ 296 const std::string& path, int rank) const\n+ 297 {\n+ 298 std::ostringstream s;\n+ 299 if(path.size() > 0) {\n+ 300 s << path;\n+ 301 if(path[path.size()-1] != '/')\n+ 302 s << '/';\n+ 303 }\n+ 304 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()\n+ 305 << ':';\n+ 306 s << 'p' << std::setw(4) << std::setfill('0') << rank << ':';\n+ 307 s << name;\n+ 308 switch(fileType) {\n+ 309 case polyData : s << \".vtp\"; break;\n+ 310 case unstructuredGrid : s << \".vtu\"; break;\n+ 311 }\n+ 312 return s.str();\n+ 313 }\n+ 314\n+ 316\n+325 std::string getParallelHeaderName(const std::string& name,\n+ 326 const std::string& path) const\n+ 327 {\n+ 328 std::ostringstream s;\n+ 329 if(path.size() > 0) {\n+ 330 s << path;\n+ 331 if(path[path.size()-1] != '/')\n+ 332 s << '/';\n+ 333 }\n+ 334 s << 's' << std::setw(4) << std::setfill('0') << factory.comm().size()\n+ 335 << ':';\n+ 336 s << name;\n+ 337 switch(fileType) {\n+ 338 case polyData : s << \".pvtp\"; break;\n+ 339 case unstructuredGrid : s << \".pvtu\"; break;\n+ 340 }\n+ 341 return s.str();\n+ 342 }\n+ 343\n+ 345\n+357 std::string getSerialPieceName(const std::string& name,\n+ 358 const std::string& path) const\n+ 359 {\n+ 360 switch(fileType) {\n+ 361 case polyData : return concatPaths(path, name+\".vtp\");\n+ 362 case unstructuredGrid : return concatPaths(path, name+\".vtu\");\n+ 363 }\n+ 364 return concatPaths(path, name); // unknown fileType\n+ 365 }\n+ 366\n+ 368 //\n+ 369 // User interface functions for writing\n+ 370 //\n+ 371\n+ 373\n+395 std::string pwrite(const std::string& name, const std::string& path,\n+ 396 const std::string& extendpath, OutputType outputType)\n+ 397 {\n+ 398 MPIGuard guard(factory.comm());\n+ 399\n+ 400 // do some magic because paraview can only cope with relative paths to\n+ 401 // piece files\n+ 402 std::ofstream file;\n+ 403 file.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n+ 404 std::ios_base::eofbit);\n+ 405 std::string piecepath = concatPaths(path, extendpath);\n+ 406 std::string relpiecepath = relativePath(path, piecepath);\n+ 407\n+ 408 // write this processes .vtu/.vtp piece file\n+ 409 std::string fullname = getParallelPieceName(name, piecepath,\n+ 410 factory.comm().rank());\n+ 411 writePiece(fullname, outputType);\n+ 412\n+ 413 // if we are rank 0, write .pvtu/.pvtp parallel header\n+ 414 fullname = getParallelHeaderName(name, path);\n+ 415 if(factory.comm().rank() == 0)\n+ 416 writeCollection(fullname, name, relpiecepath);\n+ 417\n+ 418 guard.finalize();\n+ 419\n+ 420 return fullname;\n+ 421 }\n+ 422\n+436 std::string write(const std::string &name, OutputType outputType)\n+ 437 {\n+ 438 // in the parallel case, just use pwrite, it has all the necessary\n+ 439 // stuff, so we don't need to reimplement it here.\n+ 440 if(factory.comm().size() > 1)\n+ 441 return pwrite(name, \"\", \"\", outputType);\n+ 442\n+ 443 // generate filename for process data\n+ 444 std::string pieceName = getSerialPieceName(name, \"\");\n+ 445\n+ 446 writePiece(pieceName, outputType);\n+ 447\n+ 448 return pieceName;\n+ 449 }\n+ 450\n+ 451 };\n+ 452\n+ 453 } // namespace VTK\n+ 454\n+ 456\n+ 457} // namespace Dune\n+ 458\n+ 459#endif // DUNE_GRID_IO_FILE_VTK_BASICWRITER_HH\n common.hh\n Common stuff for the VTKWriter.\n-Dune::GridView::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/gridview.hh:148\n-Dune::GridView::ctype\n-Grid::ctype ctype\n-type used for coordinates in grid\n-Definition: common/gridview.hh:145\n-Dune::mcmgElementLayout\n-MCMGLayout mcmgElementLayout()\n-layout for elements (codim-0 entities)\n-Definition: mcmgmapper.hh:97\n-Dune::mcmgVertexLayout\n-MCMGLayout mcmgVertexLayout()\n-layout for vertices (dim-0 entities)\n-Definition: mcmgmapper.hh:107\n+vtuwriter.hh\n+functionwriter.hh\n+pvtuwriter.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::Precision\n-Precision\n-which precision to use when writing out data to vtk files\n-Definition: common.hh:271\n-Dune::VTK::Precision::float32\n-@ float32\n-Dune::Entity::mydimension\n-static constexpr int mydimension\n-Dimensionality of the reference element of the entity.\n-Definition: common/entity.hh:112\n-Dune::MultipleCodimMultipleGeomTypeMapper\n-Implementation class for a multiple codim and multiple geometry type mapper.\n-Definition: mcmgmapper.hh:129\n-Dune::MultipleCodimMultipleGeomTypeMapper::size\n-size_type size() const\n-Return total number of entities in the entity set managed by the mapper.\n-Definition: mcmgmapper.hh:204\n-Dune::MultipleCodimMultipleGeomTypeMapper::subIndex\n-Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i,\n-unsigned int codim) const\n-Map subentity of codim 0 entity to starting index in array for dof block.\n-Definition: mcmgmapper.hh:185\n-Dune::MultipleCodimMultipleGeomTypeMapper::index\n-Index index(const EntityType &e) const\n-Map entity to starting index in array for dof block.\n-Definition: mcmgmapper.hh:171\n-Dune::VTKFunction\n-A base class for grid functions with any return type and dimension.\n-Definition: function.hh:42\n-Dune::VTKFunction::evaluate\n-virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector<\n-ctype, dim > &xi) const =0\n-evaluate single component comp in the entity e at local coordinates xi\n-Dune::VTKFunction::ctype\n-GridView::ctype ctype\n-Definition: function.hh:44\n-Dune::VTKFunction::Entity\n-GridView::template Codim< 0 >::Entity Entity\n-Definition: function.hh:46\n-Dune::VTKFunction::dim\n-static constexpr int dim\n-Definition: function.hh:45\n-Dune::VTKFunction::name\n-virtual std::string name() const =0\n-get name\n-Dune::VTKFunction::precision\n-virtual VTK::Precision precision() const\n-get output precision for the field\n-Definition: function.hh:67\n-Dune::VTKFunction::ncomps\n-virtual int ncomps() const =0\n-Dune::VTKFunction::~VTKFunction\n-virtual ~VTKFunction()\n-virtual destructor\n-Definition: function.hh:71\n-Dune::P0VTKFunction\n-Take a vector and interpret it as cell data for the VTKWriter.\n-Definition: function.hh:97\n-Dune::P0VTKFunction::name\n-std::string name() const override\n-get name\n-Definition: function.hh:136\n-Dune::P0VTKFunction::ctype\n-Base::ctype ctype\n-Definition: function.hh:119\n-Dune::P0VTKFunction::evaluate\n-double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &)\n-const override\n-evaluate\n-Definition: function.hh:129\n-Dune::P0VTKFunction::P0VTKFunction\n-P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1,\n-int mycomp=0, VTK::Precision prec=VTK::Precision::float32)\n-construct from a vector and a name\n-Definition: function.hh:165\n-Dune::P0VTKFunction::precision\n-VTK::Precision precision() const override\n-get output precision for the field\n-Definition: function.hh:142\n-Dune::P0VTKFunction::Entity\n-Base::Entity Entity\n-Definition: function.hh:118\n-Dune::P0VTKFunction::~P0VTKFunction\n-virtual ~P0VTKFunction()\n-destructor\n-Definition: function.hh:179\n-Dune::P0VTKFunction::ncomps\n-int ncomps() const override\n-return number of components\n-Definition: function.hh:123\n-Dune::P1VTKFunction\n-Take a vector and interpret it as point data for the VTKWriter.\n-Definition: function.hh:205\n-Dune::P1VTKFunction::name\n-std::string name() const override\n-get name\n-Definition: function.hh:253\n-Dune::P1VTKFunction::~P1VTKFunction\n-virtual ~P1VTKFunction()\n-destructor\n-Definition: function.hh:296\n-Dune::P1VTKFunction::Entity\n-Base::Entity Entity\n-Definition: function.hh:226\n-Dune::P1VTKFunction::ctype\n-Base::ctype ctype\n-Definition: function.hh:227\n-Dune::P1VTKFunction::precision\n-VTK::Precision precision() const override\n-get output precision for the field\n-Definition: function.hh:259\n-Dune::P1VTKFunction::evaluate\n-double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim\n-> &xi) const override\n-evaluate\n-Definition: function.hh:237\n-Dune::P1VTKFunction::P1VTKFunction\n-P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1,\n-int mycomp=0, VTK::Precision prec=VTK::Precision::float32)\n-construct from a vector and a name\n-Definition: function.hh:282\n-Dune::P1VTKFunction::ncomps\n-int ncomps() const override\n-return number of components\n-Definition: function.hh:231\n+Dune::VTK::OutputType\n+OutputType\n+How the bulk data should be stored in the file.\n+Definition: common.hh:43\n+Dune::VTK::FileType\n+FileType\n+which type of VTK file to write\n+Definition: common.hh:252\n+Dune::VTK::polyData\n+@ polyData\n+for .vtp files (PolyData)\n+Definition: common.hh:254\n+Dune::VTK::unstructuredGrid\n+@ unstructuredGrid\n+for .vtu files (UnstructuredGrid)\n+Definition: common.hh:256\n+Dune::VTK::BasicWriter\n+Definition: basicwriter.hh:35\n+Dune::VTK::BasicWriter::writeCellData\n+void writeCellData(VTUWriter &vtuWriter, unsigned ncells) const\n+Definition: basicwriter.hh:154\n+Dune::VTK::BasicWriter::BasicWriter\n+BasicWriter(const IteratorFactory &factory_)\n+Definition: basicwriter.hh:67\n+Dune::VTK::BasicWriter::getSerialPieceName\n+std::string getSerialPieceName(const std::string &name, const std::string\n+&path) const\n+return name of a serial piece file\n+Definition: basicwriter.hh:357\n+Dune::VTK::BasicWriter::writeCollection\n+void writeCollection(const std::string name, const std::string &piecename,\n+const std::string &piecepath)\n+write header file in parallel case to stream\n+Definition: basicwriter.hh:240\n+Dune::VTK::BasicWriter::writeGrid\n+void writeGrid(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints,\n+unsigned ncorners)\n+Definition: basicwriter.hh:176\n+Dune::VTK::BasicWriter::writeAll\n+void writeAll(VTUWriter &vtuWriter, unsigned ncells, unsigned npoints, unsigned\n+ncorners)\n+Definition: basicwriter.hh:190\n+Dune::VTK::BasicWriter::pwrite\n+std::string pwrite(const std::string &name, const std::string &path, const\n+std::string &extendpath, OutputType outputType)\n+write output; interface might change later\n+Definition: basicwriter.hh:395\n+Dune::VTK::BasicWriter::clear\n+void clear()\n+Definition: basicwriter.hh:84\n+Dune::VTK::BasicWriter::writeCellFunction\n+void writeCellFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter,\n+unsigned ncells) const\n+Definition: basicwriter.hh:95\n+Dune::VTK::BasicWriter::writeCornerFunction\n+void writeCornerFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter,\n+unsigned ncorners) const\n+Definition: basicwriter.hh:121\n+Dune::VTK::BasicWriter::getParallelHeaderName\n+std::string getParallelHeaderName(const std::string &name, const std::string\n+&path) const\n+return name of a parallel header file\n+Definition: basicwriter.hh:325\n+Dune::VTK::BasicWriter::writePointData\n+void writePointData(VTUWriter &vtuWriter, unsigned npoints) const\n+Definition: basicwriter.hh:165\n+Dune::VTK::BasicWriter::getFirstVector\n+static std::string getFirstVector(const WriterList &data)\n+Definition: basicwriter.hh:146\n+Dune::VTK::BasicWriter::FunctionWriter\n+FunctionWriterBase< Cell > FunctionWriter\n+Definition: basicwriter.hh:43\n+Dune::VTK::BasicWriter::writePointFunction\n+void writePointFunction(VTUWriter &vtuWriter, FunctionWriter &functionWriter,\n+unsigned npoints) const\n+Definition: basicwriter.hh:109\n+Dune::VTK::BasicWriter::writePiece\n+void writePiece(const std::string &filename, OutputType outputType)\n+Definition: basicwriter.hh:198\n+Dune::VTK::BasicWriter::addCellData\n+void addCellData(const std::shared_ptr< FunctionWriter > &writer)\n+Definition: basicwriter.hh:76\n+Dune::VTK::BasicWriter::getFirstScalar\n+static std::string getFirstScalar(const WriterList &data)\n+Definition: basicwriter.hh:138\n+Dune::VTK::BasicWriter::getParallelPieceName\n+std::string getParallelPieceName(const std::string &name, const std::string\n+&path, int rank) const\n+return name of a parallel piece file\n+Definition: basicwriter.hh:295\n+Dune::VTK::BasicWriter::write\n+std::string write(const std::string &name, OutputType outputType)\n+write output (interface might change later)\n+Definition: basicwriter.hh:436\n+Dune::VTK::BasicWriter::addPointData\n+void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n+Definition: basicwriter.hh:80\n+Dune::VTK::FunctionWriterBase<_Cell_>\n+Dune::VTK::FunctionWriterBase::write\n+virtual void write(const Cell &, const Domain &)\n+write at the given position\n+Definition: functionwriter.hh:59\n+Dune::VTK::FunctionWriterBase::endWrite\n+virtual void endWrite()=0\n+signal end of writing\n+Dune::VTK::FunctionWriterBase::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0\n+start writing with the given writer\n+Dune::VTK::CoordinatesWriter\n+writer for the Coordinates array\n+Definition: functionwriter.hh:147\n+Dune::VTK::CoordinatesWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: functionwriter.hh:165\n+Dune::VTK::OffsetsWriter\n+writer for the offsets array\n+Definition: functionwriter.hh:300\n+Dune::VTK::TypesWriter\n+writer for the types array\n+Definition: functionwriter.hh:340\n+Dune::VTK::PVTUWriter\n+Dump a .vtu/.vtp files contents to a stream.\n+Definition: pvtuwriter.hh:62\n+Dune::VTK::PVTUWriter::endMain\n+void endMain()\n+finish the main PolyData/UnstructuredGrid section\n+Definition: pvtuwriter.hh:195\n+Dune::VTK::PVTUWriter::endCellData\n+void endCellData()\n+finish CellData section\n+Definition: pvtuwriter.hh:155\n+Dune::VTK::PVTUWriter::beginMain\n+void beginMain(unsigned ghostLevel=0)\n+start the main PPolyData/PUnstructuredGrid section\n+Definition: pvtuwriter.hh:189\n+Dune::VTK::PVTUWriter::beginCellData\n+void beginCellData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start CellData section\n+Definition: pvtuwriter.hh:146\n+Dune::VTK::PVTUWriter::beginPointData\n+void beginPointData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start PointData section\n+Definition: pvtuwriter.hh:120\n+Dune::VTK::PVTUWriter::addPiece\n+void addPiece(const std::string &filename)\n+Add a serial piece to the output file.\n+Definition: pvtuwriter.hh:215\n+Dune::VTK::PVTUWriter::endPointData\n+void endPointData()\n+finish PointData section\n+Definition: pvtuwriter.hh:129\n+Dune::VTK::PVTUWriter::endPoints\n+void endPoints()\n+finish section for the point coordinates\n+Definition: pvtuwriter.hh:171\n+Dune::VTK::PVTUWriter::beginPoints\n+void beginPoints()\n+start section for the point coordinates\n+Definition: pvtuwriter.hh:166\n+Dune::VTK::VTUWriter\n+Dump a .vtu/.vtp files contents to a stream.\n+Definition: vtuwriter.hh:98\n+Dune::VTK::VTUWriter::beginAppended\n+bool beginAppended()\n+start the appended data section\n+Definition: vtuwriter.hh:345\n+Dune::VTK::VTUWriter::endAppended\n+void endAppended()\n+finish the appended data section\n+Definition: vtuwriter.hh:359\n+Dune::VTK::VTUWriter::endCellData\n+void endCellData()\n+finish CellData section\n+Definition: vtuwriter.hh:220\n+Dune::VTK::VTUWriter::beginMain\n+void beginMain(unsigned ncells, unsigned npoints)\n+start the main PolyData/UnstructuredGrid section\n+Definition: vtuwriter.hh:310\n+Dune::VTK::VTUWriter::beginCells\n+void beginCells()\n+start section for the grid cells/PolyData lines\n+Definition: vtuwriter.hh:274\n+Dune::VTK::VTUWriter::endPointData\n+void endPointData()\n+finish PointData section\n+Definition: vtuwriter.hh:182\n+Dune::VTK::VTUWriter::beginCellData\n+void beginCellData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start CellData section\n+Definition: vtuwriter.hh:205\n+Dune::VTK::VTUWriter::beginPointData\n+void beginPointData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start PointData section\n+Definition: vtuwriter.hh:167\n+Dune::VTK::VTUWriter::endPoints\n+void endPoints()\n+finish section for the point coordinates\n+Definition: vtuwriter.hh:249\n+Dune::VTK::VTUWriter::endCells\n+void endCells()\n+start section for the grid cells/PolyData lines\n+Definition: vtuwriter.hh:285\n+Dune::VTK::VTUWriter::beginPoints\n+void beginPoints()\n+start section for the point coordinates\n+Definition: vtuwriter.hh:238\n+Dune::VTK::VTUWriter::endMain\n+void endMain()\n+finish the main PolyData/UnstructuredGrid section\n+Definition: vtuwriter.hh:320\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00803.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00803.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtkwriter.hh File Reference\n+dune-grid: subsamplingvtkwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -65,88 +65,45 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    vtkwriter.hh File Reference
    \n+
    subsamplingvtkwriter.hh File Reference
    \n
    \n
    \n \n-

    Provides file i/o for the visualization toolkit. \n+

    Provides subsampled file i/o for the visualization toolkit. \n More...

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

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    Provides file i/o for the visualization toolkit.

    \n-
    Author
    Peter Bastian, Christian Engwer
    \n+

    Provides subsampled file i/o for the visualization toolkit.

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

    Data array writers for the VTKWriter. \n+

    Functions for VTK output. \n More...

    \n-
    #include <cstdint>
    \n-#include <iostream>
    \n-#include <string>
    \n-#include <iomanip>
    \n-#include <cmath>
    \n+
    #include <string>
    \n #include <dune/common/exceptions.hh>
    \n-#include <dune/common/indent.hh>
    \n-#include <dune/grid/io/file/vtk/streams.hh>
    \n-#include <dune/grid/io/file/vtk/common.hh>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/geometry/multilineargeometry.hh>
    \n+#include <dune/grid/common/mcmgmapper.hh>
    \n+#include <dune/grid/io/file/vtk/common.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::VTK::DataArrayWriter
     base class for data array writers More...
    class  Dune::VTKFunction< GridView >
     A base class for grid functions with any return type and dimension. More...
     
    class  Dune::VTK::AsciiDataArrayWriter
     a streaming writer for data array tags, uses ASCII inline format More...
    class  Dune::P0VTKFunction< GV, V >
     Take a vector and interpret it as cell data for the VTKWriter. More...
     
    class  Dune::VTK::BinaryDataArrayWriter
     a streaming writer for data array tags, uses binary inline format More...
     
    class  Dune::VTK::AppendedRawDataArrayWriter
     a streaming writer for data array tags, uses appended raw format More...
     
    class  Dune::VTK::AppendedBase64DataArrayWriter
     a streaming writer for data array tags, uses appended base64 format More...
     
    class  Dune::VTK::NakedBase64DataArrayWriter
     a streaming writer for appended data array tags, uses base64 format More...
     
    class  Dune::VTK::NakedRawDataArrayWriter
     a streaming writer for appended data arrays, uses raw format More...
     
    class  Dune::VTK::DataArrayWriterFactory
     a factory for DataArrayWriters More...
    class  Dune::P1VTKFunction< GV, V >
     Take a vector and interpret it as point data for the VTKWriter. More...
     
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n

    Detailed Description

    \n-

    Data array writers for the VTKWriter.

    \n-
    Author
    Peter Bastian, Christian Engwer
    \n-

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

    \n+

    Functions for VTK output.

    \n+
    Author
    Peter Bastian, Christian Engwer
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,64 +8,40 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-dataarraywriter.hh File Reference\n-Data array writers for the VTKWriter. More...\n-#include \n-#include \n+function.hh File Reference\n+Functions for VTK output. More...\n #include \n-#include \n-#include \n #include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::DataArrayWriter\n-\u00a0 base class for data array writers More...\n-\u00a0\n-class \u00a0Dune::VTK::AsciiDataArrayWriter\n-\u00a0 a streaming writer for data array tags, uses ASCII inline format\n- More...\n-\u00a0\n-class \u00a0Dune::VTK::BinaryDataArrayWriter\n-\u00a0 a streaming writer for data array tags, uses binary inline format\n- More...\n-\u00a0\n-class \u00a0Dune::VTK::AppendedRawDataArrayWriter\n-\u00a0 a streaming writer for data array tags, uses appended raw format\n+class \u00a0Dune::VTKFunction<_GridView_>\n+\u00a0 A base class for grid functions with any return type and dimension.\n More...\n \u00a0\n-class \u00a0Dune::VTK::AppendedBase64DataArrayWriter\n-\u00a0 a streaming writer for data array tags, uses appended base64 format\n- More...\n-\u00a0\n-class \u00a0Dune::VTK::NakedBase64DataArrayWriter\n-\u00a0 a streaming writer for appended data array tags, uses base64 format\n- More...\n+class \u00a0Dune::P0VTKFunction<_GV,_V_>\n+\u00a0 Take a vector and interpret it as cell data for the VTKWriter. More...\n \u00a0\n-class \u00a0Dune::VTK::NakedRawDataArrayWriter\n-\u00a0 a streaming writer for appended data arrays, uses raw format More...\n-\u00a0\n-class \u00a0Dune::VTK::DataArrayWriterFactory\n-\u00a0 a factory for DataArrayWriters More...\n+class \u00a0Dune::P1VTKFunction<_GV,_V_>\n+\u00a0 Take a vector and interpret it as point data for the VTKWriter. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::VTK\n-\u00a0\n ***** Detailed Description *****\n-Data array writers for the VTKWriter.\n+Functions for VTK output.\n Author\n Peter Bastian, Christian Engwer\n-This file contains classes to help writing data in the difeerent VTK output\n-modes\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00806_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dataarraywriter.hh Source File\n+dune-grid: function.hh Source File\n \n \n \n \n \n \n \n@@ -62,478 +62,244 @@\n \n \n
    \n
    \n-
    dataarraywriter.hh
    \n+
    function.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
    \n
    8
    \n-
    9#include <cstdint>
    \n-
    10#include <iostream>
    \n-
    11#include <string>
    \n-
    12#include <iomanip>
    \n-
    13#include <cstdint>
    \n-
    14#include <cmath>
    \n-
    15
    \n-
    16#include <dune/common/exceptions.hh>
    \n-
    17#include <dune/common/indent.hh>
    \n-
    18
    \n-\n-\n-
    21
    \n-
    30namespace Dune
    \n-
    31{
    \n-
    34
    \n-
    35 namespace VTK {
    \n-
    36
    \n-
    38
    \n-\n-
    56 {
    \n-
    57 public:
    \n-
    59
    \n-\n-
    64 : prec(_prec)
    \n-
    65 {}
    \n-
    66
    \n-
    68 template<class T>
    \n-
    69 void write(T data)
    \n-
    70 {
    \n-
    71 switch(prec)
    \n-
    72 {
    \n-\n-
    74 writeFloat32(data); break;
    \n-\n-
    76 writeFloat64(data); break;
    \n-\n-
    78 writeUInt32(data); break;
    \n-\n-
    80 writeUInt8(data); break;
    \n-\n-
    82 writeInt32(data); break;
    \n-
    83 default:
    \n-
    84 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
    \n-
    85 }
    \n-
    86 }
    \n-
    87
    \n-
    89 virtual bool writeIsNoop() const { return false; }
    \n-
    91 virtual ~DataArrayWriter () {}
    \n-
    92
    \n-
    93 private:
    \n-
    95 virtual void writeFloat32 (float data) = 0;
    \n-
    97 virtual void writeFloat64 (double data) = 0;
    \n-
    99 virtual void writeInt32 (std::int32_t data) = 0;
    \n-
    101 virtual void writeUInt8 (std::uint8_t data) = 0;
    \n-
    103 virtual void writeUInt32 (std::uint32_t data) = 0;
    \n-
    104
    \n-
    105 Precision prec;
    \n-
    106 };
    \n-
    107
    \n-\n-
    110 {
    \n-
    111 public:
    \n-
    113
    \n-
    121 AsciiDataArrayWriter(std::ostream& theStream, std::string name,
    \n-
    122 int ncomps, const Indent& indent_, Precision prec_)
    \n-
    123 : DataArrayWriter(prec_), s(theStream), counter(0), numPerLine(12), indent(indent_)
    \n-
    124 {
    \n-
    125 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n-
    126 << "Name=\\"" << name << "\\" ";
    \n-
    127 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n-
    128 s << "format=\\"ascii\\">\\n";
    \n-
    129 ++indent;
    \n-
    130 }
    \n-
    131
    \n-\n-
    134 {
    \n-
    135 if (counter%numPerLine!=0) s << "\\n";
    \n-
    136 --indent;
    \n-
    137 s << indent << "</DataArray>\\n";
    \n-
    138 }
    \n-
    139
    \n-
    140 private:
    \n-
    142 void writeFloat64 (double data) final
    \n-
    143 { write_float(data); }
    \n-
    145 void writeFloat32 (float data) final
    \n-
    146 { write_float(data); }
    \n-
    148 void writeInt32 (std::int32_t data) final
    \n-
    149 { write_(data); }
    \n-
    151 void writeUInt32 (std::uint32_t data) final
    \n-
    152 { write_(data); }
    \n-
    154 void writeUInt8 (std::uint8_t data) final
    \n-
    155 { write_(data); }
    \n-
    156
    \n-
    157 template<class T>
    \n-
    158 void write_(T data)
    \n-
    159 {
    \n-
    160 typedef typename PrintType<T>::Type PT;
    \n-
    161 if(counter%numPerLine==0) s << indent;
    \n-
    162 else s << " ";
    \n-
    163 const auto original_precision = std::cout.precision();
    \n-
    164 s << std::setprecision(std::numeric_limits<PT>::digits10) << (PT) data;
    \n-
    165 std::cout.precision(original_precision);
    \n-
    166 counter++;
    \n-
    167 if (counter%numPerLine==0) s << "\\n";
    \n-
    168 }
    \n-
    169
    \n-
    170 template<class T>
    \n-
    171 void write_float(T data)
    \n-
    172 {
    \n-
    173 typedef typename PrintType<T>::Type PT;
    \n-
    174 if(counter%numPerLine==0) s << indent;
    \n-
    175 else s << " ";
    \n-
    176 PT out_data = (PT) data;
    \n-
    177 if (std::fpclassify(out_data) == FP_SUBNORMAL)
    \n-
    178 {
    \n-
    179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS
    \n-
    180 out_data = 0;
    \n-
    181 }
    \n-
    182 const auto original_precision = std::cout.precision();
    \n-
    183 s << std::setprecision(std::numeric_limits<PT>::digits10) << out_data;
    \n-
    184 std::cout.precision(original_precision);
    \n-
    185 counter++;
    \n-
    186 if (counter%numPerLine==0) s << "\\n";
    \n-
    187 }
    \n+
    9#include <string>
    \n+
    10
    \n+
    11#include <dune/common/exceptions.hh>
    \n+
    12#include <dune/common/fvector.hh>
    \n+
    13
    \n+
    14#include <dune/geometry/type.hh>
    \n+
    15#include <dune/geometry/referenceelements.hh>
    \n+
    16#include <dune/geometry/multilineargeometry.hh>
    \n+
    17
    \n+\n+\n+
    20
    \n+
    26namespace Dune
    \n+
    27{
    \n+
    30
    \n+
    32 //
    \n+
    33 // Base VTKFunction
    \n+
    34 //
    \n+
    35
    \n+
    40 template< class GridView >
    \n+\n+
    42 {
    \n+
    43 public:
    \n+
    44 typedef typename GridView::ctype ctype;
    \n+
    45 constexpr static int dim = GridView::dimension;
    \n+
    46 typedef typename GridView::template Codim< 0 >::Entity Entity;
    \n+
    47
    \n+
    50 virtual int ncomps () const = 0;
    \n+
    51
    \n+
    53
    \n+
    60 virtual double evaluate (int comp, const Entity& e,
    \n+
    61 const Dune::FieldVector<ctype,dim>& xi) const = 0;
    \n+
    62
    \n+
    64 virtual std::string name () const = 0;
    \n+
    65
    \n+
    67 virtual VTK::Precision precision() const
    \n+
    68 { return VTK::Precision::float32; }
    \n+
    69
    \n+
    71 virtual ~VTKFunction () {}
    \n+
    72 };
    \n+
    73
    \n+
    75 //
    \n+
    76 // P0VTKFunction
    \n+
    77 //
    \n+
    78
    \n+
    80
    \n+
    94 template<typename GV, typename V>
    \n+\n+
    96 : public VTKFunction< GV >
    \n+
    97 {
    \n+
    99 typedef VTKFunction< GV > Base;
    \n+\n+
    102
    \n+
    104 const V& v;
    \n+
    106 std::string s;
    \n+
    108 int ncomps_;
    \n+
    111 int mycomp_;
    \n+
    113 VTK::Precision prec_;
    \n+
    115 Mapper mapper;
    \n+
    116
    \n+
    117 public:
    \n+
    118 typedef typename Base::Entity Entity;
    \n+
    119 typedef typename Base::ctype ctype;
    \n+
    120 using Base::dim;
    \n+
    121
    \n+
    123 int ncomps () const override
    \n+
    124 {
    \n+
    125 return 1;
    \n+
    126 }
    \n+
    127
    \n+
    129 double evaluate (int, const Entity& e,
    \n+
    130 const Dune::FieldVector<ctype,dim>&) const override
    \n+
    131 {
    \n+
    132 return v[mapper.index(e)*ncomps_+mycomp_];
    \n+
    133 }
    \n+
    134
    \n+
    136 std::string name () const override
    \n+
    137 {
    \n+
    138 return s;
    \n+
    139 }
    \n+
    140
    \n+
    142 VTK::Precision precision() const override
    \n+
    143 {
    \n+
    144 return prec_;
    \n+
    145 }
    \n+
    146
    \n+
    148
    \n+
    165 P0VTKFunction(const GV &gv, const V &v_, const std::string &s_,
    \n+
    166 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
    \n+
    167 : v( v_ ),
    \n+
    168 s( s_ ),
    \n+
    169 ncomps_(ncomps),
    \n+
    170 mycomp_(mycomp),
    \n+
    171 prec_(prec),
    \n+
    172 mapper( gv, mcmgElementLayout() )
    \n+
    173 {
    \n+
    174 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
    \n+
    175 DUNE_THROW(IOError, "P0VTKFunction: size mismatch");
    \n+
    176 }
    \n+
    177
    \n+
    179 virtual ~P0VTKFunction() {}
    \n+
    180 };
    \n+
    181
    \n+
    183 //
    \n+
    184 // P1VTKFunction
    \n+
    185 //
    \n+
    186
    \n
    188
    \n-
    189 std::ostream& s;
    \n-
    190 int counter;
    \n-
    191 int numPerLine;
    \n-
    192 Indent indent;
    \n-
    193 };
    \n-
    194
    \n-\n-
    197 {
    \n-
    198 public:
    \n-
    200
    \n-
    210 BinaryDataArrayWriter(std::ostream& theStream, std::string name,
    \n-
    211 int ncomps, int nitems, const Indent& indent_, Precision prec_)
    \n-
    212 : DataArrayWriter(prec_), s(theStream), b64(theStream), indent(indent_)
    \n-
    213 {
    \n-
    214 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n-
    215 << "Name=\\"" << name << "\\" ";
    \n-
    216 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n-
    217 s << "format=\\"binary\\">\\n";
    \n-
    218
    \n-
    219 // write indentation for the data chunk
    \n-
    220 s << indent+1;
    \n-
    221 // store size, needs to be exactly 32 bit
    \n-
    222 std::uint32_t size = ncomps*nitems*typeSize(prec_);
    \n-
    223 b64.write(size);
    \n-
    224 b64.flush();
    \n-
    225 }
    \n-
    226
    \n-\n-
    229 {
    \n-
    230 b64.flush();
    \n-
    231 // append newline to written data
    \n-
    232 s << "\\n";
    \n-
    233 s << indent << "</DataArray>\\n";
    \n-
    234 s.flush();
    \n-
    235 }
    \n-
    236
    \n-
    237 private:
    \n-
    239 void writeFloat64 (double data) final
    \n-
    240 { write_(data); }
    \n-
    242 void writeFloat32 (float data) final
    \n-
    243 { write_(data); }
    \n-
    245 void writeInt32 (std::int32_t data) final
    \n-
    246 { write_(data); }
    \n-
    248 void writeUInt32 (std::uint32_t data) final
    \n-
    249 { write_(data); }
    \n-
    251 void writeUInt8 (std::uint8_t data) final
    \n-
    252 { write_(data); }
    \n-
    253
    \n-
    255 template<class T>
    \n-
    256 void write_(T data)
    \n-
    257 {
    \n-
    258 b64.write(data);
    \n-
    259 }
    \n-
    260
    \n-
    261 std::ostream& s;
    \n-
    262 Base64Stream b64;
    \n-
    263 const Indent& indent;
    \n-
    264 };
    \n+
    202 template<typename GV, typename V>
    \n+\n+
    204 : public VTKFunction< GV >
    \n+
    205 {
    \n+
    207 typedef VTKFunction< GV > Base;
    \n+\n+
    210
    \n+
    212 const V& v;
    \n+
    214 std::string s;
    \n+
    216 int ncomps_;
    \n+
    219 int mycomp_;
    \n+
    221 VTK::Precision prec_;
    \n+
    223 Mapper mapper;
    \n+
    224
    \n+
    225 public:
    \n+
    226 typedef typename Base::Entity Entity;
    \n+
    227 typedef typename Base::ctype ctype;
    \n+
    228 using Base::dim;
    \n+
    229
    \n+
    231 int ncomps () const override
    \n+
    232 {
    \n+
    233 return 1;
    \n+
    234 }
    \n+
    235
    \n+
    237 double evaluate ([[maybe_unused]] int comp, const Entity& e,
    \n+
    238 const Dune::FieldVector<ctype,dim>& xi) const override
    \n+
    239 {
    \n+
    240 const unsigned int myDim = Entity::mydimension;
    \n+
    241 const unsigned int nVertices = e.subEntities(dim);
    \n+
    242
    \n+
    243 std::vector<FieldVector<ctype,1> > cornerValues(nVertices);
    \n+
    244 for (unsigned i=0; i<nVertices; ++i)
    \n+
    245 cornerValues[i] = v[mapper.subIndex(e,i,myDim)*ncomps_+mycomp_];
    \n+
    246
    \n+
    247 // (Ab)use the MultiLinearGeometry class to do multi-linear interpolation between scalars
    \n+
    248 const MultiLinearGeometry<ctype,dim,1> interpolation(e.type(), cornerValues);
    \n+
    249 return interpolation.global(xi);
    \n+
    250 }
    \n+
    251
    \n+
    253 std::string name () const override
    \n+
    254 {
    \n+
    255 return s;
    \n+
    256 }
    \n+
    257
    \n+
    259 VTK::Precision precision() const override
    \n+
    260 {
    \n+
    261 return prec_;
    \n+
    262 }
    \n+
    263
    \n
    265
    \n-\n-
    268 {
    \n-
    269 public:
    \n-
    271
    \n-
    283 AppendedRawDataArrayWriter(std::ostream& s, std::string name,
    \n-
    284 int ncomps, unsigned nitems, unsigned& offset,
    \n-
    285 const Indent& indent, Precision prec_)
    \n-
    286 : DataArrayWriter(prec_)
    \n-
    287 {
    \n-
    288 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n-
    289 << "Name=\\"" << name << "\\" ";
    \n-
    290 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n-
    291 s << "format=\\"appended\\" offset=\\""<< offset << "\\" />\\n";
    \n-
    292 offset += 4; // header
    \n-
    293 offset += ncomps*nitems*typeSize(prec_);
    \n-
    294 }
    \n-
    295
    \n-
    297 bool writeIsNoop() const { return true; }
    \n+
    282 P1VTKFunction(const GV& gv, const V &v_, const std::string &s_,
    \n+
    283 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)
    \n+
    284 : v( v_ ),
    \n+
    285 s( s_ ),
    \n+
    286 ncomps_(ncomps),
    \n+
    287 mycomp_(mycomp),
    \n+
    288 prec_(prec),
    \n+
    289 mapper( gv, mcmgVertexLayout() )
    \n+
    290 {
    \n+
    291 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))
    \n+
    292 DUNE_THROW(IOError,"P1VTKFunction: size mismatch");
    \n+
    293 }
    \n+
    294
    \n+
    296 virtual ~P1VTKFunction() {}
    \n+
    297 };
    \n
    298
    \n-
    299 private:
    \n-
    301 void writeFloat64 (double) final {}
    \n-
    302 void writeFloat32 (float) final {}
    \n-
    303 void writeInt32 (std::int32_t) final {}
    \n-
    304 void writeUInt32 (std::uint32_t) final {}
    \n-
    305 void writeUInt8 (std::uint8_t) final {}
    \n-
    306 };
    \n-
    307
    \n-\n-
    310 {
    \n-
    311 public:
    \n-
    313
    \n-
    325 AppendedBase64DataArrayWriter(std::ostream& s, std::string name,
    \n-
    326 int ncomps, unsigned nitems,
    \n-
    327 unsigned& offset, const Indent& indent, Precision prec_)
    \n-
    328 : DataArrayWriter(prec_)
    \n-
    329 {
    \n-
    330 s << indent << "<DataArray type=\\"" << toString(prec_) << "\\" "
    \n-
    331 << "Name=\\"" << name << "\\" ";
    \n-
    332 s << "NumberOfComponents=\\"" << ncomps << "\\" ";
    \n-
    333 s << "format=\\"appended\\" offset=\\""<< offset << "\\" />\\n";
    \n-
    334 offset += 8; // header
    \n-
    335 std::size_t bytes = ncomps*nitems*typeSize(prec_);
    \n-
    336 offset += bytes/3*4;
    \n-
    337 if(bytes%3 != 0)
    \n-
    338 offset += 4;
    \n-
    339 }
    \n-
    340
    \n-
    342 bool writeIsNoop() const { return true; }
    \n-
    343
    \n-
    344 private:
    \n-
    346 void writeFloat64 (double) final {}
    \n-
    347 void writeFloat32 (float) final {}
    \n-
    348 void writeInt32 (std::int32_t) final {}
    \n-
    349 void writeUInt32 (std::uint32_t) final {}
    \n-
    350 void writeUInt8 (std::uint8_t) final {}
    \n-
    351 };
    \n-
    352
    \n-
    354 //
    \n-
    355 // Naked ArrayWriters for the appended section
    \n-
    356 //
    \n-
    357
    \n-\n-
    360 {
    \n-
    361 public:
    \n-
    363
    \n-
    369 NakedBase64DataArrayWriter(std::ostream& theStream, int ncomps,
    \n-
    370 int nitems, Precision prec_)
    \n-
    371 : DataArrayWriter(prec_), b64(theStream)
    \n-
    372 {
    \n-
    373 // store size
    \n-
    374 std::uint32_t size = ncomps*nitems*typeSize(prec_);
    \n-
    375 b64.write(size);
    \n-
    376 b64.flush();
    \n-
    377 }
    \n-
    378
    \n-
    379 private:
    \n-
    381 void writeFloat64 (double data) final
    \n-
    382 { write_(data); }
    \n-
    384 void writeFloat32 (float data) final
    \n-
    385 { write_(data); }
    \n-
    387 void writeInt32 (std::int32_t data) final
    \n-
    388 { write_(data); }
    \n-
    390 void writeUInt32 (std::uint32_t data) final
    \n-
    391 { write_(data); }
    \n-
    393 void writeUInt8 (std::uint8_t data) final
    \n-
    394 { write_(data); }
    \n-
    395
    \n-
    397 template<class T>
    \n-
    398 void write_(T data)
    \n-
    399 {
    \n-
    400 b64.write(data);
    \n-
    401 }
    \n-
    402
    \n-
    403 Base64Stream b64;
    \n-
    404 };
    \n-
    405
    \n-\n-
    408 {
    \n-
    409 RawStream s;
    \n-
    410
    \n-
    411 public:
    \n-
    413
    \n-
    419 NakedRawDataArrayWriter(std::ostream& theStream, int ncomps,
    \n-
    420 int nitems, Precision prec_)
    \n-
    421 : DataArrayWriter(prec_), s(theStream)
    \n-
    422 {
    \n-
    423 s.write((unsigned int)(ncomps*nitems*typeSize(prec_)));
    \n-
    424 }
    \n-
    425
    \n-
    426 private:
    \n-
    428 void writeFloat64 (double data) final
    \n-
    429 { write_(data); }
    \n-
    431 void writeFloat32 (float data) final
    \n-
    432 { write_(data); }
    \n-
    434 void writeInt32 (std::int32_t data) final
    \n-
    435 { write_(data); }
    \n-
    437 void writeUInt32 (std::uint32_t data) final
    \n-
    438 { write_(data); }
    \n-
    440 void writeUInt8 (std::uint8_t data) final
    \n-
    441 { write_(data); }
    \n-
    442
    \n-
    444 template<class T>
    \n-
    445 void write_(T data)
    \n-
    446 {
    \n-
    447 s.write(data);
    \n-
    448 }
    \n-
    449 };
    \n-
    450
    \n-
    452 //
    \n-
    453 // Factory
    \n-
    454 //
    \n-
    455
    \n-
    457
    \n-\n-
    463 enum Phase { main, appended };
    \n-
    464
    \n-
    465 OutputType type;
    \n-
    466 std::ostream& stream;
    \n-
    467 unsigned offset;
    \n-
    469 Phase phase;
    \n-
    470
    \n-
    471 public:
    \n-
    473
    \n-
    482 inline DataArrayWriterFactory(OutputType type_, std::ostream& stream_)
    \n-
    483 : type(type_), stream(stream_), offset(0), phase(main)
    \n-
    484 { }
    \n-
    485
    \n-
    487
    \n-
    497 inline bool beginAppended() {
    \n-
    498 phase = appended;
    \n-
    499 switch(type) {
    \n-
    500 case ascii : return false;
    \n-
    501 case base64 : return false;
    \n-
    502 case appendedraw : return true;
    \n-
    503 case appendedbase64 : return true;
    \n-
    504 }
    \n-
    505 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
    \n-
    506 "OutputType " << type);
    \n-
    507 }
    \n-
    508
    \n-
    510 const std::string& appendedEncoding() const {
    \n-
    511 static const std::string rawString = "raw";
    \n-
    512 static const std::string base64String = "base64";
    \n-
    513
    \n-
    514 switch(type) {
    \n-
    515 case ascii :
    \n-
    516 case base64 :
    \n-
    517 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): No "
    \n-
    518 "appended encoding for OutputType " << type);
    \n-
    519 case appendedraw : return rawString;
    \n-
    520 case appendedbase64 : return base64String;
    \n-
    521 }
    \n-
    522 DUNE_THROW(IOError, "DataArrayWriterFactory::appendedEncoding(): "
    \n-
    523 "unsupported OutputType " << type);
    \n-
    524 }
    \n-
    525
    \n-
    527
    \n-
    541 DataArrayWriter* make(const std::string& name, unsigned ncomps,
    \n-
    542 unsigned nitems, const Indent& indent,
    \n-
    543 Precision prec)
    \n-
    544 {
    \n-
    545 switch(phase) {
    \n-
    546 case main :
    \n-
    547 switch(type) {
    \n-
    548 case ascii :
    \n-
    549 return new AsciiDataArrayWriter(stream, name, ncomps, indent, prec);
    \n-
    550 case base64 :
    \n-
    551 return new BinaryDataArrayWriter(stream, name, ncomps, nitems,
    \n-
    552 indent, prec);
    \n-
    553 case appendedraw :
    \n-
    554 return new AppendedRawDataArrayWriter(stream, name, ncomps,
    \n-
    555 nitems, offset, indent, prec);
    \n-
    556 case appendedbase64 :
    \n-
    557 return new AppendedBase64DataArrayWriter(stream, name, ncomps,
    \n-
    558 nitems, offset,
    \n-
    559 indent, prec);
    \n-
    560 }
    \n-
    561 break;
    \n-
    562 case appended :
    \n-
    563 switch(type) {
    \n-
    564 case ascii :
    \n-
    565 case base64 :
    \n-
    566 break; // invlid in appended mode
    \n-
    567 case appendedraw :
    \n-
    568 return new NakedRawDataArrayWriter(stream, ncomps, nitems, prec);
    \n-
    569 case appendedbase64 :
    \n-
    570 return new NakedBase64DataArrayWriter(stream, ncomps, nitems, prec);
    \n-
    571 }
    \n-
    572 break;
    \n-
    573 }
    \n-
    574 DUNE_THROW(IOError, "Dune::VTK::DataArrayWriter: unsupported "
    \n-
    575 "OutputType " << type << " in phase " << phase);
    \n-
    576 }
    \n-
    577 };
    \n-
    578
    \n-
    579 } // namespace VTK
    \n-
    580
    \n-
    582
    \n-
    583} // namespace Dune
    \n-
    584
    \n-
    585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH
    \n-\n-
    Common stuff for the VTKWriter.
    \n+
    300
    \n+
    301} // namespace Dune
    \n+
    302
    \n+
    303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH
    \n+
    Mapper for multiple codim and multiple geometry types.
    \n+
    Common stuff for the VTKWriter.
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n+
    Grid::ctype ctype
    type used for coordinates in grid
    Definition: common/gridview.hh:145
    \n+
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n+
    MCMGLayout mcmgVertexLayout()
    layout for vertices (dim-0 entities)
    Definition: mcmgmapper.hh:107
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-\n-\n-\n \n-\n-
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n-
    @ ascii
    Output to the file is in ascii.
    Definition: common.hh:45
    \n-
    @ appendedraw
    Output is to the file is appended raw binary.
    Definition: common.hh:49
    \n-
    @ appendedbase64
    Output is to the file is appended base64 binary.
    Definition: common.hh:51
    \n-
    @ base64
    Output to the file is inline base64 binary.
    Definition: common.hh:47
    \n-
    std::string toString(Precision p)
    map precision to VTK type name
    Definition: common.hh:280
    \n-
    std::size_t typeSize(Precision p)
    map precision to byte size
    Definition: common.hh:300
    \n-
    T Type
    type to convert T to before putting it into a stream with <<
    Definition: common.hh:97
    \n-
    base class for data array writers
    Definition: dataarraywriter.hh:56
    \n-
    void write(T data)
    write one element of data
    Definition: dataarraywriter.hh:69
    \n-
    DataArrayWriter(Precision _prec)
    construct a data array writer
    Definition: dataarraywriter.hh:63
    \n-
    virtual bool writeIsNoop() const
    whether calls to write may be skipped
    Definition: dataarraywriter.hh:89
    \n-
    virtual ~DataArrayWriter()
    virtual destructor
    Definition: dataarraywriter.hh:91
    \n-
    a streaming writer for data array tags, uses ASCII inline format
    Definition: dataarraywriter.hh:110
    \n-
    ~AsciiDataArrayWriter()
    finish output; writes end tag
    Definition: dataarraywriter.hh:133
    \n-
    AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, const Indent &indent_, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:121
    \n-
    a streaming writer for data array tags, uses binary inline format
    Definition: dataarraywriter.hh:197
    \n-
    ~BinaryDataArrayWriter()
    finish output; writes end tag
    Definition: dataarraywriter.hh:228
    \n-
    BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps, int nitems, const Indent &indent_, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:210
    \n-
    a streaming writer for data array tags, uses appended raw format
    Definition: dataarraywriter.hh:268
    \n-
    AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:283
    \n-
    bool writeIsNoop() const
    whether calls to write may be skipped
    Definition: dataarraywriter.hh:297
    \n-
    a streaming writer for data array tags, uses appended base64 format
    Definition: dataarraywriter.hh:310
    \n-
    AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps, unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:325
    \n-
    bool writeIsNoop() const
    whether calls to write may be skipped
    Definition: dataarraywriter.hh:342
    \n-
    a streaming writer for appended data array tags, uses base64 format
    Definition: dataarraywriter.hh:360
    \n-
    NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:369
    \n-
    a streaming writer for appended data arrays, uses raw format
    Definition: dataarraywriter.hh:408
    \n-
    NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems, Precision prec_)
    make a new data array writer
    Definition: dataarraywriter.hh:419
    \n-
    a factory for DataArrayWriters
    Definition: dataarraywriter.hh:462
    \n-
    bool beginAppended()
    signal start of the appended section
    Definition: dataarraywriter.hh:497
    \n-
    DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
    create a DataArrayWriter
    Definition: dataarraywriter.hh:541
    \n-
    DataArrayWriterFactory(OutputType type_, std::ostream &stream_)
    create a DataArrayWriterFactory
    Definition: dataarraywriter.hh:482
    \n-
    const std::string & appendedEncoding() const
    query encoding string for appended data
    Definition: dataarraywriter.hh:510
    \n-
    void write(X &data)
    encode a data item
    Definition: streams.hh:42
    \n-
    void flush()
    flush the current unwritten data to the stream.
    Definition: streams.hh:64
    \n-
    write out data in binary
    Definition: streams.hh:84
    \n-
    void write(T data)
    write data to stream
    Definition: streams.hh:93
    \n+
    static constexpr int mydimension
    Dimensionality of the reference element of the entity.
    Definition: common/entity.hh:112
    \n+
    Implementation class for a multiple codim and multiple geometry type mapper.
    Definition: mcmgmapper.hh:129
    \n+
    size_type size() const
    Return total number of entities in the entity set managed by the mapper.
    Definition: mcmgmapper.hh:204
    \n+
    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
    \n+
    Index index(const EntityType &e) const
    Map entity to starting index in array for dof block.
    Definition: mcmgmapper.hh:171
    \n+
    A base class for grid functions with any return type and dimension.
    Definition: function.hh:42
    \n+
    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
    \n+
    GridView::ctype ctype
    Definition: function.hh:44
    \n+
    GridView::template Codim< 0 >::Entity Entity
    Definition: function.hh:46
    \n+
    static constexpr int dim
    Definition: function.hh:45
    \n+
    virtual std::string name() const =0
    get name
    \n+
    virtual VTK::Precision precision() const
    get output precision for the field
    Definition: function.hh:67
    \n+
    virtual int ncomps() const =0
    \n+
    virtual ~VTKFunction()
    virtual destructor
    Definition: function.hh:71
    \n+
    Take a vector and interpret it as cell data for the VTKWriter.
    Definition: function.hh:97
    \n+
    std::string name() const override
    get name
    Definition: function.hh:136
    \n+
    Base::ctype ctype
    Definition: function.hh:119
    \n+
    double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &) const override
    evaluate
    Definition: function.hh:129
    \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
    Definition: function.hh:165
    \n+
    VTK::Precision precision() const override
    get output precision for the field
    Definition: function.hh:142
    \n+
    Base::Entity Entity
    Definition: function.hh:118
    \n+
    virtual ~P0VTKFunction()
    destructor
    Definition: function.hh:179
    \n+
    int ncomps() const override
    return number of components
    Definition: function.hh:123
    \n+
    Take a vector and interpret it as point data for the VTKWriter.
    Definition: function.hh:205
    \n+
    std::string name() const override
    get name
    Definition: function.hh:253
    \n+
    virtual ~P1VTKFunction()
    destructor
    Definition: function.hh:296
    \n+
    Base::Entity Entity
    Definition: function.hh:226
    \n+
    Base::ctype ctype
    Definition: function.hh:227
    \n+
    VTK::Precision precision() const override
    get output precision for the field
    Definition: function.hh:259
    \n+
    double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim > &xi) const override
    evaluate
    Definition: function.hh:237
    \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
    Definition: function.hh:282
    \n+
    int ncomps() const override
    return number of components
    Definition: function.hh:231
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,598 +7,349 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-dataarraywriter.hh\n+function.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTION_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_FUNCTION_HH\n 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15\n- 16#include \n- 17#include \n- 18\n- 19#include \n- 20#include \n- 21\n- 30namespace Dune\n- 31{\n- 34\n- 35 namespace VTK {\n- 36\n- 38\n-55 class DataArrayWriter\n- 56 {\n- 57 public:\n- 59\n-63 DataArrayWriter(Precision _prec)\n- 64 : prec(_prec)\n- 65 {}\n- 66\n- 68 template\n-69 void write(T data)\n- 70 {\n- 71 switch(prec)\n- 72 {\n- 73 case Precision::float32:\n- 74 writeFloat32(data); break;\n- 75 case Precision::float64:\n- 76 writeFloat64(data); break;\n- 77 case Precision::uint32:\n- 78 writeUInt32(data); break;\n- 79 case Precision::uint8:\n- 80 writeUInt8(data); break;\n- 81 case Precision::int32:\n- 82 writeInt32(data); break;\n- 83 default:\n- 84 DUNE_THROW(Dune::NotImplemented, \"Unknown precision type\");\n- 85 }\n- 86 }\n- 87\n-89 virtual bool writeIsNoop() const { return false; }\n-91 virtual ~DataArrayWriter () {}\n- 92\n- 93 private:\n- 95 virtual void writeFloat32 (float data) = 0;\n- 97 virtual void writeFloat64 (double data) = 0;\n- 99 virtual void writeInt32 (std::int32_t data) = 0;\n- 101 virtual void writeUInt8 (std::uint8_t data) = 0;\n- 103 virtual void writeUInt32 (std::uint32_t data) = 0;\n- 104\n- 105 Precision prec;\n- 106 };\n- 107\n-109 class AsciiDataArrayWriter : public DataArrayWriter\n- 110 {\n- 111 public:\n- 113\n-121 AsciiDataArrayWriter(std::ostream& theStream, std::string name,\n- 122 int ncomps, const Indent& indent_, Precision prec_)\n- 123 : DataArrayWriter(prec_), s(theStream), counter(0), numPerLine(12), indent\n-(indent_)\n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16#include \n+ 17\n+ 18#include \n+ 19#include \n+ 20\n+ 26namespace Dune\n+ 27{\n+ 30\n+ 32 //\n+ 33 // Base VTKFunction\n+ 34 //\n+ 35\n+ 40 template< class GridView >\n+41 class VTKFunction\n+ 42 {\n+ 43 public:\n+44 typedef typename GridView::ctype ctype;\n+45 constexpr static int dim = GridView::dimension;\n+46 typedef typename GridView::template Codim< 0 >::Entity Entity;\n+ 47\n+50 virtual int ncomps () const = 0;\n+ 51\n+ 53\n+60 virtual double evaluate (int comp, const Entity& e,\n+ 61 const Dune::FieldVector& xi) const = 0;\n+ 62\n+64 virtual std::string name () const = 0;\n+ 65\n+67 virtual VTK::Precision precision() const\n+ 68 { return VTK::Precision::float32; }\n+ 69\n+71 virtual ~VTKFunction () {}\n+ 72 };\n+ 73\n+ 75 //\n+ 76 // P0VTKFunction\n+ 77 //\n+ 78\n+ 80\n+ 94 template\n+95 class P0VTKFunction\n+ 96 : public VTKFunction< GV >\n+ 97 {\n+ 99 typedef VTKFunction<_GV_> Base;\n+ 101 typedef MultipleCodimMultipleGeomTypeMapper Mapper;\n+ 102\n+ 104 const V& v;\n+ 106 std::string s;\n+ 108 int ncomps_;\n+ 111 int mycomp_;\n+ 113 VTK::Precision prec_;\n+ 115 Mapper mapper;\n+ 116\n+ 117 public:\n+118 typedef typename Base::Entity Entity;\n+119 typedef typename Base::ctype ctype;\n+ 120 using Base::dim;\n+ 121\n+123 int ncomps () const override\n 124 {\n- 125 s << indent << \"\\n\";\n- 129 ++indent;\n- 130 }\n- 131\n-133 ~AsciiDataArrayWriter ()\n- 134 {\n- 135 if (counter%numPerLine!=0) s << \"\\n\";\n- 136 --indent;\n- 137 s << indent << \"\\n\";\n- 138 }\n- 139\n- 140 private:\n- 142 void writeFloat64 (double data) final\n- 143 { write_float(data); }\n- 145 void writeFloat32 (float data) final\n- 146 { write_float(data); }\n- 148 void writeInt32 (std::int32_t data) final\n- 149 { write_(data); }\n- 151 void writeUInt32 (std::uint32_t data) final\n- 152 { write_(data); }\n- 154 void writeUInt8 (std::uint8_t data) final\n- 155 { write_(data); }\n- 156\n- 157 template\n- 158 void write_(T data)\n- 159 {\n- 160 typedef typename PrintType::Type PT;\n- 161 if(counter%numPerLine==0) s << indent;\n- 162 else s << \" \";\n- 163 const auto original_precision = std::cout.precision();\n- 164 s << std::setprecision(std::numeric_limits::digits10) << (PT) data;\n- 165 std::cout.precision(original_precision);\n- 166 counter++;\n- 167 if (counter%numPerLine==0) s << \"\\n\";\n- 168 }\n- 169\n- 170 template\n- 171 void write_float(T data)\n- 172 {\n- 173 typedef typename PrintType::Type PT;\n- 174 if(counter%numPerLine==0) s << indent;\n- 175 else s << \" \";\n- 176 PT out_data = (PT) data;\n- 177 if (std::fpclassify(out_data) == FP_SUBNORMAL)\n- 178 {\n- 179 // truncate denormalized data to 0 to avoid Paraview segfaults on macOS\n- 180 out_data = 0;\n- 181 }\n- 182 const auto original_precision = std::cout.precision();\n- 183 s << std::setprecision(std::numeric_limits::digits10) << out_data;\n- 184 std::cout.precision(original_precision);\n- 185 counter++;\n- 186 if (counter%numPerLine==0) s << \"\\n\";\n- 187 }\n+ 125 return 1;\n+ 126 }\n+ 127\n+129 double evaluate (int, const Entity& e,\n+ 130 const Dune::FieldVector&) const override\n+ 131 {\n+ 132 return v[mapper.index(e)*ncomps_+mycomp_];\n+ 133 }\n+ 134\n+136 std::string name () const override\n+ 137 {\n+ 138 return s;\n+ 139 }\n+ 140\n+142 VTK::Precision precision() const override\n+ 143 {\n+ 144 return prec_;\n+ 145 }\n+ 146\n+ 148\n+165 P0VTKFunction(const GV &gv, const V &v_, const std::string &s_,\n+ 166 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)\n+ 167 : v( v_ ),\n+ 168 s( s_ ),\n+ 169 ncomps_(ncomps),\n+ 170 mycomp_(mycomp),\n+ 171 prec_(prec),\n+ 172 mapper( gv, mcmgElementLayout() )\n+ 173 {\n+ 174 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))\n+ 175 DUNE_THROW(IOError, \"P0VTKFunction: size mismatch\");\n+ 176 }\n+ 177\n+179 virtual ~P0VTKFunction() {}\n+ 180 };\n+ 181\n+ 183 //\n+ 184 // P1VTKFunction\n+ 185 //\n+ 186\n 188\n- 189 std::ostream& s;\n- 190 int counter;\n- 191 int numPerLine;\n- 192 Indent indent;\n- 193 };\n- 194\n-196 class BinaryDataArrayWriter : public DataArrayWriter\n- 197 {\n- 198 public:\n- 200\n-210 BinaryDataArrayWriter(std::ostream& theStream, std::string name,\n- 211 int ncomps, int nitems, const Indent& indent_, Precision prec_)\n- 212 : DataArrayWriter(prec_), s(theStream), b64(theStream), indent(indent_)\n- 213 {\n- 214 s << indent << \"\\n\";\n- 218\n- 219 // write indentation for the data chunk\n- 220 s << indent+1;\n- 221 // store size, needs to be exactly 32 bit\n- 222 std::uint32_t size = ncomps*nitems*typeSize(prec_);\n- 223 b64.write(size);\n- 224 b64.flush();\n- 225 }\n- 226\n-228 ~BinaryDataArrayWriter ()\n- 229 {\n- 230 b64.flush();\n- 231 // append newline to written data\n- 232 s << \"\\n\";\n- 233 s << indent << \"\\n\";\n- 234 s.flush();\n- 235 }\n- 236\n- 237 private:\n- 239 void writeFloat64 (double data) final\n- 240 { write_(data); }\n- 242 void writeFloat32 (float data) final\n- 243 { write_(data); }\n- 245 void writeInt32 (std::int32_t data) final\n- 246 { write_(data); }\n- 248 void writeUInt32 (std::uint32_t data) final\n- 249 { write_(data); }\n- 251 void writeUInt8 (std::uint8_t data) final\n- 252 { write_(data); }\n- 253\n- 255 template\n- 256 void write_(T data)\n- 257 {\n- 258 b64.write(data);\n- 259 }\n- 260\n- 261 std::ostream& s;\n- 262 Base64Stream b64;\n- 263 const Indent& indent;\n- 264 };\n+ 202 template\n+203 class P1VTKFunction\n+ 204 : public VTKFunction< GV >\n+ 205 {\n+ 207 typedef VTKFunction<_GV_> Base;\n+ 209 typedef MultipleCodimMultipleGeomTypeMapper Mapper;\n+ 210\n+ 212 const V& v;\n+ 214 std::string s;\n+ 216 int ncomps_;\n+ 219 int mycomp_;\n+ 221 VTK::Precision prec_;\n+ 223 Mapper mapper;\n+ 224\n+ 225 public:\n+226 typedef typename Base::Entity Entity;\n+227 typedef typename Base::ctype ctype;\n+ 228 using Base::dim;\n+ 229\n+231 int ncomps () const override\n+ 232 {\n+ 233 return 1;\n+ 234 }\n+ 235\n+237 double evaluate ([[maybe_unused]] int comp, const Entity& e,\n+ 238 const Dune::FieldVector& xi) const override\n+ 239 {\n+ 240 const unsigned int myDim = Entity::mydimension;\n+ 241 const unsigned int nVertices = e.subEntities(dim);\n+ 242\n+ 243 std::vector > cornerValues(nVertices);\n+ 244 for (unsigned i=0; i interpolation(e.type(),\n+cornerValues);\n+ 249 return interpolation.global(xi);\n+ 250 }\n+ 251\n+253 std::string name () const override\n+ 254 {\n+ 255 return s;\n+ 256 }\n+ 257\n+259 VTK::Precision precision() const override\n+ 260 {\n+ 261 return prec_;\n+ 262 }\n+ 263\n 265\n-267 class AppendedRawDataArrayWriter : public DataArrayWriter\n- 268 {\n- 269 public:\n- 271\n-283 AppendedRawDataArrayWriter(std::ostream& s, std::string name,\n- 284 int ncomps, unsigned nitems, unsigned& offset,\n- 285 const Indent& indent, Precision prec_)\n- 286 : DataArrayWriter(prec_)\n- 287 {\n- 288 s << indent << \"\\n\";\n- 292 offset += 4; // header\n- 293 offset += ncomps*nitems*typeSize(prec_);\n- 294 }\n- 295\n-297 bool writeIsNoop() const { return true; }\n+282 P1VTKFunction(const GV& gv, const V &v_, const std::string &s_,\n+ 283 int ncomps=1, int mycomp=0, VTK::Precision prec = VTK::Precision::float32)\n+ 284 : v( v_ ),\n+ 285 s( s_ ),\n+ 286 ncomps_(ncomps),\n+ 287 mycomp_(mycomp),\n+ 288 prec_(prec),\n+ 289 mapper( gv, mcmgVertexLayout() )\n+ 290 {\n+ 291 if (v.size()!=(unsigned int)(mapper.size()*ncomps_))\n+ 292 DUNE_THROW(IOError,\"P1VTKFunction: size mismatch\");\n+ 293 }\n+ 294\n+296 virtual ~P1VTKFunction() {}\n+ 297 };\n 298\n- 299 private:\n- 301 void writeFloat64 (double) final {}\n- 302 void writeFloat32 (float) final {}\n- 303 void writeInt32 (std::int32_t) final {}\n- 304 void writeUInt32 (std::uint32_t) final {}\n- 305 void writeUInt8 (std::uint8_t) final {}\n- 306 };\n- 307\n-309 class AppendedBase64DataArrayWriter : public DataArrayWriter\n- 310 {\n- 311 public:\n- 313\n-325 AppendedBase64DataArrayWriter(std::ostream& s, std::string name,\n- 326 int ncomps, unsigned nitems,\n- 327 unsigned& offset, const Indent& indent, Precision prec_)\n- 328 : DataArrayWriter(prec_)\n- 329 {\n- 330 s << indent << \"\\n\";\n- 334 offset += 8; // header\n- 335 std::size_t bytes = ncomps*nitems*typeSize(prec_);\n- 336 offset += bytes/3*4;\n- 337 if(bytes%3 != 0)\n- 338 offset += 4;\n- 339 }\n- 340\n-342 bool writeIsNoop() const { return true; }\n- 343\n- 344 private:\n- 346 void writeFloat64 (double) final {}\n- 347 void writeFloat32 (float) final {}\n- 348 void writeInt32 (std::int32_t) final {}\n- 349 void writeUInt32 (std::uint32_t) final {}\n- 350 void writeUInt8 (std::uint8_t) final {}\n- 351 };\n- 352\n- 354 //\n- 355 // Naked ArrayWriters for the appended section\n- 356 //\n- 357\n-359 class NakedBase64DataArrayWriter : public DataArrayWriter\n- 360 {\n- 361 public:\n- 363\n-369 NakedBase64DataArrayWriter(std::ostream& theStream, int ncomps,\n- 370 int nitems, Precision prec_)\n- 371 : DataArrayWriter(prec_), b64(theStream)\n- 372 {\n- 373 // store size\n- 374 std::uint32_t size = ncomps*nitems*typeSize(prec_);\n- 375 b64.write(size);\n- 376 b64.flush();\n- 377 }\n- 378\n- 379 private:\n- 381 void writeFloat64 (double data) final\n- 382 { write_(data); }\n- 384 void writeFloat32 (float data) final\n- 385 { write_(data); }\n- 387 void writeInt32 (std::int32_t data) final\n- 388 { write_(data); }\n- 390 void writeUInt32 (std::uint32_t data) final\n- 391 { write_(data); }\n- 393 void writeUInt8 (std::uint8_t data) final\n- 394 { write_(data); }\n- 395\n- 397 template\n- 398 void write_(T data)\n- 399 {\n- 400 b64.write(data);\n- 401 }\n- 402\n- 403 Base64Stream b64;\n- 404 };\n- 405\n-407 class NakedRawDataArrayWriter : public DataArrayWriter\n- 408 {\n- 409 RawStream s;\n- 410\n- 411 public:\n- 413\n-419 NakedRawDataArrayWriter(std::ostream& theStream, int ncomps,\n- 420 int nitems, Precision prec_)\n- 421 : DataArrayWriter(prec_), s(theStream)\n- 422 {\n- 423 s.write((unsigned int)(ncomps*nitems*typeSize(prec_)));\n- 424 }\n- 425\n- 426 private:\n- 428 void writeFloat64 (double data) final\n- 429 { write_(data); }\n- 431 void writeFloat32 (float data) final\n- 432 { write_(data); }\n- 434 void writeInt32 (std::int32_t data) final\n- 435 { write_(data); }\n- 437 void writeUInt32 (std::uint32_t data) final\n- 438 { write_(data); }\n- 440 void writeUInt8 (std::uint8_t data) final\n- 441 { write_(data); }\n- 442\n- 444 template\n- 445 void write_(T data)\n- 446 {\n- 447 s.write(data);\n- 448 }\n- 449 };\n- 450\n- 452 //\n- 453 // Factory\n- 454 //\n- 455\n- 457\n-462 class DataArrayWriterFactory {\n- 463 enum Phase { main, appended };\n- 464\n- 465 OutputType type;\n- 466 std::ostream& stream;\n- 467 unsigned offset;\n- 469 Phase phase;\n- 470\n- 471 public:\n- 473\n-482 inline DataArrayWriterFactory(OutputType type_, std::ostream& stream_)\n- 483 : type(type_), stream(stream_), offset(0), phase(main)\n- 484 { }\n- 485\n- 487\n-497 inline bool beginAppended() {\n- 498 phase = appended;\n- 499 switch(type) {\n- 500 case ascii : return false;\n- 501 case base64 : return false;\n- 502 case appendedraw : return true;\n- 503 case appendedbase64 : return true;\n- 504 }\n- 505 DUNE_THROW(IOError, \"Dune::VTK::DataArrayWriter: unsupported \"\n- 506 \"OutputType \" << type);\n- 507 }\n- 508\n-510 const std::string& appendedEncoding() const {\n- 511 static const std::string rawString = \"raw\";\n- 512 static const std::string base64String = \"base64\";\n- 513\n- 514 switch(type) {\n- 515 case ascii :\n- 516 case base64 :\n- 517 DUNE_THROW(IOError, \"DataArrayWriterFactory::appendedEncoding(): No \"\n- 518 \"appended encoding for OutputType \" << type);\n- 519 case appendedraw : return rawString;\n- 520 case appendedbase64 : return base64String;\n- 521 }\n- 522 DUNE_THROW(IOError, \"DataArrayWriterFactory::appendedEncoding(): \"\n- 523 \"unsupported OutputType \" << type);\n- 524 }\n- 525\n- 527\n-541 DataArrayWriter* make(const std::string& name, unsigned ncomps,\n- 542 unsigned nitems, const Indent& indent,\n- 543 Precision prec)\n- 544 {\n- 545 switch(phase) {\n- 546 case main :\n- 547 switch(type) {\n- 548 case ascii :\n- 549 return new AsciiDataArrayWriter(stream, name, ncomps, indent, prec);\n- 550 case base64 :\n- 551 return new BinaryDataArrayWriter(stream, name, ncomps, nitems,\n- 552 indent, prec);\n- 553 case appendedraw :\n- 554 return new AppendedRawDataArrayWriter(stream, name, ncomps,\n- 555 nitems, offset, indent, prec);\n- 556 case appendedbase64 :\n- 557 return new AppendedBase64DataArrayWriter(stream, name, ncomps,\n- 558 nitems, offset,\n- 559 indent, prec);\n- 560 }\n- 561 break;\n- 562 case appended :\n- 563 switch(type) {\n- 564 case ascii :\n- 565 case base64 :\n- 566 break; // invlid in appended mode\n- 567 case appendedraw :\n- 568 return new NakedRawDataArrayWriter(stream, ncomps, nitems, prec);\n- 569 case appendedbase64 :\n- 570 return new NakedBase64DataArrayWriter(stream, ncomps, nitems, prec);\n- 571 }\n- 572 break;\n- 573 }\n- 574 DUNE_THROW(IOError, \"Dune::VTK::DataArrayWriter: unsupported \"\n- 575 \"OutputType \" << type << \" in phase \" << phase);\n- 576 }\n- 577 };\n- 578\n- 579 } // namespace VTK\n- 580\n- 582\n- 583} // namespace Dune\n- 584\n- 585#endif // DUNE_GRID_IO_FILE_VTK_DATAARRAYWRITER_HH\n-streams.hh\n+ 300\n+ 301} // namespace Dune\n+ 302\n+ 303#endif // DUNE_GRID_IO_FILE_VTK_FUNCTION_HH\n+mcmgmapper.hh\n+Mapper for multiple codim and multiple geometry types.\n common.hh\n Common stuff for the VTKWriter.\n+Dune::GridView::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/gridview.hh:148\n+Dune::GridView::ctype\n+Grid::ctype ctype\n+type used for coordinates in grid\n+Definition: common/gridview.hh:145\n+Dune::mcmgElementLayout\n+MCMGLayout mcmgElementLayout()\n+layout for elements (codim-0 entities)\n+Definition: mcmgmapper.hh:97\n+Dune::mcmgVertexLayout\n+MCMGLayout mcmgVertexLayout()\n+layout for vertices (dim-0 entities)\n+Definition: mcmgmapper.hh:107\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::VTK::Precision\n Precision\n which precision to use when writing out data to vtk files\n Definition: common.hh:271\n-Dune::VTK::Precision::int32\n-@ int32\n-Dune::VTK::Precision::uint32\n-@ uint32\n-Dune::VTK::Precision::uint8\n-@ uint8\n Dune::VTK::Precision::float32\n @ float32\n-Dune::VTK::Precision::float64\n-@ float64\n-Dune::VTK::OutputType\n-OutputType\n-How the bulk data should be stored in the file.\n-Definition: common.hh:43\n-Dune::VTK::ascii\n-@ ascii\n-Output to the file is in ascii.\n-Definition: common.hh:45\n-Dune::VTK::appendedraw\n-@ appendedraw\n-Output is to the file is appended raw binary.\n-Definition: common.hh:49\n-Dune::VTK::appendedbase64\n-@ appendedbase64\n-Output is to the file is appended base64 binary.\n-Definition: common.hh:51\n-Dune::VTK::base64\n-@ base64\n-Output to the file is inline base64 binary.\n-Definition: common.hh:47\n-Dune::VTK::toString\n-std::string toString(Precision p)\n-map precision to VTK type name\n-Definition: common.hh:280\n-Dune::VTK::typeSize\n-std::size_t typeSize(Precision p)\n-map precision to byte size\n-Definition: common.hh:300\n-Dune::VTK::PrintType::Type\n-T Type\n-type to convert T to before putting it into a stream with <<\n-Definition: common.hh:97\n-Dune::VTK::DataArrayWriter\n-base class for data array writers\n-Definition: dataarraywriter.hh:56\n-Dune::VTK::DataArrayWriter::write\n-void write(T data)\n-write one element of data\n-Definition: dataarraywriter.hh:69\n-Dune::VTK::DataArrayWriter::DataArrayWriter\n-DataArrayWriter(Precision _prec)\n-construct a data array writer\n-Definition: dataarraywriter.hh:63\n-Dune::VTK::DataArrayWriter::writeIsNoop\n-virtual bool writeIsNoop() const\n-whether calls to write may be skipped\n-Definition: dataarraywriter.hh:89\n-Dune::VTK::DataArrayWriter::~DataArrayWriter\n-virtual ~DataArrayWriter()\n+Dune::Entity::mydimension\n+static constexpr int mydimension\n+Dimensionality of the reference element of the entity.\n+Definition: common/entity.hh:112\n+Dune::MultipleCodimMultipleGeomTypeMapper\n+Implementation class for a multiple codim and multiple geometry type mapper.\n+Definition: mcmgmapper.hh:129\n+Dune::MultipleCodimMultipleGeomTypeMapper::size\n+size_type size() const\n+Return total number of entities in the entity set managed by the mapper.\n+Definition: mcmgmapper.hh:204\n+Dune::MultipleCodimMultipleGeomTypeMapper::subIndex\n+Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i,\n+unsigned int codim) const\n+Map subentity of codim 0 entity to starting index in array for dof block.\n+Definition: mcmgmapper.hh:185\n+Dune::MultipleCodimMultipleGeomTypeMapper::index\n+Index index(const EntityType &e) const\n+Map entity to starting index in array for dof block.\n+Definition: mcmgmapper.hh:171\n+Dune::VTKFunction\n+A base class for grid functions with any return type and dimension.\n+Definition: function.hh:42\n+Dune::VTKFunction::evaluate\n+virtual double evaluate(int comp, const Entity &e, const Dune::FieldVector<\n+ctype, dim > &xi) const =0\n+evaluate single component comp in the entity e at local coordinates xi\n+Dune::VTKFunction::ctype\n+GridView::ctype ctype\n+Definition: function.hh:44\n+Dune::VTKFunction::Entity\n+GridView::template Codim< 0 >::Entity Entity\n+Definition: function.hh:46\n+Dune::VTKFunction::dim\n+static constexpr int dim\n+Definition: function.hh:45\n+Dune::VTKFunction::name\n+virtual std::string name() const =0\n+get name\n+Dune::VTKFunction::precision\n+virtual VTK::Precision precision() const\n+get output precision for the field\n+Definition: function.hh:67\n+Dune::VTKFunction::ncomps\n+virtual int ncomps() const =0\n+Dune::VTKFunction::~VTKFunction\n+virtual ~VTKFunction()\n virtual destructor\n-Definition: dataarraywriter.hh:91\n-Dune::VTK::AsciiDataArrayWriter\n-a streaming writer for data array tags, uses ASCII inline format\n-Definition: dataarraywriter.hh:110\n-Dune::VTK::AsciiDataArrayWriter::~AsciiDataArrayWriter\n-~AsciiDataArrayWriter()\n-finish output; writes end tag\n-Definition: dataarraywriter.hh:133\n-Dune::VTK::AsciiDataArrayWriter::AsciiDataArrayWriter\n-AsciiDataArrayWriter(std::ostream &theStream, std::string name, int ncomps,\n-const Indent &indent_, Precision prec_)\n-make a new data array writer\n-Definition: dataarraywriter.hh:121\n-Dune::VTK::BinaryDataArrayWriter\n-a streaming writer for data array tags, uses binary inline format\n-Definition: dataarraywriter.hh:197\n-Dune::VTK::BinaryDataArrayWriter::~BinaryDataArrayWriter\n-~BinaryDataArrayWriter()\n-finish output; writes end tag\n-Definition: dataarraywriter.hh:228\n-Dune::VTK::BinaryDataArrayWriter::BinaryDataArrayWriter\n-BinaryDataArrayWriter(std::ostream &theStream, std::string name, int ncomps,\n-int nitems, const Indent &indent_, Precision prec_)\n-make a new data array writer\n-Definition: dataarraywriter.hh:210\n-Dune::VTK::AppendedRawDataArrayWriter\n-a streaming writer for data array tags, uses appended raw format\n-Definition: dataarraywriter.hh:268\n-Dune::VTK::AppendedRawDataArrayWriter::AppendedRawDataArrayWriter\n-AppendedRawDataArrayWriter(std::ostream &s, std::string name, int ncomps,\n-unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)\n-make a new data array writer\n-Definition: dataarraywriter.hh:283\n-Dune::VTK::AppendedRawDataArrayWriter::writeIsNoop\n-bool writeIsNoop() const\n-whether calls to write may be skipped\n-Definition: dataarraywriter.hh:297\n-Dune::VTK::AppendedBase64DataArrayWriter\n-a streaming writer for data array tags, uses appended base64 format\n-Definition: dataarraywriter.hh:310\n-Dune::VTK::AppendedBase64DataArrayWriter::AppendedBase64DataArrayWriter\n-AppendedBase64DataArrayWriter(std::ostream &s, std::string name, int ncomps,\n-unsigned nitems, unsigned &offset, const Indent &indent, Precision prec_)\n-make a new data array writer\n-Definition: dataarraywriter.hh:325\n-Dune::VTK::AppendedBase64DataArrayWriter::writeIsNoop\n-bool writeIsNoop() const\n-whether calls to write may be skipped\n-Definition: dataarraywriter.hh:342\n-Dune::VTK::NakedBase64DataArrayWriter\n-a streaming writer for appended data array tags, uses base64 format\n-Definition: dataarraywriter.hh:360\n-Dune::VTK::NakedBase64DataArrayWriter::NakedBase64DataArrayWriter\n-NakedBase64DataArrayWriter(std::ostream &theStream, int ncomps, int nitems,\n-Precision prec_)\n-make a new data array writer\n-Definition: dataarraywriter.hh:369\n-Dune::VTK::NakedRawDataArrayWriter\n-a streaming writer for appended data arrays, uses raw format\n-Definition: dataarraywriter.hh:408\n-Dune::VTK::NakedRawDataArrayWriter::NakedRawDataArrayWriter\n-NakedRawDataArrayWriter(std::ostream &theStream, int ncomps, int nitems,\n-Precision prec_)\n-make a new data array writer\n-Definition: dataarraywriter.hh:419\n-Dune::VTK::DataArrayWriterFactory\n-a factory for DataArrayWriters\n-Definition: dataarraywriter.hh:462\n-Dune::VTK::DataArrayWriterFactory::beginAppended\n-bool beginAppended()\n-signal start of the appended section\n-Definition: dataarraywriter.hh:497\n-Dune::VTK::DataArrayWriterFactory::make\n-DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned\n-nitems, const Indent &indent, Precision prec)\n-create a DataArrayWriter\n-Definition: dataarraywriter.hh:541\n-Dune::VTK::DataArrayWriterFactory::DataArrayWriterFactory\n-DataArrayWriterFactory(OutputType type_, std::ostream &stream_)\n-create a DataArrayWriterFactory\n-Definition: dataarraywriter.hh:482\n-Dune::VTK::DataArrayWriterFactory::appendedEncoding\n-const std::string & appendedEncoding() const\n-query encoding string for appended data\n-Definition: dataarraywriter.hh:510\n-Dune::Base64Stream::write\n-void write(X &data)\n-encode a data item\n-Definition: streams.hh:42\n-Dune::Base64Stream::flush\n-void flush()\n-flush the current unwritten data to the stream.\n-Definition: streams.hh:64\n-Dune::RawStream\n-write out data in binary\n-Definition: streams.hh:84\n-Dune::RawStream::write\n-void write(T data)\n-write data to stream\n-Definition: streams.hh:93\n+Definition: function.hh:71\n+Dune::P0VTKFunction\n+Take a vector and interpret it as cell data for the VTKWriter.\n+Definition: function.hh:97\n+Dune::P0VTKFunction::name\n+std::string name() const override\n+get name\n+Definition: function.hh:136\n+Dune::P0VTKFunction::ctype\n+Base::ctype ctype\n+Definition: function.hh:119\n+Dune::P0VTKFunction::evaluate\n+double evaluate(int, const Entity &e, const Dune::FieldVector< ctype, dim > &)\n+const override\n+evaluate\n+Definition: function.hh:129\n+Dune::P0VTKFunction::P0VTKFunction\n+P0VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1,\n+int mycomp=0, VTK::Precision prec=VTK::Precision::float32)\n+construct from a vector and a name\n+Definition: function.hh:165\n+Dune::P0VTKFunction::precision\n+VTK::Precision precision() const override\n+get output precision for the field\n+Definition: function.hh:142\n+Dune::P0VTKFunction::Entity\n+Base::Entity Entity\n+Definition: function.hh:118\n+Dune::P0VTKFunction::~P0VTKFunction\n+virtual ~P0VTKFunction()\n+destructor\n+Definition: function.hh:179\n+Dune::P0VTKFunction::ncomps\n+int ncomps() const override\n+return number of components\n+Definition: function.hh:123\n+Dune::P1VTKFunction\n+Take a vector and interpret it as point data for the VTKWriter.\n+Definition: function.hh:205\n+Dune::P1VTKFunction::name\n+std::string name() const override\n+get name\n+Definition: function.hh:253\n+Dune::P1VTKFunction::~P1VTKFunction\n+virtual ~P1VTKFunction()\n+destructor\n+Definition: function.hh:296\n+Dune::P1VTKFunction::Entity\n+Base::Entity Entity\n+Definition: function.hh:226\n+Dune::P1VTKFunction::ctype\n+Base::ctype ctype\n+Definition: function.hh:227\n+Dune::P1VTKFunction::precision\n+VTK::Precision precision() const override\n+get output precision for the field\n+Definition: function.hh:259\n+Dune::P1VTKFunction::evaluate\n+double evaluate(int comp, const Entity &e, const Dune::FieldVector< ctype, dim\n+> &xi) const override\n+evaluate\n+Definition: function.hh:237\n+Dune::P1VTKFunction::P1VTKFunction\n+P1VTKFunction(const GV &gv, const V &v_, const std::string &s_, int ncomps=1,\n+int mycomp=0, VTK::Precision prec=VTK::Precision::float32)\n+construct from a vector and a name\n+Definition: function.hh:282\n+Dune::P1VTKFunction::ncomps\n+int ncomps() const override\n+return number of components\n+Definition: function.hh:231\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00809.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00809.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: pointiterator.hh File Reference\n+dune-grid: boundaryiterators.hh File Reference\n \n \n \n \n \n \n \n@@ -65,40 +65,50 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n
    \n
    \n
    \n \n-
    pointiterator.hh File Reference
    \n+
    boundaryiterators.hh File Reference
    \n
    \n
    \n+\n+

    Functions for VTK output on the skeleton. \n+More...

    \n
    #include <iterator>
    \n-#include <vector>
    \n+#include <memory>
    \n #include <dune/common/iteratorfacades.hh>
    \n-#include <dune/common/typetraits.hh>
    \n-#include <dune/grid/io/file/vtk/corner.hh>
    \n-#include <dune/grid/io/file/vtk/corneriterator.hh>
    \n+#include <dune/grid/io/file/vtk/corner.hh>
    \n+#include <dune/grid/io/file/vtk/corneriterator.hh>
    \n+#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::VTK::PointIterator< CellIterator, IS >
     iterate over the points of some corner range More...
    class  Dune::VTK::BoundaryIterator< GV >
     iterate over the GridViews boundary intersections More...
     
    class  Dune::VTK::IntersectionIndexSet< ElementIndexSet >
     
    class  Dune::VTK::NonConformingBoundaryIteratorFactory< GV >
     
    \n \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-
    \n+

    Detailed Description

    \n+

    Functions for VTK output on the skeleton.

    \n+
    Author
    J\u00f6 Fahlke
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-us-ascii\n+utf-8\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,28 +8,38 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-pointiterator.hh File Reference\n+boundaryiterators.hh File Reference\n+dune-grid \u00bb I/O \u00bb Visualization_ToolKit_(VTK)\n+Functions for VTK output on the skeleton. More...\n #include \n-#include \n+#include \n #include \n-#include \n #include \n #include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::PointIterator<_CellIterator,_IS_>\n-\u00a0 iterate over the points of some corner range More...\n+class \u00a0Dune::VTK::BoundaryIterator<_GV_>\n+\u00a0 iterate over the GridViews boundary intersections More...\n+\u00a0\n+class \u00a0Dune::VTK::IntersectionIndexSet<_ElementIndexSet_>\n+\u00a0\n+class \u00a0Dune::VTK::NonConformingBoundaryIteratorFactory<_GV_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::VTK\n \u00a0\n+***** Detailed Description *****\n+Functions for VTK output on the skeleton.\n+ Author\n+ J\u00f6 Fahlke\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00809_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: pointiterator.hh Source File\n+dune-grid: boundaryiterators.hh Source File\n \n \n \n \n \n \n \n@@ -62,133 +62,245 @@\n \n \n \n
    \n-
    pointiterator.hh
    \n+
    boundaryiterators.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
    \n
    8
    \n
    9#include <iterator>
    \n-
    10#include <vector>
    \n+
    10#include <memory>
    \n
    11
    \n
    12#include <dune/common/iteratorfacades.hh>
    \n-
    13#include <dune/common/typetraits.hh>
    \n-
    14
    \n-\n-\n+
    13
    \n+\n+\n+\n
    17
    \n-
    18namespace Dune
    \n-
    19{
    \n+
    18namespace Dune {
    \n+
    19
    \n
    22
    \n-
    23 namespace VTK {
    \n-
    24
    \n-
    26
    \n-
    49 template<typename CellIterator, typename IS>
    \n-\n-
    51 : public ForwardIteratorFacade
    \n-
    52 < PointIterator<CellIterator, IS>,
    \n-
    53 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n-
    54 CellIterator>::value_type>::type>,
    \n-
    55 const Corner<typename std::remove_const<typename std::iterator_traits<
    \n-
    56 CellIterator>::value_type>::type>&,
    \n-
    57 typename std::iterator_traits<CellIterator>::difference_type>
    \n-
    58 {
    \n-
    59 public:
    \n-
    60 typedef VTK::Corner<typename std::remove_const<typename std::iterator_traits<
    \n-
    61 CellIterator>::value_type>::type> Corner;
    \n-
    62
    \n-
    63 // reiterate the facades typedefs here
    \n-\n-
    65 typedef const Corner Value;
    \n-
    66 typedef Value& Reference;
    \n-
    67 typedef typename std::iterator_traits<CellIterator>::difference_type
    \n-\n-
    69
    \n-
    70 static const unsigned mydim = std::iterator_traits<CellIterator>::
    \n-
    71 value_type::mydimension;
    \n-
    72
    \n-
    73 private:
    \n-
    74 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
    \n-
    75 DifferenceType> Facade;
    \n-
    76
    \n-\n-
    78 const IS* is;
    \n-
    79 std::vector<bool> seen;
    \n+
    28 namespace VTK {
    \n+
    29
    \n+
    31
    \n+
    35 template<typename GV>
    \n+\n+
    37 : public ForwardIteratorFacade
    \n+
    38 < BoundaryIterator<GV>,
    \n+
    39 const typename GV::Intersection,
    \n+
    40 const typename GV::Intersection&,
    \n+
    41 typename std::iterator_traits<typename GV::template Codim<0>::
    \n+
    42 Iterator>::difference_type>
    \n+
    43 {
    \n+
    44 public:
    \n+
    45 // reiterator the facades typedefs here
    \n+\n+
    47 typedef const typename GV::Intersection Value;
    \n+
    48 typedef Value& Reference;
    \n+
    49 typedef typename GV::template Codim<0>::Iterator ElementIterator;
    \n+
    50 typedef typename GV::IntersectionIterator IntersectionIterator;
    \n+
    51 typedef typename std::iterator_traits<ElementIterator>::difference_type
    \n+\n+
    53
    \n+
    54 private:
    \n+
    55 typedef ForwardIteratorFacade<DerivedType, Value, Reference,
    \n+
    56 DifferenceType> Facade;
    \n+
    57
    \n+
    58 const GV* gv;
    \n+\n+
    60 std::shared_ptr<IntersectionIterator> iit;
    \n+
    61
    \n+
    62 bool valid() const {
    \n+
    63 // we're valid if we're passed-the-end
    \n+
    64 if(eit == gv->template end<0>()) return true;
    \n+
    65 // or if we're on a boundary
    \n+
    66 if((*iit)->boundary() && !(*iit)->neighbor()) return true;
    \n+
    67 // otherwise we're invalid
    \n+
    68 return false;
    \n+
    69 }
    \n+
    70
    \n+
    71 void basic_increment() {
    \n+
    72 ++*iit;
    \n+
    73 if(*iit == gv->iend(*eit)) {
    \n+
    74 iit.reset();
    \n+
    75 ++eit;
    \n+
    76 if(eit != gv->template end<0>())
    \n+
    77 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
    \n+
    78 }
    \n+
    79 }
    \n
    80
    \n
    81 public:
    \n-\n-
    83 return *cornerit;
    \n+\n+
    83 return **iit;
    \n
    84 }
    \n-
    85
    \n-
    86 bool isDereferencable() const {
    \n-
    87 return cornerit.isDereferencable();
    \n-
    88 }
    \n-
    89
    \n-
    90 bool equals(const DerivedType& other) const {
    \n-
    91 return cornerit == other.cornerit;
    \n-
    92 }
    \n-
    93
    \n-
    94 void increment() {
    \n-
    95 for(++cornerit; isDereferencable(); ++cornerit) {
    \n-
    96 typename IS::IndexType index =
    \n-
    97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), mydim);
    \n+
    85 bool equals(const DerivedType& other) const {
    \n+
    86 if(eit != other.eit) return false;
    \n+
    87
    \n+
    88 // this is a bit tricky, since we may not compare iit if we are
    \n+
    89 // passed-the-end
    \n+
    90 bool mePassedTheEnd = eit == gv->template end<0>();
    \n+
    91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();
    \n+
    92
    \n+
    93 // both passed-the-end => consider them equal
    \n+
    94 if(mePassedTheEnd && otherPassedTheEnd) return true;
    \n+
    95
    \n+
    96 // one passed the end => not equal
    \n+
    97 if(mePassedTheEnd || otherPassedTheEnd) return false;
    \n
    98
    \n-
    99 if(!seen[index]) {
    \n-
    100 seen[index] = true;
    \n-
    101 break;
    \n-
    102 }
    \n-
    103 }
    \n-
    104 }
    \n-
    105
    \n+
    99 // none passed-the-end => do their iit iterators match?
    \n+
    100 return *iit == *other.iit;
    \n+
    101 }
    \n+
    102
    \n+
    103 void increment() {
    \n+
    104 basic_increment();
    \n+
    105 while(!valid()) basic_increment();
    \n+
    106 }
    \n
    107
    \n-
    112 PointIterator(const CellIterator& cellit, const CellIterator& cellend,
    \n-
    113 const IS& is_)
    \n-
    114 : cornerit(cellit, cellend), is(&is_), seen(is->size(mydim), false)
    \n-
    115 { }
    \n-
    117
    \n-
    120 PointIterator(const CellIterator& cellend_)
    \n-
    121 : cornerit(cellend_), is(0)
    \n-
    122 { }
    \n-
    123 };
    \n-
    124
    \n-
    125 } // namespace VTK
    \n-
    126
    \n-
    128
    \n-
    129} // namespace Dune
    \n+
    109
    \n+
    113 BoundaryIterator(const GV& gv_, const ElementIterator& eit_,
    \n+
    114 const IntersectionIterator& iit_)
    \n+
    115 : gv(&gv_), eit(eit_), iit(new IntersectionIterator(iit_))
    \n+
    116 {
    \n+
    117 while(!valid()) basic_increment();
    \n+
    118 }
    \n+
    120
    \n+
    125 BoundaryIterator(const GV& gv_, const ElementIterator& eit_)
    \n+
    126 : gv(&gv_), eit(eit_)
    \n+
    127 {
    \n+
    128 if(eit != gv->template end<0>())
    \n+
    129 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
    \n
    130
    \n-
    131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH
    \n-\n-\n+
    131 while(!valid()) basic_increment();
    \n+
    132 }
    \n+
    134
    \n+
    138 BoundaryIterator(const GV& gv_, bool end = false)
    \n+
    139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())
    \n+
    140 {
    \n+
    141 if(eit != gv->template end<0>())
    \n+
    142 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));
    \n+
    143
    \n+
    144 while(!valid()) basic_increment();
    \n+
    145 }
    \n+
    146 };
    \n+
    147
    \n+
    148 template<typename ElementIndexSet>
    \n+\n+
    150 const ElementIndexSet& eis;
    \n+
    151
    \n+
    152 public:
    \n+
    153 IntersectionIndexSet(const ElementIndexSet& eis_)
    \n+
    154 : eis(eis_)
    \n+
    155 { }
    \n+
    156 };
    \n+
    157
    \n+
    158 template<typename GV>
    \n+\n+
    160 const GV& gv;
    \n+
    161
    \n+
    162 public:
    \n+
    163 static const unsigned dimCell = GV::dimension-1;
    \n+
    164
    \n+
    165 typedef typename GV::Intersection Cell;
    \n+\n+
    167
    \n+\n+\n+
    170
    \n+
    171 typedef Corner Point;
    \n+\n+
    173
    \n+\n+
    175 typedef typename GV::Communication Communication;
    \n+
    176
    \n+\n+
    178 : gv(gv_)
    \n+
    179 { }
    \n+
    180
    \n+\n+
    182 return CellIterator(gv);
    \n+
    183 }
    \n+\n+
    185 return CellIterator(gv, true);
    \n+
    186 }
    \n+
    187
    \n+\n+\n+
    190 }
    \n+\n+
    192 return CornerIterator(endCells());
    \n+
    193 }
    \n+
    194
    \n+\n+
    196 PointIterator endPoints() const { return endCorners(); }
    \n+
    197
    \n+\n+
    199 return ConnectivityWriter();
    \n+
    200 }
    \n+
    201 const Communication& comm() const {
    \n+
    202 return gv.comm();
    \n+
    203 }
    \n+
    204 };
    \n+
    205
    \n+
    206 } // namespace VTK
    \n+
    207
    \n+
    209
    \n+
    210} // namespace Dune
    \n+
    211
    \n+
    212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH
    \n+\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    iterate over the GridViews boundary intersections
    Definition: boundaryiterators.hh:43
    \n+
    BoundaryIterator< GV > DerivedType
    Definition: boundaryiterators.hh:46
    \n+
    BoundaryIterator(const GV &gv_, const ElementIterator &eit_)
    construct a BoundaryIterator
    Definition: boundaryiterators.hh:125
    \n+
    Reference dereference() const
    Definition: boundaryiterators.hh:82
    \n+
    const GV::Intersection Value
    Definition: boundaryiterators.hh:47
    \n+
    BoundaryIterator(const GV &gv_, bool end=false)
    construct a BoundaryIterator
    Definition: boundaryiterators.hh:138
    \n+
    BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const IntersectionIterator &iit_)
    construct a BoundaryIterator
    Definition: boundaryiterators.hh:113
    \n+
    GV::template Codim< 0 >::Iterator ElementIterator
    Definition: boundaryiterators.hh:49
    \n+
    Value & Reference
    Definition: boundaryiterators.hh:48
    \n+
    GV::IntersectionIterator IntersectionIterator
    Definition: boundaryiterators.hh:50
    \n+
    bool equals(const DerivedType &other) const
    Definition: boundaryiterators.hh:85
    \n+
    std::iterator_traits< ElementIterator >::difference_type DifferenceType
    Definition: boundaryiterators.hh:52
    \n+
    void increment()
    Definition: boundaryiterators.hh:103
    \n+
    Definition: boundaryiterators.hh:149
    \n+
    IntersectionIndexSet(const ElementIndexSet &eis_)
    Definition: boundaryiterators.hh:153
    \n+
    Definition: boundaryiterators.hh:159
    \n+
    PointIterator beginPoints() const
    Definition: boundaryiterators.hh:195
    \n+
    ConnectivityWriter makeConnectivity() const
    Definition: boundaryiterators.hh:198
    \n+
    GV::Communication Communication
    Definition: boundaryiterators.hh:175
    \n+
    static const unsigned dimCell
    Definition: boundaryiterators.hh:163
    \n+
    VTK::CornerIterator< CellIterator > CornerIterator
    Definition: boundaryiterators.hh:169
    \n+
    BoundaryIterator< GV > CellIterator
    Definition: boundaryiterators.hh:166
    \n+
    Corner Point
    Definition: boundaryiterators.hh:171
    \n+
    CornerIterator beginCorners() const
    Definition: boundaryiterators.hh:188
    \n+
    CellIterator beginCells() const
    Definition: boundaryiterators.hh:181
    \n+
    NonConformingConnectivityWriter< Cell > ConnectivityWriter
    Definition: boundaryiterators.hh:174
    \n+
    CornerIterator endCorners() const
    Definition: boundaryiterators.hh:191
    \n+
    VTK::Corner< Cell > Corner
    Definition: boundaryiterators.hh:168
    \n+
    GV::Intersection Cell
    Definition: boundaryiterators.hh:165
    \n+
    CornerIterator PointIterator
    Definition: boundaryiterators.hh:172
    \n+
    NonConformingBoundaryIteratorFactory(const GV &gv_)
    Definition: boundaryiterators.hh:177
    \n+
    CellIterator endCells() const
    Definition: boundaryiterators.hh:184
    \n+
    const Communication & comm() const
    Definition: boundaryiterators.hh:201
    \n+
    PointIterator endPoints() const
    Definition: boundaryiterators.hh:196
    \n
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n
    iterate over the corners of some cell range
    Definition: corneriterator.hh:39
    \n-
    bool isDereferencable() const
    Definition: corneriterator.hh:69
    \n-
    iterate over the points of some corner range
    Definition: pointiterator.hh:58
    \n-
    PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS &is_)
    construct a CornerIterator
    Definition: pointiterator.hh:112
    \n-
    void increment()
    Definition: pointiterator.hh:94
    \n-
    VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type > Corner
    Definition: pointiterator.hh:61
    \n-
    Reference dereference() const
    Definition: pointiterator.hh:82
    \n-
    std::iterator_traits< CellIterator >::difference_type DifferenceType
    Definition: pointiterator.hh:68
    \n-
    static const unsigned mydim
    Definition: pointiterator.hh:70
    \n-
    PointIterator(const CellIterator &cellend_)
    construct a CornerIterator
    Definition: pointiterator.hh:120
    \n-
    bool equals(const DerivedType &other) const
    Definition: pointiterator.hh:90
    \n-
    PointIterator< CellIterator, IS > DerivedType
    Definition: pointiterator.hh:64
    \n-
    const Corner Value
    Definition: pointiterator.hh:65
    \n-
    Value & Reference
    Definition: pointiterator.hh:66
    \n-
    bool isDereferencable() const
    Definition: pointiterator.hh:86
    \n+
    writer for the connectivity array in nonconforming mode
    Definition: functionwriter.hh:261
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,168 +7,320 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-pointiterator.hh\n+boundaryiterators.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH\n 8\n 9#include \n- 10#include \n+ 10#include \n 11\n 12#include \n- 13#include \n- 14\n- 15#include \n- 16#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16#include \n 17\n- 18namespace Dune\n- 19{\n+ 18namespace Dune {\n+ 19\n 22\n- 23 namespace VTK {\n- 24\n- 26\n- 49 template\n-50 class PointIterator\n- 51 : public ForwardIteratorFacade\n- 52 < PointIterator,\n- 53 const Corner::value_type>::type>,\n- 55 const Corner::value_type>::type>&,\n- 57 typename std::iterator_traits::difference_type>\n- 58 {\n- 59 public:\n- 60 typedef VTK::Corner::value_type>::type> Corner;\n- 62\n- 63 // reiterate the facades typedefs here\n-64 typedef PointIterator DerivedType;\n-65 typedef const Corner Value;\n-66 typedef Value& Reference;\n- 67 typedef typename std::iterator_traits::difference_type\n-68 DifferenceType;\n- 69\n-70 static const unsigned mydim = std::iterator_traits::\n- 71 value_type::mydimension;\n- 72\n- 73 private:\n- 74 typedef ForwardIteratorFacade Facade;\n- 76\n- 77 CornerIterator cornerit;\n- 78 const IS* is;\n- 79 std::vector seen;\n+ 28 namespace VTK {\n+ 29\n+ 31\n+ 35 template\n+36 class BoundaryIterator\n+ 37 : public ForwardIteratorFacade\n+ 38 < BoundaryIterator,\n+ 39 const typename GV::Intersection,\n+ 40 const typename GV::Intersection&,\n+ 41 typename std::iterator_traits::\n+ 42 Iterator>::difference_type>\n+ 43 {\n+ 44 public:\n+ 45 // reiterator the facades typedefs here\n+46 typedef BoundaryIterator DerivedType;\n+47 typedef const typename GV::Intersection Value;\n+48 typedef Value& Reference;\n+49 typedef typename GV::template Codim<0>::Iterator ElementIterator;\n+50 typedef typename GV::IntersectionIterator IntersectionIterator;\n+ 51 typedef typename std::iterator_traits::difference_type\n+52 DifferenceType;\n+ 53\n+ 54 private:\n+ 55 typedef ForwardIteratorFacade Facade;\n+ 57\n+ 58 const GV* gv;\n+ 59 ElementIterator eit;\n+ 60 std::shared_ptr iit;\n+ 61\n+ 62 bool valid() const {\n+ 63 // we're valid if we're passed-the-end\n+ 64 if(eit == gv->template end<0>()) return true;\n+ 65 // or if we're on a boundary\n+ 66 if((*iit)->boundary() && !(*iit)->neighbor()) return true;\n+ 67 // otherwise we're invalid\n+ 68 return false;\n+ 69 }\n+ 70\n+ 71 void basic_increment() {\n+ 72 ++*iit;\n+ 73 if(*iit == gv->iend(*eit)) {\n+ 74 iit.reset();\n+ 75 ++eit;\n+ 76 if(eit != gv->template end<0>())\n+ 77 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));\n+ 78 }\n+ 79 }\n 80\n 81 public:\n 82 Reference dereference() const {\n- 83 return *cornerit;\n+ 83 return **iit;\n 84 }\n- 85\n-86 bool isDereferencable() const {\n- 87 return cornerit.isDereferencable();\n- 88 }\n- 89\n-90 bool equals(const DerivedType& other) const {\n- 91 return cornerit == other.cornerit;\n- 92 }\n- 93\n-94 void increment() {\n- 95 for(++cornerit; isDereferencable(); ++cornerit) {\n- 96 typename IS::IndexType index =\n- 97 is->subIndex(cornerit->cell(), cornerit->duneIndex(), mydim);\n+85 bool equals(const DerivedType& other) const {\n+ 86 if(eit != other.eit) return false;\n+ 87\n+ 88 // this is a bit tricky, since we may not compare iit if we are\n+ 89 // passed-the-end\n+ 90 bool mePassedTheEnd = eit == gv->template end<0>();\n+ 91 bool otherPassedTheEnd = other.eit == other.gv->template end<0>();\n+ 92\n+ 93 // both passed-the-end => consider them equal\n+ 94 if(mePassedTheEnd && otherPassedTheEnd) return true;\n+ 95\n+ 96 // one passed the end => not equal\n+ 97 if(mePassedTheEnd || otherPassedTheEnd) return false;\n 98\n- 99 if(!seen[index]) {\n- 100 seen[index] = true;\n- 101 break;\n- 102 }\n- 103 }\n- 104 }\n- 105\n+ 99 // none passed-the-end => do their iit iterators match?\n+ 100 return *iit == *other.iit;\n+ 101 }\n+ 102\n+103 void increment() {\n+ 104 basic_increment();\n+ 105 while(!valid()) basic_increment();\n+ 106 }\n 107\n-112 PointIterator(const CellIterator& cellit, const CellIterator& cellend,\n- 113 const IS& is_)\n- 114 : cornerit(cellit, cellend), is(&is_), seen(is->size(mydim), false)\n- 115 { }\n- 117\n-120 PointIterator(const CellIterator& cellend_)\n- 121 : cornerit(cellend_), is(0)\n- 122 { }\n- 123 };\n- 124\n- 125 } // namespace VTK\n- 126\n- 128\n- 129} // namespace Dune\n+ 109\n+113 BoundaryIterator(const GV& gv_, const ElementIterator& eit_,\n+ 114 const IntersectionIterator& iit_)\n+ 115 : gv(&gv_), eit(eit_), iit(new IntersectionIterator(iit_))\n+ 116 {\n+ 117 while(!valid()) basic_increment();\n+ 118 }\n+ 120\n+125 BoundaryIterator(const GV& gv_, const ElementIterator& eit_)\n+ 126 : gv(&gv_), eit(eit_)\n+ 127 {\n+ 128 if(eit != gv->template end<0>())\n+ 129 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));\n 130\n- 131#endif // DUNE_GRID_IO_FILE_VTK_POINTITERATOR_HH\n-corneriterator.hh\n+ 131 while(!valid()) basic_increment();\n+ 132 }\n+ 134\n+138 BoundaryIterator(const GV& gv_, bool end = false)\n+ 139 : gv(&gv_), eit(end ? gv->template end<0>() : gv->template begin<0>())\n+ 140 {\n+ 141 if(eit != gv->template end<0>())\n+ 142 iit.reset(new IntersectionIterator(gv->ibegin(*eit)));\n+ 143\n+ 144 while(!valid()) basic_increment();\n+ 145 }\n+ 146 };\n+ 147\n+ 148 template\n+149 class IntersectionIndexSet {\n+ 150 const ElementIndexSet& eis;\n+ 151\n+ 152 public:\n+153 IntersectionIndexSet(const ElementIndexSet& eis_)\n+ 154 : eis(eis_)\n+ 155 { }\n+ 156 };\n+ 157\n+ 158 template\n+159 class NonConformingBoundaryIteratorFactory {\n+ 160 const GV& gv;\n+ 161\n+ 162 public:\n+163 static const unsigned dimCell = GV::dimension-1;\n+ 164\n+165 typedef typename GV::Intersection Cell;\n+166 typedef BoundaryIterator CellIterator;\n+ 167\n+168 typedef VTK::Corner Corner;\n+169 typedef VTK::CornerIterator CornerIterator;\n+ 170\n+171 typedef Corner Point;\n+172 typedef CornerIterator PointIterator;\n+ 173\n+174 typedef NonConformingConnectivityWriter ConnectivityWriter;\n+175 typedef typename GV::Communication Communication;\n+ 176\n+177 explicit NonConformingBoundaryIteratorFactory(const GV& gv_)\n+ 178 : gv(gv_)\n+ 179 { }\n+ 180\n+181 CellIterator beginCells() const {\n+ 182 return CellIterator(gv);\n+ 183 }\n+184 CellIterator endCells() const {\n+ 185 return CellIterator(gv, true);\n+ 186 }\n+ 187\n+188 CornerIterator beginCorners() const {\n+ 189 return CornerIterator(beginCells(), endCells());\n+ 190 }\n+191 CornerIterator endCorners() const {\n+ 192 return CornerIterator(endCells());\n+ 193 }\n+ 194\n+195 PointIterator beginPoints() const { return beginCorners(); }\n+196 PointIterator endPoints() const { return endCorners(); }\n+ 197\n+198 ConnectivityWriter makeConnectivity() const {\n+ 199 return ConnectivityWriter();\n+ 200 }\n+201 const Communication& comm() const {\n+ 202 return gv.comm();\n+ 203 }\n+ 204 };\n+ 205\n+ 206 } // namespace VTK\n+ 207\n+ 209\n+ 210} // namespace Dune\n+ 211\n+ 212#endif // DUNE_GRID_IO_FILE_VTK_BOUNDARYITERATORS_HH\n corner.hh\n+corneriterator.hh\n+functionwriter.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::VTK::BoundaryIterator\n+iterate over the GridViews boundary intersections\n+Definition: boundaryiterators.hh:43\n+Dune::VTK::BoundaryIterator::DerivedType\n+BoundaryIterator< GV > DerivedType\n+Definition: boundaryiterators.hh:46\n+Dune::VTK::BoundaryIterator::BoundaryIterator\n+BoundaryIterator(const GV &gv_, const ElementIterator &eit_)\n+construct a BoundaryIterator\n+Definition: boundaryiterators.hh:125\n+Dune::VTK::BoundaryIterator::dereference\n+Reference dereference() const\n+Definition: boundaryiterators.hh:82\n+Dune::VTK::BoundaryIterator::Value\n+const GV::Intersection Value\n+Definition: boundaryiterators.hh:47\n+Dune::VTK::BoundaryIterator::BoundaryIterator\n+BoundaryIterator(const GV &gv_, bool end=false)\n+construct a BoundaryIterator\n+Definition: boundaryiterators.hh:138\n+Dune::VTK::BoundaryIterator::BoundaryIterator\n+BoundaryIterator(const GV &gv_, const ElementIterator &eit_, const\n+IntersectionIterator &iit_)\n+construct a BoundaryIterator\n+Definition: boundaryiterators.hh:113\n+Dune::VTK::BoundaryIterator::ElementIterator\n+GV::template Codim< 0 >::Iterator ElementIterator\n+Definition: boundaryiterators.hh:49\n+Dune::VTK::BoundaryIterator::Reference\n+Value & Reference\n+Definition: boundaryiterators.hh:48\n+Dune::VTK::BoundaryIterator::IntersectionIterator\n+GV::IntersectionIterator IntersectionIterator\n+Definition: boundaryiterators.hh:50\n+Dune::VTK::BoundaryIterator::equals\n+bool equals(const DerivedType &other) const\n+Definition: boundaryiterators.hh:85\n+Dune::VTK::BoundaryIterator::DifferenceType\n+std::iterator_traits< ElementIterator >::difference_type DifferenceType\n+Definition: boundaryiterators.hh:52\n+Dune::VTK::BoundaryIterator::increment\n+void increment()\n+Definition: boundaryiterators.hh:103\n+Dune::VTK::IntersectionIndexSet\n+Definition: boundaryiterators.hh:149\n+Dune::VTK::IntersectionIndexSet::IntersectionIndexSet\n+IntersectionIndexSet(const ElementIndexSet &eis_)\n+Definition: boundaryiterators.hh:153\n+Dune::VTK::NonConformingBoundaryIteratorFactory\n+Definition: boundaryiterators.hh:159\n+Dune::VTK::NonConformingBoundaryIteratorFactory::beginPoints\n+PointIterator beginPoints() const\n+Definition: boundaryiterators.hh:195\n+Dune::VTK::NonConformingBoundaryIteratorFactory::makeConnectivity\n+ConnectivityWriter makeConnectivity() const\n+Definition: boundaryiterators.hh:198\n+Dune::VTK::NonConformingBoundaryIteratorFactory::Communication\n+GV::Communication Communication\n+Definition: boundaryiterators.hh:175\n+Dune::VTK::NonConformingBoundaryIteratorFactory::dimCell\n+static const unsigned dimCell\n+Definition: boundaryiterators.hh:163\n+Dune::VTK::NonConformingBoundaryIteratorFactory::CornerIterator\n+VTK::CornerIterator< CellIterator > CornerIterator\n+Definition: boundaryiterators.hh:169\n+Dune::VTK::NonConformingBoundaryIteratorFactory::CellIterator\n+BoundaryIterator< GV > CellIterator\n+Definition: boundaryiterators.hh:166\n+Dune::VTK::NonConformingBoundaryIteratorFactory::Point\n+Corner Point\n+Definition: boundaryiterators.hh:171\n+Dune::VTK::NonConformingBoundaryIteratorFactory::beginCorners\n+CornerIterator beginCorners() const\n+Definition: boundaryiterators.hh:188\n+Dune::VTK::NonConformingBoundaryIteratorFactory::beginCells\n+CellIterator beginCells() const\n+Definition: boundaryiterators.hh:181\n+Dune::VTK::NonConformingBoundaryIteratorFactory::ConnectivityWriter\n+NonConformingConnectivityWriter< Cell > ConnectivityWriter\n+Definition: boundaryiterators.hh:174\n+Dune::VTK::NonConformingBoundaryIteratorFactory::endCorners\n+CornerIterator endCorners() const\n+Definition: boundaryiterators.hh:191\n+Dune::VTK::NonConformingBoundaryIteratorFactory::Corner\n+VTK::Corner< Cell > Corner\n+Definition: boundaryiterators.hh:168\n+Dune::VTK::NonConformingBoundaryIteratorFactory::Cell\n+GV::Intersection Cell\n+Definition: boundaryiterators.hh:165\n+Dune::VTK::NonConformingBoundaryIteratorFactory::PointIterator\n+CornerIterator PointIterator\n+Definition: boundaryiterators.hh:172\n+Dune::VTK::NonConformingBoundaryIteratorFactory::\n+NonConformingBoundaryIteratorFactory\n+NonConformingBoundaryIteratorFactory(const GV &gv_)\n+Definition: boundaryiterators.hh:177\n+Dune::VTK::NonConformingBoundaryIteratorFactory::endCells\n+CellIterator endCells() const\n+Definition: boundaryiterators.hh:184\n+Dune::VTK::NonConformingBoundaryIteratorFactory::comm\n+const Communication & comm() const\n+Definition: boundaryiterators.hh:201\n+Dune::VTK::NonConformingBoundaryIteratorFactory::endPoints\n+PointIterator endPoints() const\n+Definition: boundaryiterators.hh:196\n Dune::VTK::Corner\n simple class representing a corner of a cell\n Definition: corner.hh:25\n Dune::VTK::CornerIterator\n iterate over the corners of some cell range\n Definition: corneriterator.hh:39\n-Dune::VTK::CornerIterator::isDereferencable\n-bool isDereferencable() const\n-Definition: corneriterator.hh:69\n-Dune::VTK::PointIterator\n-iterate over the points of some corner range\n-Definition: pointiterator.hh:58\n-Dune::VTK::PointIterator::PointIterator\n-PointIterator(const CellIterator &cellit, const CellIterator &cellend, const IS\n-&is_)\n-construct a CornerIterator\n-Definition: pointiterator.hh:112\n-Dune::VTK::PointIterator::increment\n-void increment()\n-Definition: pointiterator.hh:94\n-Dune::VTK::PointIterator::Corner\n-VTK::Corner< typename std::remove_const< typename std::iterator_traits<\n-CellIterator >::value_type >::type > Corner\n-Definition: pointiterator.hh:61\n-Dune::VTK::PointIterator::dereference\n-Reference dereference() const\n-Definition: pointiterator.hh:82\n-Dune::VTK::PointIterator::DifferenceType\n-std::iterator_traits< CellIterator >::difference_type DifferenceType\n-Definition: pointiterator.hh:68\n-Dune::VTK::PointIterator::mydim\n-static const unsigned mydim\n-Definition: pointiterator.hh:70\n-Dune::VTK::PointIterator::PointIterator\n-PointIterator(const CellIterator &cellend_)\n-construct a CornerIterator\n-Definition: pointiterator.hh:120\n-Dune::VTK::PointIterator::equals\n-bool equals(const DerivedType &other) const\n-Definition: pointiterator.hh:90\n-Dune::VTK::PointIterator::DerivedType\n-PointIterator< CellIterator, IS > DerivedType\n-Definition: pointiterator.hh:64\n-Dune::VTK::PointIterator::Value\n-const Corner Value\n-Definition: pointiterator.hh:65\n-Dune::VTK::PointIterator::Reference\n-Value & Reference\n-Definition: pointiterator.hh:66\n-Dune::VTK::PointIterator::isDereferencable\n-bool isDereferencable() const\n-Definition: pointiterator.hh:86\n+Dune::VTK::NonConformingConnectivityWriter\n+writer for the connectivity array in nonconforming mode\n+Definition: functionwriter.hh:261\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00812.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00812.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtuwriter.hh File Reference\n+dune-grid: b64enc.hh File Reference\n \n \n \n \n \n \n \n@@ -65,40 +65,47 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    vtuwriter.hh File Reference
    \n+
    b64enc.hh File Reference
    \n
    \n
    \n-
    #include <ostream>
    \n-#include <string>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/indent.hh>
    \n-#include <dune/grid/io/file/vtk/common.hh>
    \n-#include <dune/grid/io/file/vtk/dataarraywriter.hh>
    \n+\n+

    Simple base64 encode. \n+More...

    \n+
    #include <assert.h>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::VTK::VTUWriter
     Dump a .vtu/.vtp files contents to a stream. More...
    struct  Dune::b64chunk
     struct representing the three byte text as well as the four 6 bit chunks More...
     
    \n \n \n \n \n-\n-\n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n+\n+\n+\n+\n+\n

    \n+Variables

    const char Dune::base64table []
     endoing table More...
     
    \n-
    \n+

    Detailed Description

    \n+

    Simple base64 encode.

    \n+
    Author
    Christian Engwer
    \n+

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

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,28 +8,33 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-vtuwriter.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+b64enc.hh File Reference\n+Simple base64 encode. More...\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::VTUWriter\n-\u00a0 Dump a .vtu/.vtp files contents to a stream. More...\n+struct \u00a0Dune::b64chunk\n+\u00a0 struct representing the three byte text as well as the four 6 bit\n+ chunks More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::VTK\n+ Variables\n+const char\u00a0Dune::base64table []\n+\u00a0 endoing table More...\n \u00a0\n+***** Detailed Description *****\n+Simple base64 encode.\n+ Author\n+ Christian Engwer\n+We implement the base64 encoding (c.f. RFC 4648 https://tools.ietf.org/html/\n+rfc4648).\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00812_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtuwriter.hh Source File\n+dune-grid: b64enc.hh Source File\n \n \n \n \n \n \n \n@@ -62,272 +62,92 @@\n \n \n \n
    \n-
    vtuwriter.hh
    \n+
    b64enc.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_B64ENC_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_B64ENC_HH
    \n
    8
    \n-
    9#include <ostream>
    \n-
    10#include <string>
    \n-
    11
    \n-
    12#include <dune/common/exceptions.hh>
    \n-
    13#include <dune/common/indent.hh>
    \n-
    14
    \n-\n-\n-
    17
    \n-
    18namespace Dune {
    \n-
    19
    \n-
    22
    \n-
    23 namespace VTK {
    \n-
    24
    \n-
    26
    \n-
    98 class VTUWriter {
    \n-
    99 public:
    \n-
    100 std::ostream& stream;
    \n-\n-
    102
    \n-
    103 private:
    \n-\n-
    105 Indent indent;
    \n-
    106
    \n-
    107 std::string fileType;
    \n-
    108 std::string cellName;
    \n-
    109
    \n-
    110 bool doAppended;
    \n-
    111
    \n-
    112 public:
    \n-
    114
    \n-
    122 inline VTUWriter(std::ostream& stream_, OutputType outputType,
    \n-
    123 FileType fileType_)
    \n-
    124 : stream(stream_), factory(outputType, stream)
    \n-
    125 {
    \n-
    126 switch(fileType_) {
    \n-
    127 case polyData :
    \n-
    128 fileType = "PolyData";
    \n-
    129 cellName = "Lines";
    \n-
    130 break;
    \n-
    131 case unstructuredGrid :
    \n-
    132 fileType = "UnstructuredGrid";
    \n-
    133 cellName = "Cells";
    \n-
    134 break;
    \n-
    135 default :
    \n-
    136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_);
    \n-
    137 }
    \n-
    138 const std::string& byteOrder = getEndiannessString();
    \n-
    139
    \n-
    140 stream << indent << "<?xml version=\\"1.0\\"?>\\n";
    \n-
    141 stream << indent << "<VTKFile"
    \n-
    142 << " type=\\"" << fileType << "\\""
    \n-
    143 << " version=\\"0.1\\""
    \n-
    144 << " byte_order=\\"" << byteOrder << "\\">\\n";
    \n-
    145 ++indent;
    \n-
    146 }
    \n-
    147
    \n-
    149 inline ~VTUWriter() {
    \n-
    150 --indent;
    \n-
    151 stream << indent << "</VTKFile>\\n"
    \n-
    152 << std::flush;
    \n-
    153 }
    \n-
    154
    \n-
    156
    \n-
    167 inline void beginPointData(const std::string& scalars = "",
    \n-
    168 const std::string& vectors = "") {
    \n-
    169 switch(phase) {
    \n-
    170 case main :
    \n-
    171 stream << indent << "<PointData";
    \n-
    172 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n-
    173 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n-
    174 stream << ">\\n";
    \n-
    175 ++indent;
    \n-
    176 break;
    \n-
    177 case appended :
    \n-
    178 break;
    \n-
    179 }
    \n-
    180 }
    \n-
    182 inline void endPointData() {
    \n-
    183 switch(phase) {
    \n-
    184 case main :
    \n-
    185 --indent;
    \n-
    186 stream << indent << "</PointData>\\n";
    \n-
    187 break;
    \n-
    188 case appended :
    \n-
    189 break;
    \n-
    190 }
    \n-
    191 }
    \n-
    192
    \n-
    194
    \n-
    205 inline void beginCellData(const std::string& scalars = "",
    \n-
    206 const std::string& vectors = "") {
    \n-
    207 switch(phase) {
    \n-
    208 case main :
    \n-
    209 stream << indent << "<CellData";
    \n-
    210 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n-
    211 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n-
    212 stream << ">\\n";
    \n-
    213 ++indent;
    \n-
    214 break;
    \n-
    215 case appended :
    \n-
    216 break;
    \n-
    217 }
    \n-
    218 }
    \n-
    220 inline void endCellData() {
    \n-
    221 switch(phase) {
    \n-
    222 case main :
    \n-
    223 --indent;
    \n-
    224 stream << indent << "</CellData>\\n";
    \n-
    225 break;
    \n-
    226 case appended :
    \n-
    227 break;
    \n-
    228 }
    \n-
    229 }
    \n-
    230
    \n-
    232
    \n-
    238 inline void beginPoints() {
    \n-
    239 switch(phase) {
    \n-
    240 case main :
    \n-
    241 stream << indent << "<Points>\\n";
    \n-
    242 ++indent;
    \n-
    243 break;
    \n-
    244 case appended :
    \n-
    245 break;
    \n-
    246 }
    \n-
    247 }
    \n-
    249 inline void endPoints() {
    \n-
    250 switch(phase) {
    \n-
    251 case main :
    \n-
    252 --indent;
    \n-
    253 stream << indent << "</Points>\\n";
    \n-
    254 break;
    \n-
    255 case appended :
    \n-
    256 break;
    \n-
    257 }
    \n-
    258 }
    \n-
    259
    \n-
    261
    \n-
    274 inline void beginCells() {
    \n-
    275 switch(phase) {
    \n-
    276 case main :
    \n-
    277 stream << indent << "<" << cellName << ">\\n";
    \n-
    278 ++indent;
    \n-
    279 break;
    \n-
    280 case appended :
    \n-
    281 break;
    \n-
    282 }
    \n-
    283 }
    \n-
    285 inline void endCells() {
    \n-
    286 switch(phase) {
    \n-
    287 case main :
    \n-
    288 --indent;
    \n-
    289 stream << indent << "</" << cellName << ">\\n";
    \n-
    290 break;
    \n-
    291 case appended :
    \n-
    292 break;
    \n-
    293 }
    \n-
    294 }
    \n-
    295
    \n-
    297
    \n-
    310 inline void beginMain(unsigned ncells, unsigned npoints) {
    \n-
    311 stream << indent << "<" << fileType << ">\\n";
    \n-
    312 ++indent;
    \n-
    313 stream << indent << "<Piece"
    \n-
    314 << " NumberOf" << cellName << "=\\"" << ncells << "\\""
    \n-
    315 << " NumberOfPoints=\\"" << npoints << "\\">\\n";
    \n-
    316 ++indent;
    \n-
    317 phase = main;
    \n-
    318 }
    \n-
    320 inline void endMain() {
    \n-
    321 --indent;
    \n-
    322 stream << indent << "</Piece>\\n";
    \n-
    323 --indent;
    \n-
    324 stream << indent << "</" << fileType << ">\\n";
    \n-
    325 }
    \n-
    326
    \n-
    328
    \n-
    345 inline bool beginAppended() {
    \n-
    346 doAppended = factory.beginAppended();
    \n-
    347 if(doAppended) {
    \n-
    348 const std::string& encoding = factory.appendedEncoding();
    \n-
    349 stream << indent << "<AppendedData"
    \n-
    350 << " encoding=\\"" << encoding << "\\">\\n";
    \n-
    351 ++indent;
    \n-
    352 // mark begin of data
    \n-
    353 stream << indent << "_";
    \n-
    354 }
    \n-
    355 phase = appended;
    \n-
    356 return doAppended;
    \n-
    357 }
    \n-
    359 inline void endAppended() {
    \n-
    360 if(doAppended) {
    \n-
    361 stream << "\\n";
    \n-
    362 --indent;
    \n-
    363 stream << indent << "</AppendedData>\\n";
    \n-
    364 }
    \n-
    365 }
    \n-
    366
    \n-
    368
    \n-
    380 DataArrayWriter* makeArrayWriter(const std::string& name,
    \n-
    381 unsigned ncomps, unsigned nitems,
    \n-
    382 Precision prec) {
    \n-
    383 return factory.make(name, ncomps, nitems, indent, prec);
    \n-
    384 }
    \n-
    385 };
    \n-
    386
    \n-
    387 } // namespace VTK
    \n-
    388
    \n-
    390
    \n-
    391} // namespace Dune
    \n-
    392
    \n-
    393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
    \n-
    Data array writers for the VTKWriter.
    \n-
    Common stuff for the VTKWriter.
    \n+
    9#include <assert.h>
    \n+
    10
    \n+
    11namespace Dune {
    \n+
    12
    \n+
    23 const char base64table[] =
    \n+
    24 {
    \n+
    25 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
    \n+
    26 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
    \n+
    27 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
    \n+
    28 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
    \n+
    29 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'
    \n+
    30 };
    \n+
    31
    \n+
    33 struct b64chunk
    \n+
    34 {
    \n+
    35 using size_type = unsigned char;
    \n+\n+
    37 char txt[3];
    \n+
    38
    \n+
    39 void reset()
    \n+
    40 {
    \n+
    41 size = 0;
    \n+
    42 txt[0] = txt[1] = txt[2] = 0;
    \n+
    43 }
    \n+
    44
    \n+
    45 int read(const char* t, size_type s)
    \n+
    46 {
    \n+
    47 size = s>=3 ? 3 : s;
    \n+
    48 txt[0] = s>0 ? t[0] : 0;
    \n+
    49 txt[1] = s>1 ? t[1] : 0;
    \n+
    50 txt[2] = s>2 ? t[2] : 0;
    \n+
    51 return size;
    \n+
    52 }
    \n+
    53
    \n+
    54 void put(const char c)
    \n+
    55 {
    \n+
    56 assert (size < 3);
    \n+
    57 txt[size++] = c;
    \n+
    58 }
    \n+
    59
    \n+
    60 void write(char* t)
    \n+
    61 {
    \n+
    62 const unsigned A = (txt[0] & 0b1111'1100) >> 2;
    \n+
    63 const unsigned B = (txt[0] & 0b0000'0011) << 4 | (txt[1] & 0b1111'0000) >> 4;
    \n+
    64 const unsigned C = (txt[1] & 0b0000'1111) << 2 | (txt[2] & 0b1100'0000) >> 6;
    \n+
    65 const unsigned D = txt[2] & 0b0011'1111;
    \n+
    66 t[0] = size>0 ? base64table[A] : '=';
    \n+
    67 t[1] = size>0 ? base64table[B] : '=';
    \n+
    68 t[2] = size>1 ? base64table[C] : '=';
    \n+
    69 t[3] = size>2 ? base64table[D] : '=';
    \n+
    70 size = 0;
    \n+
    71 }
    \n+
    72 };
    \n+
    73
    \n+
    76} // namespace Dune
    \n+
    77
    \n+
    78#endif // DUNE_GRID_IO_FILE_VTK_B64ENC_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n-
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n-
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n-
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n-
    std::string getEndiannessString()
    determine endianness of this C++ implementation
    Definition: common.hh:232
    \n-
    base class for data array writers
    Definition: dataarraywriter.hh:56
    \n-
    a factory for DataArrayWriters
    Definition: dataarraywriter.hh:462
    \n-
    bool beginAppended()
    signal start of the appended section
    Definition: dataarraywriter.hh:497
    \n-
    DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
    create a DataArrayWriter
    Definition: dataarraywriter.hh:541
    \n-
    const std::string & appendedEncoding() const
    query encoding string for appended data
    Definition: dataarraywriter.hh:510
    \n-
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n-
    DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
    acquire a DataArrayWriter
    Definition: vtuwriter.hh:380
    \n-
    bool beginAppended()
    start the appended data section
    Definition: vtuwriter.hh:345
    \n-
    void endAppended()
    finish the appended data section
    Definition: vtuwriter.hh:359
    \n-
    VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_)
    create a VTUWriter object
    Definition: vtuwriter.hh:122
    \n-
    std::ostream & stream
    Definition: vtuwriter.hh:100
    \n-
    void endCellData()
    finish CellData section
    Definition: vtuwriter.hh:220
    \n-
    void beginMain(unsigned ncells, unsigned npoints)
    start the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:310
    \n-
    void beginCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:274
    \n-
    void endPointData()
    finish PointData section
    Definition: vtuwriter.hh:182
    \n-
    Phase
    Definition: vtuwriter.hh:101
    \n-
    @ appended
    Definition: vtuwriter.hh:101
    \n-
    @ main
    Definition: vtuwriter.hh:101
    \n-
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: vtuwriter.hh:205
    \n-
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: vtuwriter.hh:167
    \n-
    void endPoints()
    finish section for the point coordinates
    Definition: vtuwriter.hh:249
    \n-
    ~VTUWriter()
    write footer
    Definition: vtuwriter.hh:149
    \n-
    void endCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:285
    \n-
    void beginPoints()
    start section for the point coordinates
    Definition: vtuwriter.hh:238
    \n-
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:320
    \n-
    enum Dune::VTK::VTUWriter::Phase phase
    \n+
    const char base64table[]
    endoing table
    Definition: b64enc.hh:23
    \n+
    struct representing the three byte text as well as the four 6 bit chunks
    Definition: b64enc.hh:34
    \n+
    char txt[3]
    Definition: b64enc.hh:37
    \n+
    unsigned char size_type
    Definition: b64enc.hh:35
    \n+
    void write(char *t)
    Definition: b64enc.hh:60
    \n+
    size_type size
    Definition: b64enc.hh:36
    \n+
    int read(const char *t, size_type s)
    Definition: b64enc.hh:45
    \n+
    void put(const char c)
    Definition: b64enc.hh:54
    \n+
    void reset()
    Definition: b64enc.hh:39
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,363 +7,111 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-vtuwriter.hh\n+b64enc.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_B64ENC_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_B64ENC_HH\n 8\n- 9#include \n- 10#include \n- 11\n- 12#include \n- 13#include \n- 14\n- 15#include \n- 16#include \n- 17\n- 18namespace Dune {\n- 19\n- 22\n- 23 namespace VTK {\n- 24\n- 26\n-98 class VTUWriter {\n- 99 public:\n-100 std::ostream& stream;\n-101 enum Phase { main, appended } phase;\n- 102\n- 103 private:\n- 104 DataArrayWriterFactory factory;\n- 105 Indent indent;\n- 106\n- 107 std::string fileType;\n- 108 std::string cellName;\n- 109\n- 110 bool doAppended;\n- 111\n- 112 public:\n- 114\n-122 inline VTUWriter(std::ostream& stream_, OutputType outputType,\n- 123 FileType fileType_)\n- 124 : stream(stream_), factory(outputType, stream)\n- 125 {\n- 126 switch(fileType_) {\n- 127 case polyData :\n- 128 fileType = \"PolyData\";\n- 129 cellName = \"Lines\";\n- 130 break;\n- 131 case unstructuredGrid :\n- 132 fileType = \"UnstructuredGrid\";\n- 133 cellName = \"Cells\";\n- 134 break;\n- 135 default :\n- 136 DUNE_THROW(IOError, \"VTUWriter: Unknown fileType: \" << fileType_);\n- 137 }\n- 138 const std::string& byteOrder = getEndiannessString();\n- 139\n- 140 stream << indent << \"\\n\";\n- 141 stream << indent << \"\\n\";\n- 145 ++indent;\n- 146 }\n- 147\n-149 inline ~VTUWriter() {\n- 150 --indent;\n- 151 stream << indent << \"\\n\"\n- 152 << std::flush;\n- 153 }\n- 154\n- 156\n-167 inline void beginPointData(const std::string& scalars = \"\",\n- 168 const std::string& vectors = \"\") {\n- 169 switch(phase) {\n- 170 case main :\n- 171 stream << indent << \"\\n\";\n- 175 ++indent;\n- 176 break;\n- 177 case appended :\n- 178 break;\n- 179 }\n- 180 }\n-182 inline void endPointData() {\n- 183 switch(phase) {\n- 184 case main :\n- 185 --indent;\n- 186 stream << indent << \"\\n\";\n- 187 break;\n- 188 case appended :\n- 189 break;\n- 190 }\n- 191 }\n- 192\n- 194\n-205 inline void beginCellData(const std::string& scalars = \"\",\n- 206 const std::string& vectors = \"\") {\n- 207 switch(phase) {\n- 208 case main :\n- 209 stream << indent << \"\\n\";\n- 213 ++indent;\n- 214 break;\n- 215 case appended :\n- 216 break;\n- 217 }\n- 218 }\n-220 inline void endCellData() {\n- 221 switch(phase) {\n- 222 case main :\n- 223 --indent;\n- 224 stream << indent << \"\\n\";\n- 225 break;\n- 226 case appended :\n- 227 break;\n- 228 }\n- 229 }\n- 230\n- 232\n-238 inline void beginPoints() {\n- 239 switch(phase) {\n- 240 case main :\n- 241 stream << indent << \"\\n\";\n- 242 ++indent;\n- 243 break;\n- 244 case appended :\n- 245 break;\n- 246 }\n- 247 }\n-249 inline void endPoints() {\n- 250 switch(phase) {\n- 251 case main :\n- 252 --indent;\n- 253 stream << indent << \"\\n\";\n- 254 break;\n- 255 case appended :\n- 256 break;\n- 257 }\n- 258 }\n- 259\n- 261\n-274 inline void beginCells() {\n- 275 switch(phase) {\n- 276 case main :\n- 277 stream << indent << \"<\" << cellName << \">\\n\";\n- 278 ++indent;\n- 279 break;\n- 280 case appended :\n- 281 break;\n- 282 }\n- 283 }\n-285 inline void endCells() {\n- 286 switch(phase) {\n- 287 case main :\n- 288 --indent;\n- 289 stream << indent << \"\\n\";\n- 290 break;\n- 291 case appended :\n- 292 break;\n- 293 }\n- 294 }\n- 295\n- 297\n-310 inline void beginMain(unsigned ncells, unsigned npoints) {\n- 311 stream << indent << \"<\" << fileType << \">\\n\";\n- 312 ++indent;\n- 313 stream << indent << \"\\n\";\n- 316 ++indent;\n- 317 phase = main;\n- 318 }\n-320 inline void endMain() {\n- 321 --indent;\n- 322 stream << indent << \"
    \\n\";\n- 323 --indent;\n- 324 stream << indent << \"\\n\";\n- 325 }\n- 326\n- 328\n-345 inline bool beginAppended() {\n- 346 doAppended = factory.beginAppended();\n- 347 if(doAppended) {\n- 348 const std::string& encoding = factory.appendedEncoding();\n- 349 stream << indent << \"\\n\";\n- 351 ++indent;\n- 352 // mark begin of data\n- 353 stream << indent << \"_\";\n- 354 }\n- 355 phase = appended;\n- 356 return doAppended;\n- 357 }\n-359 inline void endAppended() {\n- 360 if(doAppended) {\n- 361 stream << \"\\n\";\n- 362 --indent;\n- 363 stream << indent << \"\\n\";\n- 364 }\n- 365 }\n- 366\n- 368\n-380 DataArrayWriter* makeArrayWriter(const std::string& name,\n- 381 unsigned ncomps, unsigned nitems,\n- 382 Precision prec) {\n- 383 return factory.make(name, ncomps, nitems, indent, prec);\n- 384 }\n- 385 };\n- 386\n- 387 } // namespace VTK\n- 388\n- 390\n- 391} // namespace Dune\n- 392\n- 393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH\n-dataarraywriter.hh\n-Data array writers for the VTKWriter.\n-common.hh\n-Common stuff for the VTKWriter.\n+ 9#include \n+ 10\n+ 11namespace Dune {\n+ 12\n+23 const char base64table[] =\n+ 24 {\n+ 25 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n+ 26 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n+ 27 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',\n+ 28 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n+ 29 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'\n+ 30 };\n+ 31\n+33 struct b64chunk\n+ 34 {\n+35 using size_type = unsigned char;\n+36 size_type size;\n+37 char txt[3];\n+ 38\n+39 void reset()\n+ 40 {\n+ 41 size = 0;\n+ 42 txt[0] = txt[1] = txt[2] = 0;\n+ 43 }\n+ 44\n+45 int read(const char* t, size_type s)\n+ 46 {\n+ 47 size = s>=3 ? 3 : s;\n+ 48 txt[0] = s>0 ? t[0] : 0;\n+ 49 txt[1] = s>1 ? t[1] : 0;\n+ 50 txt[2] = s>2 ? t[2] : 0;\n+ 51 return size;\n+ 52 }\n+ 53\n+54 void put(const char c)\n+ 55 {\n+ 56 assert (size < 3);\n+ 57 txt[size++] = c;\n+ 58 }\n+ 59\n+60 void write(char* t)\n+ 61 {\n+ 62 const unsigned A = (txt[0] & 0b1111'1100) >> 2;\n+ 63 const unsigned B = (txt[0] & 0b0000'0011) << 4 | (txt[1] & 0b1111'0000) >>\n+4;\n+ 64 const unsigned C = (txt[1] & 0b0000'1111) << 2 | (txt[2] & 0b1100'0000) >>\n+6;\n+ 65 const unsigned D = txt[2] & 0b0011'1111;\n+ 66 t[0] = size>0 ? base64table[A] : '=';\n+ 67 t[1] = size>0 ? base64table[B] : '=';\n+ 68 t[2] = size>1 ? base64table[C] : '=';\n+ 69 t[3] = size>2 ? base64table[D] : '=';\n+ 70 size = 0;\n+ 71 }\n+ 72 };\n+ 73\n+ 76} // namespace Dune\n+ 77\n+ 78#endif // DUNE_GRID_IO_FILE_VTK_B64ENC_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::Precision\n-Precision\n-which precision to use when writing out data to vtk files\n-Definition: common.hh:271\n-Dune::VTK::OutputType\n-OutputType\n-How the bulk data should be stored in the file.\n-Definition: common.hh:43\n-Dune::VTK::FileType\n-FileType\n-which type of VTK file to write\n-Definition: common.hh:252\n-Dune::VTK::polyData\n-@ polyData\n-for .vtp files (PolyData)\n-Definition: common.hh:254\n-Dune::VTK::unstructuredGrid\n-@ unstructuredGrid\n-for .vtu files (UnstructuredGrid)\n-Definition: common.hh:256\n-Dune::VTK::getEndiannessString\n-std::string getEndiannessString()\n-determine endianness of this C++ implementation\n-Definition: common.hh:232\n-Dune::VTK::DataArrayWriter\n-base class for data array writers\n-Definition: dataarraywriter.hh:56\n-Dune::VTK::DataArrayWriterFactory\n-a factory for DataArrayWriters\n-Definition: dataarraywriter.hh:462\n-Dune::VTK::DataArrayWriterFactory::beginAppended\n-bool beginAppended()\n-signal start of the appended section\n-Definition: dataarraywriter.hh:497\n-Dune::VTK::DataArrayWriterFactory::make\n-DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned\n-nitems, const Indent &indent, Precision prec)\n-create a DataArrayWriter\n-Definition: dataarraywriter.hh:541\n-Dune::VTK::DataArrayWriterFactory::appendedEncoding\n-const std::string & appendedEncoding() const\n-query encoding string for appended data\n-Definition: dataarraywriter.hh:510\n-Dune::VTK::VTUWriter\n-Dump a .vtu/.vtp files contents to a stream.\n-Definition: vtuwriter.hh:98\n-Dune::VTK::VTUWriter::makeArrayWriter\n-DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps,\n-unsigned nitems, Precision prec)\n-acquire a DataArrayWriter\n-Definition: vtuwriter.hh:380\n-Dune::VTK::VTUWriter::beginAppended\n-bool beginAppended()\n-start the appended data section\n-Definition: vtuwriter.hh:345\n-Dune::VTK::VTUWriter::endAppended\n-void endAppended()\n-finish the appended data section\n-Definition: vtuwriter.hh:359\n-Dune::VTK::VTUWriter::VTUWriter\n-VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_)\n-create a VTUWriter object\n-Definition: vtuwriter.hh:122\n-Dune::VTK::VTUWriter::stream\n-std::ostream & stream\n-Definition: vtuwriter.hh:100\n-Dune::VTK::VTUWriter::endCellData\n-void endCellData()\n-finish CellData section\n-Definition: vtuwriter.hh:220\n-Dune::VTK::VTUWriter::beginMain\n-void beginMain(unsigned ncells, unsigned npoints)\n-start the main PolyData/UnstructuredGrid section\n-Definition: vtuwriter.hh:310\n-Dune::VTK::VTUWriter::beginCells\n-void beginCells()\n-start section for the grid cells/PolyData lines\n-Definition: vtuwriter.hh:274\n-Dune::VTK::VTUWriter::endPointData\n-void endPointData()\n-finish PointData section\n-Definition: vtuwriter.hh:182\n-Dune::VTK::VTUWriter::Phase\n-Phase\n-Definition: vtuwriter.hh:101\n-Dune::VTK::VTUWriter::appended\n-@ appended\n-Definition: vtuwriter.hh:101\n-Dune::VTK::VTUWriter::main\n-@ main\n-Definition: vtuwriter.hh:101\n-Dune::VTK::VTUWriter::beginCellData\n-void beginCellData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start CellData section\n-Definition: vtuwriter.hh:205\n-Dune::VTK::VTUWriter::beginPointData\n-void beginPointData(const std::string &scalars=\"\", const std::string\n-&vectors=\"\")\n-start PointData section\n-Definition: vtuwriter.hh:167\n-Dune::VTK::VTUWriter::endPoints\n-void endPoints()\n-finish section for the point coordinates\n-Definition: vtuwriter.hh:249\n-Dune::VTK::VTUWriter::~VTUWriter\n-~VTUWriter()\n-write footer\n-Definition: vtuwriter.hh:149\n-Dune::VTK::VTUWriter::endCells\n-void endCells()\n-start section for the grid cells/PolyData lines\n-Definition: vtuwriter.hh:285\n-Dune::VTK::VTUWriter::beginPoints\n-void beginPoints()\n-start section for the point coordinates\n-Definition: vtuwriter.hh:238\n-Dune::VTK::VTUWriter::endMain\n-void endMain()\n-finish the main PolyData/UnstructuredGrid section\n-Definition: vtuwriter.hh:320\n-Dune::VTK::VTUWriter::phase\n-enum Dune::VTK::VTUWriter::Phase phase\n+Dune::base64table\n+const char base64table[]\n+endoing table\n+Definition: b64enc.hh:23\n+Dune::b64chunk\n+struct representing the three byte text as well as the four 6 bit chunks\n+Definition: b64enc.hh:34\n+Dune::b64chunk::txt\n+char txt[3]\n+Definition: b64enc.hh:37\n+Dune::b64chunk::size_type\n+unsigned char size_type\n+Definition: b64enc.hh:35\n+Dune::b64chunk::write\n+void write(char *t)\n+Definition: b64enc.hh:60\n+Dune::b64chunk::size\n+size_type size\n+Definition: b64enc.hh:36\n+Dune::b64chunk::read\n+int read(const char *t, size_type s)\n+Definition: b64enc.hh:45\n+Dune::b64chunk::put\n+void put(const char c)\n+Definition: b64enc.hh:54\n+Dune::b64chunk::reset\n+void reset()\n+Definition: b64enc.hh:39\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00815.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00815.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: common.hh File Reference\n+dune-grid: vtksequencewriterbase.hh File Reference\n \n \n \n \n \n \n \n@@ -64,130 +64,42 @@\n \n \n \n
    \n \n-
    common.hh File Reference
    \n+Namespaces
    \n+
    vtksequencewriterbase.hh File Reference
    \n \n
    \n-\n-

    Common stuff for the VTKWriter. \n-More...

    \n-
    #include <limits>
    \n+
    #include <vector>
    \n+#include <iostream>
    \n #include <sstream>
    \n-#include <string>
    \n-#include <cstdint>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/common/typetraits.hh>
    \n+#include <fstream>
    \n+#include <iomanip>
    \n+#include <memory>
    \n+#include <dune/grid/io/file/vtk/common.hh>
    \n+#include <dune/common/path.hh>
    \n+#include <dune/grid/io/file/vtk/vtkwriter.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n 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::VTKSequenceWriterBase< GridView >
     Base class to write pvd-files which contains a list of all collected vtk-files. More...
     
    \n \n \n \n \n-\n-\n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-Enumerations

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

    \n-Functions

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

    Detailed Description

    \n-

    Common stuff for the VTKWriter.

    \n-
    Author
    Peter Bastian, Christian Engwer
    \n-

    This file contains common stuff for all instances of VTKWriter.

    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,92 +7,31 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-Classes | Namespaces | Enumerations | Functions\n-common.hh File Reference\n-Common stuff for the VTKWriter. More...\n-#include \n+Classes | Namespaces\n+vtksequencewriterbase.hh File Reference\n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::VTK::PrintType<_T_>\n-\u00a0 determine a type to safely put another type into a stream More...\n-\u00a0\n-struct \u00a0Dune::VTK::PrintType<_unsigned_char_>\n-\u00a0\n-struct \u00a0Dune::VTK::PrintType<_signed_char_>\n-\u00a0\n-struct \u00a0Dune::VTK::PrintType<_char_>\n-\u00a0\n- class \u00a0Dune::VTK::FieldInfo\n-\u00a0 Descriptor struct for VTK fields. More...\n+class \u00a0Dune::VTKSequenceWriterBase<_GridView_>\n+\u00a0 Base class to write pvd-files which contains a list of all collected\n+ vtk-files. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::VTK\n-\u00a0\n- Enumerations\n- enum \u00a0Dune::VTK::OutputType { Dune::VTK::ascii , Dune::VTK::base64 , Dune::VTK::\n- appendedraw , Dune::VTK::appendedbase64 }\n-\u00a0 How the bulk data should be stored in the file. More...\n-\u00a0\n- enum \u00a0Dune::VTK::DataMode { Dune::VTK::conforming , Dune::VTK::nonconforming }\n-\u00a0 Whether to produce conforming or non-conforming output. More...\n-\u00a0\n- enum \u00a0Dune::VTK::GeometryType {\n- \u00a0\u00a0Dune::VTK::vertex = 1 , Dune::VTK::line = 3 , Dune::VTK::triangle = 5 , Dune::\n- VTK::polygon = 7 ,\n- \u00a0\u00a0Dune::VTK::quadrilateral = 9 , Dune::VTK::tetrahedron = 10 , Dune::VTK::\n- hexahedron = 12 , Dune::VTK::prism = 13 ,\n- \u00a0\u00a0Dune::VTK::pyramid = 14 , Dune::VTK::polyhedron = 42\n- }\n-\u00a0 Type representing VTK's entity geometry types. More...\n-\u00a0\n- enum \u00a0Dune::VTK::FileType { Dune::VTK::polyData , Dune::VTK::unstructuredGrid }\n-\u00a0 which type of VTK file to write More...\n-\u00a0\n- enum Dune::VTK::Precision {\n- class \u00a0\u00a0\u00a0Dune::VTK::int32 , Dune::VTK::uint8 , Dune::VTK::uint32 , Dune::VTK::float32 ,\n-\n- \u00a0\u00a0Dune::VTK::float64\n- }\n-\u00a0 which precision to use when writing out data to vtk files More...\n-\u00a0\n- Functions\n-GeometryType\u00a0Dune::VTK::geometryType (const Dune::GeometryType &t)\n-\u00a0 mapping from GeometryType to VTKGeometryType More...\n-\u00a0\n- int\u00a0Dune::VTK::renumber (const Dune::GeometryType &t, int i)\n-\u00a0 renumber VTK <-> Dune More...\n-\u00a0\n-template\n- int\u00a0Dune::VTK::renumber (const T &t, int i)\n-\u00a0 renumber VTK <-> Dune More...\n-\u00a0\n- std::string\u00a0Dune::VTK::getEndiannessString ()\n-\u00a0 determine endianness of this C++ implementation More...\n-\u00a0\n- std::string\u00a0Dune::VTK::toString (Precision p)\n-\u00a0 map precision to VTK type name More...\n-\u00a0\n- std::size_t\u00a0Dune::VTK::typeSize (Precision p)\n-\u00a0 map precision to byte size More...\n-\u00a0\n-***** Detailed Description *****\n-Common stuff for the VTKWriter.\n- Author\n- Peter Bastian, Christian Engwer\n-This file contains common stuff for all instances of VTKWriter.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00815_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: common.hh Source File\n+dune-grid: vtksequencewriterbase.hh Source File\n \n \n \n \n \n \n \n@@ -62,333 +62,183 @@\n \n \n \n
    \n-
    common.hh
    \n+
    vtksequencewriterbase.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH
    \n
    8
    \n-
    9#include <limits>
    \n-
    10#include <sstream>
    \n-
    11#include <string>
    \n-
    12#include <cstdint>
    \n-
    13
    \n-
    14#include <dune/common/exceptions.hh>
    \n-
    15#include <dune/geometry/type.hh>
    \n-
    16#include <dune/common/typetraits.hh>
    \n-
    17
    \n-
    25namespace Dune
    \n-
    26{
    \n-
    29
    \n-
    30 namespace VTK {
    \n-
    31
    \n-
    33 //
    \n-
    34 // VTKOptions
    \n-
    35 //
    \n-
    36
    \n-
    38
    \n-\n-\n-\n-\n-\n-
    52 // //! Output to the file is compressed inline binary.
    \n-
    53 // binarycompressed,
    \n-
    54 // //! Output is compressed and appended to the file.
    \n-
    55 // compressedappended
    \n-
    56 };
    \n-
    58
    \n-
    67 enum DataMode {
    \n-
    69
    \n-\n-
    75
    \n-\n-
    82 };
    \n-
    83
    \n-
    85 //
    \n-
    86 // PrintType
    \n-
    87 //
    \n-
    88
    \n+
    9#include <vector>
    \n+
    10#include <iostream>
    \n+
    11#include <sstream>
    \n+
    12#include <fstream>
    \n+
    13#include <iomanip>
    \n+
    14#include <memory>
    \n+
    15
    \n+\n+
    17#include <dune/common/path.hh>
    \n+
    18
    \n+\n+
    20
    \n+
    21namespace Dune {
    \n+
    22
    \n+
    32 template<class GridView>
    \n+\n+
    34 {
    \n+
    35 std::shared_ptr<VTKWriter<GridView> > vtkWriter_;
    \n+
    36 std::vector<double> timesteps_;
    \n+
    37 std::string name_,path_,extendpath_;
    \n+
    38 int rank_;
    \n+
    39 int size_;
    \n+
    40 public:
    \n+\n+
    48 const std::string& name,
    \n+
    49 const std::string& path,
    \n+
    50 const std::string& extendpath,
    \n+
    51 int rank,
    \n+
    52 int size)
    \n+
    53 : vtkWriter_(vtkWriter),
    \n+
    54 name_(name), path_(path),
    \n+
    55 extendpath_(extendpath),
    \n+
    56 rank_(rank),
    \n+
    57 size_(size)
    \n+
    58 {}
    \n+
    59
    \n+
    63 const std::shared_ptr< VTKWriter<GridView> >& vtkWriter() const
    \n+
    64 {
    \n+
    65 return vtkWriter_;
    \n+
    66 }
    \n+
    67
    \n+
    69 void addCellData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
    \n+
    70 {
    \n+
    71 vtkWriter_->addCellData(p);
    \n+
    72 }
    \n+
    73
    \n+
    79 template<class V >
    \n+
    80 void addCellData (const V &v, const std::string &name, int ncomps=1)
    \n+
    81 {
    \n+
    82 vtkWriter_->addCellData(v, name, ncomps);
    \n+
    83 }
    \n+
    84
    \n+
    86 void addVertexData (const std::shared_ptr<const typename VTKWriter<GridView>::VTKFunction> &p)
    \n+
    87 {
    \n+
    88 vtkWriter_->addVertexData(p);
    \n+
    89 }
    \n
    90
    \n-
    94 template<typename T>
    \n-
    95 struct PrintType {
    \n-
    97 typedef T Type;
    \n-
    98 };
    \n-
    99
    \n-
    100 template<>
    \n-
    101 struct PrintType<unsigned char> {
    \n-
    102 typedef unsigned Type;
    \n-
    103 };
    \n-
    104
    \n-
    105 template<>
    \n-
    106 struct PrintType<signed char> {
    \n-
    107 typedef int Type;
    \n-
    108 };
    \n-
    109
    \n-
    110 template<>
    \n-
    111 struct PrintType<char> {
    \n-
    112 typedef std::conditional<std::numeric_limits<char>::is_signed,
    \n-
    113 int, unsigned>::type
    \n-\n-
    115 };
    \n-
    116
    \n-
    118 //
    \n-
    119 // VTK::GeometryType related stuff
    \n-
    120 //
    \n-
    121
    \n-
    123
    \n-\n-\n-
    134 line = 3,
    \n-\n-\n-\n-\n-\n-
    140 prism = 13,
    \n-\n-
    142 polyhedron = 42
    \n-
    143 };
    \n-
    144
    \n-
    146
    \n-\n-
    152 {
    \n-
    153 if (t.isVertex()) return vertex;
    \n-
    154 if (t.isLine()) return line;
    \n-
    155 if (t.isTriangle()) return triangle;
    \n-
    156 if (t.isQuadrilateral()) return quadrilateral;
    \n-
    157 if (t.isTetrahedron()) return tetrahedron;
    \n-
    158 if (t.isPyramid()) return pyramid;
    \n-
    159 if (t.isPrism()) return prism;
    \n-
    160 if (t.isHexahedron()) return hexahedron;
    \n-
    161
    \n-
    162 if (t.isNone() )
    \n-
    163 {
    \n-
    164 if( t.dim() == 2 ) return polygon;
    \n-
    165 if( t.dim() == 3 ) return polyhedron;
    \n-
    166 }
    \n-
    167
    \n-
    168 DUNE_THROW(IOError,"VTKWriter: unsupported GeometryType " << t);
    \n-
    169 }
    \n-
    170
    \n-
    172 //
    \n-
    173 // Functions for transforming the index of a corner inside an entity
    \n-
    174 // between Dune and VTK
    \n-
    175 //
    \n-
    176
    \n+
    96 template<class V >
    \n+
    97 void addVertexData (const V &v, const std::string &name, int ncomps=1)
    \n+
    98 {
    \n+
    99 vtkWriter_->addVertexData(v, name, ncomps);
    \n+
    100 }
    \n+
    101
    \n+
    102
    \n+
    108 void write (double time, VTK::OutputType type = VTK::ascii)
    \n+
    109 {
    \n+
    110 /* remember current time step */
    \n+
    111 unsigned int count = timesteps_.size();
    \n+
    112 timesteps_.push_back(time);
    \n+
    113
    \n+
    114 /* write VTK file */
    \n+
    115 if(size_==1)
    \n+
    116 vtkWriter_->write(concatPaths(path_,seqName(count)),type);
    \n+
    117 else
    \n+
    118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type);
    \n+
    119
    \n+
    120 /* write pvd file ... only on rank 0 */
    \n+
    121 if (rank_==0) {
    \n+
    122 std::ofstream pvdFile;
    \n+
    123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit |
    \n+
    124 std::ios_base::eofbit);
    \n+
    125 std::string pvdname = name_ + ".pvd";
    \n+
    126 pvdFile.open(pvdname.c_str());
    \n+
    127 pvdFile << "<?xml version=\\"1.0\\"?> \\n"
    \n+
    128 << "<VTKFile type=\\"Collection\\" version=\\"0.1\\" byte_order=\\"" << VTK::getEndiannessString() << "\\"> \\n"
    \n+
    129 << "<Collection> \\n";
    \n+
    130 for (unsigned int i=0; i<=count; i++)
    \n+
    131 {
    \n+
    132 // filename
    \n+
    133 std::string piecepath;
    \n+
    134 std::string fullname;
    \n+
    135 if(size_==1) {
    \n+
    136 piecepath = path_;
    \n+
    137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath);
    \n+
    138 }
    \n+
    139 else {
    \n+
    140 piecepath = concatPaths(path_, extendpath_);
    \n+
    141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath, size_);
    \n+
    142 }
    \n+
    143 pvdFile << "<DataSet timestep=\\"" << timesteps_[i]
    \n+
    144 << "\\" group=\\"\\" part=\\"0\\" name=\\"\\" file=\\""
    \n+
    145 << fullname << "\\"/> \\n";
    \n+
    146 }
    \n+
    147 pvdFile << "</Collection> \\n"
    \n+
    148 << "</VTKFile> \\n" << std::flush;
    \n+
    149 pvdFile.close();
    \n+
    150 }
    \n+
    151 }
    \n+
    152
    \n+
    156 void clear()
    \n+
    157 {
    \n+
    158 vtkWriter_->clear();
    \n+
    159 }
    \n+
    160
    \n+
    164 const std::vector<double>& getTimeSteps() const
    \n+
    165 {
    \n+
    166 return timesteps_;
    \n+
    167 }
    \n+
    168
    \n+
    174 void setTimeSteps(const std::vector<double>& timesteps)
    \n+
    175 {
    \n+
    176 timesteps_ = timesteps;
    \n+
    177 }
    \n
    178
    \n-
    186 inline int renumber(const Dune::GeometryType &t, int i)
    \n-
    187 {
    \n-
    188 static const int quadRenumbering[4] = {0,1,3,2};
    \n-
    189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6};
    \n-
    190 static const int prismRenumbering[6] = {0,2,1,3,5,4};
    \n-
    191 static const int pyramidRenumbering[5] = {0,1,3,2,4};
    \n+
    179 private:
    \n+
    180
    \n+
    181 // create sequence name
    \n+
    182 std::string seqName(unsigned int count) const
    \n+
    183 {
    \n+
    184 std::stringstream n;
    \n+
    185 n.fill('0');
    \n+
    186 n << name_ << "-" << std::setw(5) << count;
    \n+
    187 return n.str();
    \n+
    188 }
    \n+
    189 };
    \n+
    190
    \n+
    191} // end namespace Dune
    \n
    192
    \n-
    193 if (t.isQuadrilateral()) return quadRenumbering[i];
    \n-
    194 if (t.isPyramid()) return pyramidRenumbering[i];
    \n-
    195 if (t.isPrism()) return prismRenumbering[i];
    \n-
    196 if (t.isHexahedron()) return cubeRenumbering[i];
    \n-
    197
    \n-
    198 return i;
    \n-
    199 }
    \n-
    200
    \n-
    202
    \n-
    216 template<typename T>
    \n-
    217 int renumber(const T& t, int i)
    \n-
    218 {
    \n-
    219 return renumber(t.type(), i);
    \n-
    220 }
    \n-
    221
    \n-
    223 //
    \n-
    224 // Determine Endianness
    \n-
    225 //
    \n-
    226
    \n-
    228
    \n-
    232 inline std::string getEndiannessString()
    \n-
    233 {
    \n-
    234 short i = 1;
    \n-
    235 if (reinterpret_cast<char*>(&i)[1] == 1)
    \n-
    236 return "BigEndian";
    \n-
    237 else
    \n-
    238 return "LittleEndian";
    \n-
    239 }
    \n-
    240
    \n-
    242 //
    \n-
    243 // which type of vtkfile to write
    \n-
    244 //
    \n-
    245
    \n-
    247
    \n-
    252 enum FileType {
    \n-\n-\n-
    257 };
    \n-
    258
    \n-
    259
    \n-
    261 //
    \n-
    262 // which precision to use when writing out data
    \n-
    263 //
    \n-
    264
    \n-
    266
    \n-
    271 enum class Precision {
    \n-
    272 int32,
    \n-
    273 uint8,
    \n-
    274 uint32,
    \n-
    275 float32,
    \n-
    276 float64
    \n-
    277 };
    \n-
    278
    \n-
    280 inline std::string toString(Precision p)
    \n-
    281 {
    \n-
    282 switch(p)
    \n-
    283 {
    \n-\n-
    285 return "Float32";
    \n-\n-
    287 return "Float64";
    \n-\n-
    289 return "UInt32";
    \n-
    290 case Precision::uint8:
    \n-
    291 return "UInt8";
    \n-
    292 case Precision::int32:
    \n-
    293 return "Int32";
    \n-
    294 default:
    \n-
    295 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
    \n-
    296 }
    \n-
    297 }
    \n-
    298
    \n-
    300 inline std::size_t typeSize(Precision p)
    \n-
    301 {
    \n-
    302 switch(p)
    \n-
    303 {
    \n-\n-
    305 return sizeof(float);
    \n-\n-
    307 return sizeof(double);
    \n-\n-
    309 return sizeof(std::uint32_t);
    \n-
    310 case Precision::uint8:
    \n-
    311 return sizeof(std::uint8_t);
    \n-
    312 case Precision::int32:
    \n-
    313 return sizeof(std::int32_t);
    \n-
    314 default:
    \n-
    315 DUNE_THROW(Dune::NotImplemented, "Unknown precision type");
    \n-
    316 }
    \n-
    317 }
    \n-
    318
    \n-
    320
    \n-\n-
    328 {
    \n-
    329
    \n-
    330 public:
    \n-
    331
    \n-
    333 enum class Type {
    \n-
    336 scalar,
    \n-
    338 vector,
    \n-
    340 tensor
    \n-
    341 };
    \n-
    342
    \n-
    344 FieldInfo(std::string name, Type type, std::size_t size, Precision prec = Precision::float32)
    \n-
    345 : _name(name)
    \n-
    346 , _type(type)
    \n-
    347 , _size(size)
    \n-
    348 , _prec(prec)
    \n-
    349 {}
    \n-
    350
    \n-
    352 std::string name() const
    \n-
    353 {
    \n-
    354 return _name;
    \n-
    355 }
    \n-
    356
    \n-
    358 Type type() const
    \n-
    359 {
    \n-
    360 return _type;
    \n-
    361 }
    \n-
    362
    \n-
    364 std::size_t size() const
    \n-
    365 {
    \n-
    366 return _size;
    \n-
    367 }
    \n-
    368
    \n-\n-
    371 {
    \n-
    372 return _prec;
    \n-
    373 }
    \n-
    374
    \n-
    375 private:
    \n-
    376
    \n-
    377 std::string _name;
    \n-
    378 Type _type;
    \n-
    379 std::size_t _size;
    \n-
    380 Precision _prec;
    \n-
    381
    \n-
    382 };
    \n-
    383
    \n-
    384
    \n-
    385 } // namespace VTK
    \n-
    386
    \n-
    388
    \n-
    389} // namespace Dune
    \n-
    390
    \n-
    391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH
    \n+
    193#endif
    \n+
    Common stuff for the VTKWriter.
    \n+
    Provides file i/o for the visualization toolkit.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n-\n-\n-\n-\n-\n
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n
    @ ascii
    Output to the file is in ascii.
    Definition: common.hh:45
    \n-
    @ appendedraw
    Output is to the file is appended raw binary.
    Definition: common.hh:49
    \n-
    @ appendedbase64
    Output is to the file is appended base64 binary.
    Definition: common.hh:51
    \n-
    @ base64
    Output to the file is inline base64 binary.
    Definition: common.hh:47
    \n-
    int renumber(const Dune::GeometryType &t, int i)
    renumber VTK <-> Dune
    Definition: common.hh:186
    \n-
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n-
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n-
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n-
    std::string toString(Precision p)
    map precision to VTK type name
    Definition: common.hh:280
    \n-
    DataMode
    Whether to produce conforming or non-conforming output.
    Definition: common.hh:67
    \n-
    @ conforming
    Output conforming data.
    Definition: common.hh:73
    \n-
    @ nonconforming
    Output non-conforming data.
    Definition: common.hh:81
    \n-
    std::size_t typeSize(Precision p)
    map precision to byte size
    Definition: common.hh:300
    \n-
    GeometryType geometryType(const Dune::GeometryType &t)
    mapping from GeometryType to VTKGeometryType
    Definition: common.hh:151
    \n
    std::string getEndiannessString()
    determine endianness of this C++ implementation
    Definition: common.hh:232
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    @ line
    Definition: common.hh:134
    \n-
    @ pyramid
    Definition: common.hh:141
    \n-
    @ polyhedron
    Definition: common.hh:142
    \n-
    @ quadrilateral
    Definition: common.hh:137
    \n-
    @ vertex
    Definition: common.hh:133
    \n-
    @ tetrahedron
    Definition: common.hh:138
    \n-
    @ prism
    Definition: common.hh:140
    \n-
    @ hexahedron
    Definition: common.hh:139
    \n-
    @ triangle
    Definition: common.hh:135
    \n-
    @ polygon
    Definition: common.hh:136
    \n-
    determine a type to safely put another type into a stream
    Definition: common.hh:95
    \n-
    T Type
    type to convert T to before putting it into a stream with <<
    Definition: common.hh:97
    \n-
    unsigned Type
    Definition: common.hh:102
    \n-
    int Type
    Definition: common.hh:107
    \n-
    std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type Type
    Definition: common.hh:114
    \n-
    Descriptor struct for VTK fields.
    Definition: common.hh:328
    \n-
    std::size_t size() const
    The number of components in the data field.
    Definition: common.hh:364
    \n-
    Precision precision() const
    The precision used for the output of the data field.
    Definition: common.hh:370
    \n-
    Type
    VTK data type.
    Definition: common.hh:333
    \n-
    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
    \n-
    Type type() const
    The type of the data field.
    Definition: common.hh:358
    \n-
    std::string name() const
    The name of the data field.
    Definition: common.hh:352
    \n+
    A base class for grid functions with any return type and dimension.
    Definition: function.hh:42
    \n+
    Base class to write pvd-files which contains a list of all collected vtk-files.
    Definition: vtksequencewriterbase.hh:34
    \n+
    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
    \n+
    const std::vector< double > & getTimeSteps() const
    Retrieve the current list of time steps.
    Definition: vtksequencewriterbase.hh:164
    \n+
    const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
    Definition: vtksequencewriterbase.hh:63
    \n+
    void write(double time, VTK::OutputType type=VTK::ascii)
    Writes VTK data for the given time,.
    Definition: vtksequencewriterbase.hh:108
    \n+
    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
    \n+
    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
    \n+
    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
    \n+
    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
    \n+
    void setTimeSteps(const std::vector< double > &timesteps)
    Set the current list of time steps.
    Definition: vtksequencewriterbase.hh:174
    \n+
    void clear()
    Clears all VTK data added to the VTK writer.
    Definition: vtksequencewriterbase.hh:156
    \n+
    Writer for the ouput of grid functions in the vtk format.
    Definition: vtkwriter.hh:95
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,444 +7,236 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-common.hh\n+vtksequencewriterbase.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_COMMON_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_COMMON_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_VTKSEQUENCEWRITERBASE_HH\n 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13\n- 14#include \n- 15#include \n- 16#include \n- 17\n- 25namespace Dune\n- 26{\n- 29\n- 30 namespace VTK {\n- 31\n- 33 //\n- 34 // VTKOptions\n- 35 //\n- 36\n- 38\n-43 enum OutputType {\n-45 ascii,\n-47 base64,\n-49 appendedraw,\n- 51 appendedbase64\n- 52 // //! Output to the file is compressed inline binary.\n- 53 // binarycompressed,\n- 54 // //! Output is compressed and appended to the file.\n- 55 // compressedappended\n-56 };\n- 58\n-67 enum DataMode {\n- 69\n-73 conforming,\n- 75\n- 81 nonconforming\n-82 };\n- 83\n- 85 //\n- 86 // PrintType\n- 87 //\n- 88\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15\n+ 16#include \n+ 17#include \n+ 18\n+ 19#include \n+ 20\n+ 21namespace Dune {\n+ 22\n+ 32 template\n+33 class VTKSequenceWriterBase\n+ 34 {\n+ 35 std::shared_ptr > vtkWriter_;\n+ 36 std::vector timesteps_;\n+ 37 std::string name_,path_,extendpath_;\n+ 38 int rank_;\n+ 39 int size_;\n+ 40 public:\n+47 explicit VTKSequenceWriterBase( std::shared_ptr >\n+vtkWriter,\n+ 48 const std::string& name,\n+ 49 const std::string& path,\n+ 50 const std::string& extendpath,\n+ 51 int rank,\n+ 52 int size)\n+ 53 : vtkWriter_(vtkWriter),\n+ 54 name_(name), path_(path),\n+ 55 extendpath_(extendpath),\n+ 56 rank_(rank),\n+ 57 size_(size)\n+ 58 {}\n+ 59\n+63 const std::shared_ptr< VTKWriter >& vtkWriter() const\n+ 64 {\n+ 65 return vtkWriter_;\n+ 66 }\n+ 67\n+69 void addCellData (const std::shared_ptr::\n+VTKFunction> &p)\n+ 70 {\n+ 71 vtkWriter_->addCellData(p);\n+ 72 }\n+ 73\n+ 79 template\n+80 void addCellData (const V &v, const std::string &name, int ncomps=1)\n+ 81 {\n+ 82 vtkWriter_->addCellData(v, name, ncomps);\n+ 83 }\n+ 84\n+86 void addVertexData (const std::shared_ptr::VTKFunction> &p)\n+ 87 {\n+ 88 vtkWriter_->addVertexData(p);\n+ 89 }\n 90\n- 94 template\n-95 struct PrintType {\n-97 typedef T Type;\n- 98 };\n- 99\n- 100 template<>\n-101 struct PrintType {\n-102 typedef unsigned Type;\n- 103 };\n- 104\n- 105 template<>\n-106 struct PrintType {\n-107 typedef int Type;\n- 108 };\n- 109\n- 110 template<>\n-111 struct PrintType {\n- 112 typedef std::conditional::is_signed,\n- 113 int, unsigned>::type\n-114 Type;\n- 115 };\n- 116\n- 118 //\n- 119 // VTK::GeometryType related stuff\n- 120 //\n- 121\n- 123\n-132 enum GeometryType {\n-133 vertex = 1,\n-134 line = 3,\n-135 triangle = 5,\n-136 polygon = 7,\n-137 quadrilateral = 9,\n-138 tetrahedron = 10,\n-139 hexahedron = 12,\n-140 prism = 13,\n-141 pyramid = 14,\n- 142 polyhedron = 42\n-143 };\n- 144\n- 146\n-151 inline GeometryType geometryType(const Dune::GeometryType& t)\n- 152 {\n- 153 if (t.isVertex()) return vertex;\n- 154 if (t.isLine()) return line;\n- 155 if (t.isTriangle()) return triangle;\n- 156 if (t.isQuadrilateral()) return quadrilateral;\n- 157 if (t.isTetrahedron()) return tetrahedron;\n- 158 if (t.isPyramid()) return pyramid;\n- 159 if (t.isPrism()) return prism;\n- 160 if (t.isHexahedron()) return hexahedron;\n- 161\n- 162 if (t.isNone() )\n- 163 {\n- 164 if( t.dim() == 2 ) return polygon;\n- 165 if( t.dim() == 3 ) return polyhedron;\n- 166 }\n- 167\n- 168 DUNE_THROW(IOError,\"VTKWriter: unsupported GeometryType \" << t);\n- 169 }\n- 170\n- 172 //\n- 173 // Functions for transforming the index of a corner inside an entity\n- 174 // between Dune and VTK\n- 175 //\n- 176\n+ 96 template\n+97 void addVertexData (const V &v, const std::string &name, int ncomps=1)\n+ 98 {\n+ 99 vtkWriter_->addVertexData(v, name, ncomps);\n+ 100 }\n+ 101\n+ 102\n+108 void write (double time, VTK::OutputType type = VTK::ascii)\n+ 109 {\n+ 110 /* remember current time step */\n+ 111 unsigned int count = timesteps_.size();\n+ 112 timesteps_.push_back(time);\n+ 113\n+ 114 /* write VTK file */\n+ 115 if(size_==1)\n+ 116 vtkWriter_->write(concatPaths(path_,seqName(count)),type);\n+ 117 else\n+ 118 vtkWriter_->pwrite(seqName(count), path_,extendpath_,type);\n+ 119\n+ 120 /* write pvd file ... only on rank 0 */\n+ 121 if (rank_==0) {\n+ 122 std::ofstream pvdFile;\n+ 123 pvdFile.exceptions(std::ios_base::badbit | std::ios_base::failbit |\n+ 124 std::ios_base::eofbit);\n+ 125 std::string pvdname = name_ + \".pvd\";\n+ 126 pvdFile.open(pvdname.c_str());\n+ 127 pvdFile << \" \\n\"\n+ 128 << \" \\n\"\n+ 129 << \" \\n\";\n+ 130 for (unsigned int i=0; i<=count; i++)\n+ 131 {\n+ 132 // filename\n+ 133 std::string piecepath;\n+ 134 std::string fullname;\n+ 135 if(size_==1) {\n+ 136 piecepath = path_;\n+ 137 fullname = vtkWriter_->getSerialPieceName(seqName(i), piecepath);\n+ 138 }\n+ 139 else {\n+ 140 piecepath = concatPaths(path_, extendpath_);\n+ 141 fullname = vtkWriter_->getParallelHeaderName(seqName(i), piecepath,\n+size_);\n+ 142 }\n+ 143 pvdFile << \" \\n\";\n+ 146 }\n+ 147 pvdFile << \" \\n\"\n+ 148 << \" \\n\" << std::flush;\n+ 149 pvdFile.close();\n+ 150 }\n+ 151 }\n+ 152\n+156 void clear()\n+ 157 {\n+ 158 vtkWriter_->clear();\n+ 159 }\n+ 160\n+164 const std::vector& getTimeSteps() const\n+ 165 {\n+ 166 return timesteps_;\n+ 167 }\n+ 168\n+174 void setTimeSteps(const std::vector& timesteps)\n+ 175 {\n+ 176 timesteps_ = timesteps;\n+ 177 }\n 178\n-186 inline int renumber(const Dune::GeometryType &t, int i)\n- 187 {\n- 188 static const int quadRenumbering[4] = {0,1,3,2};\n- 189 static const int cubeRenumbering[8] = {0,1,3,2,4,5,7,6};\n- 190 static const int prismRenumbering[6] = {0,2,1,3,5,4};\n- 191 static const int pyramidRenumbering[5] = {0,1,3,2,4};\n+ 179 private:\n+ 180\n+ 181 // create sequence name\n+ 182 std::string seqName(unsigned int count) const\n+ 183 {\n+ 184 std::stringstream n;\n+ 185 n.fill('0');\n+ 186 n << name_ << \"-\" << std::setw(5) << count;\n+ 187 return n.str();\n+ 188 }\n+ 189 };\n+ 190\n+ 191} // end namespace Dune\n 192\n- 193 if (t.isQuadrilateral()) return quadRenumbering[i];\n- 194 if (t.isPyramid()) return pyramidRenumbering[i];\n- 195 if (t.isPrism()) return prismRenumbering[i];\n- 196 if (t.isHexahedron()) return cubeRenumbering[i];\n- 197\n- 198 return i;\n- 199 }\n- 200\n- 202\n- 216 template\n-217 int renumber(const T& t, int i)\n- 218 {\n- 219 return renumber(t.type(), i);\n- 220 }\n- 221\n- 223 //\n- 224 // Determine Endianness\n- 225 //\n- 226\n- 228\n-232 inline std::string getEndiannessString()\n- 233 {\n- 234 short i = 1;\n- 235 if (reinterpret_cast(&i)[1] == 1)\n- 236 return \"BigEndian\";\n- 237 else\n- 238 return \"LittleEndian\";\n- 239 }\n- 240\n- 242 //\n- 243 // which type of vtkfile to write\n- 244 //\n- 245\n- 247\n-252 enum FileType {\n-254 polyData,\n- 256 unstructuredGrid\n-257 };\n- 258\n- 259\n- 261 //\n- 262 // which precision to use when writing out data\n- 263 //\n- 264\n- 266\n-271 enum class Precision {\n- 272 int32,\n- 273 uint8,\n- 274 uint32,\n- 275 float32,\n- 276 float64\n- 277 };\n- 278\n-280 inline std::string toString(Precision p)\n- 281 {\n- 282 switch(p)\n- 283 {\n- 284 case Precision::float32:\n- 285 return \"Float32\";\n- 286 case Precision::float64:\n- 287 return \"Float64\";\n- 288 case Precision::uint32:\n- 289 return \"UInt32\";\n- 290 case Precision::uint8:\n- 291 return \"UInt8\";\n- 292 case Precision::int32:\n- 293 return \"Int32\";\n- 294 default:\n- 295 DUNE_THROW(Dune::NotImplemented, \"Unknown precision type\");\n- 296 }\n- 297 }\n- 298\n-300 inline std::size_t typeSize(Precision p)\n- 301 {\n- 302 switch(p)\n- 303 {\n- 304 case Precision::float32:\n- 305 return sizeof(float);\n- 306 case Precision::float64:\n- 307 return sizeof(double);\n- 308 case Precision::uint32:\n- 309 return sizeof(std::uint32_t);\n- 310 case Precision::uint8:\n- 311 return sizeof(std::uint8_t);\n- 312 case Precision::int32:\n- 313 return sizeof(std::int32_t);\n- 314 default:\n- 315 DUNE_THROW(Dune::NotImplemented, \"Unknown precision type\");\n- 316 }\n- 317 }\n- 318\n- 320\n-327 class FieldInfo\n- 328 {\n- 329\n- 330 public:\n- 331\n-333 enum class Type {\n- 336 scalar,\n- 338 vector,\n- 340 tensor\n- 341 };\n- 342\n-344 FieldInfo(std::string name, Type type, std::size_t size, Precision prec =\n-Precision::float32)\n- 345 : _name(name)\n- 346 , _type(type)\n- 347 , _size(size)\n- 348 , _prec(prec)\n- 349 {}\n- 350\n-352 std::string name() const\n- 353 {\n- 354 return _name;\n- 355 }\n- 356\n-358 Type type() const\n- 359 {\n- 360 return _type;\n- 361 }\n- 362\n-364 std::size_t size() const\n- 365 {\n- 366 return _size;\n- 367 }\n- 368\n-370 Precision precision() const\n- 371 {\n- 372 return _prec;\n- 373 }\n- 374\n- 375 private:\n- 376\n- 377 std::string _name;\n- 378 Type _type;\n- 379 std::size_t _size;\n- 380 Precision _prec;\n- 381\n- 382 };\n- 383\n- 384\n- 385 } // namespace VTK\n- 386\n- 388\n- 389} // namespace Dune\n- 390\n- 391#endif // DUNE_GRID_IO_FILE_VTK_COMMON_HH\n+ 193#endif\n+common.hh\n+Common stuff for the VTKWriter.\n+vtkwriter.hh\n+Provides file i/o for the visualization toolkit.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::Precision\n-Precision\n-which precision to use when writing out data to vtk files\n-Definition: common.hh:271\n-Dune::VTK::Precision::int32\n-@ int32\n-Dune::VTK::Precision::uint32\n-@ uint32\n-Dune::VTK::Precision::uint8\n-@ uint8\n-Dune::VTK::Precision::float32\n-@ float32\n-Dune::VTK::Precision::float64\n-@ float64\n Dune::VTK::OutputType\n OutputType\n How the bulk data should be stored in the file.\n Definition: common.hh:43\n Dune::VTK::ascii\n @ ascii\n Output to the file is in ascii.\n Definition: common.hh:45\n-Dune::VTK::appendedraw\n-@ appendedraw\n-Output is to the file is appended raw binary.\n-Definition: common.hh:49\n-Dune::VTK::appendedbase64\n-@ appendedbase64\n-Output is to the file is appended base64 binary.\n-Definition: common.hh:51\n-Dune::VTK::base64\n-@ base64\n-Output to the file is inline base64 binary.\n-Definition: common.hh:47\n-Dune::VTK::renumber\n-int renumber(const Dune::GeometryType &t, int i)\n-renumber VTK <-> Dune\n-Definition: common.hh:186\n-Dune::VTK::FileType\n-FileType\n-which type of VTK file to write\n-Definition: common.hh:252\n-Dune::VTK::polyData\n-@ polyData\n-for .vtp files (PolyData)\n-Definition: common.hh:254\n-Dune::VTK::unstructuredGrid\n-@ unstructuredGrid\n-for .vtu files (UnstructuredGrid)\n-Definition: common.hh:256\n-Dune::VTK::toString\n-std::string toString(Precision p)\n-map precision to VTK type name\n-Definition: common.hh:280\n-Dune::VTK::DataMode\n-DataMode\n-Whether to produce conforming or non-conforming output.\n-Definition: common.hh:67\n-Dune::VTK::conforming\n-@ conforming\n-Output conforming data.\n-Definition: common.hh:73\n-Dune::VTK::nonconforming\n-@ nonconforming\n-Output non-conforming data.\n-Definition: common.hh:81\n-Dune::VTK::typeSize\n-std::size_t typeSize(Precision p)\n-map precision to byte size\n-Definition: common.hh:300\n-Dune::VTK::geometryType\n-GeometryType geometryType(const Dune::GeometryType &t)\n-mapping from GeometryType to VTKGeometryType\n-Definition: common.hh:151\n Dune::VTK::getEndiannessString\n std::string getEndiannessString()\n determine endianness of this C++ implementation\n Definition: common.hh:232\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::VTK::line\n-@ line\n-Definition: common.hh:134\n-Dune::VTK::pyramid\n-@ pyramid\n-Definition: common.hh:141\n-Dune::VTK::polyhedron\n-@ polyhedron\n-Definition: common.hh:142\n-Dune::VTK::quadrilateral\n-@ quadrilateral\n-Definition: common.hh:137\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n-Dune::VTK::tetrahedron\n-@ tetrahedron\n-Definition: common.hh:138\n-Dune::VTK::prism\n-@ prism\n-Definition: common.hh:140\n-Dune::VTK::hexahedron\n-@ hexahedron\n-Definition: common.hh:139\n-Dune::VTK::triangle\n-@ triangle\n-Definition: common.hh:135\n-Dune::VTK::polygon\n-@ polygon\n-Definition: common.hh:136\n-Dune::VTK::PrintType\n-determine a type to safely put another type into a stream\n-Definition: common.hh:95\n-Dune::VTK::PrintType::Type\n-T Type\n-type to convert T to before putting it into a stream with <<\n-Definition: common.hh:97\n-Dune::VTK::PrintType<_unsigned_char_>::Type\n-unsigned Type\n-Definition: common.hh:102\n-Dune::VTK::PrintType<_signed_char_>::Type\n-int Type\n-Definition: common.hh:107\n-Dune::VTK::PrintType<_char_>::Type\n-std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type\n-Type\n-Definition: common.hh:114\n-Dune::VTK::FieldInfo\n-Descriptor struct for VTK fields.\n-Definition: common.hh:328\n-Dune::VTK::FieldInfo::size\n-std::size_t size() const\n-The number of components in the data field.\n-Definition: common.hh:364\n-Dune::VTK::FieldInfo::precision\n-Precision precision() const\n-The precision used for the output of the data field.\n-Definition: common.hh:370\n-Dune::VTK::FieldInfo::Type\n-Type\n-VTK data type.\n-Definition: common.hh:333\n-Dune::VTK::FieldInfo::FieldInfo\n-FieldInfo(std::string name, Type type, std::size_t size, Precision\n-prec=Precision::float32)\n-Create a FieldInfo instance with the given name, type and size.\n-Definition: common.hh:344\n-Dune::VTK::FieldInfo::type\n-Type type() const\n-The type of the data field.\n-Definition: common.hh:358\n-Dune::VTK::FieldInfo::name\n-std::string name() const\n-The name of the data field.\n-Definition: common.hh:352\n+Dune::VTKFunction\n+A base class for grid functions with any return type and dimension.\n+Definition: function.hh:42\n+Dune::VTKSequenceWriterBase\n+Base class to write pvd-files which contains a list of all collected vtk-files.\n+Definition: vtksequencewriterbase.hh:34\n+Dune::VTKSequenceWriterBase::addVertexData\n+void addVertexData(const V &v, const std::string &name, int ncomps=1)\n+Adds a field of vertex data to the VTK file.\n+Definition: vtksequencewriterbase.hh:97\n+Dune::VTKSequenceWriterBase::getTimeSteps\n+const std::vector< double > & getTimeSteps() const\n+Retrieve the current list of time steps.\n+Definition: vtksequencewriterbase.hh:164\n+Dune::VTKSequenceWriterBase::vtkWriter\n+const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const\n+Definition: vtksequencewriterbase.hh:63\n+Dune::VTKSequenceWriterBase::write\n+void write(double time, VTK::OutputType type=VTK::ascii)\n+Writes VTK data for the given time,.\n+Definition: vtksequencewriterbase.hh:108\n+Dune::VTKSequenceWriterBase::addVertexData\n+void addVertexData(const std::shared_ptr< const typename VTKWriter< GridView\n+>::VTKFunction > &p)\n+Adds a field of vertex data to the VTK file.\n+Definition: vtksequencewriterbase.hh:86\n+Dune::VTKSequenceWriterBase::addCellData\n+void addCellData(const V &v, const std::string &name, int ncomps=1)\n+Adds a field of cell data to the VTK file.\n+Definition: vtksequencewriterbase.hh:80\n+Dune::VTKSequenceWriterBase::VTKSequenceWriterBase\n+VTKSequenceWriterBase(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const\n+std::string &name, const std::string &path, const std::string &extendpath, int\n+rank, int size)\n+Set up the VTKSequenceWriterBase class.\n+Definition: vtksequencewriterbase.hh:47\n+Dune::VTKSequenceWriterBase::addCellData\n+void addCellData(const std::shared_ptr< const typename VTKWriter< GridView >::\n+VTKFunction > &p)\n+Adds a field of cell data to the VTK file.\n+Definition: vtksequencewriterbase.hh:69\n+Dune::VTKSequenceWriterBase::setTimeSteps\n+void setTimeSteps(const std::vector< double > ×teps)\n+Set the current list of time steps.\n+Definition: vtksequencewriterbase.hh:174\n+Dune::VTKSequenceWriterBase::clear\n+void clear()\n+Clears all VTK data added to the VTK writer.\n+Definition: vtksequencewriterbase.hh:156\n+Dune::VTKWriter\n+Writer for the ouput of grid functions in the vtk format.\n+Definition: vtkwriter.hh:95\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00818.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00818.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: volumewriter.hh File Reference\n+dune-grid: vtuwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -65,28 +65,30 @@\n
  • dune
  • grid
  • io
  • file
  • vtk
  • \n \n \n
    \n \n-
    volumewriter.hh File Reference
    \n+
    vtuwriter.hh File Reference
    \n
    \n
    \n-
    #include <memory>
    \n-#include <dune/grid/io/file/vtk/basicwriter.hh>
    \n-#include <dune/grid/io/file/vtk/function.hh>
    \n-#include <dune/grid/io/file/vtk/functionwriter.hh>
    \n-#include <dune/grid/io/file/vtk/volumeiterators.hh>
    \n+
    #include <ostream>
    \n+#include <string>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/indent.hh>
    \n+#include <dune/grid/io/file/vtk/common.hh>
    \n+#include <dune/grid/io/file/vtk/dataarraywriter.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n \n

    \n Classes

    class  Dune::VTK::ConformingVolumeWriter< GV >
    class  Dune::VTK::VTUWriter
     Dump a .vtu/.vtp files contents to a stream. More...
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,23 +8,25 @@\n \n * dune\n * grid\n * io\n * file\n * vtk\n Classes | Namespaces\n-volumewriter.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n+vtuwriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::VTK::ConformingVolumeWriter<_GV_>\n+class \u00a0Dune::VTK::VTUWriter\n+\u00a0 Dump a .vtu/.vtp files contents to a stream. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::VTK\n \u00a0\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00818_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: volumewriter.hh Source File\n+dune-grid: vtuwriter.hh Source File\n \n \n \n \n \n \n \n@@ -62,116 +62,272 @@\n \n \n \n
    \n-
    volumewriter.hh
    \n+
    vtuwriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
    \n
    8
    \n-
    9#include <memory>
    \n-
    10
    \n-\n-\n-\n-\n-
    15
    \n-
    16namespace Dune {
    \n+
    9#include <ostream>
    \n+
    10#include <string>
    \n+
    11
    \n+
    12#include <dune/common/exceptions.hh>
    \n+
    13#include <dune/common/indent.hh>
    \n+
    14
    \n+\n+\n+
    17
    \n+
    18namespace Dune {
    \n
    19
    \n-
    20 namespace VTK {
    \n-
    21
    \n-
    22 template<typename GV>
    \n-\n-\n-
    25 public BasicWriter<ConformingVolumeIteratorFactory<GV> >
    \n-
    26 {
    \n-\n-\n-
    29
    \n-
    30 const GV& gv;
    \n-
    31
    \n-
    32 public:
    \n-\n-
    34 typedef std::shared_ptr<VTKFunction> VTKFunctionPtr;
    \n-
    35
    \n-\n-
    37 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
    \n-
    38 { }
    \n-
    39
    \n-\n-
    41
    \n-
    42 void addCellData(const VTKFunctionPtr& p) {
    \n-
    43 Base::addCellData(std::shared_ptr<typename Base::FunctionWriter>
    \n-\n-
    45 }
    \n-
    46
    \n-\n-\n-
    49 }
    \n-
    50
    \n-
    51 template<typename V>
    \n-
    52 void addCellData(const V &v, const std::string &name, int ncomps=1) {
    \n-
    53 addCellData(new P0VTKFunction<GV, V>(gv, v, name, ncomps));
    \n-
    54 }
    \n-
    55
    \n-\n-
    57 addPointData(std::shared_ptr<typename Base::FunctionWriter>
    \n-\n-
    59 }
    \n-
    60
    \n-\n-\n-
    63 }
    \n-
    64
    \n-
    65 template<typename V>
    \n-
    66 void addVertexData(const V &v, const std::string &name, int ncomps=1) {
    \n-
    67 addVertexData(new P1VTKFunction<GV, V>(gv, v, name, ncomps));
    \n-
    68 }
    \n-
    69
    \n-
    70 };
    \n-
    71
    \n-
    72 } // namespace VTK
    \n-
    73
    \n-
    75
    \n-
    76} // namespace Dune
    \n-
    77
    \n-
    78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
    \n-\n-\n-\n-
    Functions for VTK output.
    \n+
    22
    \n+
    23 namespace VTK {
    \n+
    24
    \n+
    26
    \n+
    98 class VTUWriter {
    \n+
    99 public:
    \n+
    100 std::ostream& stream;
    \n+\n+
    102
    \n+
    103 private:
    \n+\n+
    105 Indent indent;
    \n+
    106
    \n+
    107 std::string fileType;
    \n+
    108 std::string cellName;
    \n+
    109
    \n+
    110 bool doAppended;
    \n+
    111
    \n+
    112 public:
    \n+
    114
    \n+
    122 inline VTUWriter(std::ostream& stream_, OutputType outputType,
    \n+
    123 FileType fileType_)
    \n+
    124 : stream(stream_), factory(outputType, stream)
    \n+
    125 {
    \n+
    126 switch(fileType_) {
    \n+
    127 case polyData :
    \n+
    128 fileType = "PolyData";
    \n+
    129 cellName = "Lines";
    \n+
    130 break;
    \n+
    131 case unstructuredGrid :
    \n+
    132 fileType = "UnstructuredGrid";
    \n+
    133 cellName = "Cells";
    \n+
    134 break;
    \n+
    135 default :
    \n+
    136 DUNE_THROW(IOError, "VTUWriter: Unknown fileType: " << fileType_);
    \n+
    137 }
    \n+
    138 const std::string& byteOrder = getEndiannessString();
    \n+
    139
    \n+
    140 stream << indent << "<?xml version=\\"1.0\\"?>\\n";
    \n+
    141 stream << indent << "<VTKFile"
    \n+
    142 << " type=\\"" << fileType << "\\""
    \n+
    143 << " version=\\"0.1\\""
    \n+
    144 << " byte_order=\\"" << byteOrder << "\\">\\n";
    \n+
    145 ++indent;
    \n+
    146 }
    \n+
    147
    \n+
    149 inline ~VTUWriter() {
    \n+
    150 --indent;
    \n+
    151 stream << indent << "</VTKFile>\\n"
    \n+
    152 << std::flush;
    \n+
    153 }
    \n+
    154
    \n+
    156
    \n+
    167 inline void beginPointData(const std::string& scalars = "",
    \n+
    168 const std::string& vectors = "") {
    \n+
    169 switch(phase) {
    \n+
    170 case main :
    \n+
    171 stream << indent << "<PointData";
    \n+
    172 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n+
    173 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n+
    174 stream << ">\\n";
    \n+
    175 ++indent;
    \n+
    176 break;
    \n+
    177 case appended :
    \n+
    178 break;
    \n+
    179 }
    \n+
    180 }
    \n+
    182 inline void endPointData() {
    \n+
    183 switch(phase) {
    \n+
    184 case main :
    \n+
    185 --indent;
    \n+
    186 stream << indent << "</PointData>\\n";
    \n+
    187 break;
    \n+
    188 case appended :
    \n+
    189 break;
    \n+
    190 }
    \n+
    191 }
    \n+
    192
    \n+
    194
    \n+
    205 inline void beginCellData(const std::string& scalars = "",
    \n+
    206 const std::string& vectors = "") {
    \n+
    207 switch(phase) {
    \n+
    208 case main :
    \n+
    209 stream << indent << "<CellData";
    \n+
    210 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n+
    211 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n+
    212 stream << ">\\n";
    \n+
    213 ++indent;
    \n+
    214 break;
    \n+
    215 case appended :
    \n+
    216 break;
    \n+
    217 }
    \n+
    218 }
    \n+
    220 inline void endCellData() {
    \n+
    221 switch(phase) {
    \n+
    222 case main :
    \n+
    223 --indent;
    \n+
    224 stream << indent << "</CellData>\\n";
    \n+
    225 break;
    \n+
    226 case appended :
    \n+
    227 break;
    \n+
    228 }
    \n+
    229 }
    \n+
    230
    \n+
    232
    \n+
    238 inline void beginPoints() {
    \n+
    239 switch(phase) {
    \n+
    240 case main :
    \n+
    241 stream << indent << "<Points>\\n";
    \n+
    242 ++indent;
    \n+
    243 break;
    \n+
    244 case appended :
    \n+
    245 break;
    \n+
    246 }
    \n+
    247 }
    \n+
    249 inline void endPoints() {
    \n+
    250 switch(phase) {
    \n+
    251 case main :
    \n+
    252 --indent;
    \n+
    253 stream << indent << "</Points>\\n";
    \n+
    254 break;
    \n+
    255 case appended :
    \n+
    256 break;
    \n+
    257 }
    \n+
    258 }
    \n+
    259
    \n+
    261
    \n+
    274 inline void beginCells() {
    \n+
    275 switch(phase) {
    \n+
    276 case main :
    \n+
    277 stream << indent << "<" << cellName << ">\\n";
    \n+
    278 ++indent;
    \n+
    279 break;
    \n+
    280 case appended :
    \n+
    281 break;
    \n+
    282 }
    \n+
    283 }
    \n+
    285 inline void endCells() {
    \n+
    286 switch(phase) {
    \n+
    287 case main :
    \n+
    288 --indent;
    \n+
    289 stream << indent << "</" << cellName << ">\\n";
    \n+
    290 break;
    \n+
    291 case appended :
    \n+
    292 break;
    \n+
    293 }
    \n+
    294 }
    \n+
    295
    \n+
    297
    \n+
    310 inline void beginMain(unsigned ncells, unsigned npoints) {
    \n+
    311 stream << indent << "<" << fileType << ">\\n";
    \n+
    312 ++indent;
    \n+
    313 stream << indent << "<Piece"
    \n+
    314 << " NumberOf" << cellName << "=\\"" << ncells << "\\""
    \n+
    315 << " NumberOfPoints=\\"" << npoints << "\\">\\n";
    \n+
    316 ++indent;
    \n+
    317 phase = main;
    \n+
    318 }
    \n+
    320 inline void endMain() {
    \n+
    321 --indent;
    \n+
    322 stream << indent << "</Piece>\\n";
    \n+
    323 --indent;
    \n+
    324 stream << indent << "</" << fileType << ">\\n";
    \n+
    325 }
    \n+
    326
    \n+
    328
    \n+
    345 inline bool beginAppended() {
    \n+
    346 doAppended = factory.beginAppended();
    \n+
    347 if(doAppended) {
    \n+
    348 const std::string& encoding = factory.appendedEncoding();
    \n+
    349 stream << indent << "<AppendedData"
    \n+
    350 << " encoding=\\"" << encoding << "\\">\\n";
    \n+
    351 ++indent;
    \n+
    352 // mark begin of data
    \n+
    353 stream << indent << "_";
    \n+
    354 }
    \n+
    355 phase = appended;
    \n+
    356 return doAppended;
    \n+
    357 }
    \n+
    359 inline void endAppended() {
    \n+
    360 if(doAppended) {
    \n+
    361 stream << "\\n";
    \n+
    362 --indent;
    \n+
    363 stream << indent << "</AppendedData>\\n";
    \n+
    364 }
    \n+
    365 }
    \n+
    366
    \n+
    368
    \n+
    380 DataArrayWriter* makeArrayWriter(const std::string& name,
    \n+
    381 unsigned ncomps, unsigned nitems,
    \n+
    382 Precision prec) {
    \n+
    383 return factory.make(name, ncomps, nitems, indent, prec);
    \n+
    384 }
    \n+
    385 };
    \n+
    386
    \n+
    387 } // namespace VTK
    \n+
    388
    \n+
    390
    \n+
    391} // namespace Dune
    \n+
    392
    \n+
    393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH
    \n+
    Data array writers for the VTKWriter.
    \n+
    Common stuff for the VTKWriter.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: basicwriter.hh:35
    \n-
    void addCellData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:76
    \n-
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n-\n-
    Take a vector and interpret it as cell data for the VTKWriter.
    Definition: function.hh:97
    \n-
    Take a vector and interpret it as point data for the VTKWriter.
    Definition: function.hh:205
    \n-
    Base class for function writers.
    Definition: functionwriter.hh:90
    \n-
    Definition: volumeiterators.hh:23
    \n-
    Definition: volumewriter.hh:26
    \n-
    std::shared_ptr< VTKFunction > VTKFunctionPtr
    Definition: volumewriter.hh:34
    \n-
    void addCellData(const VTKFunctionPtr &p)
    Definition: volumewriter.hh:42
    \n-
    void addVertexData(const VTKFunctionPtr &p)
    Definition: volumewriter.hh:56
    \n-
    void addCellData(VTKFunction *p)
    Definition: volumewriter.hh:47
    \n-
    void addVertexData(const V &v, const std::string &name, int ncomps=1)
    Definition: volumewriter.hh:66
    \n-
    void addVertexData(VTKFunction *p)
    Definition: volumewriter.hh:61
    \n-
    void addCellData(const V &v, const std::string &name, int ncomps=1)
    Definition: volumewriter.hh:52
    \n-
    ConformingVolumeWriter(const GV &gv_)
    Definition: volumewriter.hh:36
    \n-
    Dune::VTKFunction< GV > VTKFunction
    Definition: volumewriter.hh:33
    \n-
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n+
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n+
    OutputType
    How the bulk data should be stored in the file.
    Definition: common.hh:43
    \n+
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n+
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n+
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n+
    std::string getEndiannessString()
    determine endianness of this C++ implementation
    Definition: common.hh:232
    \n+
    base class for data array writers
    Definition: dataarraywriter.hh:56
    \n+
    a factory for DataArrayWriters
    Definition: dataarraywriter.hh:462
    \n+
    bool beginAppended()
    signal start of the appended section
    Definition: dataarraywriter.hh:497
    \n+
    DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned nitems, const Indent &indent, Precision prec)
    create a DataArrayWriter
    Definition: dataarraywriter.hh:541
    \n+
    const std::string & appendedEncoding() const
    query encoding string for appended data
    Definition: dataarraywriter.hh:510
    \n+
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n+
    DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
    acquire a DataArrayWriter
    Definition: vtuwriter.hh:380
    \n+
    bool beginAppended()
    start the appended data section
    Definition: vtuwriter.hh:345
    \n+
    void endAppended()
    finish the appended data section
    Definition: vtuwriter.hh:359
    \n+
    VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_)
    create a VTUWriter object
    Definition: vtuwriter.hh:122
    \n+
    std::ostream & stream
    Definition: vtuwriter.hh:100
    \n+
    void endCellData()
    finish CellData section
    Definition: vtuwriter.hh:220
    \n+
    void beginMain(unsigned ncells, unsigned npoints)
    start the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:310
    \n+
    void beginCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:274
    \n+
    void endPointData()
    finish PointData section
    Definition: vtuwriter.hh:182
    \n+
    Phase
    Definition: vtuwriter.hh:101
    \n+
    @ appended
    Definition: vtuwriter.hh:101
    \n+
    @ main
    Definition: vtuwriter.hh:101
    \n+
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: vtuwriter.hh:205
    \n+
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: vtuwriter.hh:167
    \n+
    void endPoints()
    finish section for the point coordinates
    Definition: vtuwriter.hh:249
    \n+
    ~VTUWriter()
    write footer
    Definition: vtuwriter.hh:149
    \n+
    void endCells()
    start section for the grid cells/PolyData lines
    Definition: vtuwriter.hh:285
    \n+
    void beginPoints()
    start section for the point coordinates
    Definition: vtuwriter.hh:238
    \n+
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: vtuwriter.hh:320
    \n+
    enum Dune::VTK::VTUWriter::Phase phase
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,148 +7,363 @@\n \n \n * dune\n * grid\n * io\n * file\n * vtk\n-volumewriter.hh\n+vtuwriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH\n 8\n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15\n- 16namespace Dune {\n+ 9#include \n+ 10#include \n+ 11\n+ 12#include \n+ 13#include \n+ 14\n+ 15#include \n+ 16#include \n+ 17\n+ 18namespace Dune {\n 19\n- 20 namespace VTK {\n- 21\n- 22 template\n-23 class ConformingVolumeWriter\n- 24 : public ConformingVolumeIteratorFactory,\n- 25 public BasicWriter >\n- 26 {\n- 27 typedef ConformingVolumeIteratorFactory Factory;\n- 28 typedef BasicWriter Base;\n- 29\n- 30 const GV& gv;\n- 31\n- 32 public:\n-33 typedef Dune::VTKFunction<_GV_> VTKFunction;\n-34 typedef std::shared_ptr VTKFunctionPtr;\n- 35\n-36 ConformingVolumeWriter(const GV& gv_)\n- 37 : Factory(gv_), Base(static_cast(*this)), gv(gv_)\n- 38 { }\n- 39\n- 40 using Base::addPointData;\n- 41\n-42 void addCellData(const VTKFunctionPtr& p) {\n- 43 Base::addCellData(std::shared_ptr\n- 44 (new VTKFunctionWriter(p)));\n- 45 }\n- 46\n-47 void addCellData(VTKFunction* p) {\n- 48 addCellData(VTKFunctionPtr(p));\n- 49 }\n- 50\n- 51 template\n-52 void addCellData(const V &v, const std::string &name, int ncomps=1) {\n- 53 addCellData(new P0VTKFunction(gv, v, name, ncomps));\n- 54 }\n- 55\n-56 void addVertexData(const VTKFunctionPtr& p) {\n- 57 addPointData(std::shared_ptr\n- 58 (new VTKFunctionWriter(p)));\n- 59 }\n- 60\n-61 void addVertexData(VTKFunction* p) {\n- 62 addVertexData(VTKFunctionPtr(p));\n- 63 }\n- 64\n- 65 template\n-66 void addVertexData(const V &v, const std::string &name, int ncomps=1) {\n- 67 addVertexData(new P1VTKFunction(gv, v, name, ncomps));\n- 68 }\n- 69\n- 70 };\n- 71\n- 72 } // namespace VTK\n- 73\n- 75\n- 76} // namespace Dune\n- 77\n- 78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH\n-basicwriter.hh\n-volumeiterators.hh\n-functionwriter.hh\n-function.hh\n-Functions for VTK output.\n+ 22\n+ 23 namespace VTK {\n+ 24\n+ 26\n+98 class VTUWriter {\n+ 99 public:\n+100 std::ostream& stream;\n+101 enum Phase { main, appended } phase;\n+ 102\n+ 103 private:\n+ 104 DataArrayWriterFactory factory;\n+ 105 Indent indent;\n+ 106\n+ 107 std::string fileType;\n+ 108 std::string cellName;\n+ 109\n+ 110 bool doAppended;\n+ 111\n+ 112 public:\n+ 114\n+122 inline VTUWriter(std::ostream& stream_, OutputType outputType,\n+ 123 FileType fileType_)\n+ 124 : stream(stream_), factory(outputType, stream)\n+ 125 {\n+ 126 switch(fileType_) {\n+ 127 case polyData :\n+ 128 fileType = \"PolyData\";\n+ 129 cellName = \"Lines\";\n+ 130 break;\n+ 131 case unstructuredGrid :\n+ 132 fileType = \"UnstructuredGrid\";\n+ 133 cellName = \"Cells\";\n+ 134 break;\n+ 135 default :\n+ 136 DUNE_THROW(IOError, \"VTUWriter: Unknown fileType: \" << fileType_);\n+ 137 }\n+ 138 const std::string& byteOrder = getEndiannessString();\n+ 139\n+ 140 stream << indent << \"\\n\";\n+ 141 stream << indent << \"\\n\";\n+ 145 ++indent;\n+ 146 }\n+ 147\n+149 inline ~VTUWriter() {\n+ 150 --indent;\n+ 151 stream << indent << \"\\n\"\n+ 152 << std::flush;\n+ 153 }\n+ 154\n+ 156\n+167 inline void beginPointData(const std::string& scalars = \"\",\n+ 168 const std::string& vectors = \"\") {\n+ 169 switch(phase) {\n+ 170 case main :\n+ 171 stream << indent << \"\\n\";\n+ 175 ++indent;\n+ 176 break;\n+ 177 case appended :\n+ 178 break;\n+ 179 }\n+ 180 }\n+182 inline void endPointData() {\n+ 183 switch(phase) {\n+ 184 case main :\n+ 185 --indent;\n+ 186 stream << indent << \"\\n\";\n+ 187 break;\n+ 188 case appended :\n+ 189 break;\n+ 190 }\n+ 191 }\n+ 192\n+ 194\n+205 inline void beginCellData(const std::string& scalars = \"\",\n+ 206 const std::string& vectors = \"\") {\n+ 207 switch(phase) {\n+ 208 case main :\n+ 209 stream << indent << \"\\n\";\n+ 213 ++indent;\n+ 214 break;\n+ 215 case appended :\n+ 216 break;\n+ 217 }\n+ 218 }\n+220 inline void endCellData() {\n+ 221 switch(phase) {\n+ 222 case main :\n+ 223 --indent;\n+ 224 stream << indent << \"\\n\";\n+ 225 break;\n+ 226 case appended :\n+ 227 break;\n+ 228 }\n+ 229 }\n+ 230\n+ 232\n+238 inline void beginPoints() {\n+ 239 switch(phase) {\n+ 240 case main :\n+ 241 stream << indent << \"\\n\";\n+ 242 ++indent;\n+ 243 break;\n+ 244 case appended :\n+ 245 break;\n+ 246 }\n+ 247 }\n+249 inline void endPoints() {\n+ 250 switch(phase) {\n+ 251 case main :\n+ 252 --indent;\n+ 253 stream << indent << \"\\n\";\n+ 254 break;\n+ 255 case appended :\n+ 256 break;\n+ 257 }\n+ 258 }\n+ 259\n+ 261\n+274 inline void beginCells() {\n+ 275 switch(phase) {\n+ 276 case main :\n+ 277 stream << indent << \"<\" << cellName << \">\\n\";\n+ 278 ++indent;\n+ 279 break;\n+ 280 case appended :\n+ 281 break;\n+ 282 }\n+ 283 }\n+285 inline void endCells() {\n+ 286 switch(phase) {\n+ 287 case main :\n+ 288 --indent;\n+ 289 stream << indent << \"\\n\";\n+ 290 break;\n+ 291 case appended :\n+ 292 break;\n+ 293 }\n+ 294 }\n+ 295\n+ 297\n+310 inline void beginMain(unsigned ncells, unsigned npoints) {\n+ 311 stream << indent << \"<\" << fileType << \">\\n\";\n+ 312 ++indent;\n+ 313 stream << indent << \"\\n\";\n+ 316 ++indent;\n+ 317 phase = main;\n+ 318 }\n+320 inline void endMain() {\n+ 321 --indent;\n+ 322 stream << indent << \"\\n\";\n+ 323 --indent;\n+ 324 stream << indent << \"\\n\";\n+ 325 }\n+ 326\n+ 328\n+345 inline bool beginAppended() {\n+ 346 doAppended = factory.beginAppended();\n+ 347 if(doAppended) {\n+ 348 const std::string& encoding = factory.appendedEncoding();\n+ 349 stream << indent << \"\\n\";\n+ 351 ++indent;\n+ 352 // mark begin of data\n+ 353 stream << indent << \"_\";\n+ 354 }\n+ 355 phase = appended;\n+ 356 return doAppended;\n+ 357 }\n+359 inline void endAppended() {\n+ 360 if(doAppended) {\n+ 361 stream << \"\\n\";\n+ 362 --indent;\n+ 363 stream << indent << \"\\n\";\n+ 364 }\n+ 365 }\n+ 366\n+ 368\n+380 DataArrayWriter* makeArrayWriter(const std::string& name,\n+ 381 unsigned ncomps, unsigned nitems,\n+ 382 Precision prec) {\n+ 383 return factory.make(name, ncomps, nitems, indent, prec);\n+ 384 }\n+ 385 };\n+ 386\n+ 387 } // namespace VTK\n+ 388\n+ 390\n+ 391} // namespace Dune\n+ 392\n+ 393#endif // DUNE_GRID_IO_FILE_VTK_VTUWRITER_HH\n+dataarraywriter.hh\n+Data array writers for the VTKWriter.\n+common.hh\n+Common stuff for the VTKWriter.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::BasicWriter\n-Definition: basicwriter.hh:35\n-Dune::VTK::BasicWriter::addCellData\n-void addCellData(const std::shared_ptr< FunctionWriter > &writer)\n-Definition: basicwriter.hh:76\n-Dune::VTK::BasicWriter::addPointData\n-void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n-Definition: basicwriter.hh:80\n-Dune::VTKFunction<_GV_>\n-Dune::P0VTKFunction\n-Take a vector and interpret it as cell data for the VTKWriter.\n-Definition: function.hh:97\n-Dune::P1VTKFunction\n-Take a vector and interpret it as point data for the VTKWriter.\n-Definition: function.hh:205\n-Dune::VTK::VTKFunctionWriter\n-Base class for function writers.\n-Definition: functionwriter.hh:90\n-Dune::VTK::ConformingVolumeIteratorFactory\n-Definition: volumeiterators.hh:23\n-Dune::VTK::ConformingVolumeWriter\n-Definition: volumewriter.hh:26\n-Dune::VTK::ConformingVolumeWriter::VTKFunctionPtr\n-std::shared_ptr< VTKFunction > VTKFunctionPtr\n-Definition: volumewriter.hh:34\n-Dune::VTK::ConformingVolumeWriter::addCellData\n-void addCellData(const VTKFunctionPtr &p)\n-Definition: volumewriter.hh:42\n-Dune::VTK::ConformingVolumeWriter::addVertexData\n-void addVertexData(const VTKFunctionPtr &p)\n-Definition: volumewriter.hh:56\n-Dune::VTK::ConformingVolumeWriter::addCellData\n-void addCellData(VTKFunction *p)\n-Definition: volumewriter.hh:47\n-Dune::VTK::ConformingVolumeWriter::addVertexData\n-void addVertexData(const V &v, const std::string &name, int ncomps=1)\n-Definition: volumewriter.hh:66\n-Dune::VTK::ConformingVolumeWriter::addVertexData\n-void addVertexData(VTKFunction *p)\n-Definition: volumewriter.hh:61\n-Dune::VTK::ConformingVolumeWriter::addCellData\n-void addCellData(const V &v, const std::string &name, int ncomps=1)\n-Definition: volumewriter.hh:52\n-Dune::VTK::ConformingVolumeWriter::ConformingVolumeWriter\n-ConformingVolumeWriter(const GV &gv_)\n-Definition: volumewriter.hh:36\n-Dune::VTK::ConformingVolumeWriter::VTKFunction\n-Dune::VTKFunction< GV > VTKFunction\n-Definition: volumewriter.hh:33\n-Dune::VTK::ConformingVolumeWriter::addPointData\n-void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n-Definition: basicwriter.hh:80\n+Dune::VTK::Precision\n+Precision\n+which precision to use when writing out data to vtk files\n+Definition: common.hh:271\n+Dune::VTK::OutputType\n+OutputType\n+How the bulk data should be stored in the file.\n+Definition: common.hh:43\n+Dune::VTK::FileType\n+FileType\n+which type of VTK file to write\n+Definition: common.hh:252\n+Dune::VTK::polyData\n+@ polyData\n+for .vtp files (PolyData)\n+Definition: common.hh:254\n+Dune::VTK::unstructuredGrid\n+@ unstructuredGrid\n+for .vtu files (UnstructuredGrid)\n+Definition: common.hh:256\n+Dune::VTK::getEndiannessString\n+std::string getEndiannessString()\n+determine endianness of this C++ implementation\n+Definition: common.hh:232\n+Dune::VTK::DataArrayWriter\n+base class for data array writers\n+Definition: dataarraywriter.hh:56\n+Dune::VTK::DataArrayWriterFactory\n+a factory for DataArrayWriters\n+Definition: dataarraywriter.hh:462\n+Dune::VTK::DataArrayWriterFactory::beginAppended\n+bool beginAppended()\n+signal start of the appended section\n+Definition: dataarraywriter.hh:497\n+Dune::VTK::DataArrayWriterFactory::make\n+DataArrayWriter * make(const std::string &name, unsigned ncomps, unsigned\n+nitems, const Indent &indent, Precision prec)\n+create a DataArrayWriter\n+Definition: dataarraywriter.hh:541\n+Dune::VTK::DataArrayWriterFactory::appendedEncoding\n+const std::string & appendedEncoding() const\n+query encoding string for appended data\n+Definition: dataarraywriter.hh:510\n+Dune::VTK::VTUWriter\n+Dump a .vtu/.vtp files contents to a stream.\n+Definition: vtuwriter.hh:98\n+Dune::VTK::VTUWriter::makeArrayWriter\n+DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps,\n+unsigned nitems, Precision prec)\n+acquire a DataArrayWriter\n+Definition: vtuwriter.hh:380\n+Dune::VTK::VTUWriter::beginAppended\n+bool beginAppended()\n+start the appended data section\n+Definition: vtuwriter.hh:345\n+Dune::VTK::VTUWriter::endAppended\n+void endAppended()\n+finish the appended data section\n+Definition: vtuwriter.hh:359\n+Dune::VTK::VTUWriter::VTUWriter\n+VTUWriter(std::ostream &stream_, OutputType outputType, FileType fileType_)\n+create a VTUWriter object\n+Definition: vtuwriter.hh:122\n+Dune::VTK::VTUWriter::stream\n+std::ostream & stream\n+Definition: vtuwriter.hh:100\n+Dune::VTK::VTUWriter::endCellData\n+void endCellData()\n+finish CellData section\n+Definition: vtuwriter.hh:220\n+Dune::VTK::VTUWriter::beginMain\n+void beginMain(unsigned ncells, unsigned npoints)\n+start the main PolyData/UnstructuredGrid section\n+Definition: vtuwriter.hh:310\n+Dune::VTK::VTUWriter::beginCells\n+void beginCells()\n+start section for the grid cells/PolyData lines\n+Definition: vtuwriter.hh:274\n+Dune::VTK::VTUWriter::endPointData\n+void endPointData()\n+finish PointData section\n+Definition: vtuwriter.hh:182\n+Dune::VTK::VTUWriter::Phase\n+Phase\n+Definition: vtuwriter.hh:101\n+Dune::VTK::VTUWriter::appended\n+@ appended\n+Definition: vtuwriter.hh:101\n+Dune::VTK::VTUWriter::main\n+@ main\n+Definition: vtuwriter.hh:101\n+Dune::VTK::VTUWriter::beginCellData\n+void beginCellData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start CellData section\n+Definition: vtuwriter.hh:205\n+Dune::VTK::VTUWriter::beginPointData\n+void beginPointData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start PointData section\n+Definition: vtuwriter.hh:167\n+Dune::VTK::VTUWriter::endPoints\n+void endPoints()\n+finish section for the point coordinates\n+Definition: vtuwriter.hh:249\n+Dune::VTK::VTUWriter::~VTUWriter\n+~VTUWriter()\n+write footer\n+Definition: vtuwriter.hh:149\n+Dune::VTK::VTUWriter::endCells\n+void endCells()\n+start section for the grid cells/PolyData lines\n+Definition: vtuwriter.hh:285\n+Dune::VTK::VTUWriter::beginPoints\n+void beginPoints()\n+start section for the point coordinates\n+Definition: vtuwriter.hh:238\n+Dune::VTK::VTUWriter::endMain\n+void endMain()\n+finish the main PolyData/UnstructuredGrid section\n+Definition: vtuwriter.hh:320\n+Dune::VTK::VTUWriter::phase\n+enum Dune::VTK::VTUWriter::Phase phase\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00821.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00821.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfidentitygrid.hh File Reference\n+dune-grid: vtkwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -58,44 +58,95 @@\n \n \n \n \n \n
    \n \n-
    dgfidentitygrid.hh File Reference
    \n+
    vtkwriter.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/typetraits.hh>
    \n-#include <dune/grid/identitygrid.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfparser.hh>
    \n-#include <dune/grid/utility/hostgridaccess.hh>
    \n+\n+

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

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

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n+\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    Provides file i/o for the visualization toolkit.

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

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    struct  Dune::dgf::UGGridParameterBlock
     
    struct  Dune::DGFGridInfo< UGGrid< dim > >
     
    struct  Dune::DGFGridFactory< UGGrid< dim > >
    class  Dune::VTKSequenceWriter< GridView >
     Writer for the ouput of grid functions in the vtk format. More...
     
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,38 +6,26 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n+ * vtk\n Classes | Namespaces\n-dgfug.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \"dgfparser.hh\"\n-#include \"blocks/gridparameter.hh\"\n+vtksequencewriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::dgf::UGGridParameterBlock\n-\u00a0\n-struct \u00a0Dune::DGFGridInfo<_UGGrid<_dim_>_>\n-\u00a0\n-struct \u00a0Dune::DGFGridFactory<_UGGrid<_dim_>_>\n+class \u00a0Dune::VTKSequenceWriter<_GridView_>\n+\u00a0 Writer for the ouput of grid functions in the vtk format. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::dgf\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00824_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfug.hh Source File\n+dune-grid: vtksequencewriter.hh Source File\n \n \n \n \n \n \n \n@@ -58,285 +58,94 @@\n \n
    \n \n \n \n
    \n-
    dgfug.hh
    \n+
    vtksequencewriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
    \n-
    6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
    \n-
    7
    \n-
    8//- C++ includes
    \n-
    9#include <fstream>
    \n-
    10#include <istream>
    \n-
    11#include <string>
    \n-
    12#include <vector>
    \n-
    13
    \n-
    14//- dune-common includes
    \n-
    15#include <dune/common/exceptions.hh>
    \n-
    16#include <dune/common/fvector.hh>
    \n-
    17#include <dune/common/parallel/mpihelper.hh>
    \n-
    18
    \n-
    19//- dune-grid includes
    \n-\n-
    21#include <dune/grid/uggrid.hh>
    \n-
    22
    \n-
    23//- local includes
    \n-
    24#include "dgfparser.hh"
    \n-\n-
    26
    \n-
    27
    \n-
    28namespace Dune
    \n-
    29{
    \n-
    30
    \n-
    31 namespace dgf
    \n-
    32 {
    \n-
    33
    \n-
    34 // UGGridParameterBlock
    \n-
    35 // --------------------
    \n-
    36
    \n-\n-
    38 : public GridParameterBlock
    \n-
    39 {
    \n-
    41 explicit UGGridParameterBlock ( std::istream &input );
    \n-
    42
    \n-
    44 bool noClosure () const { return noClosure_; }
    \n-
    46 bool noCopy () const { return noCopy_; }
    \n-
    48 size_t heapSize () const { return heapSize_; }
    \n-
    49
    \n-
    50 protected:
    \n-
    51 bool noClosure_; // no closure for UGGrid
    \n-
    52 bool noCopy_; // no copies for UGGrid
    \n-
    53 size_t heapSize_; // heap size for UGGrid
    \n-
    54 };
    \n-
    55
    \n-
    56 } // namespace dgf
    \n-
    57
    \n-
    58
    \n-
    59
    \n-
    60#if HAVE_DUNE_UGGRID
    \n-
    61 template< int dim >
    \n-
    62 struct DGFGridInfo< UGGrid< dim > >
    \n-
    63 {
    \n-
    64 static int refineStepsForHalf ()
    \n-
    65 {
    \n-
    66 return 1;
    \n-
    67 }
    \n-
    68
    \n-
    69 static double refineWeight ()
    \n-
    70 {
    \n-
    71 return -1.;
    \n-
    72 }
    \n-
    73 };
    \n-
    74
    \n-
    75
    \n-
    76
    \n-
    77 // DGFGridFactory< UGGrid< dim > >
    \n-
    78 // -------------------------------
    \n-
    79
    \n-
    80 template< int dim >
    \n-
    81 struct DGFGridFactory< UGGrid< dim > >
    \n-
    82 {
    \n-\n-
    86 static const int dimension = dim;
    \n-
    88 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n-
    89
    \n-
    91 explicit DGFGridFactory ( std::istream &input,
    \n-
    92 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    93 : grid_( 0 ),
    \n-
    94 factory_(),
    \n-
    95 dgf_( rank( comm ), size( comm ) )
    \n-
    96 {
    \n-
    97 generate( input );
    \n-
    98 }
    \n+
    5
    \n+
    6#ifndef DUNE_VTKSEQUENCE_HH
    \n+
    7#define DUNE_VTKSEQUENCE_HH
    \n+
    8
    \n+
    9#include <memory>
    \n+
    10
    \n+\n+
    12
    \n+\n+\n+
    15
    \n+
    16namespace Dune {
    \n+
    17
    \n+
    26 template< class GridView >
    \n+\n+
    28 public VTKSequenceWriterBase<GridView>
    \n+
    29 {
    \n+
    30 public:
    \n+\n+
    43 const std::string& name )
    \n+\n+
    45 name,
    \n+
    46 "",
    \n+
    47 "",
    \n+
    48 vtkWriter->gridView_.comm().rank(),
    \n+
    49 vtkWriter->gridView_.comm().size())
    \n+
    50 {}
    \n+
    51
    \n+\n+
    70 const std::string& name,
    \n+
    71 const std::string& path,
    \n+
    72 const std::string& extendpath )
    \n+\n+
    74 name,
    \n+
    75 path,
    \n+
    76 extendpath,
    \n+
    77 vtkWriter->gridView_.comm().rank(),
    \n+
    78 vtkWriter->gridView_.comm().size())
    \n+
    79 {}
    \n+
    80
    \n+
    87 explicit VTKSequenceWriter ( const GridView &gridView,
    \n+
    88 const std::string& name,
    \n+
    89 const std::string& path,
    \n+
    90 const std::string& extendpath,
    \n+\n+
    92 : VTKSequenceWriterBase<GridView>(std::make_shared<VTKWriter<GridView> >(gridView,dm),
    \n+
    93 name,path,extendpath,
    \n+
    94 gridView.comm().rank(), gridView.comm().size())
    \n+
    95 {}
    \n+
    96 };
    \n+
    97
    \n+
    98} // end namespace Dune
    \n
    99
    \n-
    101 explicit DGFGridFactory ( const std::string &filename,
    \n-
    102 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    103 : grid_( 0 ),
    \n-
    104 factory_(),
    \n-
    105 dgf_( rank( comm ), size( comm ) )
    \n-
    106 {
    \n-
    107 std::ifstream input( filename.c_str() );
    \n-
    108 if ( !input )
    \n-
    109 DUNE_THROW( DGFException, "Error: Macrofile " << filename << " not found" );
    \n-
    110 generate( input );
    \n-
    111 }
    \n-
    112
    \n-\n-
    115 {
    \n-
    116 return grid_;
    \n-
    117 }
    \n-
    118
    \n-
    120 template< class GG, class II >
    \n-
    121 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
    \n-
    122 {
    \n-
    123 return factory_.wasInserted( intersection );
    \n-
    124 }
    \n-
    125
    \n-
    127 template< class GG, class II >
    \n-
    128 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
    \n-
    129 {
    \n-
    130 return intersection.boundarySegmentIndex();
    \n-
    131 }
    \n-
    132
    \n-
    134 template< int codim >
    \n-
    135 int numParameters () const
    \n-
    136 {
    \n-
    137 if( codim == 0 )
    \n-
    138 return dgf_.nofelparams;
    \n-
    139 else if( codim == dimension )
    \n-
    140 return dgf_.nofvtxparams;
    \n-
    141 else
    \n-
    142 return 0;
    \n-
    143 }
    \n-
    144
    \n-
    146 template< class Entity >
    \n-
    147 int numParameters ( const Entity & ) const
    \n-
    148 {
    \n-
    149 return numParameters< Entity::codimension >();
    \n-
    150 }
    \n-
    151
    \n-
    153 std::vector< double > &parameter ( const typename Grid::template Codim< 0 >::Entity &element )
    \n-
    154 {
    \n-
    155 if( numParameters< 0 >() <= 0 )
    \n-
    156 {
    \n-
    157 DUNE_THROW( InvalidStateException,
    \n-
    158 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
    \n-
    159 }
    \n-
    160 return dgf_.elParams[ factory_.insertionIndex( element ) ];
    \n-
    161 }
    \n-
    162
    \n-
    164 std::vector< double > &parameter ( const typename Grid::template Codim< dimension >::Entity &vertex )
    \n-
    165 {
    \n-
    166 if( numParameters< dimension >() <= 0 )
    \n-
    167 {
    \n-
    168 DUNE_THROW( InvalidStateException,
    \n-
    169 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
    \n-
    170 }
    \n-
    171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];
    \n-
    172 }
    \n-
    173
    \n-\n-
    176 {
    \n-
    177 return dgf_.haveBndParameters;
    \n-
    178 }
    \n-
    179
    \n-
    181 template< class GG, class II >
    \n-\n-
    183 {
    \n-\n-
    185 typename Intersection::Entity entity = intersection.inside();
    \n-
    186 const int face = intersection.indexInInside();
    \n-
    187
    \n-
    188 auto refElem = referenceElement< double, dimension >( entity.type() );
    \n-
    189 int corners = refElem.size( face, 1, dimension );
    \n-
    190 std::vector< unsigned int > bound( corners );
    \n-
    191 for( int i = 0; i < corners; ++i )
    \n-
    192 {
    \n-
    193 const int k = refElem.subEntity( face, 1, i, dimension );
    \n-
    194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension >( k ) );
    \n-
    195 }
    \n-
    196
    \n-
    197 DuneGridFormatParser::facemap_t::key_type key( bound, false );
    \n-
    198 const DuneGridFormatParser::facemap_t::const_iterator pos = dgf_.facemap.find( key );
    \n-
    199 if( pos != dgf_.facemap.end() )
    \n-
    200 return dgf_.facemap.find( key )->second.second;
    \n-
    201 else
    \n-\n-
    203 }
    \n-
    204
    \n-
    205 private:
    \n-
    206 // create grid
    \n-
    207 void generate ( std::istream &input );
    \n-
    208
    \n-
    209 // return rank
    \n-
    210 static int rank( MPICommunicatorType MPICOMM )
    \n-
    211 {
    \n-
    212 int rank = 0;
    \n-
    213#if HAVE_MPI
    \n-
    214 MPI_Comm_rank( MPICOMM, &rank );
    \n-
    215#endif
    \n-
    216 return rank;
    \n-
    217 }
    \n-
    218
    \n-
    219 // return size
    \n-
    220 static int size( MPICommunicatorType MPICOMM )
    \n-
    221 {
    \n-
    222 int size = 1;
    \n-
    223#if HAVE_MPI
    \n-
    224 MPI_Comm_size( MPICOMM, &size );
    \n-
    225#endif
    \n-
    226 return size;
    \n-
    227 }
    \n-
    228
    \n-
    229 Grid *grid_;
    \n-
    230 GridFactory< UGGrid< dim > > factory_;
    \n-
    231 DuneGridFormatParser dgf_;
    \n-
    232 };
    \n-
    233#endif // #if HAVE_DUNE_UGGRID
    \n-
    234
    \n-
    235} // namespace Dune
    \n-
    236
    \n-
    237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
    \n-\n-
    The UGGrid class.
    \n+
    100#endif
    \n+
    Provides subsampled file i/o for the visualization toolkit.
    \n+\n+
    Provides file i/o for the visualization toolkit.
    \n+
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    @ vertex
    Definition: common.hh:133
    \n-
    Definition: dgfgridfactory.hh:38
    \n-
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfgridfactory.hh:41
    \n-
    G Grid
    Definition: dgfgridfactory.hh:39
    \n-
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n-
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n-
    int indexInInside() const
    Local index of codim 1 entity in the inside() entity where intersection is contained in.
    Definition: common/intersection.hh:346
    \n-
    size_t boundarySegmentIndex() const
    index of the boundary segment within the macro grid
    Definition: common/intersection.hh:236
    \n-
    Entity inside() const
    return Entity on the inside of this intersection. That is the Entity where we started this.
    Definition: common/intersection.hh:250
    \n-
    GridImp::template Codim< 0 >::Entity Entity
    Type of entity that this Intersection belongs to.
    Definition: common/intersection.hh:192
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    Common Grid parameters.
    Definition: gridparameter.hh:35
    \n-
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n-
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n-
    Definition: dgfug.hh:39
    \n-
    size_t heapSize() const
    returns heap size used on construction of the grid
    Definition: dgfug.hh:48
    \n-
    bool noCopy_
    Definition: dgfug.hh:52
    \n-
    UGGridParameterBlock(std::istream &input)
    constructor taking istream
    Definition: dgfug.cc:20
    \n-
    size_t heapSize_
    Definition: dgfug.hh:53
    \n-
    bool noClosure_
    Definition: dgfug.hh:51
    \n-
    bool noCopy() const
    returns true if no copies are made for UGGrid elements
    Definition: dgfug.hh:46
    \n-
    bool noClosure() const
    returns true if no closure should be used for UGGrid
    Definition: dgfug.hh:44
    \n-
    static double refineWeight()
    Definition: dgfug.hh:69
    \n-
    static int refineStepsForHalf()
    Definition: dgfug.hh:64
    \n-
    const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
    return invalid value
    Definition: dgfug.hh:182
    \n-
    std::vector< double > & parameter(const typename Grid::template Codim< dimension >::Entity &vertex)
    return parameter for vertex
    Definition: dgfug.hh:164
    \n-
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    constructor taking filename
    Definition: dgfug.hh:101
    \n-
    MPIHelper::MPICommunicator MPICommunicatorType
    MPI communicator type.
    Definition: dgfug.hh:88
    \n-
    int numParameters(const Entity &) const
    return number of parameters
    Definition: dgfug.hh:147
    \n-
    int boundaryId(const Dune::Intersection< GG, II > &intersection) const
    will return boundary segment index
    Definition: dgfug.hh:128
    \n-
    UGGrid< dim > Grid
    grid type
    Definition: dgfug.hh:84
    \n-
    bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
    please doc me
    Definition: dgfug.hh:121
    \n-
    DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
    constructor taking istream
    Definition: dgfug.hh:91
    \n-
    int numParameters() const
    return number of parameters
    Definition: dgfug.hh:135
    \n-
    bool haveBoundaryParameters() const
    UGGrid does not support boundary parameters.
    Definition: dgfug.hh:175
    \n-
    std::vector< double > & parameter(const typename Grid::template Codim< 0 >::Entity &element)
    return parameter for codim 0 entity
    Definition: dgfug.hh:153
    \n-
    Grid * grid()
    return grid
    Definition: dgfug.hh:114
    \n-
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n-
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n-
    Front-end for the grid manager of the finite element toolbox UG3.
    Definition: uggrid.hh:207
    \n-\n-\n+
    DataMode
    Whether to produce conforming or non-conforming output.
    Definition: common.hh:67
    \n+
    @ conforming
    Output conforming data.
    Definition: common.hh:73
    \n+
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n+
    Writer for the ouput of grid functions in the vtk format.
    Definition: vtksequencewriter.hh:29
    \n+
    VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name, const std::string &path, const std::string &extendpath)
    Constructor with a given VTKWriter or SubsamplingVTKWriter.
    Definition: vtksequencewriter.hh:69
    \n+
    VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const std::string &name)
    Constructor with a given VTKWriter or SubsamplingVTKWriter.
    Definition: vtksequencewriter.hh:42
    \n+
    VTKSequenceWriter(const GridView &gridView, const std::string &name, const std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK::conforming)
    Constructor creating its own VTKWriter object.
    Definition: vtksequencewriter.hh:87
    \n+
    Base class to write pvd-files which contains a list of all collected vtk-files.
    Definition: vtksequencewriterbase.hh:34
    \n+
    const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const
    Definition: vtksequencewriterbase.hh:63
    \n+
    Writer for the ouput of grid functions in the vtk format.
    Definition: vtkwriter.hh:95
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,398 +6,122 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-dgfug.hh\n+ * vtk\n+vtksequencewriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH\n- 6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH\n- 7\n- 8//- C++ includes\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13\n- 14//- dune-common includes\n- 15#include \n- 16#include \n- 17#include \n- 18\n- 19//- dune-grid includes\n- 20#include \n- 21#include \n- 22\n- 23//- local includes\n- 24#include \"dgfparser.hh\"\n- 25#include \"blocks/gridparameter.hh\"\n- 26\n- 27\n- 28namespace Dune\n- 29{\n- 30\n- 31 namespace dgf\n- 32 {\n- 33\n- 34 // UGGridParameterBlock\n- 35 // --------------------\n- 36\n-37 struct UGGridParameterBlock\n- 38 : public GridParameterBlock\n- 39 {\n- 41 explicit UGGridParameterBlock ( std::istream &input );\n- 42\n-44 bool noClosure () const { return noClosure_; }\n-46 bool noCopy () const { return noCopy_; }\n-48 size_t heapSize () const { return heapSize_; }\n- 49\n- 50 protected:\n-51 bool noClosure_; // no closure for UGGrid\n-52 bool noCopy_; // no copies for UGGrid\n-53 size_t heapSize_; // heap size for UGGrid\n- 54 };\n- 55\n- 56 } // namespace dgf\n- 57\n- 58\n- 59\n- 60#if HAVE_DUNE_UGGRID\n- 61 template< int dim >\n-62 struct DGFGridInfo< UGGrid< dim > >\n- 63 {\n-64 static int refineStepsForHalf ()\n- 65 {\n- 66 return 1;\n- 67 }\n- 68\n-69 static double refineWeight ()\n- 70 {\n- 71 return -1.;\n- 72 }\n- 73 };\n- 74\n- 75\n- 76\n- 77 // DGFGridFactory< UGGrid< dim > >\n- 78 // -------------------------------\n- 79\n- 80 template< int dim >\n-81 struct DGFGridFactory< UGGrid< dim > >\n- 82 {\n-84 typedef UGGrid<_dim_> Grid;\n-86 static const int dimension = dim;\n-88 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n- 89\n-91 explicit DGFGridFactory ( std::istream &input,\n- 92 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 93 : grid_( 0 ),\n- 94 factory_(),\n- 95 dgf_( rank( comm ), size( comm ) )\n- 96 {\n- 97 generate( input );\n- 98 }\n+ 5\n+ 6#ifndef DUNE_VTKSEQUENCE_HH\n+ 7#define DUNE_VTKSEQUENCE_HH\n+ 8\n+ 9#include \n+ 10\n+ 11#include \n+ 12\n+ 13#include \n+ 14#include \n+ 15\n+ 16namespace Dune {\n+ 17\n+ 26 template< class GridView >\n+27 class VTKSequenceWriter :\n+ 28 public VTKSequenceWriterBase\n+ 29 {\n+ 30 public:\n+42 VTKSequenceWriter ( std::shared_ptr > vtkWriter,\n+ 43 const std::string& name )\n+ 44 : VTKSequenceWriterBase(vtkWriter,\n+ 45 name,\n+ 46 \"\",\n+ 47 \"\",\n+ 48 vtkWriter->gridView_.comm().rank(),\n+ 49 vtkWriter->gridView_.comm().size())\n+ 50 {}\n+ 51\n+69 VTKSequenceWriter ( std::shared_ptr > vtkWriter,\n+ 70 const std::string& name,\n+ 71 const std::string& path,\n+ 72 const std::string& extendpath )\n+ 73 : VTKSequenceWriterBase(vtkWriter,\n+ 74 name,\n+ 75 path,\n+ 76 extendpath,\n+ 77 vtkWriter->gridView_.comm().rank(),\n+ 78 vtkWriter->gridView_.comm().size())\n+ 79 {}\n+ 80\n+87 explicit VTKSequenceWriter ( const GridView &gridView,\n+ 88 const std::string& name,\n+ 89 const std::string& path,\n+ 90 const std::string& extendpath,\n+ 91 VTK::DataMode dm = VTK::conforming )\n+ 92 : VTKSequenceWriterBase(std::make_shared >\n+(gridView,dm),\n+ 93 name,path,extendpath,\n+ 94 gridView.comm().rank(), gridView.comm().size())\n+ 95 {}\n+ 96 };\n+ 97\n+ 98} // end namespace Dune\n 99\n-101 explicit DGFGridFactory ( const std::string &filename,\n- 102 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 103 : grid_( 0 ),\n- 104 factory_(),\n- 105 dgf_( rank( comm ), size( comm ) )\n- 106 {\n- 107 std::ifstream input( filename.c_str() );\n- 108 if ( !input )\n- 109 DUNE_THROW( DGFException, \"Error: Macrofile \" << filename << \" not found\"\n-);\n- 110 generate( input );\n- 111 }\n- 112\n-114 Grid *grid ()\n- 115 {\n- 116 return grid_;\n- 117 }\n- 118\n- 120 template< class GG, class II >\n-121 bool wasInserted ( const Dune::Intersection<_GG,_II_> &intersection ) const\n- 122 {\n- 123 return factory_.wasInserted( intersection );\n- 124 }\n- 125\n- 127 template< class GG, class II >\n-128 int boundaryId ( const Dune::Intersection<_GG,_II_> &intersection ) const\n- 129 {\n- 130 return intersection.boundarySegmentIndex();\n- 131 }\n- 132\n- 134 template< int codim >\n-135 int numParameters () const\n- 136 {\n- 137 if( codim == 0 )\n- 138 return dgf_.nofelparams;\n- 139 else if( codim == dimension )\n- 140 return dgf_.nofvtxparams;\n- 141 else\n- 142 return 0;\n- 143 }\n- 144\n- 146 template< class Entity >\n-147 int numParameters ( const Entity & ) const\n- 148 {\n- 149 return numParameters< Entity::codimension >();\n- 150 }\n- 151\n-153 std::vector< double > ¶meter ( const typename Grid::template Codim< 0\n->::Entity &element )\n- 154 {\n- 155 if( numParameters< 0 >() <= 0 )\n- 156 {\n- 157 DUNE_THROW( InvalidStateException,\n- 158 \"Calling DGFGridFactory::parameter is only allowed if there are\n-parameters.\" );\n- 159 }\n- 160 return dgf_.elParams[ factory_.insertionIndex( element ) ];\n- 161 }\n- 162\n-164 std::vector< double > ¶meter ( const typename Grid::template Codim<\n-dimension >::Entity &vertex )\n- 165 {\n- 166 if( numParameters< dimension >() <= 0 )\n- 167 {\n- 168 DUNE_THROW( InvalidStateException,\n- 169 \"Calling DGFGridFactory::parameter is only allowed if there are\n-parameters.\" );\n- 170 }\n- 171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];\n- 172 }\n- 173\n-175 bool haveBoundaryParameters () const\n- 176 {\n- 177 return dgf_.haveBndParameters;\n- 178 }\n- 179\n- 181 template< class GG, class II >\n-182 const DGFBoundaryParameter::type &boundaryParameter ( const Dune::\n-Intersection<_GG,_II_> &intersection ) const\n- 183 {\n- 184 typedef Dune::Intersection<_GG,_II_> Intersection;\n- 185 typename Intersection::Entity entity = intersection.inside();\n- 186 const int face = intersection.indexInInside();\n- 187\n- 188 auto refElem = referenceElement< double, dimension >( entity.type() );\n- 189 int corners = refElem.size( face, 1, dimension );\n- 190 std::vector< unsigned int > bound( corners );\n- 191 for( int i = 0; i < corners; ++i )\n- 192 {\n- 193 const int k = refElem.subEntity( face, 1, i, dimension );\n- 194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension\n->( k ) );\n- 195 }\n- 196\n- 197 DuneGridFormatParser::facemap_t::key_type key( bound, false );\n- 198 const DuneGridFormatParser::facemap_t::const_iterator pos =\n-dgf_.facemap.find( key );\n- 199 if( pos != dgf_.facemap.end() )\n- 200 return dgf_.facemap.find( key )->second.second;\n- 201 else\n- 202 return DGFBoundaryParameter::defaultValue();\n- 203 }\n- 204\n- 205 private:\n- 206 // create grid\n- 207 void generate ( std::istream &input );\n- 208\n- 209 // return rank\n- 210 static int rank( MPICommunicatorType MPICOMM )\n- 211 {\n- 212 int rank = 0;\n- 213#if HAVE_MPI\n- 214 MPI_Comm_rank( MPICOMM, &rank );\n- 215#endif\n- 216 return rank;\n- 217 }\n- 218\n- 219 // return size\n- 220 static int size( MPICommunicatorType MPICOMM )\n- 221 {\n- 222 int size = 1;\n- 223#if HAVE_MPI\n- 224 MPI_Comm_size( MPICOMM, &size );\n- 225#endif\n- 226 return size;\n- 227 }\n- 228\n- 229 Grid *grid_;\n- 230 GridFactory< UGGrid< dim > > factory_;\n- 231 DuneGridFormatParser dgf_;\n- 232 };\n- 233#endif // #if HAVE_DUNE_UGGRID\n- 234\n- 235} // namespace Dune\n- 236\n- 237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH\n-gridparameter.hh\n-uggrid.hh\n-The UGGrid class.\n+ 100#endif\n+subsamplingvtkwriter.hh\n+Provides subsampled file i/o for the visualization toolkit.\n+vtksequencewriterbase.hh\n+vtkwriter.hh\n+Provides file i/o for the visualization toolkit.\n+std\n+STL namespace.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n-Dune::DGFGridFactory\n-Definition: dgfgridfactory.hh:38\n-Dune::DGFGridFactory::MPICommunicatorType\n-MPIHelper::MPICommunicator MPICommunicatorType\n-Definition: dgfgridfactory.hh:41\n-Dune::DGFGridFactory::Grid\n-G Grid\n-Definition: dgfgridfactory.hh:39\n-Dune::DGFGridFactory::dimension\n-static const int dimension\n-Definition: dgfgridfactory.hh:40\n-Dune::Intersection\n-Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n-element or with the d...\n-Definition: common/intersection.hh:164\n-Dune::Intersection::indexInInside\n-int indexInInside() const\n-Local index of codim 1 entity in the inside() entity where intersection is\n-contained in.\n-Definition: common/intersection.hh:346\n-Dune::Intersection::boundarySegmentIndex\n-size_t boundarySegmentIndex() const\n-index of the boundary segment within the macro grid\n-Definition: common/intersection.hh:236\n-Dune::Intersection::inside\n-Entity inside() const\n-return Entity on the inside of this intersection. That is the Entity where we\n-started this.\n-Definition: common/intersection.hh:250\n-Dune::Intersection::Entity\n-GridImp::template Codim< 0 >::Entity Entity\n-Type of entity that this Intersection belongs to.\n-Definition: common/intersection.hh:192\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::dgf::GridParameterBlock\n-Common Grid parameters.\n-Definition: gridparameter.hh:35\n-Dune::DGFException\n-exception class for IO errors in the DGF parser\n-Definition: dgfexception.hh:16\n-Dune::DGFGridInfo\n-Some simple static information for a given GridType.\n-Definition: io/file/dgfparser/dgfparser.hh:56\n-Dune::dgf::UGGridParameterBlock\n-Definition: dgfug.hh:39\n-Dune::dgf::UGGridParameterBlock::heapSize\n-size_t heapSize() const\n-returns heap size used on construction of the grid\n-Definition: dgfug.hh:48\n-Dune::dgf::UGGridParameterBlock::noCopy_\n-bool noCopy_\n-Definition: dgfug.hh:52\n-Dune::dgf::UGGridParameterBlock::UGGridParameterBlock\n-UGGridParameterBlock(std::istream &input)\n-constructor taking istream\n-Definition: dgfug.cc:20\n-Dune::dgf::UGGridParameterBlock::heapSize_\n-size_t heapSize_\n-Definition: dgfug.hh:53\n-Dune::dgf::UGGridParameterBlock::noClosure_\n-bool noClosure_\n-Definition: dgfug.hh:51\n-Dune::dgf::UGGridParameterBlock::noCopy\n-bool noCopy() const\n-returns true if no copies are made for UGGrid elements\n-Definition: dgfug.hh:46\n-Dune::dgf::UGGridParameterBlock::noClosure\n-bool noClosure() const\n-returns true if no closure should be used for UGGrid\n-Definition: dgfug.hh:44\n-Dune::DGFGridInfo<_UGGrid<_dim_>_>::refineWeight\n-static double refineWeight()\n-Definition: dgfug.hh:69\n-Dune::DGFGridInfo<_UGGrid<_dim_>_>::refineStepsForHalf\n-static int refineStepsForHalf()\n-Definition: dgfug.hh:64\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::boundaryParameter\n-const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection<\n-GG, II > &intersection) const\n-return invalid value\n-Definition: dgfug.hh:182\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::parameter\n-std::vector< double > & parameter(const typename Grid::template Codim<\n-dimension >::Entity &vertex)\n-return parameter for vertex\n-Definition: dgfug.hh:164\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::DGFGridFactory\n-DGFGridFactory(const std::string &filename, MPICommunicatorType\n-comm=MPIHelper::getCommunicator())\n-constructor taking filename\n-Definition: dgfug.hh:101\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::MPICommunicatorType\n-MPIHelper::MPICommunicator MPICommunicatorType\n-MPI communicator type.\n-Definition: dgfug.hh:88\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::numParameters\n-int numParameters(const Entity &) const\n-return number of parameters\n-Definition: dgfug.hh:147\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::boundaryId\n-int boundaryId(const Dune::Intersection< GG, II > &intersection) const\n-will return boundary segment index\n-Definition: dgfug.hh:128\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::Grid\n-UGGrid< dim > Grid\n-grid type\n-Definition: dgfug.hh:84\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::wasInserted\n-bool wasInserted(const Dune::Intersection< GG, II > &intersection) const\n-please doc me\n-Definition: dgfug.hh:121\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::DGFGridFactory\n-DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::\n-getCommunicator())\n-constructor taking istream\n-Definition: dgfug.hh:91\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::numParameters\n-int numParameters() const\n-return number of parameters\n-Definition: dgfug.hh:135\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::haveBoundaryParameters\n-bool haveBoundaryParameters() const\n-UGGrid does not support boundary parameters.\n-Definition: dgfug.hh:175\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::parameter\n-std::vector< double > & parameter(const typename Grid::template Codim< 0 >::\n-Entity &element)\n-return parameter for codim 0 entity\n-Definition: dgfug.hh:153\n-Dune::DGFGridFactory<_UGGrid<_dim_>_>::grid\n-Grid * grid()\n-return grid\n-Definition: dgfug.hh:114\n-Dune::DGFBoundaryParameter::defaultValue\n-static const type & defaultValue()\n-default constructor\n-Definition: parser.hh:28\n-Dune::DGFBoundaryParameter::type\n-std::string type\n-type of additional boundary parameters\n-Definition: parser.hh:25\n-Dune::UGGrid\n-Front-end for the grid manager of the finite element toolbox UG3.\n-Definition: uggrid.hh:207\n-dgfparser.hh\n-intersection.hh\n+Dune::VTK::DataMode\n+DataMode\n+Whether to produce conforming or non-conforming output.\n+Definition: common.hh:67\n+Dune::VTK::conforming\n+@ conforming\n+Output conforming data.\n+Definition: common.hh:73\n+Dune::GridView\n+Grid view abstract base class.\n+Definition: common/gridview.hh:66\n+Dune::VTKSequenceWriter\n+Writer for the ouput of grid functions in the vtk format.\n+Definition: vtksequencewriter.hh:29\n+Dune::VTKSequenceWriter::VTKSequenceWriter\n+VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const\n+std::string &name, const std::string &path, const std::string &extendpath)\n+Constructor with a given VTKWriter or SubsamplingVTKWriter.\n+Definition: vtksequencewriter.hh:69\n+Dune::VTKSequenceWriter::VTKSequenceWriter\n+VTKSequenceWriter(std::shared_ptr< VTKWriter< GridView > > vtkWriter, const\n+std::string &name)\n+Constructor with a given VTKWriter or SubsamplingVTKWriter.\n+Definition: vtksequencewriter.hh:42\n+Dune::VTKSequenceWriter::VTKSequenceWriter\n+VTKSequenceWriter(const GridView &gridView, const std::string &name, const\n+std::string &path, const std::string &extendpath, VTK::DataMode dm=VTK::\n+conforming)\n+Constructor creating its own VTKWriter object.\n+Definition: vtksequencewriter.hh:87\n+Dune::VTKSequenceWriterBase\n+Base class to write pvd-files which contains a list of all collected vtk-files.\n+Definition: vtksequencewriterbase.hh:34\n+Dune::VTKSequenceWriterBase::vtkWriter\n+const std::shared_ptr< VTKWriter< GridView > > & vtkWriter() const\n+Definition: vtksequencewriterbase.hh:63\n+Dune::VTKWriter\n+Writer for the ouput of grid functions in the vtk format.\n+Definition: vtkwriter.hh:95\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00827.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00827.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfug.cc File Reference\n+dune-grid: functionwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -58,33 +58,69 @@\n \n \n \n \n \n
    \n \n-
    dgfug.cc File Reference
    \n+
    functionwriter.hh File Reference
    \n
    \n
    \n-
    #include <config.h>
    \n-#include <dune/geometry/utility/typefromvertexcount.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfug.hh>
    \n-
    \n+
    #include <cstddef>
    \n+#include <memory>
    \n+#include <string>
    \n+#include <typeinfo>
    \n+#include <vector>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid/io/file/vtk/common.hh>
    \n+#include <dune/grid/io/file/vtk/dataarraywriter.hh>
    \n+#include <dune/grid/io/file/vtk/pvtuwriter.hh>
    \n+#include <dune/grid/io/file/vtk/vtuwriter.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+

    \n+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...
     
    \n \n \n \n \n-\n+\n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
    namespace  Dune::VTK
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,22 +6,54 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-Namespaces\n-dgfug.cc File Reference\n-#include \n-#include \n-#include \n+ * vtk\n+Classes | Namespaces\n+functionwriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::VTK::FunctionWriterBase<_Cell__>\n+\u00a0 Base class for function writers. More...\n+\u00a0\n+class \u00a0Dune::VTK::VTKFunctionWriter<_Func_>\n+\u00a0 Base class for function writers. More...\n+\u00a0\n+class \u00a0Dune::VTK::CoordinatesWriter<_Cell_>\n+\u00a0 writer for the Coordinates array More...\n+\u00a0\n+class \u00a0Dune::VTK::ConformingConnectivityWriter<_IteratorFactory_>\n+\u00a0 writer for the connectivity array in conforming mode More...\n+\u00a0\n+class \u00a0Dune::VTK::NonConformingConnectivityWriter<_Cell_>\n+\u00a0 writer for the connectivity array in nonconforming mode More...\n+\u00a0\n+class \u00a0Dune::VTK::OffsetsWriter<_Cell_>\n+\u00a0 writer for the offsets array More...\n+\u00a0\n+class \u00a0Dune::VTK::TypesWriter<_Cell_>\n+\u00a0 writer for the types array More...\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::dgf\n+namespace \u00a0Dune::VTK\n \u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00830.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00830.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfyasp.hh File Reference\n+dune-grid: pvtuwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -58,53 +58,44 @@\n \n \n \n \n \n
    \n \n-
    dgfyasp.hh File Reference
    \n+
    pvtuwriter.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid/common/intersection.hh>
    \n-#include <dune/grid/yaspgrid.hh>
    \n-#include "dgfparser.hh"
    \n+
    #include <ostream>
    \n+#include <string>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/indent.hh>
    \n+#include <dune/grid/io/file/vtk/common.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::dgf::YaspGridParameterBlock
     Grid parameters for YaspGrid. More...
     
    struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
     Grid factory for YaspGrid with equidistant coordinates. More...
     
    struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
     Grid factory for YaspGrid with equidistant coordinates. More...
     
    class  Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >
     Placeholder for grid factory for YaspGrid with tensor product coordinates. More...
     
    struct  Dune::DGFGridInfo< YaspGrid< dim, Coordinates > >
    class  Dune::VTK::PVTUWriter
     Dump a .vtu/.vtp files contents to a stream. More...
     
    \n \n \n \n \n-\n+\n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
    namespace  Dune::VTK
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,42 +6,29 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n+ * vtk\n Classes | Namespaces\n-dgfyasp.hh File Reference\n-#include \n-#include \n-#include \"dgfparser.hh\"\n+pvtuwriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::dgf::YaspGridParameterBlock\n-\u00a0 Grid parameters for YaspGrid. More...\n-\u00a0\n-struct \u00a0Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,\n- dim_>_>_>\n-\u00a0 Grid factory for YaspGrid with equidistant coordinates. More...\n-\u00a0\n-struct \u00a0Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<\n- ctype,_dim_>_>_>\n-\u00a0 Grid factory for YaspGrid with equidistant coordinates. More...\n-\u00a0\n- class \u00a0Dune::DGFGridFactory<_Dune::YaspGrid<_dim,_Dune::\n- TensorProductCoordinates<_ctype,_dim_>_>_>\n-\u00a0 Placeholder for grid factory for YaspGrid with tensor product\n- coordinates. More...\n-\u00a0\n-struct \u00a0Dune::DGFGridInfo<_YaspGrid<_dim,_Coordinates_>_>\n+class \u00a0Dune::VTK::PVTUWriter\n+\u00a0 Dump a .vtu/.vtp files contents to a stream. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::dgf\n+namespace \u00a0Dune::VTK\n \u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00830_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfyasp.hh Source File\n+dune-grid: pvtuwriter.hh Source File\n \n \n \n \n \n \n \n@@ -58,564 +58,171 @@\n \n
    \n \n \n \n
    \n-
    dgfyasp.hh
    \n+
    pvtuwriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGFPARSERYASP_HH
    \n-
    6#define DUNE_DGFPARSERYASP_HH
    \n-
    7
    \n-\n-\n-
    10#include "dgfparser.hh"
    \n+
    5
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
    \n+
    8
    \n+
    9#include <ostream>
    \n+
    10#include <string>
    \n
    11
    \n-
    12namespace Dune
    \n-
    13{
    \n+
    12#include <dune/common/exceptions.hh>
    \n+
    13#include <dune/common/indent.hh>
    \n
    14
    \n-
    15 // External Forward Declarations
    \n-
    16 // -----------------------------
    \n-
    17
    \n-
    18 template< class GridImp, class IntersectionImp >
    \n-
    19 class Intersection;
    \n-
    20
    \n+\n+
    16
    \n+
    17namespace Dune {
    \n+
    18
    \n
    21
    \n-
    22 namespace dgf
    \n-
    23 {
    \n-
    24
    \n-\n-
    39 : public GridParameterBlock
    \n-
    40 {
    \n-
    41 protected:
    \n-
    42 int _overlap; // overlap for YaspGrid
    \n-
    43
    \n-
    44 public:
    \n-
    46 YaspGridParameterBlock( std::istream &in )
    \n-
    47 : GridParameterBlock( in ),
    \n-
    48 _overlap( 0 ) // default value
    \n-
    49 {
    \n-
    50 // check overlap
    \n-
    51 if( findtoken( "overlap" ) )
    \n-
    52 {
    \n-
    53 int x;
    \n-
    54 if( getnextentry(x) ) _overlap = x;
    \n-
    55 else
    \n-
    56 {
    \n-
    57 dwarn << "GridParameterBlock: found keyword `overlap' but no value, defaulting to `" << _overlap <<"' !\\n";
    \n-
    58 }
    \n-
    59
    \n-
    60 if (_overlap < 0)
    \n-
    61 {
    \n-
    62 DUNE_THROW(DGFException,"Negative overlap specified!");
    \n-
    63 }
    \n-
    64 }
    \n-
    65 else
    \n-
    66 {
    \n-
    67 dwarn << "YaspGridParameterBlock: Parameter 'overlap' not specified, "
    \n-
    68 << "defaulting to '" << _overlap << "'." << std::endl;
    \n-
    69 }
    \n-
    70
    \n-
    71 }
    \n-
    72
    \n-
    74 int overlap () const
    \n-
    75 {
    \n-
    76 return _overlap;
    \n-
    77 }
    \n-
    78
    \n-
    79 };
    \n-
    80
    \n-
    81 }
    \n-
    82
    \n-
    86 template <typename ctype, int dim>
    \n-
    87 struct DGFGridFactory< YaspGrid<dim, EquidistantCoordinates<ctype, dim> > >
    \n-
    88 {
    \n-\n-
    90 const static int dimension = Grid::dimension;
    \n-
    91 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n+
    22 namespace VTK {
    \n+
    23
    \n+
    25
    \n+
    62 class PVTUWriter {
    \n+
    63 std::ostream& stream;
    \n+
    64
    \n+
    65 std::string fileType;
    \n+
    66
    \n+
    67 Indent indent;
    \n+
    68
    \n+
    69 public:
    \n+
    71
    \n+
    78 inline PVTUWriter(std::ostream& stream_, FileType fileType_)
    \n+
    79 : stream(stream_)
    \n+
    80 {
    \n+
    81 switch(fileType_) {
    \n+
    82 case polyData :
    \n+
    83 fileType = "PPolyData";
    \n+
    84 break;
    \n+
    85 case unstructuredGrid :
    \n+
    86 fileType = "PUnstructuredGrid";
    \n+
    87 break;
    \n+
    88 default :
    \n+
    89 DUNE_THROW(IOError, "PVTUWriter: Unknown fileType: " << fileType_);
    \n+
    90 }
    \n+
    91 const std::string& byteOrder = getEndiannessString();
    \n
    92
    \n-
    93 private:
    \n-
    94 typedef FieldVector< ctype, dimension > Point;
    \n-\n-
    96
    \n-
    97 public:
    \n-
    98 explicit DGFGridFactory ( std::istream &input,
    \n-
    99 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    100 {
    \n-
    101 generate( input, comm );
    \n-
    102 }
    \n-
    103
    \n-
    104 explicit DGFGridFactory ( const std::string &filename,
    \n-
    105 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    106 {
    \n-
    107 std::ifstream input( filename.c_str() );
    \n-
    108 if( !input )
    \n-
    109 DUNE_THROW( DGFException, "Error: Macrofile '" << filename << "' not found" );
    \n-
    110 generate( input, comm );
    \n-
    111 }
    \n-
    112
    \n-\n-
    114 {
    \n-
    115 delete boundaryDomainBlock_;
    \n-
    116 }
    \n-
    117
    \n-
    118 Grid *grid() const
    \n-
    119 {
    \n-
    120 return grid_;
    \n-
    121 }
    \n-
    122
    \n-
    123 template <class Intersection>
    \n-
    124 bool wasInserted(const Intersection &intersection) const
    \n-
    125 {
    \n-
    126 return false;
    \n-
    127 }
    \n-
    128
    \n-
    129 template <class Intersection>
    \n-
    130 int boundaryId(const Intersection &intersection) const
    \n-
    131 {
    \n-
    132 if( boundaryDomainBlock_->isactive() )
    \n-
    133 {
    \n-
    134 std::vector< Point > corners;
    \n-
    135 getCorners( intersection.geometry(), corners );
    \n-
    136 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n-
    137 if( data )
    \n-
    138 return data->id();
    \n-
    139 else
    \n-
    140 return intersection.indexInInside();
    \n-
    141 }
    \n-
    142 else
    \n-
    143 return intersection.indexInInside();
    \n-
    144 }
    \n-
    145
    \n-
    146 template< int codim >
    \n-
    147 int numParameters () const
    \n-
    148 {
    \n-
    149 return 0;
    \n-
    150 }
    \n-
    151
    \n-
    152 // return true if boundary parameters found
    \n-\n-
    154 {
    \n-
    155 return boundaryDomainBlock_->hasParameter();
    \n-
    156 }
    \n-
    157
    \n-
    158 template< class GG, class II >
    \n-
    159 const typename DGFBoundaryParameter::type &
    \n-
    160 boundaryParameter ( const Intersection< GG, II > & intersection ) const
    \n-
    161 {
    \n-\n-
    163 {
    \n-
    164 std::vector< Point > corners;
    \n-
    165 getCorners( intersection.geometry(), corners );
    \n-
    166 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n-
    167 if( data )
    \n-
    168 return data->parameter();
    \n-
    169 else
    \n-\n-
    171 }
    \n-
    172 else
    \n-\n-
    174 }
    \n+
    93 stream << indent << "<?xml version=\\"1.0\\"?>\\n";
    \n+
    94 stream << indent << "<VTKFile"
    \n+
    95 << " type=\\"" << fileType << "\\""
    \n+
    96 << " version=\\"0.1\\""
    \n+
    97 << " byte_order=\\"" << byteOrder << "\\">\\n";
    \n+
    98 ++indent;
    \n+
    99 }
    \n+
    100
    \n+
    102 inline ~PVTUWriter() {
    \n+
    103 --indent;
    \n+
    104 stream << indent << "</VTKFile>\\n"
    \n+
    105 << std::flush;
    \n+
    106 }
    \n+
    107
    \n+
    109
    \n+
    120 inline void beginPointData(const std::string& scalars = "",
    \n+
    121 const std::string& vectors = "") {
    \n+
    122 stream << indent << "<PPointData";
    \n+
    123 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n+
    124 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n+
    125 stream << ">\\n";
    \n+
    126 ++indent;
    \n+
    127 }
    \n+
    129 inline void endPointData() {
    \n+
    130 --indent;
    \n+
    131 stream << indent << "</PPointData>\\n";
    \n+
    132 }
    \n+
    133
    \n+
    135
    \n+
    146 inline void beginCellData(const std::string& scalars = "",
    \n+
    147 const std::string& vectors = "") {
    \n+
    148 stream << indent << "<PCellData";
    \n+
    149 if(scalars != "") stream << " Scalars=\\"" << scalars << "\\"";
    \n+
    150 if(vectors != "") stream << " Vectors=\\"" << vectors << "\\"";
    \n+
    151 stream << ">\\n";
    \n+
    152 ++indent;
    \n+
    153 }
    \n+
    155 inline void endCellData() {
    \n+
    156 --indent;
    \n+
    157 stream << indent << "</PCellData>\\n";
    \n+
    158 }
    \n+
    159
    \n+
    161
    \n+
    166 inline void beginPoints() {
    \n+
    167 stream << indent << "<PPoints>\\n";
    \n+
    168 ++indent;
    \n+
    169 }
    \n+
    171 inline void endPoints() {
    \n+
    172 --indent;
    \n+
    173 stream << indent << "</PPoints>\\n";
    \n+
    174 }
    \n
    175
    \n-
    176 template< class Entity >
    \n-
    177 std::vector<double> &parameter ( const Entity & )
    \n-
    178 {
    \n-
    179 return emptyParam;
    \n-
    180 }
    \n-
    181
    \n-
    182 private:
    \n-
    183 void generate( std::istream &gridin, MPICommunicatorType comm );
    \n-
    184
    \n-
    185 template< class Geometry >
    \n-
    186 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
    \n-
    187 {
    \n-
    188 corners.resize( geometry.corners() );
    \n-
    189 for( int i = 0; i < geometry.corners(); ++i )
    \n-
    190 {
    \n-
    191 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
    \n-
    192 for( int j = 0; j < dimension; ++j )
    \n-
    193 corners[ i ][ j ] = corner[ j ];
    \n-
    194 }
    \n-
    195 }
    \n-
    196
    \n-
    197 Grid *grid_;
    \n-
    198 dgf::BoundaryDomBlock *boundaryDomainBlock_;
    \n-
    199 std::vector<double> emptyParam;
    \n-
    200 };
    \n+
    177
    \n+
    189 inline void beginMain(unsigned ghostLevel = 0) {
    \n+
    190 stream << indent << "<" << fileType
    \n+
    191 << " GhostLevel=\\"" << ghostLevel << "\\">\\n";
    \n+
    192 ++indent;
    \n+
    193 }
    \n+
    195 inline void endMain() {
    \n+
    196 --indent;
    \n+
    197 stream << indent << "</" << fileType << ">\\n";
    \n+
    198 }
    \n+
    199
    \n
    201
    \n-
    202 // generate YaspGrid from the provided DGF
    \n-
    203 template< typename ctype, int dim >
    \n-
    204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates<ctype, dim> > >
    \n-
    205 ::generate ( std::istream &gridin, MPICommunicatorType comm )
    \n-
    206 {
    \n-
    207 using std::abs;
    \n-
    208 dgf::IntervalBlock intervalBlock( gridin );
    \n-
    209
    \n-
    210 if( !intervalBlock.isactive() )
    \n-
    211 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
    \n-
    212
    \n-
    213 if( intervalBlock.numIntervals() != 1 )
    \n-
    214 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
    \n-
    215
    \n-
    216 if( intervalBlock.dimw() != dim )
    \n-
    217 {
    \n-
    218 DUNE_THROW( DGFException,
    \n-
    219 "Cannot read an interval of dimension " << intervalBlock.dimw()
    \n-
    220 << " into a YaspGrid< " << dim << " >." );
    \n-
    221 }
    \n+
    207 void addArray(const std::string& name, unsigned ncomps, Precision prec) {
    \n+
    208 stream << indent << "<PDataArray"
    \n+
    209 << " type=\\"" << toString(prec) << "\\""
    \n+
    210 << " Name=\\"" << name << "\\""
    \n+
    211 << " NumberOfComponents=\\"" << ncomps << "\\"/>\\n";
    \n+
    212 }
    \n+
    213
    \n+
    215 inline void addPiece(const std::string& filename) {
    \n+
    216 stream << indent << "<Piece "
    \n+
    217 << " Source=\\"" << filename << "\\"/>\\n";
    \n+
    218 }
    \n+
    219 };
    \n+
    220
    \n+
    221 } // namespace VTK
    \n
    222
    \n-
    223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
    \n
    224
    \n-
    225 FieldVector<ctype, dim> lang;
    \n-
    226 std::array<int,dim> anz;
    \n-
    227 for( int i = 0; i < dim; ++i )
    \n-
    228 {
    \n-
    229 // check that start point is 0.0
    \n-
    230 if( abs( interval.p[ 0 ][ i ] ) > 1e-10 )
    \n-
    231 {
    \n-
    232 DUNE_THROW( DGFException,
    \n-
    233 "YaspGrid cannot handle grids with non-zero left lower corner." );
    \n-
    234 }
    \n-
    235
    \n-
    236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ];
    \n-
    237 anz[ i ] = interval.n[ i ];
    \n-
    238 }
    \n-
    239
    \n-\n-
    241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
    \n-
    242 std::bitset< dim > per;
    \n-
    243 const int numTrafos = trafoBlock.numTransformations();
    \n-
    244 for( int k = 0; k < numTrafos; ++k )
    \n-
    245 {
    \n-
    246 const Transformation &trafo = trafoBlock.transformation( k );
    \n-
    247
    \n-
    248 bool identity = true;
    \n-
    249 for( int i = 0; i < dim; ++i )
    \n-
    250 for( int j = 0; j < dim; ++j )
    \n-
    251 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
    \n-
    252 if( !identity )
    \n-
    253 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
    \n-
    254
    \n-
    255 int numDirs = 0;
    \n-
    256 int dir = -1;
    \n-
    257 for( int i = 0; i < dim; ++i )
    \n-
    258 {
    \n-
    259 if( abs( trafo.shift[ i ] ) < 1e-10 )
    \n-
    260 continue;
    \n-
    261 dir = i;
    \n-
    262 ++numDirs;
    \n-
    263 }
    \n-
    264 if( (numDirs != 1) || (abs( abs( trafo.shift[ dir ] ) - lang[ dir ] ) >= 1e-10) )
    \n-
    265 {
    \n-
    266 std::cerr << "Tranformation '" << trafo
    \n-
    267 << "' does not map boundaries on boundaries." << std::endl;
    \n-
    268 }
    \n-
    269 else
    \n-
    270 per[ dir ] = true;
    \n-
    271 }
    \n-
    272
    \n-
    273 // get grid parameters
    \n-
    274 dgf::YaspGridParameterBlock grdParam( gridin );
    \n-
    275
    \n-
    276 grid_ = new YaspGrid< dim , EquidistantCoordinates<ctype, dim> >( lang, anz, per, grdParam.overlap(), comm );
    \n-
    277
    \n-
    278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
    \n-
    279 }
    \n-
    280
    \n-
    284 template <typename ctype, int dim>
    \n-\n-
    286 {
    \n-\n-
    288 const static int dimension = Grid::dimension;
    \n-
    289 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n-
    290
    \n-
    291 private:
    \n-
    292 typedef FieldVector< ctype, dimension > Point;
    \n-\n-
    294
    \n-
    295 public:
    \n-
    296 explicit DGFGridFactory ( std::istream &input,
    \n-
    297 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    298 {
    \n-
    299 generate( input, comm );
    \n-
    300 }
    \n-
    301
    \n-
    302 explicit DGFGridFactory ( const std::string &filename,
    \n-
    303 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    304 {
    \n-
    305 std::ifstream input( filename.c_str() );
    \n-
    306 generate( input, comm );
    \n-
    307 }
    \n-
    308
    \n-\n-
    310 {
    \n-
    311 delete boundaryDomainBlock_;
    \n-
    312 }
    \n-
    313
    \n-
    314 Grid *grid() const
    \n-
    315 {
    \n-
    316 return grid_;
    \n-
    317 }
    \n-
    318
    \n-
    319 template <class Intersection>
    \n-
    320 bool wasInserted(const Intersection &intersection) const
    \n-
    321 {
    \n-
    322 return false;
    \n-
    323 }
    \n-
    324
    \n-
    325 template <class Intersection>
    \n-
    326 int boundaryId(const Intersection &intersection) const
    \n-
    327 {
    \n-
    328 if( boundaryDomainBlock_->isactive() )
    \n-
    329 {
    \n-
    330 std::vector< Point > corners;
    \n-
    331 getCorners( intersection.geometry(), corners );
    \n-
    332 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n-
    333 if( data )
    \n-
    334 return data->id();
    \n-
    335 else
    \n-
    336 return intersection.indexInInside();
    \n-
    337 }
    \n-
    338 else
    \n-
    339 return intersection.indexInInside();
    \n-
    340 }
    \n-
    341
    \n-
    342 template< int codim >
    \n-
    343 int numParameters () const
    \n-
    344 {
    \n-
    345 return 0;
    \n-
    346 }
    \n-
    347
    \n-
    348 // return true if boundary parameters found
    \n-\n-
    350 {
    \n-
    351 return boundaryDomainBlock_->hasParameter();
    \n-
    352 }
    \n-
    353
    \n-
    354 template< class GG, class II >
    \n-
    355 const typename DGFBoundaryParameter::type &
    \n-
    356 boundaryParameter ( const Intersection< GG, II > & intersection ) const
    \n-
    357 {
    \n-\n-
    359 {
    \n-
    360 std::vector< Point > corners;
    \n-
    361 getCorners( intersection.geometry(), corners );
    \n-
    362 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n-
    363 if( data )
    \n-
    364 return data->parameter();
    \n-
    365 else
    \n-\n-
    367 }
    \n-
    368 else
    \n-\n-
    370 }
    \n-
    371
    \n-
    372 template< class Entity >
    \n-
    373 std::vector<double> &parameter ( [[maybe_unused]] const Entity &entity )
    \n-
    374 {
    \n-
    375 return emptyParam;
    \n-
    376 }
    \n-
    377
    \n-
    378 private:
    \n-
    379 void generate( std::istream &gridin, MPICommunicatorType comm );
    \n-
    380
    \n-
    381 template< class Geometry >
    \n-
    382 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
    \n-
    383 {
    \n-
    384 corners.resize( geometry.corners() );
    \n-
    385 for( int i = 0; i < geometry.corners(); ++i )
    \n-
    386 {
    \n-
    387 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
    \n-
    388 for( int j = 0; j < dimension; ++j )
    \n-
    389 corners[ i ][ j ] = corner[ j ];
    \n-
    390 }
    \n-
    391 }
    \n-
    392
    \n-
    393 Grid *grid_;
    \n-
    394 dgf::BoundaryDomBlock *boundaryDomainBlock_;
    \n-
    395 std::vector<double> emptyParam;
    \n-
    396 };
    \n-
    397
    \n-
    398 // generate YaspGrid from the provided DGF
    \n-
    399 template< typename ctype, int dim >
    \n-
    400 inline void DGFGridFactory< YaspGrid<dim, EquidistantOffsetCoordinates<ctype, dim> > >
    \n-
    401 ::generate ( std::istream &gridin, MPICommunicatorType comm )
    \n-
    402 {
    \n-
    403 using std::abs;
    \n-
    404 dgf::IntervalBlock intervalBlock( gridin );
    \n-
    405
    \n-
    406 if( !intervalBlock.isactive() )
    \n-
    407 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
    \n-
    408
    \n-
    409 if( intervalBlock.numIntervals() != 1 )
    \n-
    410 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
    \n-
    411
    \n-
    412 if( intervalBlock.dimw() != dim )
    \n-
    413 {
    \n-
    414 DUNE_THROW( DGFException,
    \n-
    415 "Cannot read an interval of dimension "
    \n-
    416 << intervalBlock.dimw()
    \n-
    417 << " into a YaspGrid< " << dim << " >." );
    \n-
    418 }
    \n-
    419
    \n-
    420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
    \n-
    421
    \n-
    422 FieldVector<ctype, dim> lower;
    \n-
    423 FieldVector<ctype, dim> upper;
    \n-
    424 std::array<int,dim> anz;
    \n-
    425 for( int i = 0; i < dim; ++i )
    \n-
    426 {
    \n-
    427 lower[ i ] = interval.p[ 0 ][ i ];
    \n-
    428 upper[ i ] = interval.p[ 1 ][ i ];
    \n-
    429 anz[ i ] = interval.n[ i ];
    \n-
    430 }
    \n-
    431
    \n-\n-
    433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
    \n-
    434 std::bitset< dim > periodic;
    \n-
    435 const int numTrafos = trafoBlock.numTransformations();
    \n-
    436 for( int k = 0; k < numTrafos; ++k )
    \n-
    437 {
    \n-
    438 const Transformation &trafo = trafoBlock.transformation( k );
    \n-
    439
    \n-
    440 bool identity = true;
    \n-
    441 for( int i = 0; i < dim; ++i )
    \n-
    442 for( int j = 0; j < dim; ++j )
    \n-
    443 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
    \n-
    444 if( !identity )
    \n-
    445 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
    \n-
    446
    \n-
    447 int numDirs = 0;
    \n-
    448 int dir = -1;
    \n-
    449 for( int currentDir = 0; currentDir < dim; ++currentDir )
    \n-
    450 {
    \n-
    451 if( abs( trafo.shift[ currentDir ] ) > 1e-10 )
    \n-
    452 {
    \n-
    453 dir = currentDir;
    \n-
    454 ++numDirs;
    \n-
    455 }
    \n-
    456 }
    \n-
    457 if ( (numDirs != 1)
    \n-
    458 || (abs( abs( trafo.shift[ dir ] ) - abs( upper[ dir ] - lower[ dir ] ) ) >= 1e-10) )
    \n-
    459 {
    \n-
    460 std::cerr << "Tranformation '" << trafo
    \n-
    461 << "' does not map boundaries on boundaries." << std::endl;
    \n-
    462 }
    \n-
    463 else
    \n-
    464 {
    \n-
    465 periodic[ dir ] = true;
    \n-
    466 }
    \n-
    467 }
    \n-
    468
    \n-
    469 // get grid parameters
    \n-
    470 dgf::YaspGridParameterBlock grdParam( gridin );
    \n-
    471
    \n-
    472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates<ctype, dim> >
    \n-
    473 ( lower, upper, anz, periodic, grdParam.overlap(), comm );
    \n-
    474
    \n-
    475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
    \n-
    476 }
    \n-
    477
    \n-
    483 template< class ctype, int dim >
    \n-
    484 class DGFGridFactory< Dune::YaspGrid<dim, Dune::TensorProductCoordinates<ctype, dim> > >
    \n-
    485 {
    \n-\n-
    487 public:
    \n-
    488 template< typename In >
    \n-
    489 DGFGridFactory ( const In & ) {}
    \n-\n-
    491 {
    \n-
    492 throw std::invalid_argument( "Tensor product coordinates for YaspGrid are currently not supported via the DGFGridFactory" );
    \n-
    493 }
    \n-
    494 };
    \n-
    495
    \n-
    496 template <typename Coordinates, int dim>
    \n-
    497 struct DGFGridInfo< YaspGrid<dim , Coordinates> > {
    \n-
    498 static int refineStepsForHalf() {return 1;}
    \n-
    499 static double refineWeight() {return std::pow(0.5,dim);}
    \n-
    500 };
    \n-
    501
    \n-
    502}
    \n-
    503#endif // #ifndef DUNE_DGFPARSERYASP_HH
    \n-\n+
    225} // namespace Dune
    \n+
    226
    \n+
    227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH
    \n+
    Common stuff for the VTKWriter.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n-
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n-
    Definition: dgfgridfactory.hh:38
    \n-
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfgridfactory.hh:41
    \n-
    G Grid
    Definition: dgfgridfactory.hh:39
    \n-
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n-
    bool haveBoundaryParameters() const
    Definition: dgfgridfactory.hh:151
    \n-
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n-
    Geometry geometry() const
    geometrical information about the intersection in global coordinates.
    Definition: common/intersection.hh:323
    \n-
    int indexInInside() const
    Local index of codim 1 entity in the inside() entity where intersection is contained in.
    Definition: common/intersection.hh:346
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    Wrapper class for geometries.
    Definition: common/geometry.hh:71
    \n-
    FieldVector< ctype, cdim > GlobalCoordinate
    type of the global coordinates
    Definition: common/geometry.hh:106
    \n-
    GlobalCoordinate corner(int i) const
    Obtain a corner of the geometry.
    Definition: common/geometry.hh:219
    \n-
    int corners() const
    Return the number of corners of the reference element.
    Definition: common/geometry.hh:205
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n-
    bool findtoken(std ::string token)
    Definition: basic.cc:123
    \n-
    bool getnextentry(ENTRY &entry)
    Definition: basic.hh:63
    \n-
    Definition: boundarydom.hh:23
    \n-
    int id() const
    Definition: boundarydom.hh:42
    \n-
    const BoundaryParameter & parameter() const
    Definition: boundarydom.hh:54
    \n-
    Definition: boundarydom.hh:195
    \n-
    Common Grid parameters.
    Definition: gridparameter.hh:35
    \n-
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n-
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n-
    Grid parameters for YaspGrid.
    Definition: dgfyasp.hh:40
    \n-
    int _overlap
    Definition: dgfyasp.hh:42
    \n-
    YaspGridParameterBlock(std::istream &in)
    constructor taking istream
    Definition: dgfyasp.hh:46
    \n-
    int overlap() const
    get dimension of world found in block
    Definition: dgfyasp.hh:74
    \n-
    DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:98
    \n-
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:104
    \n-
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfyasp.hh:124
    \n-\n-
    std::vector< double > & parameter(const Entity &)
    Definition: dgfyasp.hh:177
    \n-
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfyasp.hh:91
    \n-
    const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
    Definition: dgfyasp.hh:160
    \n-\n-\n-\n-
    YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid
    Definition: dgfyasp.hh:89
    \n-
    int boundaryId(const Intersection &intersection) const
    Definition: dgfyasp.hh:130
    \n-
    const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
    Definition: dgfyasp.hh:356
    \n-
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:302
    \n-\n-
    int boundaryId(const Intersection &intersection) const
    Definition: dgfyasp.hh:326
    \n-
    YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid
    Definition: dgfyasp.hh:287
    \n-
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfyasp.hh:320
    \n-
    std::vector< double > & parameter(const Entity &entity)
    Definition: dgfyasp.hh:373
    \n-\n-
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfyasp.hh:289
    \n-
    DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:296
    \n-\n-\n-\n-\n-
    static double refineWeight()
    Definition: dgfyasp.hh:499
    \n-
    static int refineStepsForHalf()
    Definition: dgfyasp.hh:498
    \n-
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n-
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n-
    [ provides Dune::Grid ]
    Definition: yaspgrid.hh:163
    \n-
    Container for equidistant coordinates in a YaspGrid.
    Definition: coordinates.hh:29
    \n-
    Container for equidistant coordinates in a YaspGrid with non-trivial origin.
    Definition: coordinates.hh:131
    \n-\n-\n+
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n+
    FileType
    which type of VTK file to write
    Definition: common.hh:252
    \n+
    @ polyData
    for .vtp files (PolyData)
    Definition: common.hh:254
    \n+
    @ unstructuredGrid
    for .vtu files (UnstructuredGrid)
    Definition: common.hh:256
    \n+
    std::string toString(Precision p)
    map precision to VTK type name
    Definition: common.hh:280
    \n+
    std::string getEndiannessString()
    determine endianness of this C++ implementation
    Definition: common.hh:232
    \n+
    Dump a .vtu/.vtp files contents to a stream.
    Definition: pvtuwriter.hh:62
    \n+
    ~PVTUWriter()
    write footer
    Definition: pvtuwriter.hh:102
    \n+
    void endMain()
    finish the main PolyData/UnstructuredGrid section
    Definition: pvtuwriter.hh:195
    \n+
    void endCellData()
    finish CellData section
    Definition: pvtuwriter.hh:155
    \n+
    void addArray(const std::string &name, unsigned ncomps, Precision prec)
    Add an array to the output file.
    Definition: pvtuwriter.hh:207
    \n+
    void beginMain(unsigned ghostLevel=0)
    start the main PPolyData/PUnstructuredGrid section
    Definition: pvtuwriter.hh:189
    \n+
    void beginCellData(const std::string &scalars="", const std::string &vectors="")
    start CellData section
    Definition: pvtuwriter.hh:146
    \n+
    void beginPointData(const std::string &scalars="", const std::string &vectors="")
    start PointData section
    Definition: pvtuwriter.hh:120
    \n+
    void addPiece(const std::string &filename)
    Add a serial piece to the output file.
    Definition: pvtuwriter.hh:215
    \n+
    PVTUWriter(std::ostream &stream_, FileType fileType_)
    create a PVTUWriter object
    Definition: pvtuwriter.hh:78
    \n+
    void endPointData()
    finish PointData section
    Definition: pvtuwriter.hh:129
    \n+
    void endPoints()
    finish section for the point coordinates
    Definition: pvtuwriter.hh:171
    \n+
    void beginPoints()
    start section for the point coordinates
    Definition: pvtuwriter.hh:166
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,743 +6,225 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-dgfyasp.hh\n+ * vtk\n+pvtuwriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGFPARSERYASP_HH\n- 6#define DUNE_DGFPARSERYASP_HH\n- 7\n- 8#include \n- 9#include \n- 10#include \"dgfparser.hh\"\n+ 5\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH\n+ 8\n+ 9#include \n+ 10#include \n 11\n- 12namespace Dune\n- 13{\n+ 12#include \n+ 13#include \n 14\n- 15 // External Forward Declarations\n- 16 // -----------------------------\n- 17\n- 18 template< class GridImp, class IntersectionImp >\n- 19 class Intersection;\n- 20\n+ 15#include \n+ 16\n+ 17namespace Dune {\n+ 18\n 21\n- 22 namespace dgf\n- 23 {\n- 24\n-38 class YaspGridParameterBlock\n- 39 : public GridParameterBlock\n- 40 {\n- 41 protected:\n-42 int _overlap; // overlap for YaspGrid\n- 43\n- 44 public:\n-46 YaspGridParameterBlock( std::istream &in )\n- 47 : GridParameterBlock( in ),\n- 48 _overlap( 0 ) // default value\n- 49 {\n- 50 // check overlap\n- 51 if( findtoken( \"overlap\" ) )\n- 52 {\n- 53 int x;\n- 54 if( getnextentry(x) ) _overlap = x;\n- 55 else\n- 56 {\n- 57 dwarn << \"GridParameterBlock: found keyword `overlap' but no value,\n-defaulting to `\" << _overlap <<\"' !\\n\";\n- 58 }\n- 59\n- 60 if (_overlap < 0)\n- 61 {\n- 62 DUNE_THROW(DGFException,\"Negative overlap specified!\");\n- 63 }\n- 64 }\n- 65 else\n- 66 {\n- 67 dwarn << \"YaspGridParameterBlock: Parameter 'overlap' not specified, \"\n- 68 << \"defaulting to '\" << _overlap << \"'.\" << std::endl;\n- 69 }\n- 70\n- 71 }\n- 72\n-74 int overlap () const\n- 75 {\n- 76 return _overlap;\n- 77 }\n- 78\n- 79 };\n- 80\n- 81 }\n- 82\n- 86 template \n-87 struct DGFGridFactory< YaspGrid > >\n- 88 {\n-89 typedef YaspGrid > Grid;\n-90 const static int dimension = Grid::dimension;\n-91 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n+ 22 namespace VTK {\n+ 23\n+ 25\n+62 class PVTUWriter {\n+ 63 std::ostream& stream;\n+ 64\n+ 65 std::string fileType;\n+ 66\n+ 67 Indent indent;\n+ 68\n+ 69 public:\n+ 71\n+78 inline PVTUWriter(std::ostream& stream_, FileType fileType_)\n+ 79 : stream(stream_)\n+ 80 {\n+ 81 switch(fileType_) {\n+ 82 case polyData :\n+ 83 fileType = \"PPolyData\";\n+ 84 break;\n+ 85 case unstructuredGrid :\n+ 86 fileType = \"PUnstructuredGrid\";\n+ 87 break;\n+ 88 default :\n+ 89 DUNE_THROW(IOError, \"PVTUWriter: Unknown fileType: \" << fileType_);\n+ 90 }\n+ 91 const std::string& byteOrder = getEndiannessString();\n 92\n- 93 private:\n- 94 typedef FieldVector< ctype, dimension > Point;\n- 95 typedef dgf::BoundaryDomBlock BoundaryDomainBlock;\n- 96\n- 97 public:\n-98 explicit DGFGridFactory ( std::istream &input,\n- 99 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 100 {\n- 101 generate( input, comm );\n- 102 }\n- 103\n-104 explicit DGFGridFactory ( const std::string &filename,\n- 105 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 106 {\n- 107 std::ifstream input( filename.c_str() );\n- 108 if( !input )\n- 109 DUNE_THROW( DGFException, \"Error: Macrofile '\" << filename << \"' not\n-found\" );\n- 110 generate( input, comm );\n- 111 }\n- 112\n-113 ~DGFGridFactory ()\n- 114 {\n- 115 delete boundaryDomainBlock_;\n- 116 }\n- 117\n-118 Grid *grid() const\n- 119 {\n- 120 return grid_;\n- 121 }\n- 122\n- 123 template \n-124 bool wasInserted(const Intersection &intersection) const\n- 125 {\n- 126 return false;\n+ 93 stream << indent << \"\\n\";\n+ 94 stream << indent << \"\\n\";\n+ 98 ++indent;\n+ 99 }\n+ 100\n+102 inline ~PVTUWriter() {\n+ 103 --indent;\n+ 104 stream << indent << \"\\n\"\n+ 105 << std::flush;\n+ 106 }\n+ 107\n+ 109\n+120 inline void beginPointData(const std::string& scalars = \"\",\n+ 121 const std::string& vectors = \"\") {\n+ 122 stream << indent << \"\\n\";\n+ 126 ++indent;\n 127 }\n- 128\n- 129 template \n-130 int boundaryId(const Intersection &intersection) const\n- 131 {\n- 132 if( boundaryDomainBlock_->isactive() )\n- 133 {\n- 134 std::vector< Point > corners;\n- 135 getCorners( intersection.geometry(), corners );\n- 136 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n- 137 if( data )\n- 138 return data->id();\n- 139 else\n- 140 return intersection.indexInInside();\n- 141 }\n- 142 else\n- 143 return intersection.indexInInside();\n- 144 }\n- 145\n- 146 template< int codim >\n-147 int numParameters () const\n- 148 {\n- 149 return 0;\n- 150 }\n- 151\n- 152 // return true if boundary parameters found\n-153 bool haveBoundaryParameters () const\n- 154 {\n- 155 return boundaryDomainBlock_->hasParameter();\n- 156 }\n- 157\n- 158 template< class GG, class II >\n- 159 const typename DGFBoundaryParameter::type &\n-160 boundaryParameter ( const Intersection<_GG,_II_> & intersection ) const\n- 161 {\n- 162 if( haveBoundaryParameters() )\n- 163 {\n- 164 std::vector< Point > corners;\n- 165 getCorners( intersection.geometry(), corners );\n- 166 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n- 167 if( data )\n- 168 return data->parameter();\n- 169 else\n- 170 return DGFBoundaryParameter::defaultValue();\n- 171 }\n- 172 else\n- 173 return DGFBoundaryParameter::defaultValue();\n+129 inline void endPointData() {\n+ 130 --indent;\n+ 131 stream << indent << \"\\n\";\n+ 132 }\n+ 133\n+ 135\n+146 inline void beginCellData(const std::string& scalars = \"\",\n+ 147 const std::string& vectors = \"\") {\n+ 148 stream << indent << \"\\n\";\n+ 152 ++indent;\n+ 153 }\n+155 inline void endCellData() {\n+ 156 --indent;\n+ 157 stream << indent << \"\\n\";\n+ 158 }\n+ 159\n+ 161\n+166 inline void beginPoints() {\n+ 167 stream << indent << \"\\n\";\n+ 168 ++indent;\n+ 169 }\n+171 inline void endPoints() {\n+ 172 --indent;\n+ 173 stream << indent << \"\\n\";\n 174 }\n 175\n- 176 template< class Entity >\n-177 std::vector ¶meter ( const Entity & )\n- 178 {\n- 179 return emptyParam;\n- 180 }\n- 181\n- 182 private:\n- 183 void generate( std::istream &gridin, MPICommunicatorType comm );\n- 184\n- 185 template< class Geometry >\n- 186 static void getCorners ( const Geometry &geometry, std::vector< Point >\n-&corners )\n- 187 {\n- 188 corners.resize( geometry.corners() );\n- 189 for( int i = 0; i < geometry.corners(); ++i )\n- 190 {\n- 191 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );\n- 192 for( int j = 0; j < dimension; ++j )\n- 193 corners[ i ][ j ] = corner[ j ];\n- 194 }\n- 195 }\n- 196\n- 197 Grid *grid_;\n- 198 dgf::BoundaryDomBlock *boundaryDomainBlock_;\n- 199 std::vector emptyParam;\n- 200 };\n+ 177\n+189 inline void beginMain(unsigned ghostLevel = 0) {\n+ 190 stream << indent << \"<\" << fileType\n+ 191 << \" GhostLevel=\\\"\" << ghostLevel << \"\\\">\\n\";\n+ 192 ++indent;\n+ 193 }\n+195 inline void endMain() {\n+ 196 --indent;\n+ 197 stream << indent << \"\\n\";\n+ 198 }\n+ 199\n 201\n- 202 // generate YaspGrid from the provided DGF\n- 203 template< typename ctype, int dim >\n- 204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates > >\n- 205 ::generate ( std::istream &gridin, MPICommunicatorType comm )\n- 206 {\n- 207 using std::abs;\n- 208 dgf::IntervalBlock intervalBlock( gridin );\n- 209\n- 210 if( !intervalBlock.isactive() )\n- 211 DUNE_THROW( DGFException, \"YaspGrid can only be created from an interval\n-block.\" );\n- 212\n- 213 if( intervalBlock.numIntervals() != 1 )\n- 214 DUNE_THROW( DGFException, \"YaspGrid can only handle 1 interval block.\" );\n- 215\n- 216 if( intervalBlock.dimw() != dim )\n- 217 {\n- 218 DUNE_THROW( DGFException,\n- 219 \"Cannot read an interval of dimension \" << intervalBlock.dimw()\n- 220 << \" into a YaspGrid< \" << dim << \" >.\" );\n- 221 }\n+207 void addArray(const std::string& name, unsigned ncomps, Precision prec) {\n+ 208 stream << indent << \"\\n\";\n+ 212 }\n+ 213\n+215 inline void addPiece(const std::string& filename) {\n+ 216 stream << indent << \"\\n\";\n+ 218 }\n+ 219 };\n+ 220\n+ 221 } // namespace VTK\n 222\n- 223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );\n 224\n- 225 FieldVector lang;\n- 226 std::array anz;\n- 227 for( int i = 0; i < dim; ++i )\n- 228 {\n- 229 // check that start point is 0.0\n- 230 if( abs( interval.p[ 0 ][ i ] ) > 1e-10 )\n- 231 {\n- 232 DUNE_THROW( DGFException,\n- 233 \"YaspGrid cannot handle grids with non-zero left lower corner.\" );\n- 234 }\n- 235\n- 236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ];\n- 237 anz[ i ] = interval.n[ i ];\n- 238 }\n- 239\n- 240 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation\n-Transformation;\n- 241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );\n- 242 std::bitset< dim > per;\n- 243 const int numTrafos = trafoBlock.numTransformations();\n- 244 for( int k = 0; k < numTrafos; ++k )\n- 245 {\n- 246 const Transformation &trafo = trafoBlock.transformation( k );\n- 247\n- 248 bool identity = true;\n- 249 for( int i = 0; i < dim; ++i )\n- 250 for( int j = 0; j < dim; ++j )\n- 251 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);\n- 252 if( !identity )\n- 253 DUNE_THROW( DGFException, \"YaspGrid can only handle shifts as periodic\n-face transformations.\" );\n- 254\n- 255 int numDirs = 0;\n- 256 int dir = -1;\n- 257 for( int i = 0; i < dim; ++i )\n- 258 {\n- 259 if( abs( trafo.shift[ i ] ) < 1e-10 )\n- 260 continue;\n- 261 dir = i;\n- 262 ++numDirs;\n- 263 }\n- 264 if( (numDirs != 1) || (abs( abs( trafo.shift[ dir ] ) - lang[ dir ] ) >=\n-1e-10) )\n- 265 {\n- 266 std::cerr << \"Tranformation '\" << trafo\n- 267 << \"' does not map boundaries on boundaries.\" << std::endl;\n- 268 }\n- 269 else\n- 270 per[ dir ] = true;\n- 271 }\n- 272\n- 273 // get grid parameters\n- 274 dgf::YaspGridParameterBlock grdParam( gridin );\n- 275\n- 276 grid_ = new YaspGrid< dim , EquidistantCoordinates >( lang,\n-anz, per, grdParam.overlap(), comm );\n- 277\n- 278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );\n- 279 }\n- 280\n- 284 template \n-285 struct DGFGridFactory< YaspGrid > >\n- 286 {\n-287 typedef YaspGrid > Grid;\n-288 const static int dimension = Grid::dimension;\n-289 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n- 290\n- 291 private:\n- 292 typedef FieldVector< ctype, dimension > Point;\n- 293 typedef dgf::BoundaryDomBlock BoundaryDomainBlock;\n- 294\n- 295 public:\n-296 explicit DGFGridFactory ( std::istream &input,\n- 297 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 298 {\n- 299 generate( input, comm );\n- 300 }\n- 301\n-302 explicit DGFGridFactory ( const std::string &filename,\n- 303 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 304 {\n- 305 std::ifstream input( filename.c_str() );\n- 306 generate( input, comm );\n- 307 }\n- 308\n-309 ~DGFGridFactory ()\n- 310 {\n- 311 delete boundaryDomainBlock_;\n- 312 }\n- 313\n-314 Grid *grid() const\n- 315 {\n- 316 return grid_;\n- 317 }\n- 318\n- 319 template \n-320 bool wasInserted(const Intersection &intersection) const\n- 321 {\n- 322 return false;\n- 323 }\n- 324\n- 325 template \n-326 int boundaryId(const Intersection &intersection) const\n- 327 {\n- 328 if( boundaryDomainBlock_->isactive() )\n- 329 {\n- 330 std::vector< Point > corners;\n- 331 getCorners( intersection.geometry(), corners );\n- 332 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n- 333 if( data )\n- 334 return data->id();\n- 335 else\n- 336 return intersection.indexInInside();\n- 337 }\n- 338 else\n- 339 return intersection.indexInInside();\n- 340 }\n- 341\n- 342 template< int codim >\n-343 int numParameters () const\n- 344 {\n- 345 return 0;\n- 346 }\n- 347\n- 348 // return true if boundary parameters found\n-349 bool haveBoundaryParameters () const\n- 350 {\n- 351 return boundaryDomainBlock_->hasParameter();\n- 352 }\n- 353\n- 354 template< class GG, class II >\n- 355 const typename DGFBoundaryParameter::type &\n-356 boundaryParameter ( const Intersection<_GG,_II_> & intersection ) const\n- 357 {\n- 358 if( haveBoundaryParameters() )\n- 359 {\n- 360 std::vector< Point > corners;\n- 361 getCorners( intersection.geometry(), corners );\n- 362 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n- 363 if( data )\n- 364 return data->parameter();\n- 365 else\n- 366 return DGFBoundaryParameter::defaultValue();\n- 367 }\n- 368 else\n- 369 return DGFBoundaryParameter::defaultValue();\n- 370 }\n- 371\n- 372 template< class Entity >\n-373 std::vector ¶meter ( [[maybe_unused]] const Entity &entity )\n- 374 {\n- 375 return emptyParam;\n- 376 }\n- 377\n- 378 private:\n- 379 void generate( std::istream &gridin, MPICommunicatorType comm );\n- 380\n- 381 template< class Geometry >\n- 382 static void getCorners ( const Geometry &geometry, std::vector< Point >\n-&corners )\n- 383 {\n- 384 corners.resize( geometry.corners() );\n- 385 for( int i = 0; i < geometry.corners(); ++i )\n- 386 {\n- 387 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );\n- 388 for( int j = 0; j < dimension; ++j )\n- 389 corners[ i ][ j ] = corner[ j ];\n- 390 }\n- 391 }\n- 392\n- 393 Grid *grid_;\n- 394 dgf::BoundaryDomBlock *boundaryDomainBlock_;\n- 395 std::vector emptyParam;\n- 396 };\n- 397\n- 398 // generate YaspGrid from the provided DGF\n- 399 template< typename ctype, int dim >\n- 400 inline void DGFGridFactory< YaspGrid > >\n- 401 ::generate ( std::istream &gridin, MPICommunicatorType comm )\n- 402 {\n- 403 using std::abs;\n- 404 dgf::IntervalBlock intervalBlock( gridin );\n- 405\n- 406 if( !intervalBlock.isactive() )\n- 407 DUNE_THROW( DGFException, \"YaspGrid can only be created from an interval\n-block.\" );\n- 408\n- 409 if( intervalBlock.numIntervals() != 1 )\n- 410 DUNE_THROW( DGFException, \"YaspGrid can only handle 1 interval block.\" );\n- 411\n- 412 if( intervalBlock.dimw() != dim )\n- 413 {\n- 414 DUNE_THROW( DGFException,\n- 415 \"Cannot read an interval of dimension \"\n- 416 << intervalBlock.dimw()\n- 417 << \" into a YaspGrid< \" << dim << \" >.\" );\n- 418 }\n- 419\n- 420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );\n- 421\n- 422 FieldVector lower;\n- 423 FieldVector upper;\n- 424 std::array anz;\n- 425 for( int i = 0; i < dim; ++i )\n- 426 {\n- 427 lower[ i ] = interval.p[ 0 ][ i ];\n- 428 upper[ i ] = interval.p[ 1 ][ i ];\n- 429 anz[ i ] = interval.n[ i ];\n- 430 }\n- 431\n- 432 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation\n-Transformation;\n- 433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );\n- 434 std::bitset< dim > periodic;\n- 435 const int numTrafos = trafoBlock.numTransformations();\n- 436 for( int k = 0; k < numTrafos; ++k )\n- 437 {\n- 438 const Transformation &trafo = trafoBlock.transformation( k );\n- 439\n- 440 bool identity = true;\n- 441 for( int i = 0; i < dim; ++i )\n- 442 for( int j = 0; j < dim; ++j )\n- 443 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);\n- 444 if( !identity )\n- 445 DUNE_THROW( DGFException, \"YaspGrid can only handle shifts as periodic\n-face transformations.\" );\n- 446\n- 447 int numDirs = 0;\n- 448 int dir = -1;\n- 449 for( int currentDir = 0; currentDir < dim; ++currentDir )\n- 450 {\n- 451 if( abs( trafo.shift[ currentDir ] ) > 1e-10 )\n- 452 {\n- 453 dir = currentDir;\n- 454 ++numDirs;\n- 455 }\n- 456 }\n- 457 if ( (numDirs != 1)\n- 458 || (abs( abs( trafo.shift[ dir ] ) - abs( upper[ dir ] - lower[ dir ] ) )\n->= 1e-10) )\n- 459 {\n- 460 std::cerr << \"Tranformation '\" << trafo\n- 461 << \"' does not map boundaries on boundaries.\" << std::endl;\n- 462 }\n- 463 else\n- 464 {\n- 465 periodic[ dir ] = true;\n- 466 }\n- 467 }\n- 468\n- 469 // get grid parameters\n- 470 dgf::YaspGridParameterBlock grdParam( gridin );\n- 471\n- 472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates >\n- 473 ( lower, upper, anz, periodic, grdParam.overlap(), comm );\n- 474\n- 475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );\n- 476 }\n- 477\n- 483 template< class ctype, int dim >\n-484 class DGFGridFactory< Dune::YaspGrid > >\n- 485 {\n- 486 using Grid = Dune::YaspGrid >;\n- 487 public:\n- 488 template< typename In >\n-489 DGFGridFactory ( const In & ) {}\n-490 Grid *grid()\n- 491 {\n- 492 throw std::invalid_argument( \"Tensor product coordinates for YaspGrid are\n-currently not supported via the DGFGridFactory\" );\n- 493 }\n- 494 };\n- 495\n- 496 template \n-497 struct DGFGridInfo< YaspGrid > {\n-498 static int refineStepsForHalf() {return 1;}\n-499 static double refineWeight() {return std::pow(0.5,dim);}\n- 500 };\n- 501\n- 502}\n- 503#endif // #ifndef DUNE_DGFPARSERYASP_HH\n-yaspgrid.hh\n+ 225} // namespace Dune\n+ 226\n+ 227#endif // DUNE_GRID_IO_FILE_VTK_PVTUWRITER_HH\n+common.hh\n+Common stuff for the VTKWriter.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::abs\n-void abs(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:328\n-Dune::Alberta::AffineTransformation\n-ALBERTA AFF_TRAFO AffineTransformation\n-Definition: misc.hh:52\n-Dune::DGFGridFactory\n-Definition: dgfgridfactory.hh:38\n-Dune::DGFGridFactory::MPICommunicatorType\n-MPIHelper::MPICommunicator MPICommunicatorType\n-Definition: dgfgridfactory.hh:41\n-Dune::DGFGridFactory::Grid\n-G Grid\n-Definition: dgfgridfactory.hh:39\n-Dune::DGFGridFactory::dimension\n-static const int dimension\n-Definition: dgfgridfactory.hh:40\n-Dune::DGFGridFactory::haveBoundaryParameters\n-bool haveBoundaryParameters() const\n-Definition: dgfgridfactory.hh:151\n-Dune::Intersection\n-Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n-element or with the d...\n-Definition: common/intersection.hh:164\n-Dune::Intersection::geometry\n-Geometry geometry() const\n-geometrical information about the intersection in global coordinates.\n-Definition: common/intersection.hh:323\n-Dune::Intersection::indexInInside\n-int indexInInside() const\n-Local index of codim 1 entity in the inside() entity where intersection is\n-contained in.\n-Definition: common/intersection.hh:346\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::Geometry\n-Wrapper class for geometries.\n-Definition: common/geometry.hh:71\n-Dune::Geometry::GlobalCoordinate\n-FieldVector< ctype, cdim > GlobalCoordinate\n-type of the global coordinates\n-Definition: common/geometry.hh:106\n-Dune::Geometry::corner\n-GlobalCoordinate corner(int i) const\n-Obtain a corner of the geometry.\n-Definition: common/geometry.hh:219\n-Dune::Geometry::corners\n-int corners() const\n-Return the number of corners of the reference element.\n-Definition: common/geometry.hh:205\n-Dune::Grid::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/grid.hh:387\n-Dune::dgf::BasicBlock::findtoken\n-bool findtoken(std ::string token)\n-Definition: basic.cc:123\n-Dune::dgf::BasicBlock::getnextentry\n-bool getnextentry(ENTRY &entry)\n-Definition: basic.hh:63\n-Dune::dgf::DomainData\n-Definition: boundarydom.hh:23\n-Dune::dgf::DomainData::id\n-int id() const\n-Definition: boundarydom.hh:42\n-Dune::dgf::DomainData::parameter\n-const BoundaryParameter & parameter() const\n-Definition: boundarydom.hh:54\n-Dune::dgf::BoundaryDomBlock\n-Definition: boundarydom.hh:195\n-Dune::dgf::GridParameterBlock\n-Common Grid parameters.\n-Definition: gridparameter.hh:35\n-Dune::DGFException\n-exception class for IO errors in the DGF parser\n-Definition: dgfexception.hh:16\n-Dune::DGFGridInfo\n-Some simple static information for a given GridType.\n-Definition: io/file/dgfparser/dgfparser.hh:56\n-Dune::dgf::YaspGridParameterBlock\n-Grid parameters for YaspGrid.\n-Definition: dgfyasp.hh:40\n-Dune::dgf::YaspGridParameterBlock::_overlap\n-int _overlap\n-Definition: dgfyasp.hh:42\n-Dune::dgf::YaspGridParameterBlock::YaspGridParameterBlock\n-YaspGridParameterBlock(std::istream &in)\n-constructor taking istream\n-Definition: dgfyasp.hh:46\n-Dune::dgf::YaspGridParameterBlock::overlap\n-int overlap() const\n-get dimension of world found in block\n-Definition: dgfyasp.hh:74\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-DGFGridFactory\n-DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::\n-getCommunicator())\n-Definition: dgfyasp.hh:98\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-DGFGridFactory\n-DGFGridFactory(const std::string &filename, MPICommunicatorType\n-comm=MPIHelper::getCommunicator())\n-Definition: dgfyasp.hh:104\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-wasInserted\n-bool wasInserted(const Intersection &intersection) const\n-Definition: dgfyasp.hh:124\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-numParameters\n-int numParameters() const\n-Definition: dgfyasp.hh:147\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-parameter\n-std::vector< double > & parameter(const Entity &)\n-Definition: dgfyasp.hh:177\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-MPICommunicatorType\n-MPIHelper::MPICommunicator MPICommunicatorType\n-Definition: dgfyasp.hh:91\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-boundaryParameter\n-const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II\n-> &intersection) const\n-Definition: dgfyasp.hh:160\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-~DGFGridFactory\n-~DGFGridFactory()\n-Definition: dgfyasp.hh:113\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-haveBoundaryParameters\n-bool haveBoundaryParameters() const\n-Definition: dgfyasp.hh:153\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-grid\n-Grid * grid() const\n-Definition: dgfyasp.hh:118\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-Grid\n-YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid\n-Definition: dgfyasp.hh:89\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n-boundaryId\n-int boundaryId(const Intersection &intersection) const\n-Definition: dgfyasp.hh:130\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::boundaryParameter\n-const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II\n-> &intersection) const\n-Definition: dgfyasp.hh:356\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::DGFGridFactory\n-DGFGridFactory(const std::string &filename, MPICommunicatorType\n-comm=MPIHelper::getCommunicator())\n-Definition: dgfyasp.hh:302\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::grid\n-Grid * grid() const\n-Definition: dgfyasp.hh:314\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::boundaryId\n-int boundaryId(const Intersection &intersection) const\n-Definition: dgfyasp.hh:326\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::Grid\n-YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid\n-Definition: dgfyasp.hh:287\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::wasInserted\n-bool wasInserted(const Intersection &intersection) const\n-Definition: dgfyasp.hh:320\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::parameter\n-std::vector< double > & parameter(const Entity &entity)\n-Definition: dgfyasp.hh:373\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::haveBoundaryParameters\n-bool haveBoundaryParameters() const\n-Definition: dgfyasp.hh:349\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::MPICommunicatorType\n-MPIHelper::MPICommunicator MPICommunicatorType\n-Definition: dgfyasp.hh:289\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::DGFGridFactory\n-DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::\n-getCommunicator())\n-Definition: dgfyasp.hh:296\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::~DGFGridFactory\n-~DGFGridFactory()\n-Definition: dgfyasp.hh:309\n-Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n->_>::numParameters\n-int numParameters() const\n-Definition: dgfyasp.hh:343\n-Dune::DGFGridFactory<_Dune::YaspGrid<_dim,_Dune::TensorProductCoordinates<\n-ctype,_dim_>_>_>::grid\n-Grid * grid()\n-Definition: dgfyasp.hh:490\n-Dune::DGFGridFactory<_Dune::YaspGrid<_dim,_Dune::TensorProductCoordinates<\n-ctype,_dim_>_>_>::DGFGridFactory\n-DGFGridFactory(const In &)\n-Definition: dgfyasp.hh:489\n-Dune::DGFGridInfo<_YaspGrid<_dim,_Coordinates_>_>::refineWeight\n-static double refineWeight()\n-Definition: dgfyasp.hh:499\n-Dune::DGFGridInfo<_YaspGrid<_dim,_Coordinates_>_>::refineStepsForHalf\n-static int refineStepsForHalf()\n-Definition: dgfyasp.hh:498\n-Dune::DGFBoundaryParameter::defaultValue\n-static const type & defaultValue()\n-default constructor\n-Definition: parser.hh:28\n-Dune::DGFBoundaryParameter::type\n-std::string type\n-type of additional boundary parameters\n-Definition: parser.hh:25\n-Dune::YaspGrid\n-[ provides Dune::Grid ]\n-Definition: yaspgrid.hh:163\n-Dune::EquidistantCoordinates\n-Container for equidistant coordinates in a YaspGrid.\n-Definition: coordinates.hh:29\n-Dune::EquidistantOffsetCoordinates\n-Container for equidistant coordinates in a YaspGrid with non-trivial origin.\n-Definition: coordinates.hh:131\n-dgfparser.hh\n-intersection.hh\n+Dune::VTK::Precision\n+Precision\n+which precision to use when writing out data to vtk files\n+Definition: common.hh:271\n+Dune::VTK::FileType\n+FileType\n+which type of VTK file to write\n+Definition: common.hh:252\n+Dune::VTK::polyData\n+@ polyData\n+for .vtp files (PolyData)\n+Definition: common.hh:254\n+Dune::VTK::unstructuredGrid\n+@ unstructuredGrid\n+for .vtu files (UnstructuredGrid)\n+Definition: common.hh:256\n+Dune::VTK::toString\n+std::string toString(Precision p)\n+map precision to VTK type name\n+Definition: common.hh:280\n+Dune::VTK::getEndiannessString\n+std::string getEndiannessString()\n+determine endianness of this C++ implementation\n+Definition: common.hh:232\n+Dune::VTK::PVTUWriter\n+Dump a .vtu/.vtp files contents to a stream.\n+Definition: pvtuwriter.hh:62\n+Dune::VTK::PVTUWriter::~PVTUWriter\n+~PVTUWriter()\n+write footer\n+Definition: pvtuwriter.hh:102\n+Dune::VTK::PVTUWriter::endMain\n+void endMain()\n+finish the main PolyData/UnstructuredGrid section\n+Definition: pvtuwriter.hh:195\n+Dune::VTK::PVTUWriter::endCellData\n+void endCellData()\n+finish CellData section\n+Definition: pvtuwriter.hh:155\n+Dune::VTK::PVTUWriter::addArray\n+void addArray(const std::string &name, unsigned ncomps, Precision prec)\n+Add an array to the output file.\n+Definition: pvtuwriter.hh:207\n+Dune::VTK::PVTUWriter::beginMain\n+void beginMain(unsigned ghostLevel=0)\n+start the main PPolyData/PUnstructuredGrid section\n+Definition: pvtuwriter.hh:189\n+Dune::VTK::PVTUWriter::beginCellData\n+void beginCellData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start CellData section\n+Definition: pvtuwriter.hh:146\n+Dune::VTK::PVTUWriter::beginPointData\n+void beginPointData(const std::string &scalars=\"\", const std::string\n+&vectors=\"\")\n+start PointData section\n+Definition: pvtuwriter.hh:120\n+Dune::VTK::PVTUWriter::addPiece\n+void addPiece(const std::string &filename)\n+Add a serial piece to the output file.\n+Definition: pvtuwriter.hh:215\n+Dune::VTK::PVTUWriter::PVTUWriter\n+PVTUWriter(std::ostream &stream_, FileType fileType_)\n+create a PVTUWriter object\n+Definition: pvtuwriter.hh:78\n+Dune::VTK::PVTUWriter::endPointData\n+void endPointData()\n+finish PointData section\n+Definition: pvtuwriter.hh:129\n+Dune::VTK::PVTUWriter::endPoints\n+void endPoints()\n+finish section for the point coordinates\n+Definition: pvtuwriter.hh:171\n+Dune::VTK::PVTUWriter::beginPoints\n+void beginPoints()\n+start section for the point coordinates\n+Definition: pvtuwriter.hh:166\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00833.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00833.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entitykey_inline.hh File Reference\n+dune-grid: volumeiterators.hh File Reference\n \n \n \n \n \n \n \n@@ -58,34 +58,46 @@\n \n \n \n \n \n
    \n \n-
    entitykey_inline.hh File Reference
    \n+
    volumeiterators.hh File Reference
    \n
    \n
    \n-
    #include <algorithm>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n+\n

    Go to the source code of this file.

    \n \n+\n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::VTK::ConformingVolumeIteratorFactory< GV >
     
    class  Dune::VTK::NonConformingVolumeIteratorFactory< GV >
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,21 +6,30 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-Namespaces\n-entitykey_inline.hh File Reference\n-#include \n-#include \n-#include \n+ * vtk\n+Classes | Namespaces\n+volumeiterators.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::VTK::ConformingVolumeIteratorFactory<_GV_>\n+\u00a0\n+class \u00a0Dune::VTK::NonConformingVolumeIteratorFactory<_GV_>\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::VTK\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00833_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entitykey_inline.hh Source File\n+dune-grid: volumeiterators.hh Source File\n \n \n \n \n \n \n \n@@ -58,210 +58,204 @@\n \n
    \n \n \n \n
    \n-
    entitykey_inline.hh
    \n+
    volumeiterators.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ENTITYKEY_INLINE_HH
    \n-
    6#define DUNE_ENTITYKEY_INLINE_HH
    \n-
    7
    \n-
    8#include <algorithm>
    \n-
    9#include <dune/geometry/referenceelements.hh>
    \n-\n-
    11
    \n-
    12namespace Dune
    \n-
    13{
    \n-
    14
    \n-
    15 // DGFEntityKey
    \n-
    16 // ------------
    \n-
    17
    \n-
    18 template< class A >
    \n-
    19 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey )
    \n-
    20 : key_( key.size() ),
    \n-
    21 origKey_( key.size() ),
    \n-
    22 origKeySet_( setOrigKey )
    \n-
    23 {
    \n-
    24 for (size_t i=0; i<key_.size(); i++)
    \n-
    25 {
    \n-
    26 key_[i]=key[i];
    \n-
    27 origKey_[i]=key_[i];
    \n-
    28 }
    \n-
    29 std :: sort( key_.begin(), key_.end() );
    \n-
    30 }
    \n-
    31
    \n-\n-
    33 template< class A >
    \n-
    34 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key,
    \n-
    35 int N, int offset, bool setOrigKey )
    \n-
    36 : key_( N ),
    \n-
    37 origKey_( N ),
    \n-
    38 origKeySet_( setOrigKey )
    \n-
    39 {
    \n-
    40 for (size_t i=0; i<key_.size(); i++)
    \n-
    41 {
    \n-
    42 key_[i]=key[(i+offset)%key.size()];
    \n-
    43 origKey_[i]=key[(i+offset)%key.size()];
    \n-
    44 }
    \n-
    45 std :: sort( key_.begin(), key_.end() );
    \n-
    46 }
    \n-
    47
    \n+
    5
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
    \n+
    8
    \n+\n+
    10
    \n+\n+\n+\n+\n+
    15
    \n+
    16namespace Dune {
    \n+
    19
    \n+
    20 namespace VTK {
    \n+
    21
    \n+
    22 template<typename GV>
    \n+\n+
    24 const GV& gv;
    \n+
    25
    \n+
    26 typedef typename GV::IndexSet IndexSet;
    \n+
    27 const IndexSet& indexSet() const { return gv.indexSet(); }
    \n+\n+\n+
    30
    \n+
    31 public:
    \n+
    32 static const unsigned dimCell = GV::dimension;
    \n+
    33
    \n+
    34 typedef typename GV::template Codim<0>::Entity Cell;
    \n+
    35 typedef typename GV::template Codim<0>::
    \n+
    36 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
    \n+
    37
    \n+\n+\n+
    40
    \n+\n+\n+
    43 typename GV::IndexSet> PointIterator;
    \n+
    44
    \n+\n+\n+
    47 typedef typename GV::Communication Communication;
    \n
    48
    \n-
    49 template< class A >
    \n-\n-
    51 : key_( k.key_.size() ),
    \n-
    52 origKey_( k.key_.size() ),
    \n-
    53 origKeySet_( k. origKeySet_ )
    \n-
    54 {
    \n-
    55 for (size_t i=0; i<key_.size(); i++)
    \n-
    56 {
    \n-
    57 key_[i]=k.key_[i];
    \n-
    58 origKey_[i]=k.origKey_[i];
    \n-
    59 }
    \n-
    60 }
    \n-
    61
    \n-
    62
    \n-
    63 template< class A >
    \n-\n-
    65 {
    \n-
    66 assert(key_.size()==k.key_.size());
    \n-
    67 for (size_t i=0; i<key_.size(); i++) {
    \n-
    68 key_[i]=k.key_[i];
    \n-
    69 origKey_[i]=k.origKey_[i];
    \n-
    70 }
    \n-
    71 origKeySet_ = k.origKeySet_;
    \n-
    72 return *this;
    \n-
    73 }
    \n-
    74
    \n-
    75
    \n-
    76 template< class A >
    \n-
    77 inline void DGFEntityKey< A >
    \n-
    78 :: orientation ( int base, std::vector< std :: vector< double > > &vtx )
    \n-
    79 {
    \n-
    80 if (key_.size()==3) {
    \n-
    81 assert( (size_t) origKey_[0] < vtx.size() );
    \n-
    82 std::vector<double>& p0 = vtx[origKey_[0]];
    \n-
    83 assert( (size_t) origKey_[1] < vtx.size() );
    \n-
    84 std::vector<double>& p1 = vtx[origKey_[1]];
    \n-
    85 assert( (size_t) origKey_[2] < vtx.size() );
    \n-
    86 std::vector<double>& p2 = vtx[origKey_[2]];
    \n-
    87 assert( (size_t) base < vtx.size() );
    \n-
    88 std::vector<double>& q = vtx[base];
    \n-
    89 double n[3];
    \n-
    90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]);
    \n-
    91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]);
    \n-
    92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]);
    \n-
    93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]);
    \n-
    94 bool reorient = (test>0);
    \n-
    95 if (reorient) {
    \n-
    96 A key1=origKey_[1];
    \n-
    97 origKey_[1]=origKey_[2];
    \n-
    98 origKey_[2]=key1;
    \n-
    99 }
    \n-
    100 }
    \n-
    101 }
    \n-
    102
    \n-
    103
    \n-
    104 template< class A >
    \n-
    105 inline void DGFEntityKey< A > :: print ( std :: ostream &out ) const
    \n-
    106 {
    \n-
    107 for( size_t i = 0; i < key_.size(); ++i )
    \n-
    108 out << key_[ i ] << " ";
    \n-
    109 out << std :: endl;
    \n-
    110 }
    \n-
    111
    \n+
    49 explicit ConformingVolumeIteratorFactory(const GV& gv_)
    \n+
    50 : gv(gv_)
    \n+
    51 { }
    \n+
    52
    \n+\n+
    54 return gv.template begin<0, InteriorBorder_Partition>();
    \n+
    55 }
    \n+\n+
    57 return gv.template end<0, InteriorBorder_Partition>();
    \n+
    58 }
    \n+
    59
    \n+\n+\n+
    62 }
    \n+\n+
    64 return CornerIterator(endCells());
    \n+
    65 }
    \n+
    66
    \n+\n+
    68 return PointIterator(beginCells(), endCells(), gv.indexSet());
    \n+
    69 }
    \n+\n+
    71 return PointIterator(endCells());
    \n+
    72 }
    \n+
    73
    \n+\n+
    75 return ConnectivityWriter(*this);
    \n+
    76 }
    \n+
    77 const Communication& comm() const {
    \n+
    78 return gv.comm();
    \n+
    79 }
    \n+
    80 };
    \n+
    81
    \n+
    82 template<typename GV>
    \n+\n+
    84 const GV& gv;
    \n+
    85
    \n+
    86 public:
    \n+
    87 static const unsigned dimCell = GV::dimension;
    \n+
    88
    \n+
    89 typedef typename GV::template Codim<0>::Entity Cell;
    \n+
    90 typedef typename GV::template Codim<0>::
    \n+
    91 template Partition<InteriorBorder_Partition>::Iterator CellIterator;
    \n+
    92
    \n+\n+\n+
    95
    \n+
    96 typedef Corner Point;
    \n+\n+
    98
    \n+\n+
    100 typedef typename GV::Communication Communication;
    \n+
    101
    \n+\n+
    103 : gv(gv_)
    \n+
    104 { }
    \n+
    105
    \n+\n+
    107 return gv.template begin<0, InteriorBorder_Partition>();
    \n+
    108 }
    \n+\n+
    110 return gv.template end<0, InteriorBorder_Partition>();
    \n+
    111 }
    \n
    112
    \n-
    113 // ElementFaceUtil
    \n-
    114 // ---------------
    \n-
    115
    \n-
    116 template< int dim >
    \n-\n-
    118 ElementFaceUtil::generateCubeFace
    \n-
    119 ( const std::vector< unsigned int > &element, int f )
    \n-
    120 {
    \n-
    121 auto refCube = ReferenceElements< double, dim >::cube();
    \n-
    122 const unsigned int size = refCube.size( f, 1, dim );
    \n-
    123 std::vector< unsigned int > k( size );
    \n-
    124 for( unsigned int i = 0; i < size; ++ i )
    \n-
    125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ];
    \n-\n-
    127 }
    \n-
    128
    \n-
    129
    \n-
    130 template< int dim >
    \n-\n-
    132 ElementFaceUtil :: generateSimplexFace
    \n-
    133 ( const std :: vector< unsigned int > &element, int f )
    \n-
    134 {
    \n-
    135 auto refSimplex = ReferenceElements< double, dim >::simplex();
    \n-
    136 const unsigned int size = refSimplex.size( f, 1, dim );
    \n-
    137 std :: vector< unsigned int > k( size );
    \n-
    138 for( unsigned int i = 0; i < size; ++i )
    \n-
    139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ];
    \n-\n-
    141 }
    \n-
    142
    \n-
    143
    \n-\n-
    145 ElementFaceUtil::generateFace ( int dim, const std::vector< unsigned int > &element, int f )
    \n-
    146 {
    \n-
    147 if( element.size() == size_t(dim+1) )
    \n-
    148 {
    \n-
    149 // Simplex element
    \n-
    150 switch( dim )
    \n-
    151 {
    \n-
    152 case 3 :
    \n-
    153 return generateSimplexFace< 3 >( element, f );
    \n-
    154 case 2 :
    \n-
    155 return generateSimplexFace< 2 >( element, f );
    \n-
    156 case 1 :
    \n-
    157 return generateSimplexFace< 1 >( element, f );
    \n-
    158 default :
    \n-
    159 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
    \n-
    160 }
    \n-
    161 }
    \n-
    162 else
    \n-
    163 {
    \n-
    164 // Cube element
    \n-
    165 switch( dim )
    \n-
    166 {
    \n-
    167 case 3 :
    \n-
    168 return generateCubeFace< 3 >( element, f );
    \n-
    169 case 2 :
    \n-
    170 return generateCubeFace< 2 >( element, f );
    \n-
    171 case 1 :
    \n-
    172 return generateCubeFace< 1 >( element, f );
    \n-
    173 default :
    \n-
    174 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
    \n-
    175 }
    \n-
    176 }
    \n-
    177 }
    \n-
    178
    \n-
    179} // end namespace Dune
    \n-
    180
    \n-
    181#endif // DUNE_ENTITYKEY_INLINE_HH
    \n-\n+\n+\n+
    115 }
    \n+\n+
    117 return CornerIterator(endCells());
    \n+
    118 }
    \n+
    119
    \n+\n+
    121 PointIterator endPoints() const { return endCorners(); }
    \n+
    122
    \n+\n+
    124 return ConnectivityWriter();
    \n+
    125 }
    \n+
    126 const Communication& comm() const {
    \n+
    127 return gv.comm();
    \n+
    128 }
    \n+
    129 };
    \n+
    130
    \n+
    131 } // namespace VTK
    \n+
    132
    \n+
    134
    \n+
    135} // namespace Dune
    \n+
    136
    \n+
    137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH
    \n+\n+\n+\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: entitykey.hh:21
    \n-
    DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)
    Definition: entitykey_inline.hh:64
    \n-
    void orientation(int base, std ::vector< std ::vector< double > > &vtx)
    Definition: entitykey_inline.hh:78
    \n-
    void print(std ::ostream &out=std ::cerr) const
    Definition: entitykey_inline.hh:105
    \n-
    DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)
    Definition: entitykey_inline.hh:19
    \n-
    static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
    Definition: entitykey_inline.hh:145
    \n+
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n+
    iterate over the corners of some cell range
    Definition: corneriterator.hh:39
    \n+
    writer for the connectivity array in conforming mode
    Definition: functionwriter.hh:195
    \n+
    writer for the connectivity array in nonconforming mode
    Definition: functionwriter.hh:261
    \n+
    iterate over the points of some corner range
    Definition: pointiterator.hh:58
    \n+
    Definition: volumeiterators.hh:23
    \n+
    CornerIterator endCorners() const
    Definition: volumeiterators.hh:63
    \n+
    VTK::CornerIterator< CellIterator > CornerIterator
    Definition: volumeiterators.hh:39
    \n+
    VTK::Corner< Cell > Corner
    Definition: volumeiterators.hh:38
    \n+
    CellIterator endCells() const
    Definition: volumeiterators.hh:56
    \n+
    GV::Communication Communication
    Definition: volumeiterators.hh:47
    \n+
    VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator
    Definition: volumeiterators.hh:43
    \n+
    ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > > ConnectivityWriter
    Definition: volumeiterators.hh:46
    \n+
    CornerIterator beginCorners() const
    Definition: volumeiterators.hh:60
    \n+
    static const unsigned dimCell
    Definition: volumeiterators.hh:32
    \n+
    PointIterator endPoints() const
    Definition: volumeiterators.hh:70
    \n+
    const Communication & comm() const
    Definition: volumeiterators.hh:77
    \n+
    ConformingVolumeIteratorFactory(const GV &gv_)
    Definition: volumeiterators.hh:49
    \n+
    VTK::Corner< Cell > Point
    Definition: volumeiterators.hh:41
    \n+
    ConnectivityWriter makeConnectivity() const
    Definition: volumeiterators.hh:74
    \n+
    CellIterator beginCells() const
    Definition: volumeiterators.hh:53
    \n+
    GV::template Codim< 0 >::Entity Cell
    Definition: volumeiterators.hh:34
    \n+
    PointIterator beginPoints() const
    Definition: volumeiterators.hh:67
    \n+
    GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
    Definition: volumeiterators.hh:36
    \n+
    Definition: volumeiterators.hh:83
    \n+
    const Communication & comm() const
    Definition: volumeiterators.hh:126
    \n+
    PointIterator beginPoints() const
    Definition: volumeiterators.hh:120
    \n+
    GV::Communication Communication
    Definition: volumeiterators.hh:100
    \n+
    CellIterator beginCells() const
    Definition: volumeiterators.hh:106
    \n+
    GV::template Codim< 0 >::Entity Cell
    Definition: volumeiterators.hh:89
    \n+
    NonConformingVolumeIteratorFactory(const GV &gv_)
    Definition: volumeiterators.hh:102
    \n+
    ConnectivityWriter makeConnectivity() const
    Definition: volumeiterators.hh:123
    \n+
    NonConformingConnectivityWriter< Cell > ConnectivityWriter
    Definition: volumeiterators.hh:99
    \n+
    static const unsigned dimCell
    Definition: volumeiterators.hh:87
    \n+
    CellIterator endCells() const
    Definition: volumeiterators.hh:109
    \n+
    CornerIterator endCorners() const
    Definition: volumeiterators.hh:116
    \n+
    VTK::CornerIterator< CellIterator > CornerIterator
    Definition: volumeiterators.hh:94
    \n+
    VTK::Corner< Cell > Corner
    Definition: volumeiterators.hh:93
    \n+
    CornerIterator PointIterator
    Definition: volumeiterators.hh:97
    \n+
    GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
    Definition: volumeiterators.hh:91
    \n+
    PointIterator endPoints() const
    Definition: volumeiterators.hh:121
    \n+
    Corner Point
    Definition: volumeiterators.hh:96
    \n+
    CornerIterator beginCorners() const
    Definition: volumeiterators.hh:113
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,222 +6,287 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-entitykey_inline.hh\n+ * vtk\n+volumeiterators.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ENTITYKEY_INLINE_HH\n- 6#define DUNE_ENTITYKEY_INLINE_HH\n- 7\n- 8#include \n- 9#include \n- 10#include \n- 11\n- 12namespace Dune\n- 13{\n- 14\n- 15 // DGFEntityKey\n- 16 // ------------\n- 17\n- 18 template< class A >\n-19 inline DGFEntityKey<_A_>_::_DGFEntityKey ( const std :: vector< A > &key,\n-bool setOrigKey )\n- 20 : key_( key.size() ),\n- 21 origKey_( key.size() ),\n-22 origKeySet_( setOrigKey )\n- 23 {\n- 24 for (size_t i=0; i\n- 34 inline DGFEntityKey<_A_>_::_DGFEntityKey ( const std :: vector< A > &key,\n- 35 int N, int offset, bool setOrigKey )\n- 36 : key_( N ),\n- 37 origKey_( N ),\n- 38 origKeySet_( setOrigKey )\n- 39 {\n- 40 for (size_t i=0; i\n+ 10\n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15\n+ 16namespace Dune {\n+ 19\n+ 20 namespace VTK {\n+ 21\n+ 22 template\n+23 class ConformingVolumeIteratorFactory {\n+ 24 const GV& gv;\n+ 25\n+ 26 typedef typename GV::IndexSet IndexSet;\n+27 const IndexSet& indexSet() const { return gv.indexSet(); }\n+ 28 friend class ConformingConnectivityWriter<\n+ 29 ConformingVolumeIteratorFactory >;\n+ 30\n+ 31 public:\n+32 static const unsigned dimCell = GV::dimension;\n+ 33\n+34 typedef typename GV::template Codim<0>::Entity Cell;\n+ 35 typedef typename GV::template Codim<0>::\n+36 template Partition::Iterator CellIterator;\n+ 37\n+38 typedef VTK::Corner Corner;\n+39 typedef VTK::CornerIterator CornerIterator;\n+ 40\n+41 typedef VTK::Corner Point;\n+ 42 typedef VTK::PointIterator PointIterator;\n+ 44\n+ 45 typedef ConformingConnectivityWriter\n+46 > ConnectivityWriter;\n+47 typedef typename GV::Communication Communication;\n 48\n- 49 template< class A >\n-50 inline DGFEntityKey<_A_>_::_DGFEntityKey ( const DGFEntityKey<_A_> &k )\n- 51 : key_( k.key_.size() ),\n- 52 origKey_( k.key_.size() ),\n- 53 origKeySet_( k. origKeySet_ )\n- 54 {\n- 55 for (size_t i=0; i\n-64 inline DGFEntityKey<_A_> &DGFEntityKey<_A_>_::_operator=( const\n-DGFEntityKey<_A_> &k )\n- 65 {\n- 66 assert(key_.size()==k.key_.size());\n- 67 for (size_t i=0; i\n- 77 inline void DGFEntityKey<_A_>\n-78::_orientation ( int base, std::vector< std :: vector< double > > &vtx )\n- 79 {\n- 80 if (key_.size()==3) {\n- 81 assert( (size_t) origKey_[0] < vtx.size() );\n- 82 std::vector& p0 = vtx[origKey_[0]];\n- 83 assert( (size_t) origKey_[1] < vtx.size() );\n- 84 std::vector& p1 = vtx[origKey_[1]];\n- 85 assert( (size_t) origKey_[2] < vtx.size() );\n- 86 std::vector& p2 = vtx[origKey_[2]];\n- 87 assert( (size_t) base < vtx.size() );\n- 88 std::vector& q = vtx[base];\n- 89 double n[3];\n- 90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]);\n- 91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]);\n- 92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]);\n- 93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]);\n- 94 bool reorient = (test>0);\n- 95 if (reorient) {\n- 96 A key1=origKey_[1];\n- 97 origKey_[1]=origKey_[2];\n- 98 origKey_[2]=key1;\n- 99 }\n- 100 }\n- 101 }\n- 102\n- 103\n- 104 template< class A >\n-105 inline void DGFEntityKey<_A_>_::_print ( std :: ostream &out ) const\n- 106 {\n- 107 for( size_t i = 0; i < key_.size(); ++i )\n- 108 out << key_[ i ] << \" \";\n- 109 out << std :: endl;\n- 110 }\n- 111\n+49 explicit ConformingVolumeIteratorFactory(const GV& gv_)\n+ 50 : gv(gv_)\n+ 51 { }\n+ 52\n+53 CellIterator beginCells() const {\n+ 54 return gv.template begin<0, InteriorBorder_Partition>();\n+ 55 }\n+56 CellIterator endCells() const {\n+ 57 return gv.template end<0, InteriorBorder_Partition>();\n+ 58 }\n+ 59\n+60 CornerIterator beginCorners() const {\n+ 61 return CornerIterator(beginCells(), endCells());\n+ 62 }\n+63 CornerIterator endCorners() const {\n+ 64 return CornerIterator(endCells());\n+ 65 }\n+ 66\n+67 PointIterator beginPoints() const {\n+ 68 return PointIterator(beginCells(), endCells(), gv.indexSet());\n+ 69 }\n+70 PointIterator endPoints() const {\n+ 71 return PointIterator(endCells());\n+ 72 }\n+ 73\n+74 ConnectivityWriter makeConnectivity() const {\n+ 75 return ConnectivityWriter(*this);\n+ 76 }\n+77 const Communication& comm() const {\n+ 78 return gv.comm();\n+ 79 }\n+ 80 };\n+ 81\n+ 82 template\n+83 class NonConformingVolumeIteratorFactory {\n+ 84 const GV& gv;\n+ 85\n+ 86 public:\n+87 static const unsigned dimCell = GV::dimension;\n+ 88\n+89 typedef typename GV::template Codim<0>::Entity Cell;\n+ 90 typedef typename GV::template Codim<0>::\n+91 template Partition::Iterator CellIterator;\n+ 92\n+93 typedef VTK::Corner Corner;\n+94 typedef VTK::CornerIterator CornerIterator;\n+ 95\n+96 typedef Corner Point;\n+97 typedef CornerIterator PointIterator;\n+ 98\n+99 typedef NonConformingConnectivityWriter ConnectivityWriter;\n+100 typedef typename GV::Communication Communication;\n+ 101\n+102 explicit NonConformingVolumeIteratorFactory(const GV& gv_)\n+ 103 : gv(gv_)\n+ 104 { }\n+ 105\n+106 CellIterator beginCells() const {\n+ 107 return gv.template begin<0, InteriorBorder_Partition>();\n+ 108 }\n+109 CellIterator endCells() const {\n+ 110 return gv.template end<0, InteriorBorder_Partition>();\n+ 111 }\n 112\n- 113 // ElementFaceUtil\n- 114 // ---------------\n- 115\n- 116 template< int dim >\n- 117 inline DGFEntityKey<_unsigned_int_>\n- 118 ElementFaceUtil::generateCubeFace\n- 119 ( const std::vector< unsigned int > &element, int f )\n- 120 {\n- 121 auto refCube = ReferenceElements< double, dim >::cube();\n- 122 const unsigned int size = refCube.size( f, 1, dim );\n- 123 std::vector< unsigned int > k( size );\n- 124 for( unsigned int i = 0; i < size; ++ i )\n- 125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ];\n- 126 return DGFEntityKey<_unsigned_int_>( k );\n- 127 }\n- 128\n- 129\n- 130 template< int dim >\n- 131 inline DGFEntityKey<_unsigned_int_>\n-132 ElementFaceUtil :: generateSimplexFace\n- 133 ( const std :: vector< unsigned int > &element, int f )\n- 134 {\n- 135 auto refSimplex = ReferenceElements< double, dim >::simplex();\n- 136 const unsigned int size = refSimplex.size( f, 1, dim );\n- 137 std :: vector< unsigned int > k( size );\n- 138 for( unsigned int i = 0; i < size; ++i )\n- 139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ];\n- 140 return DGFEntityKey<_unsigned_int_>( k );\n- 141 }\n- 142\n- 143\n- 144 inline DGFEntityKey<_unsigned_int_>\n-145 ElementFaceUtil::generateFace ( int dim, const std::vector< unsigned int >\n-&element, int f )\n- 146 {\n- 147 if( element.size() == size_t(dim+1) )\n- 148 {\n- 149 // Simplex element\n- 150 switch( dim )\n- 151 {\n- 152 case 3 :\n- 153 return generateSimplexFace< 3 >( element, f );\n- 154 case 2 :\n- 155 return generateSimplexFace< 2 >( element, f );\n- 156 case 1 :\n- 157 return generateSimplexFace< 1 >( element, f );\n- 158 default :\n- 159 DUNE_THROW( NotImplemented, \"ElementUtil::generateFace not implemented for\n-dim = \" << dim << \".\" );\n- 160 }\n- 161 }\n- 162 else\n- 163 {\n- 164 // Cube element\n- 165 switch( dim )\n- 166 {\n- 167 case 3 :\n- 168 return generateCubeFace< 3 >( element, f );\n- 169 case 2 :\n- 170 return generateCubeFace< 2 >( element, f );\n- 171 case 1 :\n- 172 return generateCubeFace< 1 >( element, f );\n- 173 default :\n- 174 DUNE_THROW( NotImplemented, \"ElementUtil::generateFace not implemented for\n-dim = \" << dim << \".\" );\n- 175 }\n- 176 }\n- 177 }\n- 178\n- 179} // end namespace Dune\n- 180\n- 181#endif // DUNE_ENTITYKEY_INLINE_HH\n-entitykey.hh\n+113 CornerIterator beginCorners() const {\n+ 114 return CornerIterator(beginCells(), endCells());\n+ 115 }\n+116 CornerIterator endCorners() const {\n+ 117 return CornerIterator(endCells());\n+ 118 }\n+ 119\n+120 PointIterator beginPoints() const { return beginCorners(); }\n+121 PointIterator endPoints() const { return endCorners(); }\n+ 122\n+123 ConnectivityWriter makeConnectivity() const {\n+ 124 return ConnectivityWriter();\n+ 125 }\n+126 const Communication& comm() const {\n+ 127 return gv.comm();\n+ 128 }\n+ 129 };\n+ 130\n+ 131 } // namespace VTK\n+ 132\n+ 134\n+ 135} // namespace Dune\n+ 136\n+ 137#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEITERATORS_HH\n+gridenums.hh\n+pointiterator.hh\n+corner.hh\n+corneriterator.hh\n+functionwriter.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::DGFEntityKey\n-Definition: entitykey.hh:21\n-Dune::DGFEntityKey::operator=\n-DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)\n-Definition: entitykey_inline.hh:64\n-Dune::DGFEntityKey::orientation\n-void orientation(int base, std ::vector< std ::vector< double > > &vtx)\n-Definition: entitykey_inline.hh:78\n-Dune::DGFEntityKey::print\n-void print(std ::ostream &out=std ::cerr) const\n-Definition: entitykey_inline.hh:105\n-Dune::DGFEntityKey::DGFEntityKey\n-DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)\n-Definition: entitykey_inline.hh:19\n-Dune::ElementFaceUtil::generateFace\n-static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector<\n-unsigned int > &element, int f)\n-Definition: entitykey_inline.hh:145\n+Dune::VTK::Corner\n+simple class representing a corner of a cell\n+Definition: corner.hh:25\n+Dune::VTK::CornerIterator\n+iterate over the corners of some cell range\n+Definition: corneriterator.hh:39\n+Dune::VTK::ConformingConnectivityWriter\n+writer for the connectivity array in conforming mode\n+Definition: functionwriter.hh:195\n+Dune::VTK::NonConformingConnectivityWriter\n+writer for the connectivity array in nonconforming mode\n+Definition: functionwriter.hh:261\n+Dune::VTK::PointIterator\n+iterate over the points of some corner range\n+Definition: pointiterator.hh:58\n+Dune::VTK::ConformingVolumeIteratorFactory\n+Definition: volumeiterators.hh:23\n+Dune::VTK::ConformingVolumeIteratorFactory::endCorners\n+CornerIterator endCorners() const\n+Definition: volumeiterators.hh:63\n+Dune::VTK::ConformingVolumeIteratorFactory::CornerIterator\n+VTK::CornerIterator< CellIterator > CornerIterator\n+Definition: volumeiterators.hh:39\n+Dune::VTK::ConformingVolumeIteratorFactory::Corner\n+VTK::Corner< Cell > Corner\n+Definition: volumeiterators.hh:38\n+Dune::VTK::ConformingVolumeIteratorFactory::endCells\n+CellIterator endCells() const\n+Definition: volumeiterators.hh:56\n+Dune::VTK::ConformingVolumeIteratorFactory::Communication\n+GV::Communication Communication\n+Definition: volumeiterators.hh:47\n+Dune::VTK::ConformingVolumeIteratorFactory::PointIterator\n+VTK::PointIterator< CellIterator, typename GV::IndexSet > PointIterator\n+Definition: volumeiterators.hh:43\n+Dune::VTK::ConformingVolumeIteratorFactory::ConnectivityWriter\n+ConformingConnectivityWriter< ConformingVolumeIteratorFactory< GV > >\n+ConnectivityWriter\n+Definition: volumeiterators.hh:46\n+Dune::VTK::ConformingVolumeIteratorFactory::beginCorners\n+CornerIterator beginCorners() const\n+Definition: volumeiterators.hh:60\n+Dune::VTK::ConformingVolumeIteratorFactory::dimCell\n+static const unsigned dimCell\n+Definition: volumeiterators.hh:32\n+Dune::VTK::ConformingVolumeIteratorFactory::endPoints\n+PointIterator endPoints() const\n+Definition: volumeiterators.hh:70\n+Dune::VTK::ConformingVolumeIteratorFactory::comm\n+const Communication & comm() const\n+Definition: volumeiterators.hh:77\n+Dune::VTK::ConformingVolumeIteratorFactory::ConformingVolumeIteratorFactory\n+ConformingVolumeIteratorFactory(const GV &gv_)\n+Definition: volumeiterators.hh:49\n+Dune::VTK::ConformingVolumeIteratorFactory::Point\n+VTK::Corner< Cell > Point\n+Definition: volumeiterators.hh:41\n+Dune::VTK::ConformingVolumeIteratorFactory::makeConnectivity\n+ConnectivityWriter makeConnectivity() const\n+Definition: volumeiterators.hh:74\n+Dune::VTK::ConformingVolumeIteratorFactory::beginCells\n+CellIterator beginCells() const\n+Definition: volumeiterators.hh:53\n+Dune::VTK::ConformingVolumeIteratorFactory::Cell\n+GV::template Codim< 0 >::Entity Cell\n+Definition: volumeiterators.hh:34\n+Dune::VTK::ConformingVolumeIteratorFactory::beginPoints\n+PointIterator beginPoints() const\n+Definition: volumeiterators.hh:67\n+Dune::VTK::ConformingVolumeIteratorFactory::CellIterator\n+GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::\n+Iterator CellIterator\n+Definition: volumeiterators.hh:36\n+Dune::VTK::NonConformingVolumeIteratorFactory\n+Definition: volumeiterators.hh:83\n+Dune::VTK::NonConformingVolumeIteratorFactory::comm\n+const Communication & comm() const\n+Definition: volumeiterators.hh:126\n+Dune::VTK::NonConformingVolumeIteratorFactory::beginPoints\n+PointIterator beginPoints() const\n+Definition: volumeiterators.hh:120\n+Dune::VTK::NonConformingVolumeIteratorFactory::Communication\n+GV::Communication Communication\n+Definition: volumeiterators.hh:100\n+Dune::VTK::NonConformingVolumeIteratorFactory::beginCells\n+CellIterator beginCells() const\n+Definition: volumeiterators.hh:106\n+Dune::VTK::NonConformingVolumeIteratorFactory::Cell\n+GV::template Codim< 0 >::Entity Cell\n+Definition: volumeiterators.hh:89\n+Dune::VTK::NonConformingVolumeIteratorFactory::\n+NonConformingVolumeIteratorFactory\n+NonConformingVolumeIteratorFactory(const GV &gv_)\n+Definition: volumeiterators.hh:102\n+Dune::VTK::NonConformingVolumeIteratorFactory::makeConnectivity\n+ConnectivityWriter makeConnectivity() const\n+Definition: volumeiterators.hh:123\n+Dune::VTK::NonConformingVolumeIteratorFactory::ConnectivityWriter\n+NonConformingConnectivityWriter< Cell > ConnectivityWriter\n+Definition: volumeiterators.hh:99\n+Dune::VTK::NonConformingVolumeIteratorFactory::dimCell\n+static const unsigned dimCell\n+Definition: volumeiterators.hh:87\n+Dune::VTK::NonConformingVolumeIteratorFactory::endCells\n+CellIterator endCells() const\n+Definition: volumeiterators.hh:109\n+Dune::VTK::NonConformingVolumeIteratorFactory::endCorners\n+CornerIterator endCorners() const\n+Definition: volumeiterators.hh:116\n+Dune::VTK::NonConformingVolumeIteratorFactory::CornerIterator\n+VTK::CornerIterator< CellIterator > CornerIterator\n+Definition: volumeiterators.hh:94\n+Dune::VTK::NonConformingVolumeIteratorFactory::Corner\n+VTK::Corner< Cell > Corner\n+Definition: volumeiterators.hh:93\n+Dune::VTK::NonConformingVolumeIteratorFactory::PointIterator\n+CornerIterator PointIterator\n+Definition: volumeiterators.hh:97\n+Dune::VTK::NonConformingVolumeIteratorFactory::CellIterator\n+GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::\n+Iterator CellIterator\n+Definition: volumeiterators.hh:91\n+Dune::VTK::NonConformingVolumeIteratorFactory::endPoints\n+PointIterator endPoints() const\n+Definition: volumeiterators.hh:121\n+Dune::VTK::NonConformingVolumeIteratorFactory::Point\n+Corner Point\n+Definition: volumeiterators.hh:96\n+Dune::VTK::NonConformingVolumeIteratorFactory::beginCorners\n+CornerIterator beginCorners() const\n+Definition: volumeiterators.hh:113\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00836.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00836.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfexception.hh File Reference\n+dune-grid: volumewriter.hh File Reference\n \n \n \n \n \n \n \n@@ -58,39 +58,44 @@\n \n \n \n \n \n
    \n \n-
    dgfexception.hh File Reference
    \n+
    volumewriter.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/exceptions.hh>
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n

    \n Classes

    class  Dune::DGFException
     exception class for IO errors in the DGF parser More...
    class  Dune::VTK::ConformingVolumeWriter< GV >
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::VTK
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,23 +6,28 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n+ * vtk\n Classes | Namespaces\n-dgfexception.hh File Reference\n-#include \n+volumewriter.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::DGFException\n-\u00a0 exception class for IO errors in the DGF parser More...\n+class \u00a0Dune::VTK::ConformingVolumeWriter<_GV_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::VTK\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00836_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfexception.hh Source File\n+dune-grid: volumewriter.hh Source File\n \n \n \n \n \n \n \n@@ -58,42 +58,120 @@\n \n
    \n \n \n \n
    \n-
    dgfexception.hh
    \n+
    volumewriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_DGFEXCEPTION_HH
    \n-
    6#define DUNE_GRID_DGFEXCEPTION_HH
    \n-
    7
    \n-
    8#include <dune/common/exceptions.hh>
    \n-
    9
    \n-
    10namespace Dune
    \n-
    11{
    \n-
    12
    \n-\n-
    15 : public IOError
    \n-
    16 {};
    \n-
    17
    \n-
    18}
    \n+
    5
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
    \n+
    8
    \n+
    9#include <memory>
    \n+
    10
    \n+\n+\n+\n+\n+
    15
    \n+
    16namespace Dune {
    \n
    19
    \n-
    20#endif
    \n+
    20 namespace VTK {
    \n+
    21
    \n+
    22 template<typename GV>
    \n+\n+\n+
    25 public BasicWriter<ConformingVolumeIteratorFactory<GV> >
    \n+
    26 {
    \n+\n+\n+
    29
    \n+
    30 const GV& gv;
    \n+
    31
    \n+
    32 public:
    \n+\n+
    34 typedef std::shared_ptr<VTKFunction> VTKFunctionPtr;
    \n+
    35
    \n+\n+
    37 : Factory(gv_), Base(static_cast<const Factory&>(*this)), gv(gv_)
    \n+
    38 { }
    \n+
    39
    \n+\n+
    41
    \n+
    42 void addCellData(const VTKFunctionPtr& p) {
    \n+
    43 Base::addCellData(std::shared_ptr<typename Base::FunctionWriter>
    \n+\n+
    45 }
    \n+
    46
    \n+\n+\n+
    49 }
    \n+
    50
    \n+
    51 template<typename V>
    \n+
    52 void addCellData(const V &v, const std::string &name, int ncomps=1) {
    \n+
    53 addCellData(new P0VTKFunction<GV, V>(gv, v, name, ncomps));
    \n+
    54 }
    \n+
    55
    \n+\n+
    57 addPointData(std::shared_ptr<typename Base::FunctionWriter>
    \n+\n+
    59 }
    \n+
    60
    \n+\n+\n+
    63 }
    \n+
    64
    \n+
    65 template<typename V>
    \n+
    66 void addVertexData(const V &v, const std::string &name, int ncomps=1) {
    \n+
    67 addVertexData(new P1VTKFunction<GV, V>(gv, v, name, ncomps));
    \n+
    68 }
    \n+
    69
    \n+
    70 };
    \n+
    71
    \n+
    72 } // namespace VTK
    \n+
    73
    \n+
    75
    \n+
    76} // namespace Dune
    \n+
    77
    \n+
    78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH
    \n+\n+
    Functions for VTK output.
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n+
    Definition: basicwriter.hh:35
    \n+
    void addCellData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:76
    \n+
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n+\n+
    Take a vector and interpret it as cell data for the VTKWriter.
    Definition: function.hh:97
    \n+
    Take a vector and interpret it as point data for the VTKWriter.
    Definition: function.hh:205
    \n+
    Base class for function writers.
    Definition: functionwriter.hh:90
    \n+
    Definition: volumeiterators.hh:23
    \n+
    Definition: volumewriter.hh:26
    \n+
    std::shared_ptr< VTKFunction > VTKFunctionPtr
    Definition: volumewriter.hh:34
    \n+
    void addCellData(const VTKFunctionPtr &p)
    Definition: volumewriter.hh:42
    \n+
    void addVertexData(const VTKFunctionPtr &p)
    Definition: volumewriter.hh:56
    \n+
    void addCellData(VTKFunction *p)
    Definition: volumewriter.hh:47
    \n+
    void addVertexData(const V &v, const std::string &name, int ncomps=1)
    Definition: volumewriter.hh:66
    \n+
    void addVertexData(VTKFunction *p)
    Definition: volumewriter.hh:61
    \n+
    void addCellData(const V &v, const std::string &name, int ncomps=1)
    Definition: volumewriter.hh:52
    \n+
    ConformingVolumeWriter(const GV &gv_)
    Definition: volumewriter.hh:36
    \n+
    Dune::VTKFunction< GV > VTKFunction
    Definition: volumewriter.hh:33
    \n+
    void addPointData(const std::shared_ptr< FunctionWriter > &writer)
    Definition: basicwriter.hh:80
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,39 +6,149 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-dgfexception.hh\n+ * vtk\n+volumewriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_DGFEXCEPTION_HH\n- 6#define DUNE_GRID_DGFEXCEPTION_HH\n- 7\n- 8#include \n- 9\n- 10namespace Dune\n- 11{\n- 12\n-14 class DGFException\n- 15 : public IOError\n- 16 {};\n- 17\n- 18}\n+ 5\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH\n+ 8\n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15\n+ 16namespace Dune {\n 19\n- 20#endif\n+ 20 namespace VTK {\n+ 21\n+ 22 template\n+23 class ConformingVolumeWriter\n+ 24 : public ConformingVolumeIteratorFactory,\n+ 25 public BasicWriter >\n+ 26 {\n+ 27 typedef ConformingVolumeIteratorFactory Factory;\n+ 28 typedef BasicWriter Base;\n+ 29\n+ 30 const GV& gv;\n+ 31\n+ 32 public:\n+33 typedef Dune::VTKFunction<_GV_> VTKFunction;\n+34 typedef std::shared_ptr VTKFunctionPtr;\n+ 35\n+36 ConformingVolumeWriter(const GV& gv_)\n+ 37 : Factory(gv_), Base(static_cast(*this)), gv(gv_)\n+ 38 { }\n+ 39\n+ 40 using Base::addPointData;\n+ 41\n+42 void addCellData(const VTKFunctionPtr& p) {\n+ 43 Base::addCellData(std::shared_ptr\n+ 44 (new VTKFunctionWriter(p)));\n+ 45 }\n+ 46\n+47 void addCellData(VTKFunction* p) {\n+ 48 addCellData(VTKFunctionPtr(p));\n+ 49 }\n+ 50\n+ 51 template\n+52 void addCellData(const V &v, const std::string &name, int ncomps=1) {\n+ 53 addCellData(new P0VTKFunction(gv, v, name, ncomps));\n+ 54 }\n+ 55\n+56 void addVertexData(const VTKFunctionPtr& p) {\n+ 57 addPointData(std::shared_ptr\n+ 58 (new VTKFunctionWriter(p)));\n+ 59 }\n+ 60\n+61 void addVertexData(VTKFunction* p) {\n+ 62 addVertexData(VTKFunctionPtr(p));\n+ 63 }\n+ 64\n+ 65 template\n+66 void addVertexData(const V &v, const std::string &name, int ncomps=1) {\n+ 67 addVertexData(new P1VTKFunction(gv, v, name, ncomps));\n+ 68 }\n+ 69\n+ 70 };\n+ 71\n+ 72 } // namespace VTK\n+ 73\n+ 75\n+ 76} // namespace Dune\n+ 77\n+ 78#endif // DUNE_GRID_IO_FILE_VTK_VOLUMEWRITER_HH\n+basicwriter.hh\n+function.hh\n+Functions for VTK output.\n+functionwriter.hh\n+volumeiterators.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::DGFException\n-exception class for IO errors in the DGF parser\n-Definition: dgfexception.hh:16\n+Dune::VTK::BasicWriter\n+Definition: basicwriter.hh:35\n+Dune::VTK::BasicWriter::addCellData\n+void addCellData(const std::shared_ptr< FunctionWriter > &writer)\n+Definition: basicwriter.hh:76\n+Dune::VTK::BasicWriter::addPointData\n+void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n+Definition: basicwriter.hh:80\n+Dune::VTKFunction<_GV_>\n+Dune::P0VTKFunction\n+Take a vector and interpret it as cell data for the VTKWriter.\n+Definition: function.hh:97\n+Dune::P1VTKFunction\n+Take a vector and interpret it as point data for the VTKWriter.\n+Definition: function.hh:205\n+Dune::VTK::VTKFunctionWriter\n+Base class for function writers.\n+Definition: functionwriter.hh:90\n+Dune::VTK::ConformingVolumeIteratorFactory\n+Definition: volumeiterators.hh:23\n+Dune::VTK::ConformingVolumeWriter\n+Definition: volumewriter.hh:26\n+Dune::VTK::ConformingVolumeWriter::VTKFunctionPtr\n+std::shared_ptr< VTKFunction > VTKFunctionPtr\n+Definition: volumewriter.hh:34\n+Dune::VTK::ConformingVolumeWriter::addCellData\n+void addCellData(const VTKFunctionPtr &p)\n+Definition: volumewriter.hh:42\n+Dune::VTK::ConformingVolumeWriter::addVertexData\n+void addVertexData(const VTKFunctionPtr &p)\n+Definition: volumewriter.hh:56\n+Dune::VTK::ConformingVolumeWriter::addCellData\n+void addCellData(VTKFunction *p)\n+Definition: volumewriter.hh:47\n+Dune::VTK::ConformingVolumeWriter::addVertexData\n+void addVertexData(const V &v, const std::string &name, int ncomps=1)\n+Definition: volumewriter.hh:66\n+Dune::VTK::ConformingVolumeWriter::addVertexData\n+void addVertexData(VTKFunction *p)\n+Definition: volumewriter.hh:61\n+Dune::VTK::ConformingVolumeWriter::addCellData\n+void addCellData(const V &v, const std::string &name, int ncomps=1)\n+Definition: volumewriter.hh:52\n+Dune::VTK::ConformingVolumeWriter::ConformingVolumeWriter\n+ConformingVolumeWriter(const GV &gv_)\n+Definition: volumewriter.hh:36\n+Dune::VTK::ConformingVolumeWriter::VTKFunction\n+Dune::VTKFunction< GV > VTKFunction\n+Definition: volumewriter.hh:33\n+Dune::VTK::ConformingVolumeWriter::addPointData\n+void addPointData(const std::shared_ptr< FunctionWriter > &writer)\n+Definition: basicwriter.hh:80\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00839.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00839.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridptr.hh File Reference\n+dune-grid: printgrid.hh File Reference\n \n \n \n \n \n \n \n@@ -58,62 +58,44 @@\n \n \n \n \n \n
    \n \n-
    gridptr.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    printgrid.hh File Reference
    \n \n
    \n-
    #include <cassert>
    \n-#include <cctype>
    \n-#include <array>
    \n-#include <iostream>
    \n-#include <map>
    \n-#include <memory>
    \n+
    #include <fstream>
    \n #include <string>
    \n-#include <type_traits>
    \n-#include <vector>
    \n+#include <dune/common/exceptions.hh>
    \n #include <dune/common/parallel/mpihelper.hh>
    \n-#include <dune/common/shared_ptr.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n-#include <dune/grid/common/intersection.hh>
    \n-#include <dune/grid/common/partitionset.hh>
    \n-#include <dune/grid/common/rangegenerators.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n-#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n-#include <dune/grid/io/file/dgfparser/parser.hh>
    \n-#include <dune/grid/io/file/gmshreader.hh>
    \n+#include <dune/grid/common/mcmgmapper.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-Classes

    struct  Dune::GridPtr< GridType >
     Class for constructing grids from DGF files. More...
     
    class  Dune::GridPtr< GridType >::mygrid_ptr
     
    struct  Dune::GridPtr< GridType >::DataHandle
     
    \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n+\n+\n

    \n+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. More...
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,46 +6,30 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-Classes | Namespaces\n-gridptr.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+Namespaces | Functions\n+printgrid.hh File Reference\n+#include \n #include \n-#include \n-#include \n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+#include \n Go_to_the_source_code_of_this_file.\n- Classes\n-struct \u00a0Dune::GridPtr<_GridType_>\n-\u00a0 Class for constructing grids from DGF files. More...\n-\u00a0\n- class \u00a0Dune::GridPtr<_GridType_>::mygrid_ptr\n-\u00a0\n-struct \u00a0Dune::GridPtr<_GridType_>::DataHandle\n-\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+ Functions\n+template\n+void\u00a0Dune::printGrid (const GridType &grid, const Dune::MPIHelper &helper,\n+ std::string output_file=\"printgrid\", int size=2000, bool\n+ execute_plot=true, bool png=true, bool local_corner_indices=true, bool\n+ local_intersection_indices=true, bool outer_normals=true)\n+\u00a0 Print a grid as a gnuplot for testing and development. More...\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00839_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00839_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridptr.hh Source File\n+dune-grid: printgrid.hh Source File\n \n \n \n \n \n \n \n@@ -58,892 +58,225 @@\n \n
    \n \n \n \n
    \n-
    gridptr.hh
    \n+
    printgrid.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_GRIDPTR_HH
    \n-
    6#define DUNE_DGF_GRIDPTR_HH
    \n+
    5#ifndef DUNE_PRINTGRID_HH
    \n+
    6#define DUNE_PRINTGRID_HH
    \n
    7
    \n-
    8#include <cassert>
    \n-
    9#include <cctype>
    \n+
    8#include <fstream>
    \n+
    9#include <string>
    \n
    10
    \n-
    11#include <array>
    \n-
    12#include <iostream>
    \n-
    13#include <map>
    \n-
    14#include <memory>
    \n-
    15#include <string>
    \n-
    16#include <type_traits>
    \n-
    17#include <vector>
    \n+
    11#include <dune/common/exceptions.hh>
    \n+
    12#include <dune/common/parallel/mpihelper.hh>
    \n+\n+
    14
    \n+
    15namespace Dune {
    \n+
    16
    \n+
    17 namespace {
    \n
    18
    \n-
    19//- Dune includes
    \n-
    20#include <dune/common/parallel/mpihelper.hh>
    \n-
    21#include <dune/common/shared_ptr.hh>
    \n-
    22
    \n-\n-\n-\n-\n-\n-
    28
    \n-\n-\n-\n-
    32
    \n-\n-
    34
    \n-
    35namespace Dune
    \n-
    36{
    \n-
    37
    \n-
    38 // External Forward Declarations
    \n-
    39 // -----------------------------
    \n-
    40
    \n-
    41 template < class G >
    \n-
    42 struct DGFGridFactory;
    \n-
    43
    \n-
    44 template< class GridImp, class IntersectionImp >
    \n-
    45 class Intersection;
    \n+
    19 template<int dim>
    \n+
    20 struct ElementDataLayout
    \n+
    21 {
    \n+
    22 bool contains (Dune::GeometryType gt)
    \n+
    23 {
    \n+
    24 return gt.dim()==dim;
    \n+
    25 }
    \n+
    26 };
    \n+
    27
    \n+
    28 template<int dim>
    \n+
    29 struct NodeDataLayout
    \n+
    30 {
    \n+
    31 bool contains (Dune::GeometryType gt)
    \n+
    32 {
    \n+
    33 return gt.dim()==0;
    \n+
    34 }
    \n+
    35 };
    \n+
    36
    \n+
    37 // Move a point closer to basegeo's center by factor scale (used for drawing relative to the element)
    \n+
    38 template <typename B, typename C>
    \n+
    39 C centrify (const B& basegeo, const C& coords, const double scale) {
    \n+
    40 C ret = coords;
    \n+
    41 ret -= basegeo.center();
    \n+
    42 ret *= scale;
    \n+
    43 ret += basegeo.center();
    \n+
    44 return ret;
    \n+
    45 }
    \n
    46
    \n-
    47
    \n-
    48
    \n-
    49 // GridPtr
    \n-
    50 // -------
    \n-
    51
    \n-
    64 template< class GridType >
    \n-
    65 struct GridPtr
    \n-
    66 {
    \n-
    67 class mygrid_ptr : public std::shared_ptr< GridType >
    \n-
    68 {
    \n-
    69 typedef std::shared_ptr< GridType > base_t ;
    \n-
    70 // empty deleter to avoid deletion on release
    \n-
    71 typedef null_deleter< GridType > emptydeleter_t ;
    \n-
    72
    \n-
    73 void removeObj()
    \n-
    74 {
    \n-
    75 // if use count is only 1 delete object
    \n-
    76 if( use_count() == 1 )
    \n-
    77 {
    \n-
    78 // delete point here, since we use the empty deleter
    \n-
    79 GridType* grd = release();
    \n-
    80 if( grd ) delete grd ;
    \n-
    81 }
    \n-
    82 }
    \n-
    83
    \n-
    84 void assignObj( const mygrid_ptr& other )
    \n-
    85 {
    \n-
    86 removeObj();
    \n-
    87 base_t :: operator = ( other );
    \n-
    88 }
    \n-
    89 public:
    \n-
    90 using base_t :: get ;
    \n-
    91 using base_t :: swap ;
    \n-
    92 using base_t :: use_count ;
    \n-
    93
    \n-
    94 // default constructor
    \n-
    95 mygrid_ptr() : base_t( ( GridType * ) 0, emptydeleter_t() ) {}
    \n-
    96 // copy constructor
    \n-
    97 mygrid_ptr( const mygrid_ptr& other ) : base_t(nullptr) { assignObj( other ); }
    \n-
    98 // constructor taking pointer
    \n-
    99 explicit mygrid_ptr( GridType* grd ) : base_t( grd, emptydeleter_t() ) {}
    \n+
    47 // Add a line to the plotfile from p1 to p2
    \n+
    48 template <typename Coord>
    \n+
    49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2, std::string options) {
    \n+
    50 plotfile << "set object poly from ";
    \n+
    51 plotfile << p1[0] << "," << p1[1] << " to ";
    \n+
    52 plotfile << p2[0] << "," << p2[1] << " to ";
    \n+
    53 plotfile << p1[0] << "," << p1[1];
    \n+
    54 plotfile << " " << options << std::endl;
    \n+
    55 }
    \n+
    56
    \n+
    57 }
    \n+
    58
    \n+
    72 template <typename GridType>
    \n+
    73 void printGrid (const GridType& grid, const Dune::MPIHelper& helper, std::string output_file = "printgrid",
    \n+
    74 int size = 2000, bool execute_plot = true, bool png = true, bool local_corner_indices = true,
    \n+
    75 bool local_intersection_indices = true, bool outer_normals = true)
    \n+
    76 {
    \n+
    77
    \n+
    78 // Create output file
    \n+
    79 output_file = output_file + "_" + std::to_string(helper.rank());
    \n+
    80 std::string plot_file_name = output_file + ".gnuplot";
    \n+
    81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc);
    \n+
    82 if (!plotfile.is_open()) {
    \n+
    83 DUNE_THROW(Dune::IOError, "Could not create plot file " << output_file << "!");
    \n+
    84 return;
    \n+
    85 }
    \n+
    86
    \n+
    87 // Basic plot settings
    \n+
    88 plotfile << "set size ratio -1" << std::endl;
    \n+
    89 if (png) {
    \n+
    90 plotfile << "set terminal png size " << size << "," << size << std::endl;
    \n+
    91 plotfile << "set output '" << output_file << ".png'" << std::endl;
    \n+
    92 } else {
    \n+
    93 plotfile << "set terminal svg size " << size << "," << size << " enhanced background rgb 'white'" << std::endl;
    \n+
    94 plotfile << "set output '" << output_file << ".svg'" << std::endl;
    \n+
    95 }
    \n+
    96
    \n+
    97 // Get GridView
    \n+
    98 typedef typename GridType::LeafGridView GV;
    \n+
    99 const GV gv = grid.leafGridView();
    \n
    100
    \n-
    101 // destructor
    \n-
    102 ~mygrid_ptr() { removeObj(); }
    \n-
    103
    \n-
    104 // assigment operator
    \n-\n-
    106 {
    \n-
    107 assignObj( other );
    \n-
    108 return *this;
    \n-
    109 }
    \n-
    110
    \n-
    111 // release pointer
    \n-
    112 GridType* release()
    \n-
    113 {
    \n-
    114 GridType* grd = this->get();
    \n-
    115 base_t ptr(( GridType * ) 0, emptydeleter_t() );
    \n-
    116 this->swap( ptr );
    \n-
    117 return grd ;
    \n-
    118 }
    \n-
    119 };
    \n+
    101 // Create mappers used to retrieve indices
    \n+\n+
    103 const Mapper elementmapper(gv, mcmgElementLayout());
    \n+
    104 const Mapper nodemapper(gv, mcmgVertexLayout());
    \n+
    105
    \n+
    106 // Create iterators
    \n+
    107 typedef typename GV::template Codim<0 >::Iterator LeafIterator;
    \n+
    108 typedef typename GV::IntersectionIterator IntersectionIterator;
    \n+
    109
    \n+
    110 LeafIterator it = gv.template begin<0>();
    \n+
    111
    \n+
    112 // Will contain min/max coordinates. Needed for scaling of the plot
    \n+
    113 Dune::FieldVector<typename GridType::ctype,2> max_coord (it->geometry().center()), min_coord (max_coord);
    \n+
    114
    \n+
    115 // Iterate over elements
    \n+
    116 for (; it != gv.template end<0>(); ++it) {
    \n+
    117
    \n+
    118 const auto& entity = *it;
    \n+
    119 auto geo = entity.geometry();
    \n
    120
    \n-
    121 protected:
    \n-
    122 std::string getFileExtension( const std::string& filename ) const
    \n-
    123 {
    \n-
    124 // extract file extension
    \n-
    125 auto extpos = filename.find_last_of(".");
    \n-
    126 std::string ext;
    \n-
    127 if( extpos != std::string::npos)
    \n-
    128 ext = filename.substr( extpos + 1 );
    \n-
    129
    \n-
    130 // convert all letters to lower case
    \n-
    131 for( auto& item : ext )
    \n-
    132 item = std::tolower( item );
    \n-
    133 return ext;
    \n-
    134 }
    \n-
    135
    \n-
    136 // read gmsh file if dimension world <= 3
    \n-
    137 void readGmsh( const std::string& filename, std::integral_constant< bool, true > )
    \n-
    138 {
    \n-
    139 GridFactory<GridType> gridFactory;
    \n-
    140 std::vector<int> boundaryIDs;
    \n-
    141 std::vector<int> elementsIDs;
    \n-
    142 GmshReader<GridType>::read(gridFactory,filename,boundaryIDs,elementsIDs);
    \n-
    143 initialize( gridFactory, boundaryIDs,elementsIDs);
    \n-
    144 }
    \n-
    145
    \n-
    146 // if dimension world > 3 throw GridError
    \n-
    147 void readGmsh( const std::string& filename, std::integral_constant< bool, false > )
    \n-
    148 {
    \n-
    149 DUNE_THROW(GridError, "GmshReader requires dimWorld <= 3." );
    \n-
    150 }
    \n-
    151
    \n-
    152 public:
    \n-
    153
    \n-
    154 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n-
    155 static const int dimension = GridType::dimension;
    \n-
    156
    \n-
    158 explicit GridPtr ( const std::string &filename,
    \n-
    159 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    160 : gridPtr_(),
    \n-
    161 elParam_(),
    \n-
    162 vtxParam_(),
    \n-
    163 bndParam_(),
    \n-
    164 bndId_(),
    \n-
    165 emptyParam_(),
    \n-
    166 nofElParam_( 0 ),
    \n-
    167 nofVtxParam_( 0 ),
    \n-
    168 haveBndParam_( false )
    \n-
    169 {
    \n-
    170 std::string fileExt = getFileExtension( filename );
    \n-
    171
    \n-
    172 if( fileExt == "dgf" )
    \n-
    173 {
    \n-
    174 DGFGridFactory< GridType > dgfFactory( filename, comm );
    \n-
    175 initialize( dgfFactory );
    \n-
    176 }
    \n-
    177 else if( fileExt == "msh" )
    \n-
    178 {
    \n-
    179 // Gmsh reader only compiles for dimworld <= 3
    \n-
    180 readGmsh( filename, std::integral_constant< bool, GridType::dimensionworld <= 3 > () );
    \n-
    181 }
    \n-
    182 else if( fileExt == "amc" || fileExt == "2d" || fileExt == "3d" )
    \n-
    183 {
    \n-
    184 // TODO: AlbertaReader
    \n-
    185 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not supported yet!" );
    \n-
    186 }
    \n-
    187 else if( fileExt == "vtu" )
    \n-
    188 {
    \n-
    189 // TODO: vtu/vtk reader
    \n-
    190 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not supported yet!" );
    \n-
    191 }
    \n-
    192 else
    \n-
    193 {
    \n-
    194 DUNE_THROW( NotImplemented, "GridPtr: file format '" << fileExt << "' not supported yet!" );
    \n-
    195 }
    \n-
    196 }
    \n-
    197
    \n-
    199 explicit GridPtr ( std::istream &input,
    \n-
    200 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    201 : gridPtr_(),
    \n-
    202 elParam_(),
    \n-
    203 vtxParam_(),
    \n-
    204 bndParam_(),
    \n-
    205 bndId_(),
    \n-
    206 emptyParam_(),
    \n-
    207 nofElParam_( 0 ),
    \n-
    208 nofVtxParam_( 0 ),
    \n-
    209 haveBndParam_( false )
    \n-
    210 {
    \n-
    211 // input stream only works for DGF format right now
    \n-
    212 DGFGridFactory< GridType > dgfFactory( input, comm );
    \n-
    213 initialize( dgfFactory );
    \n-
    214 }
    \n-
    215
    \n-\n-
    218 : gridPtr_(),
    \n-
    219 elParam_(),
    \n-
    220 vtxParam_(),
    \n-
    221 bndParam_(),
    \n-
    222 bndId_(),
    \n-
    223 emptyParam_(),
    \n-
    224 nofElParam_(0),
    \n-
    225 nofVtxParam_(0),
    \n-
    226 haveBndParam_( false )
    \n-
    227 {}
    \n-
    228
    \n-
    230 explicit GridPtr( GridType *grd )
    \n-
    231 : gridPtr_(grd),
    \n-
    232 elParam_(),
    \n-
    233 vtxParam_(),
    \n-
    234 bndParam_(),
    \n-
    235 bndId_(),
    \n-
    236 emptyParam_(),
    \n-
    237 nofElParam_(0),
    \n-
    238 nofVtxParam_(0),
    \n-
    239 haveBndParam_( false )
    \n-
    240 {}
    \n-
    241
    \n-
    243 GridPtr( const GridPtr &org ) = default;
    \n-
    244
    \n-\n-
    247 {
    \n-
    248 gridPtr_ = org.gridPtr_;
    \n-
    249 elParam_ = org.elParam_;
    \n-
    250 vtxParam_ = org.vtxParam_;
    \n-
    251 bndParam_ = org.bndParam_;
    \n-
    252 bndId_ = org.bndId_;
    \n-\n-
    254
    \n-\n-\n-\n-
    258 return *this;
    \n-
    259 }
    \n-
    260
    \n-
    262 GridPtr& operator = (GridType * grd)
    \n-
    263 {
    \n-
    264 gridPtr_ = mygrid_ptr( grd );
    \n-
    265 elParam_.resize(0);
    \n-
    266 vtxParam_.resize(0);
    \n-
    267 bndParam_.resize(0);
    \n-
    268 bndId_.resize(0);
    \n-
    269 emptyParam_.resize(0);
    \n-
    270
    \n-
    271 nofVtxParam_ = 0;
    \n-
    272 nofElParam_ = 0;
    \n-
    273 haveBndParam_ = false;
    \n-
    274 return *this;
    \n-
    275 }
    \n-
    276
    \n-
    278 GridType& operator*() {
    \n-
    279 return *gridPtr_;
    \n-
    280 }
    \n-
    281
    \n-
    283 GridType* operator->() {
    \n-
    284 return gridPtr_.operator -> ();
    \n-
    285 }
    \n-
    286
    \n-
    288 const GridType& operator*() const {
    \n-
    289 return *gridPtr_;
    \n-
    290 }
    \n-
    291
    \n-
    293 const GridType* operator->() const {
    \n-
    294 return gridPtr_.operator -> ();
    \n-
    295 }
    \n-
    296
    \n-
    298 GridType* release () { return gridPtr_.release(); }
    \n-
    299
    \n-
    301 int nofParameters(int cdim) const {
    \n-
    302 switch (cdim) {
    \n-
    303 case 0 : return nofElParam_; break;
    \n-
    304 case GridType::dimension : return nofVtxParam_; break;
    \n-
    305 }
    \n-
    306 return 0;
    \n-
    307 }
    \n-
    308
    \n-
    310 template <class Entity>
    \n-
    311 int nofParameters ( const Entity & ) const
    \n-
    312 {
    \n-
    313 return nofParameters( (int) Entity::codimension );
    \n-
    314 }
    \n-
    315
    \n-
    317 template< class GridImp, class IntersectionImp >
    \n-\n-
    319 {
    \n-
    320 return parameters( intersection ).size();
    \n-
    321 }
    \n-
    322
    \n-
    324 template <class Entity>
    \n-
    325 const std::vector< double > &parameters ( const Entity &entity ) const
    \n-
    326 {
    \n-
    327 typedef typename GridType::LevelGridView GridView;
    \n-
    328 GridView gridView = gridPtr_->levelGridView( 0 );
    \n-
    329 switch( (int)Entity::codimension )
    \n-
    330 {
    \n-
    331 case 0 :
    \n-
    332 if( nofElParam_ > 0 )
    \n-
    333 {
    \n-
    334 assert( (unsigned int)gridView.indexSet().index( entity ) < elParam_.size() );
    \n-
    335 return elParam_[ gridView.indexSet().index( entity ) ];
    \n-
    336 }
    \n-
    337 break;
    \n-
    338 case GridType::dimension :
    \n-
    339 if( nofVtxParam_ > 0 )
    \n-
    340 {
    \n-
    341 assert( (unsigned int)gridView.indexSet().index( entity ) < vtxParam_.size() );
    \n-
    342 return vtxParam_[ gridView.indexSet().index( entity ) ];
    \n-
    343 }
    \n-
    344 break;
    \n-
    345 }
    \n-
    346 return emptyParam_;
    \n-
    347 }
    \n-
    348
    \n-
    350 template< class GridImp, class IntersectionImp >
    \n-\n-
    352 {
    \n-
    353 // if no parameters given return empty vector
    \n-
    354 if ( !haveBndParam_ )
    \n-\n-
    356
    \n-
    357 return bndParam_[ intersection.boundarySegmentIndex() ];
    \n-
    358 }
    \n-
    359
    \n-\n-
    361 {
    \n-
    362 if( gridPtr_->comm().size() > 1 )
    \n-
    363 {
    \n-
    364 DataHandle dh(*this);
    \n-
    365 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
    \n-
    366 }
    \n-
    367 }
    \n-
    368
    \n-\n-
    370 {
    \n-
    371 if( gridPtr_->comm().size() > 1 )
    \n-
    372 {
    \n-
    373 DataHandle dh(*this);
    \n-
    374 gridPtr_->loadBalance( dh.interface() );
    \n-
    375 gridPtr_->levelGridView( 0 ).communicate( dh.interface(), InteriorBorder_All_Interface,ForwardCommunication );
    \n-
    376 }
    \n-
    377 }
    \n-
    378
    \n-
    379 protected:
    \n-
    380 template< class Range >
    \n-
    381 static bool isEmpty ( Range &&range )
    \n-
    382 {
    \n-
    383 return range.begin() == range.end();
    \n-
    384 }
    \n-
    385
    \n-\n-
    387 {
    \n-
    388 gridPtr_ = mygrid_ptr( dgfFactory.grid() );
    \n-
    389
    \n-
    390 const auto gridView = gridPtr_->levelGridView( 0 );
    \n-
    391 const auto &indexSet = gridView.indexSet();
    \n-
    392
    \n-
    393 nofElParam_ = dgfFactory.template numParameters< 0 >();
    \n-
    394 nofVtxParam_ = dgfFactory.template numParameters< dimension >();
    \n-\n-
    396
    \n-
    397 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
    \n-
    398 gridView.comm().max( nofParams.data(), nofParams.size() );
    \n-
    399
    \n-
    400 // empty grids have no parameters associated
    \n-
    401 if( isEmpty( elements( gridView, Partitions::interiorBorder ) ) )
    \n-
    402 {
    \n-
    403 nofElParam_ = nofParams[ 0 ];
    \n-
    404 nofVtxParam_ = nofParams[ 1 ];
    \n-
    405 }
    \n-
    406
    \n-
    407 // boundary parameters may be empty
    \n-
    408 haveBndParam_ = static_cast< bool >( nofParams[ 2 ] );
    \n-
    409
    \n-
    410 if( (nofElParam_ != nofParams[ 0 ]) || (nofVtxParam_ != nofParams[ 1 ]) )
    \n-
    411 DUNE_THROW( DGFException, "Number of parameters differs between processes" );
    \n-
    412
    \n-
    413 elParam_.resize( nofElParam_ > 0 ? indexSet.size( 0 ) : 0 );
    \n-
    414 vtxParam_.resize( nofVtxParam_ > 0 ? indexSet.size( dimension ) : 0 );
    \n-
    415
    \n-
    416 bndId_.resize( indexSet.size( 1 ) );
    \n-
    417 if( haveBndParam_ )
    \n-
    418 bndParam_.resize( gridPtr_->numBoundarySegments() );
    \n-
    419
    \n-
    420 for( const auto &element : elements( gridView, Partitions::interiorBorder ) )
    \n-
    421 {
    \n-
    422 if( nofElParam_ > 0 )
    \n-
    423 {
    \n-
    424 std::swap( elParam_[ indexSet.index( element ) ], dgfFactory.parameter( element ) );
    \n-
    425 assert( elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( nofElParam_ ) );
    \n-
    426 }
    \n-
    427
    \n-
    428 if( nofVtxParam_ > 0 )
    \n-
    429 {
    \n-
    430 for( unsigned int v = 0, n = element.subEntities( dimension ); v < n; ++v )
    \n-
    431 {
    \n-
    432 const auto index = indexSet.subIndex( element, v, dimension );
    \n-
    433 if( vtxParam_[ index ].empty() )
    \n-
    434 std::swap( vtxParam_[ index ], dgfFactory.parameter( element.template subEntity< dimension >( v ) ) );
    \n-
    435 assert( vtxParam_[ index ].size() == static_cast< std::size_t >( nofVtxParam_ ) );
    \n-
    436 }
    \n-
    437 }
    \n-
    438
    \n-
    439 if( element.hasBoundaryIntersections() )
    \n-
    440 {
    \n-
    441 for( const auto &intersection : intersections( gridView, element ) )
    \n-
    442 {
    \n-
    443 // dirty hack: check for "none" to make corner point grid work
    \n-
    444 if( !intersection.boundary() || intersection.type().isNone() )
    \n-
    445 continue;
    \n-
    446
    \n-
    447 const auto k = indexSet.subIndex( element, intersection.indexInInside(), 1 );
    \n-
    448 bndId_[ k ] = dgfFactory.boundaryId( intersection );
    \n-
    449 if( haveBndParam_ )
    \n-
    450 bndParam_[ intersection.boundarySegmentIndex() ] = dgfFactory.boundaryParameter( intersection );
    \n-
    451 }
    \n-
    452 }
    \n-
    453 }
    \n-
    454 }
    \n-
    455
    \n-\n-
    457 std::vector<int>& boundaryIds,
    \n-
    458 std::vector<int>& elementIds )
    \n-
    459 {
    \n-
    460 gridPtr_ = mygrid_ptr( factory.createGrid().release() );
    \n-
    461
    \n-
    462 const auto& gridView = gridPtr_->leafGridView();
    \n-
    463 const auto& indexSet = gridView.indexSet();
    \n-
    464
    \n-
    465 nofElParam_ = elementIds.empty() ? 0 : 1 ;
    \n-
    466 nofVtxParam_ = 0;
    \n-
    467 haveBndParam_ = boundaryIds.empty() ? 0 : 1 ;
    \n-
    468
    \n-
    469 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_, static_cast< int >( haveBndParam_ ) }};
    \n-
    470 gridView.comm().max( nofParams.data(), nofParams.size() );
    \n-
    471
    \n-
    472 // empty grids have no parameters associated
    \n-
    473 if( isEmpty( elements( gridView, Partitions::interiorBorder ) ) )
    \n-
    474 {
    \n-
    475 nofElParam_ = nofParams[ 0 ];
    \n-
    476 }
    \n-
    477
    \n-
    478 // boundary parameters may be empty
    \n-
    479 haveBndParam_ = static_cast< bool >( nofParams[ 2 ] );
    \n-
    480
    \n-
    481 // Reorder boundary IDs according to the insertion index
    \n-
    482 if(!boundaryIds.empty() || !elementIds.empty() )
    \n-
    483 {
    \n-
    484 bndParam_.resize( boundaryIds.size() );
    \n-
    485 elParam_.resize( elementIds.size(), std::vector<double>(1) );
    \n-
    486 for(const auto& entity : elements( gridView ))
    \n-
    487 {
    \n-
    488 elParam_[ indexSet.index( entity ) ][ 0 ] = elementIds[ factory.insertionIndex( entity ) ];
    \n-
    489 if( haveBndParam_ )
    \n-
    490 {
    \n-
    491 for(const auto& intersection : intersections( gridView,entity) )
    \n-
    492 {
    \n-
    493 if(intersection.boundary())
    \n-
    494 {
    \n-
    495 // DGFBoundaryParameter::type is of type string.
    \n-
    496 bndParam_[intersection.boundarySegmentIndex()] = std::to_string(boundaryIds[factory.insertionIndex(intersection)]);
    \n-
    497 }
    \n-
    498 }
    \n-
    499 }
    \n-
    500 }
    \n-
    501 }
    \n-
    502 }
    \n-
    503
    \n-
    504 template <class Entity>
    \n-
    505 std::vector< double > &params ( const Entity &entity )
    \n-
    506 {
    \n-
    507 const auto gridView = gridPtr_->levelGridView( 0 );
    \n-
    508 switch( (int)Entity::codimension )
    \n-
    509 {
    \n-
    510 case 0 :
    \n-
    511 if( nofElParam_ > 0 ) {
    \n-
    512 if ( gridView.indexSet().index( entity ) >= elParam_.size() )
    \n-
    513 elParam_.resize( gridView.indexSet().index( entity ) );
    \n-
    514 return elParam_[ gridView.indexSet().index( entity ) ];
    \n-
    515 }
    \n-
    516 break;
    \n-
    517 case GridType::dimension :
    \n-
    518 if( nofVtxParam_ > 0 ) {
    \n-
    519 if ( gridView.indexSet().index( entity ) >= vtxParam_.size() )
    \n-
    520 vtxParam_.resize( gridView.indexSet().index( entity ) );
    \n-
    521 return vtxParam_[ gridView.indexSet().index( entity ) ];
    \n-
    522 }
    \n-
    523 break;
    \n-
    524 }
    \n-
    525 return emptyParam_;
    \n-
    526 }
    \n-
    527
    \n-
    528 void setNofParams( int cdim, int nofP )
    \n-
    529 {
    \n-
    530 switch (cdim) {
    \n-
    531 case 0 : nofElParam_ = nofP; break;
    \n-
    532 case GridType::dimension : nofVtxParam_ = nofP; break;
    \n-
    533 }
    \n-
    534 }
    \n-
    535
    \n-\n-
    537 : public CommDataHandleIF< DataHandle, char >
    \n-
    538 {
    \n-
    539 explicit DataHandle ( GridPtr &gridPtr )
    \n-
    540 : gridPtr_( gridPtr ), idSet_( gridPtr->localIdSet() )
    \n-
    541 {
    \n-
    542 const auto gridView = gridPtr_->levelGridView( 0 );
    \n-
    543 const auto &indexSet = gridView.indexSet();
    \n-
    544
    \n-
    545 for( const auto &element : elements( gridView, Partitions::interiorBorder ) )
    \n-
    546 {
    \n-
    547 if( gridPtr_.nofElParam_ > 0 )
    \n-
    548 std::swap( gridPtr_.elParam_[ indexSet.index( element ) ], elData_[ idSet_.id( element ) ] );
    \n-
    549
    \n-
    550 if( gridPtr_.nofVtxParam_ > 0 )
    \n-
    551 {
    \n-
    552 for( unsigned int v = 0, n = element.subEntities( dimension ); v < n; ++v )
    \n-
    553 {
    \n-
    554 const auto index = indexSet.subIndex( element, v, dimension );
    \n-
    555 if ( !gridPtr_.vtxParam_[ index ].empty() )
    \n-
    556 std::swap( gridPtr_.vtxParam_[ index ], vtxData_[ idSet_.subId( element, v, dimension ) ] );
    \n-
    557 }
    \n-
    558 }
    \n-
    559
    \n-
    560 if( element.hasBoundaryIntersections() )
    \n-
    561 {
    \n-
    562 for( const auto &intersection : intersections( gridView, element ) )
    \n-
    563 {
    \n-
    564 // dirty hack: check for "none" to make corner point grid work
    \n-
    565 if( !intersection.boundary() || intersection.type().isNone() )
    \n-
    566 continue;
    \n-
    567
    \n-
    568 const int i = intersection.indexInInside();
    \n-
    569 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ];
    \n-
    570 bndData.first = gridPtr_.bndId_[ indexSet.subIndex( element, i, 1 ) ];
    \n-
    571 if( gridPtr_.haveBndParam_ )
    \n-
    572 std::swap( bndData.second, gridPtr_.bndParam_[ intersection.boundarySegmentIndex() ] );
    \n-
    573 }
    \n-
    574 }
    \n-
    575 }
    \n-
    576 }
    \n-
    577
    \n-
    578 DataHandle ( const DataHandle & ) = delete;
    \n-
    579 DataHandle ( DataHandle && ) = delete;
    \n-
    580
    \n-\n-
    582 {
    \n-
    583 const auto gridView = gridPtr_->levelGridView( 0 );
    \n-
    584 const auto &indexSet = gridView.indexSet();
    \n-
    585
    \n-
    586 if( gridPtr_.nofElParam_ > 0 )
    \n-
    587 gridPtr_.elParam_.resize( indexSet.size( 0 ) );
    \n-
    588 if( gridPtr_.nofVtxParam_ > 0 )
    \n-
    589 gridPtr_.vtxParam_.resize( indexSet.size( dimension ) );
    \n-
    590 gridPtr_.bndId_.resize( indexSet.size( 1 ) );
    \n-
    591 if( gridPtr_.haveBndParam_ )
    \n-
    592 gridPtr_.bndParam_.resize( gridPtr_->numBoundarySegments() );
    \n-
    593
    \n-
    594 for( const auto &element : elements( gridView, Partitions::all ) )
    \n-
    595 {
    \n-
    596 if( gridPtr_.nofElParam_ > 0 )
    \n-
    597 {
    \n-
    598 std::swap( gridPtr_.elParam_[ indexSet.index( element ) ], elData_[ idSet_.id( element ) ] );
    \n-
    599 assert( gridPtr_.elParam_[ indexSet.index( element ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
    \n-
    600 }
    \n-
    601
    \n-
    602 if( gridPtr_.nofVtxParam_ > 0 )
    \n-
    603 {
    \n-
    604 for( unsigned int v = 0; v < element.subEntities( dimension ); ++v )
    \n-
    605 {
    \n-
    606 const auto index = indexSet.subIndex( element, v, dimension );
    \n-
    607 if( gridPtr_.vtxParam_[ index ].empty() )
    \n-
    608 std::swap( gridPtr_.vtxParam_[ index ], vtxData_[ idSet_.subId( element, v, dimension ) ] );
    \n-
    609 assert( gridPtr_.vtxParam_[ index ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
    \n-
    610 }
    \n-
    611 }
    \n-
    612
    \n-
    613 if( element.hasBoundaryIntersections() )
    \n-
    614 {
    \n-
    615 for( const auto &intersection : intersections( gridView, element ) )
    \n-
    616 {
    \n-
    617 // dirty hack: check for "none" to make corner point grid work
    \n-
    618 if( !intersection.boundary() || intersection.type().isNone() )
    \n-
    619 continue;
    \n-
    620
    \n-
    621 const int i = intersection.indexInInside();
    \n-
    622 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ];
    \n-
    623 gridPtr_.bndId_[ indexSet.subIndex( element, i, 1 ) ] = bndData.first;
    \n-
    624 if( gridPtr_.haveBndParam_ )
    \n-
    625 std::swap( bndData.second, gridPtr_.bndParam_[ intersection.boundarySegmentIndex() ] );
    \n-
    626 }
    \n-
    627 }
    \n-
    628 }
    \n-
    629 }
    \n-
    630
    \n-\n-
    632
    \n-
    633 bool contains ( int dim, int codim ) const
    \n-
    634 {
    \n-
    635 assert( dim == dimension );
    \n-
    636 // do not use a switch statement, because dimension == 1 is possible
    \n-
    637 return (codim == 1) || ((codim == dimension) && (gridPtr_.nofVtxParam_ > 0)) || ((codim == 0) && (gridPtr_.nofElParam_ > 0));
    \n-
    638 }
    \n-
    639
    \n-
    640 bool fixedSize (int /* dim */, int /* codim */) const { return false; }
    \n-
    641
    \n-
    642 template< class Entity >
    \n-
    643 std::size_t size ( const Entity &entity ) const
    \n-
    644 {
    \n-
    645 std::size_t totalSize = 0;
    \n-
    646
    \n-
    647 // do not use a switch statement, because dimension == 1 is possible
    \n-
    648 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )
    \n-
    649 {
    \n-
    650 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
    \n-
    651 for( double &v : elData_[ idSet_.id( entity ) ] )
    \n-
    652 totalSize += dataSize( v );
    \n-
    653 }
    \n-
    654
    \n-
    655 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )
    \n-
    656 {
    \n-
    657 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
    \n-
    658 for( double &v : vtxData_[ idSet_.id( entity ) ] )
    \n-
    659 totalSize += dataSize( v );
    \n-
    660 }
    \n-
    661
    \n-
    662 if( Entity::codimension == 1 )
    \n-
    663 {
    \n-
    664 const auto bndData = bndData_.find( idSet_.id( entity ) );
    \n-
    665 if( bndData != bndData_.end() )
    \n-
    666 totalSize += dataSize( bndData->second.first ) + dataSize( bndData->second.second );
    \n-
    667 }
    \n-
    668
    \n-
    669 return totalSize;
    \n-
    670 }
    \n-
    671
    \n-
    672 template< class Buffer, class Entity >
    \n-
    673 void gather ( Buffer &buffer, const Entity &entity ) const
    \n-
    674 {
    \n-
    675 // do not use a switch statement, because dimension == 1 is possible
    \n-
    676 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )
    \n-
    677 {
    \n-
    678 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofElParam_ ) );
    \n-
    679 for( double &v : elData_[ idSet_.id( entity ) ] )
    \n-
    680 write( buffer, v );
    \n-
    681 }
    \n-
    682
    \n-
    683 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )
    \n-
    684 {
    \n-
    685 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t >( gridPtr_.nofVtxParam_ ) );
    \n-
    686 for( double &v : vtxData_[ idSet_.id( entity ) ] )
    \n-
    687 write( buffer, v );
    \n-
    688 }
    \n-
    689
    \n-
    690 if( Entity::codimension == 1 )
    \n-
    691 {
    \n-
    692 const auto bndData = bndData_.find( idSet_.id( entity ) );
    \n-
    693 if( bndData != bndData_.end() )
    \n-
    694 {
    \n-
    695 write( buffer, bndData->second.first );
    \n-
    696 write( buffer, bndData->second.second );
    \n-
    697 }
    \n-
    698 }
    \n-
    699 }
    \n-
    700
    \n-
    701 template< class Buffer, class Entity >
    \n-
    702 void scatter ( Buffer &buffer, const Entity &entity, std::size_t n )
    \n-
    703 {
    \n-
    704 // do not use a switch statement, because dimension == 1 is possible
    \n-
    705 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )
    \n-
    706 {
    \n-
    707 auto &p = elData_[ idSet_.id( entity ) ];
    \n-
    708 p.resize( gridPtr_.nofElParam_ );
    \n-
    709 for( double &v : p )
    \n-
    710 read( buffer, v, n );
    \n-
    711 }
    \n-
    712
    \n-
    713 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )
    \n-
    714 {
    \n-
    715 auto &p = vtxData_[ idSet_.id( entity ) ];
    \n-
    716 p.resize( gridPtr_.nofVtxParam_ );
    \n-
    717 for( double &v : p )
    \n-
    718 read( buffer, v, n );
    \n-
    719 }
    \n-
    720
    \n-
    721 if( (Entity::codimension == 1) && (n > 0) )
    \n-
    722 {
    \n-
    723 auto &bndData = bndData_[ idSet_.id( entity ) ];
    \n-
    724 read( buffer, bndData.first, n );
    \n-
    725 read( buffer, bndData.second, n );
    \n-
    726 }
    \n-
    727
    \n-
    728 assert( n == 0 );
    \n-
    729 }
    \n-
    730
    \n-
    731 private:
    \n-
    732 template< class T >
    \n-
    733 static std::enable_if_t< std::is_trivially_copyable< T >::value, std::size_t > dataSize ( const T & /* value */ )
    \n-
    734 {
    \n-
    735 return sizeof( T );
    \n-
    736 }
    \n-
    737
    \n-
    738 static std::size_t dataSize ( const std::string &s )
    \n-
    739 {
    \n-
    740 return dataSize( s.size() ) + s.size();
    \n-
    741 }
    \n-
    742
    \n-
    743 template< class Buffer, class T >
    \n-
    744 static std::enable_if_t< std::is_trivially_copyable< T >::value > write ( Buffer &buffer, const T &value )
    \n-
    745 {
    \n-
    746 std::array< char, sizeof( T ) > bytes;
    \n-
    747 std::memcpy( bytes.data(), &value, sizeof( T ) );
    \n-
    748 for( char &b : bytes )
    \n-
    749 buffer.write( b );
    \n-
    750 }
    \n-
    751
    \n-
    752 template< class Buffer >
    \n-
    753 static void write ( Buffer &buffer, const std::string &s )
    \n-
    754 {
    \n-
    755 write( buffer, s.size() );
    \n-
    756 for( const char &c : s )
    \n-
    757 buffer.write( c );
    \n-
    758 }
    \n-
    759
    \n-
    760 template< class Buffer, class T >
    \n-
    761 static std::enable_if_t< std::is_trivially_copyable< T >::value > read ( Buffer &buffer, T &value, std::size_t &n )
    \n-
    762 {
    \n-
    763 assert( n >= sizeof( T ) );
    \n-
    764 n -= sizeof( T );
    \n-
    765
    \n-
    766 std::array< char, sizeof( T ) > bytes;
    \n-
    767 for( char &b : bytes )
    \n-
    768 buffer.read( b );
    \n-
    769 std::memcpy( &value, bytes.data(), sizeof( T ) );
    \n-
    770 }
    \n-
    771
    \n-
    772 template< class Buffer >
    \n-
    773 static void read ( Buffer &buffer, std::string &s, std::size_t &n )
    \n-
    774 {
    \n-
    775 std::size_t size;
    \n-
    776 read( buffer, size, n );
    \n-
    777 s.resize( size );
    \n-
    778
    \n-
    779 assert( n >= size );
    \n-
    780 n -= size;
    \n-
    781
    \n-
    782 for( char &c : s )
    \n-
    783 buffer.read( c );
    \n-
    784 }
    \n-
    785
    \n-
    786 GridPtr &gridPtr_;
    \n-
    787 const typename GridType::LocalIdSet &idSet_;
    \n-
    788 mutable std::map< typename GridType::LocalIdSet::IdType, std::vector< double > > elData_, vtxData_;
    \n-
    789 mutable std::map< typename GridType::LocalIdSet::IdType, std::pair< int, DGFBoundaryParameter::type > > bndData_;
    \n-
    790 };
    \n-
    791
    \n-
    792 // grid auto pointer
    \n-\n-
    794 // element and vertex parameters
    \n-
    795 std::vector< std::vector< double > > elParam_;
    \n-
    796 std::vector< std::vector< double > > vtxParam_;
    \n-
    797 std::vector< DGFBoundaryParameter::type > bndParam_;
    \n-
    798 std::vector< int > bndId_;
    \n-
    799 std::vector< double > emptyParam_;
    \n-
    800
    \n-\n-\n-\n-
    804 }; // end of class GridPtr
    \n-
    805
    \n-
    806} // end namespace Dune
    \n-
    807
    \n-
    808#endif
    \n-\n-\n-\n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n-\n-\n-\n-\n-
    @ ForwardCommunication
    communicate as given in InterfaceType
    Definition: gridenums.hh:171
    \n-
    @ InteriorBorder_All_Interface
    send interior and border, receive all entities
    Definition: gridenums.hh:88
    \n-
    const IndexSet & indexSet() const
    obtain the index set
    Definition: common/gridview.hh:191
    \n-
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n+
    121 // Plot element index
    \n+
    122 int element_id = elementmapper.index(entity);
    \n+
    123 plotfile << "set label at " << geo.center()[0] << "," << geo.center()[1] << " '"
    \n+
    124 << element_id << "' center" << std::endl;
    \n+
    125
    \n+
    126 for (int i = 0; i < geo.corners(); ++i) {
    \n+
    127 // Plot corner indices
    \n+
    128 const int globalNodeNumber1 = nodemapper.subIndex(entity, i, 2);
    \n+
    129 auto labelpos = centrify (geo, geo.corner(i), 0.7);
    \n+
    130 plotfile << "set label at " << labelpos[0] << "," << labelpos[1] << " '" << globalNodeNumber1;
    \n+
    131 if (local_corner_indices)
    \n+
    132 plotfile << "(" << i << ")";
    \n+
    133 plotfile << "' center" << std::endl;
    \n+
    134
    \n+
    135 // Adapt min / max coordinates
    \n+
    136 for (int dim = 0; dim < 2; ++dim) {
    \n+
    137 if (geo.corner(i)[dim] < min_coord[dim])
    \n+
    138 min_coord[dim] = geo.corner(i)[dim];
    \n+
    139 else if (geo.corner(i)[dim] > max_coord[dim])
    \n+
    140 max_coord[dim] = geo.corner(i)[dim];
    \n+
    141 }
    \n+
    142 }
    \n+
    143
    \n+
    144 // Iterate over intersections
    \n+
    145 for (IntersectionIterator is = gv.ibegin(entity); is != gv.iend(entity); ++is) {
    \n+
    146
    \n+
    147 const auto& intersection = *is;
    \n+
    148 auto igeo = intersection.geometry();
    \n+
    149
    \n+
    150 // Draw intersection line
    \n+
    151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), "fs empty border 1");
    \n+
    152
    \n+
    153 // Plot local intersection index
    \n+
    154 if (local_intersection_indices) {
    \n+
    155 auto label_pos = centrify (geo, igeo.center(), 0.8);
    \n+
    156 plotfile << "set label at " << label_pos[0] << "," << label_pos[1]
    \n+
    157 << " '" << intersection.indexInInside() << "' center" << std::endl;
    \n+
    158 }
    \n+
    159
    \n+
    160 // Plot outer normal
    \n+
    161 if (outer_normals) {
    \n+
    162 auto intersection_pos = igeo.center();
    \n+
    163 auto normal = intersection.centerUnitOuterNormal();
    \n+
    164 normal *= 0.15 * igeo.volume();
    \n+
    165 auto normal_end = intersection_pos + normal;
    \n+
    166 plotfile << "set arrow from " << intersection_pos[0] << "," << intersection_pos[1]
    \n+
    167 << " to " << normal_end[0] << "," << normal_end[1] << " lt rgb \\"gray\\"" << std::endl;
    \n+
    168 }
    \n+
    169
    \n+
    170 // Get corners for inner intersection representation
    \n+
    171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5);
    \n+
    172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5);
    \n+
    173
    \n+
    174 // Thick line in case of boundary()
    \n+
    175 if (intersection.boundary())
    \n+
    176 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 3 lw 4");
    \n+
    177
    \n+
    178 // Thin line with color according to neighbor()
    \n+
    179 if (intersection.neighbor())
    \n+
    180 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 2");
    \n+
    181 else
    \n+
    182 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 1");
    \n+
    183 }
    \n+
    184
    \n+
    185 }
    \n+
    186
    \n+
    187 // Finish plot, pass extend of the grid
    \n+
    188 Dune::FieldVector<typename GridType::ctype,2> extend (max_coord - min_coord);
    \n+
    189
    \n+
    190 extend *= 0.2;
    \n+
    191 min_coord -= extend;
    \n+
    192 max_coord += extend;
    \n+
    193 plotfile << "plot [" << min_coord[0] << ":" << max_coord[0] << "] [" << min_coord[1]
    \n+
    194 << ":" << max_coord[1] << "] NaN notitle" << std::endl;
    \n+
    195 plotfile.close();
    \n+
    196
    \n+
    197 if (execute_plot) {
    \n+
    198 std::string cmd = "gnuplot -p '" + plot_file_name + "'";
    \n+
    199 if (std::system (cmd.c_str()) != 0)
    \n+
    200 DUNE_THROW(Dune::Exception,"Error running GNUPlot: " << cmd);
    \n+
    201 }
    \n+
    202 }
    \n+
    203
    \n+
    204}
    \n+
    205
    \n+
    206#endif // #ifndef DUNE_PRINTGRID_HH
    \n+
    Mapper for multiple codim and multiple geometry types.
    \n+
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n+
    MCMGLayout mcmgVertexLayout()
    layout for vertices (dim-0 entities)
    Definition: mcmgmapper.hh:107
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    constexpr All all
    PartitionSet for all partitions.
    Definition: partitionset.hh:296
    \n-
    constexpr InteriorBorder interiorBorder
    PartitionSet for the interior and border partitions.
    Definition: partitionset.hh:287
    \n-
    Definition: dgfgridfactory.hh:38
    \n-
    int boundaryId(const Intersection &intersection) const
    Definition: dgfgridfactory.hh:102
    \n-
    const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
    Definition: dgfgridfactory.hh:158
    \n-
    Grid * grid()
    Definition: dgfgridfactory.hh:90
    \n-
    std::vector< double > & parameter(const Element &element)
    Definition: dgfgridfactory.hh:124
    \n-
    bool haveBoundaryParameters() const
    Definition: dgfgridfactory.hh:151
    \n-
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n-
    size_t boundarySegmentIndex() const
    index of the boundary segment within the macro grid
    Definition: common/intersection.hh:236
    \n-
    CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
    Definition: datahandleif.hh:78
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    static constexpr int codimension
    Know your own codimension.
    Definition: common/entity.hh:106
    \n-
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n-
    virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
    obtain an element's insertion index
    Definition: common/gridfactory.hh:220
    \n-
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:314
    \n-
    virtual std::unique_ptr< GridType > createGrid()
    Finalize grid creation and hand over the grid.
    Definition: common/gridfactory.hh:372
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n-
    Class for constructing grids from DGF files.
    Definition: gridptr.hh:66
    \n-
    GridPtr(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
    constructor given a std::istream
    Definition: gridptr.hh:199
    \n-
    const std::vector< double > & parameters(const Entity &entity) const
    get parameters defined for each codim 0 und dim entity on the grid through the grid file
    Definition: gridptr.hh:325
    \n-
    GridPtr()
    Default constructor, creating empty GridPtr.
    Definition: gridptr.hh:217
    \n-
    const GridType & operator*() const
    return const reference to GridType instance
    Definition: gridptr.hh:288
    \n-
    bool haveBndParam_
    Definition: gridptr.hh:803
    \n-
    static const int dimension
    Definition: gridptr.hh:155
    \n-
    std::vector< int > bndId_
    Definition: gridptr.hh:798
    \n-
    void setNofParams(int cdim, int nofP)
    Definition: gridptr.hh:528
    \n-
    void loadBalance()
    Definition: gridptr.hh:369
    \n-
    std::vector< DGFBoundaryParameter::type > bndParam_
    Definition: gridptr.hh:797
    \n-
    void initialize(GridFactory< GridType > &factory, std::vector< int > &boundaryIds, std::vector< int > &elementIds)
    Definition: gridptr.hh:456
    \n-
    GridPtr(GridType *grd)
    Constructor storing given pointer to internal auto pointer.
    Definition: gridptr.hh:230
    \n-
    int nofElParam_
    Definition: gridptr.hh:801
    \n-
    const DGFBoundaryParameter::type & parameters(const Intersection< GridImp, IntersectionImp > &intersection) const
    get parameters for intersection
    Definition: gridptr.hh:351
    \n-
    GridType & operator*()
    return reference to GridType instance
    Definition: gridptr.hh:278
    \n-
    static bool isEmpty(Range &&range)
    Definition: gridptr.hh:381
    \n-
    int nofParameters(const Entity &) const
    get parameters defined for given entity
    Definition: gridptr.hh:311
    \n-
    GridPtr(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    constructor given the name of a DGF file
    Definition: gridptr.hh:158
    \n-
    std::vector< std::vector< double > > elParam_
    Definition: gridptr.hh:795
    \n-
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: gridptr.hh:154
    \n-
    GridPtr & operator=(const GridPtr &org)
    assignment of grid pointer
    Definition: gridptr.hh:246
    \n-
    int nofParameters(int cdim) const
    get number of parameters defined for a given codimension
    Definition: gridptr.hh:301
    \n-
    int nofParameters(const Intersection< GridImp, IntersectionImp > &intersection) const
    get number of parameters defined for a given intersection
    Definition: gridptr.hh:318
    \n-
    std::vector< double > emptyParam_
    Definition: gridptr.hh:799
    \n-
    mygrid_ptr gridPtr_
    Definition: gridptr.hh:793
    \n-
    void readGmsh(const std::string &filename, std::integral_constant< bool, false >)
    Definition: gridptr.hh:147
    \n-
    void readGmsh(const std::string &filename, std::integral_constant< bool, true >)
    Definition: gridptr.hh:137
    \n-
    std::vector< double > & params(const Entity &entity)
    Definition: gridptr.hh:505
    \n-
    void initialize(DGFGridFactory< GridType > &dgfFactory)
    Definition: gridptr.hh:386
    \n-
    GridPtr(const GridPtr &org)=default
    Copy constructor, copies internal auto pointer.
    \n-
    std::string getFileExtension(const std::string &filename) const
    Definition: gridptr.hh:122
    \n-
    const GridType * operator->() const
    return const pointer to GridType instance
    Definition: gridptr.hh:293
    \n-
    GridType * release()
    release pointer from internal ownership
    Definition: gridptr.hh:298
    \n-
    void communicate()
    Definition: gridptr.hh:360
    \n-
    std::vector< std::vector< double > > vtxParam_
    Definition: gridptr.hh:796
    \n-
    GridType * operator->()
    return pointer to GridType instance
    Definition: gridptr.hh:283
    \n-
    int nofVtxParam_
    Definition: gridptr.hh:802
    \n-
    Definition: gridptr.hh:68
    \n-
    mygrid_ptr(GridType *grd)
    Definition: gridptr.hh:99
    \n-
    ~mygrid_ptr()
    Definition: gridptr.hh:102
    \n-
    GridType * release()
    Definition: gridptr.hh:112
    \n-
    mygrid_ptr(const mygrid_ptr &other)
    Definition: gridptr.hh:97
    \n-
    mygrid_ptr & operator=(const mygrid_ptr &other)
    Definition: gridptr.hh:105
    \n-
    mygrid_ptr()
    Definition: gridptr.hh:95
    \n-
    Definition: gridptr.hh:538
    \n-
    CommDataHandleIF< DataHandle, char > & interface()
    Definition: gridptr.hh:631
    \n-
    DataHandle(const DataHandle &)=delete
    \n-
    ~DataHandle()
    Definition: gridptr.hh:581
    \n-
    DataHandle(GridPtr &gridPtr)
    Definition: gridptr.hh:539
    \n-
    void gather(Buffer &buffer, const Entity &entity) const
    Definition: gridptr.hh:673
    \n-
    bool fixedSize(int, int) const
    Definition: gridptr.hh:640
    \n-
    std::size_t size(const Entity &entity) const
    Definition: gridptr.hh:643
    \n-
    DataHandle(DataHandle &&)=delete
    \n-
    void scatter(Buffer &buffer, const Entity &entity, std::size_t n)
    Definition: gridptr.hh:702
    \n-
    bool contains(int dim, int codim) const
    Definition: gridptr.hh:633
    \n-
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n-
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n-
    static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
    Definition: gmshreader.hh:902
    \n-\n+
    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
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
    Definition: common/intersectioniterator.hh:83
    \n+
    Mapper interface.
    Definition: mapper.hh:110
    \n+
    Index index(const EntityType &e) const
    Map entity to array index.
    Definition: mapper.hh:122
    \n+
    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
    \n+
    Implementation class for a multiple codim and multiple geometry type mapper.
    Definition: mcmgmapper.hh:129
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,1135 +6,264 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * dgfparser\n-gridptr.hh\n+printgrid.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_GRIDPTR_HH\n- 6#define DUNE_DGF_GRIDPTR_HH\n+ 5#ifndef DUNE_PRINTGRID_HH\n+ 6#define DUNE_PRINTGRID_HH\n 7\n- 8#include \n- 9#include \n+ 8#include \n+ 9#include \n 10\n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15#include \n- 16#include \n- 17#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14\n+ 15namespace Dune {\n+ 16\n+ 17 namespace {\n 18\n- 19//- Dune includes\n- 20#include \n- 21#include \n- 22\n- 23#include \n- 24#include \n- 25#include \n- 26#include \n- 27#include \n- 28\n- 29#include \n- 30#include \n- 31#include \n- 32\n- 33#include \n- 34\n- 35namespace Dune\n- 36{\n- 37\n- 38 // External Forward Declarations\n- 39 // -----------------------------\n- 40\n- 41 template < class G >\n- 42 struct DGFGridFactory;\n- 43\n- 44 template< class GridImp, class IntersectionImp >\n- 45 class Intersection;\n+ 19 template\n+ 20 struct ElementDataLayout\n+ 21 {\n+ 22 bool contains (Dune::GeometryType gt)\n+ 23 {\n+ 24 return gt.dim()==dim;\n+ 25 }\n+ 26 };\n+ 27\n+ 28 template\n+ 29 struct NodeDataLayout\n+ 30 {\n+ 31 bool contains (Dune::GeometryType gt)\n+ 32 {\n+ 33 return gt.dim()==0;\n+ 34 }\n+ 35 };\n+ 36\n+ 37 // Move a point closer to basegeo's center by factor scale (used for\n+drawing relative to the element)\n+ 38 template \n+ 39 C centrify (const B& basegeo, const C& coords, const double scale) {\n+ 40 C ret = coords;\n+ 41 ret -= basegeo.center();\n+ 42 ret *= scale;\n+ 43 ret += basegeo.center();\n+ 44 return ret;\n+ 45 }\n 46\n- 47\n- 48\n- 49 // GridPtr\n- 50 // -------\n- 51\n- 64 template< class GridType >\n-65 struct GridPtr\n- 66 {\n-67 class mygrid_ptr : public std::shared_ptr< GridType >\n- 68 {\n- 69 typedef std::shared_ptr< GridType > base_t ;\n- 70 // empty deleter to avoid deletion on release\n- 71 typedef null_deleter< GridType > emptydeleter_t ;\n- 72\n- 73 void removeObj()\n- 74 {\n- 75 // if use count is only 1 delete object\n- 76 if( use_count() == 1 )\n- 77 {\n- 78 // delete point here, since we use the empty deleter\n- 79 GridType* grd = release();\n- 80 if( grd ) delete grd ;\n- 81 }\n- 82 }\n- 83\n- 84 void assignObj( const mygrid_ptr& other )\n- 85 {\n- 86 removeObj();\n- 87 base_t :: operator = ( other );\n- 88 }\n- 89 public:\n- 90 using base_t :: get ;\n- 91 using base_t ::_swap ;\n- 92 using base_t :: use_count ;\n- 93\n- 94 // default constructor\n-95 mygrid_ptr() : base_t( ( GridType * ) 0, emptydeleter_t() ) {}\n- 96 // copy constructor\n-97 mygrid_ptr( const mygrid_ptr& other ) : base_t(nullptr) { assignObj( other\n-); }\n- 98 // constructor taking pointer\n-99 explicit mygrid_ptr( GridType* grd ) : base_t( grd, emptydeleter_t() ) {}\n+ 47 // Add a line to the plotfile from p1 to p2\n+ 48 template \n+ 49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2,\n+std::string options) {\n+ 50 plotfile << \"set object poly from \";\n+ 51 plotfile << p1[0] << \",\" << p1[1] << \" to \";\n+ 52 plotfile << p2[0] << \",\" << p2[1] << \" to \";\n+ 53 plotfile << p1[0] << \",\" << p1[1];\n+ 54 plotfile << \" \" << options << std::endl;\n+ 55 }\n+ 56\n+ 57 }\n+ 58\n+ 72 template \n+73 void printGrid (const GridType& grid, const Dune::MPIHelper& helper, std::\n+string output_file = \"printgrid\",\n+ 74 int size = 2000, bool execute_plot = true, bool png = true, bool\n+local_corner_indices = true,\n+ 75 bool local_intersection_indices = true, bool outer_normals = true)\n+ 76 {\n+ 77\n+ 78 // Create output file\n+ 79 output_file = output_file + \"_\" + std::to_string(helper.rank());\n+ 80 std::string plot_file_name = output_file + \".gnuplot\";\n+ 81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc);\n+ 82 if (!plotfile.is_open()) {\n+ 83 DUNE_THROW(Dune::IOError, \"Could not create plot file \" << output_file <<\n+\"!\");\n+ 84 return;\n+ 85 }\n+ 86\n+ 87 // Basic plot settings\n+ 88 plotfile << \"set size ratio -1\" << std::endl;\n+ 89 if (png) {\n+ 90 plotfile << \"set terminal png size \" << size << \",\" << size << std::endl;\n+ 91 plotfile << \"set output '\" << output_file << \".png'\" << std::endl;\n+ 92 } else {\n+ 93 plotfile << \"set terminal svg size \" << size << \",\" << size << \" enhanced\n+background rgb 'white'\" << std::endl;\n+ 94 plotfile << \"set output '\" << output_file << \".svg'\" << std::endl;\n+ 95 }\n+ 96\n+ 97 // Get GridView\n+ 98 typedef typename GridType::LeafGridView GV;\n+ 99 const GV gv = grid.leafGridView();\n 100\n- 101 // destructor\n-102 ~mygrid_ptr() { removeObj(); }\n- 103\n- 104 // assigment operator\n-105 mygrid_ptr& operator_=( const mygrid_ptr& other )\n- 106 {\n- 107 assignObj( other );\n- 108 return *this;\n- 109 }\n- 110\n- 111 // release pointer\n-112 GridType* release()\n- 113 {\n- 114 GridType* grd = this->get();\n- 115 base_t ptr(( GridType * ) 0, emptydeleter_t() );\n- 116 this->swap( ptr );\n- 117 return grd ;\n- 118 }\n- 119 };\n+ 101 // Create mappers used to retrieve indices\n+ 102 typedef typename Dune::MultipleCodimMultipleGeomTypeMapper Mapper;\n+ 103 const Mapper elementmapper(gv, mcmgElementLayout());\n+ 104 const Mapper nodemapper(gv, mcmgVertexLayout());\n+ 105\n+ 106 // Create iterators\n+ 107 typedef typename GV::template Codim<0 >::Iterator LeafIterator;\n+ 108 typedef typename GV::IntersectionIterator IntersectionIterator;\n+ 109\n+ 110 LeafIterator it = gv.template begin<0>();\n+ 111\n+ 112 // Will contain min/max coordinates. Needed for scaling of the plot\n+ 113 Dune::FieldVector max_coord (it->geometry\n+().center()), min_coord (max_coord);\n+ 114\n+ 115 // Iterate over elements\n+ 116 for (; it != gv.template end<0>(); ++it) {\n+ 117\n+ 118 const auto& entity = *it;\n+ 119 auto geo = entity.geometry();\n 120\n- 121 protected:\n-122 std::string getFileExtension( const std::string& filename ) const\n- 123 {\n- 124 // extract file extension\n- 125 auto extpos = filename.find_last_of(\".\");\n- 126 std::string ext;\n- 127 if( extpos != std::string::npos)\n- 128 ext = filename.substr( extpos + 1 );\n- 129\n- 130 // convert all letters to lower case\n- 131 for( auto& item : ext )\n- 132 item = std::tolower( item );\n- 133 return ext;\n- 134 }\n- 135\n- 136 // read gmsh file if dimension world <= 3\n-137 void readGmsh( const std::string& filename, std::integral_constant< bool,\n-true > )\n- 138 {\n- 139 GridFactory gridFactory;\n- 140 std::vector boundaryIDs;\n- 141 std::vector elementsIDs;\n- 142 GmshReader::read(gridFactory,filename,boundaryIDs,elementsIDs);\n- 143 initialize( gridFactory, boundaryIDs,elementsIDs);\n- 144 }\n- 145\n- 146 // if dimension world > 3 throw GridError\n-147 void readGmsh( const std::string& filename, std::integral_constant< bool,\n-false > )\n- 148 {\n- 149 DUNE_THROW(GridError, \"GmshReader requires dimWorld <= 3.\" );\n- 150 }\n- 151\n- 152 public:\n- 153\n-154 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n-155 static const int dimension = GridType::dimension;\n- 156\n-158 explicit GridPtr ( const std::string &filename,\n- 159 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 160 : gridPtr_(),\n- 161 elParam_(),\n- 162 vtxParam_(),\n- 163 bndParam_(),\n- 164 bndId_(),\n- 165 emptyParam_(),\n- 166 nofElParam_( 0 ),\n- 167 nofVtxParam_( 0 ),\n- 168 haveBndParam_( false )\n- 169 {\n- 170 std::string fileExt = getFileExtension( filename );\n- 171\n- 172 if( fileExt == \"dgf\" )\n- 173 {\n- 174 DGFGridFactory<_GridType_> dgfFactory( filename, comm );\n- 175 initialize( dgfFactory );\n- 176 }\n- 177 else if( fileExt == \"msh\" )\n- 178 {\n- 179 // Gmsh reader only compiles for dimworld <= 3\n- 180 readGmsh( filename, std::integral_constant< bool, GridType::dimensionworld\n-<= 3 > () );\n- 181 }\n- 182 else if( fileExt == \"amc\" || fileExt == \"2d\" || fileExt == \"3d\" )\n- 183 {\n- 184 // TODO: AlbertaReader\n- 185 DUNE_THROW( NotImplemented, \"GridPtr: file format '\" << fileExt << \"' not\n-supported yet!\" );\n- 186 }\n- 187 else if( fileExt == \"vtu\" )\n- 188 {\n- 189 // TODO: vtu/vtk reader\n- 190 DUNE_THROW( NotImplemented, \"GridPtr: file format '\" << fileExt << \"' not\n-supported yet!\" );\n- 191 }\n- 192 else\n- 193 {\n- 194 DUNE_THROW( NotImplemented, \"GridPtr: file format '\" << fileExt << \"' not\n-supported yet!\" );\n- 195 }\n- 196 }\n- 197\n-199 explicit GridPtr ( std::istream &input,\n- 200 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 201 : gridPtr_(),\n- 202 elParam_(),\n- 203 vtxParam_(),\n- 204 bndParam_(),\n- 205 bndId_(),\n- 206 emptyParam_(),\n- 207 nofElParam_( 0 ),\n- 208 nofVtxParam_( 0 ),\n- 209 haveBndParam_( false )\n- 210 {\n- 211 // input stream only works for DGF format right now\n- 212 DGFGridFactory<_GridType_> dgfFactory( input, comm );\n- 213 initialize( dgfFactory );\n- 214 }\n- 215\n-217 GridPtr()\n- 218 : gridPtr_(),\n- 219 elParam_(),\n- 220 vtxParam_(),\n- 221 bndParam_(),\n- 222 bndId_(),\n- 223 emptyParam_(),\n- 224 nofElParam_(0),\n- 225 nofVtxParam_(0),\n- 226 haveBndParam_( false )\n- 227 {}\n- 228\n-230 explicit GridPtr( GridType *grd )\n- 231 : gridPtr_(grd),\n- 232 elParam_(),\n- 233 vtxParam_(),\n- 234 bndParam_(),\n- 235 bndId_(),\n- 236 emptyParam_(),\n- 237 nofElParam_(0),\n- 238 nofVtxParam_(0),\n- 239 haveBndParam_( false )\n- 240 {}\n- 241\n-243 GridPtr( const GridPtr &org ) = default;\n- 244\n-246 GridPtr& operator=( const GridPtr &org )\n- 247 {\n- 248 gridPtr_ = org.gridPtr_;\n- 249 elParam_ = org.elParam_;\n- 250 vtxParam_ = org.vtxParam_;\n- 251 bndParam_ = org.bndParam_;\n- 252 bndId_ = org.bndId_;\n- 253 emptyParam_ = org.emptyParam_;\n- 254\n- 255 nofElParam_ = org.nofElParam_;\n- 256 nofVtxParam_ = org.nofVtxParam_;\n- 257 haveBndParam_ = org.haveBndParam_;\n- 258 return *this;\n- 259 }\n- 260\n-262 GridPtr& operator_=(GridType * grd)\n- 263 {\n- 264 gridPtr_ = mygrid_ptr( grd );\n- 265 elParam_.resize(0);\n- 266 vtxParam_.resize(0);\n- 267 bndParam_.resize(0);\n- 268 bndId_.resize(0);\n- 269 emptyParam_.resize(0);\n- 270\n- 271 nofVtxParam_ = 0;\n- 272 nofElParam_ = 0;\n- 273 haveBndParam_ = false;\n- 274 return *this;\n- 275 }\n- 276\n-278 GridType& operator*() {\n- 279 return *gridPtr_;\n- 280 }\n- 281\n-283 GridType* operator->() {\n- 284 return gridPtr_.operator -> ();\n- 285 }\n- 286\n-288 const GridType& operator*() const {\n- 289 return *gridPtr_;\n- 290 }\n- 291\n-293 const GridType* operator->() const {\n- 294 return gridPtr_.operator -> ();\n- 295 }\n- 296\n-298 GridType* release () { return gridPtr_.release(); }\n- 299\n-301 int nofParameters(int cdim) const {\n- 302 switch (cdim) {\n- 303 case 0 : return nofElParam_; break;\n- 304 case GridType::dimension : return nofVtxParam_; break;\n- 305 }\n- 306 return 0;\n- 307 }\n- 308\n- 310 template \n-311 int nofParameters ( const Entity & ) const\n- 312 {\n- 313 return nofParameters( (int) Entity::codimension );\n- 314 }\n- 315\n- 317 template< class GridImp, class IntersectionImp >\n-318 int nofParameters ( const Intersection<_GridImp,_IntersectionImp_> &\n-intersection ) const\n- 319 {\n- 320 return parameters( intersection ).size();\n- 321 }\n- 322\n- 324 template \n-325 const std::vector< double > ¶meters ( const Entity &entity ) const\n- 326 {\n- 327 typedef typename GridType::LevelGridView GridView;\n- 328 GridView gridView = gridPtr_->levelGridView( 0 );\n- 329 switch( (int)Entity::codimension )\n- 330 {\n- 331 case 0 :\n- 332 if( nofElParam_ > 0 )\n- 333 {\n- 334 assert( (unsigned int)gridView.indexSet().index( entity ) < elParam_.size\n-() );\n- 335 return elParam_[ gridView.indexSet().index( entity ) ];\n- 336 }\n- 337 break;\n- 338 case GridType::dimension :\n- 339 if( nofVtxParam_ > 0 )\n- 340 {\n- 341 assert( (unsigned int)gridView.indexSet().index( entity ) < vtxParam_.size\n-() );\n- 342 return vtxParam_[ gridView.indexSet().index( entity ) ];\n- 343 }\n- 344 break;\n- 345 }\n- 346 return emptyParam_;\n- 347 }\n- 348\n- 350 template< class GridImp, class IntersectionImp >\n-351 const DGFBoundaryParameter::type & parameters ( const Intersection<\n-GridImp,_IntersectionImp_> & intersection ) const\n- 352 {\n- 353 // if no parameters given return empty vector\n- 354 if ( !haveBndParam_ )\n- 355 return DGFBoundaryParameter::defaultValue();\n- 356\n- 357 return bndParam_[ intersection.boundarySegmentIndex() ];\n- 358 }\n- 359\n-360 void communicate ()\n- 361 {\n- 362 if( gridPtr_->comm().size() > 1 )\n- 363 {\n- 364 DataHandle dh(*this);\n- 365 gridPtr_->levelGridView( 0 ).communicate( dh.interface(),\n-InteriorBorder_All_Interface,ForwardCommunication );\n- 366 }\n- 367 }\n- 368\n-369 void loadBalance ()\n- 370 {\n- 371 if( gridPtr_->comm().size() > 1 )\n- 372 {\n- 373 DataHandle dh(*this);\n- 374 gridPtr_->loadBalance( dh.interface() );\n- 375 gridPtr_->levelGridView( 0 ).communicate( dh.interface(),\n-InteriorBorder_All_Interface,ForwardCommunication );\n- 376 }\n- 377 }\n- 378\n- 379 protected:\n- 380 template< class Range >\n-381 static bool isEmpty ( Range &&range )\n- 382 {\n- 383 return range.begin() == range.end();\n- 384 }\n- 385\n-386 void initialize ( DGFGridFactory<_GridType_> &dgfFactory )\n- 387 {\n- 388 gridPtr_ = mygrid_ptr( dgfFactory.grid() );\n- 389\n- 390 const auto gridView = gridPtr_->levelGridView( 0 );\n- 391 const auto &indexSet = gridView.indexSet();\n- 392\n- 393 nofElParam_ = dgfFactory.template numParameters< 0 >();\n- 394 nofVtxParam_ = dgfFactory.template numParameters< dimension >();\n- 395 haveBndParam_ = dgfFactory.haveBoundaryParameters();\n- 396\n- 397 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_,\n-static_cast< int >( haveBndParam_ ) }};\n- 398 gridView.comm().max( nofParams.data(), nofParams.size() );\n- 399\n- 400 // empty grids have no parameters associated\n- 401 if( isEmpty( elements( gridView, Partitions::interiorBorder ) ) )\n- 402 {\n- 403 nofElParam_ = nofParams[ 0 ];\n- 404 nofVtxParam_ = nofParams[ 1 ];\n- 405 }\n- 406\n- 407 // boundary parameters may be empty\n- 408 haveBndParam_ = static_cast< bool >( nofParams[ 2 ] );\n- 409\n- 410 if( (nofElParam_ != nofParams[ 0 ]) || (nofVtxParam_ != nofParams[ 1 ]) )\n- 411 DUNE_THROW( DGFException, \"Number of parameters differs between processes\"\n-);\n- 412\n- 413 elParam_.resize( nofElParam_ > 0 ? indexSet.size( 0 ) : 0 );\n- 414 vtxParam_.resize( nofVtxParam_ > 0 ? indexSet.size( dimension ) : 0 );\n- 415\n- 416 bndId_.resize( indexSet.size( 1 ) );\n- 417 if( haveBndParam_ )\n- 418 bndParam_.resize( gridPtr_->numBoundarySegments() );\n- 419\n- 420 for( const auto &element : elements( gridView, Partitions::interiorBorder\n-) )\n- 421 {\n- 422 if( nofElParam_ > 0 )\n- 423 {\n- 424 std::swap( elParam_[ indexSet.index( element ) ], dgfFactory.parameter\n-( element ) );\n- 425 assert( elParam_[ indexSet.index( element ) ].size() == static_cast< std::\n-size_t >( nofElParam_ ) );\n- 426 }\n- 427\n- 428 if( nofVtxParam_ > 0 )\n- 429 {\n- 430 for( unsigned int v = 0, n = element.subEntities( dimension ); v < n; ++v\n-)\n- 431 {\n- 432 const auto index = indexSet.subIndex( element, v, dimension );\n- 433 if( vtxParam_[ index ].empty() )\n- 434 std::swap( vtxParam_[ index ], dgfFactory.parameter( element.template\n-subEntity< dimension >( v ) ) );\n- 435 assert( vtxParam_[ index ].size() == static_cast< std::size_t >\n-( nofVtxParam_ ) );\n- 436 }\n- 437 }\n- 438\n- 439 if( element.hasBoundaryIntersections() )\n- 440 {\n- 441 for( const auto &intersection : intersections( gridView, element ) )\n- 442 {\n- 443 // dirty hack: check for \"none\" to make corner point grid work\n- 444 if( !intersection.boundary() || intersection.type().isNone() )\n- 445 continue;\n- 446\n- 447 const auto k = indexSet.subIndex( element, intersection.indexInInside(), 1\n-);\n- 448 bndId_[ k ] = dgfFactory.boundaryId( intersection );\n- 449 if( haveBndParam_ )\n- 450 bndParam_[ intersection.boundarySegmentIndex() ] =\n-dgfFactory.boundaryParameter( intersection );\n- 451 }\n- 452 }\n- 453 }\n- 454 }\n- 455\n-456 void initialize ( GridFactory<_GridType_> &factory,\n- 457 std::vector& boundaryIds,\n- 458 std::vector& elementIds )\n- 459 {\n- 460 gridPtr_ = mygrid_ptr( factory.createGrid().release() );\n- 461\n- 462 const auto& gridView = gridPtr_->leafGridView();\n- 463 const auto& indexSet = gridView.indexSet();\n- 464\n- 465 nofElParam_ = elementIds.empty() ? 0 : 1 ;\n- 466 nofVtxParam_ = 0;\n- 467 haveBndParam_ = boundaryIds.empty() ? 0 : 1 ;\n- 468\n- 469 std::array< int, 3 > nofParams = {{ nofElParam_, nofVtxParam_,\n-static_cast< int >( haveBndParam_ ) }};\n- 470 gridView.comm().max( nofParams.data(), nofParams.size() );\n- 471\n- 472 // empty grids have no parameters associated\n- 473 if( isEmpty( elements( gridView, Partitions::interiorBorder ) ) )\n- 474 {\n- 475 nofElParam_ = nofParams[ 0 ];\n- 476 }\n- 477\n- 478 // boundary parameters may be empty\n- 479 haveBndParam_ = static_cast< bool >( nofParams[ 2 ] );\n- 480\n- 481 // Reorder boundary IDs according to the insertion index\n- 482 if(!boundaryIds.empty() || !elementIds.empty() )\n- 483 {\n- 484 bndParam_.resize( boundaryIds.size() );\n- 485 elParam_.resize( elementIds.size(), std::vector(1) );\n- 486 for(const auto& entity : elements( gridView ))\n- 487 {\n- 488 elParam_[ indexSet.index( entity ) ][ 0 ] = elementIds\n-[ factory.insertionIndex( entity ) ];\n- 489 if( haveBndParam_ )\n- 490 {\n- 491 for(const auto& intersection : intersections( gridView,entity) )\n- 492 {\n- 493 if(intersection.boundary())\n- 494 {\n- 495 // DGFBoundaryParameter::type is of type string.\n- 496 bndParam_[intersection.boundarySegmentIndex()] = std::to_string\n-(boundaryIds[factory.insertionIndex(intersection)]);\n- 497 }\n- 498 }\n- 499 }\n- 500 }\n- 501 }\n- 502 }\n- 503\n- 504 template \n-505 std::vector< double > ¶ms ( const Entity &entity )\n- 506 {\n- 507 const auto gridView = gridPtr_->levelGridView( 0 );\n- 508 switch( (int)Entity::codimension )\n- 509 {\n- 510 case 0 :\n- 511 if( nofElParam_ > 0 ) {\n- 512 if ( gridView.indexSet().index( entity ) >= elParam_.size() )\n- 513 elParam_.resize( gridView.indexSet().index( entity ) );\n- 514 return elParam_[ gridView.indexSet().index( entity ) ];\n- 515 }\n- 516 break;\n- 517 case GridType::dimension :\n- 518 if( nofVtxParam_ > 0 ) {\n- 519 if ( gridView.indexSet().index( entity ) >= vtxParam_.size() )\n- 520 vtxParam_.resize( gridView.indexSet().index( entity ) );\n- 521 return vtxParam_[ gridView.indexSet().index( entity ) ];\n- 522 }\n- 523 break;\n- 524 }\n- 525 return emptyParam_;\n- 526 }\n- 527\n-528 void setNofParams( int cdim, int nofP )\n- 529 {\n- 530 switch (cdim) {\n- 531 case 0 : nofElParam_ = nofP; break;\n- 532 case GridType::dimension : nofVtxParam_ = nofP; break;\n- 533 }\n- 534 }\n- 535\n-536 struct DataHandle\n- 537 : public CommDataHandleIF< DataHandle, char >\n- 538 {\n-539 explicit DataHandle ( GridPtr &gridPtr )\n- 540 : gridPtr_( gridPtr ), idSet_( gridPtr->localIdSet() )\n- 541 {\n- 542 const auto gridView = gridPtr_->levelGridView( 0 );\n- 543 const auto &indexSet = gridView.indexSet();\n- 544\n- 545 for( const auto &element : elements( gridView, Partitions::interiorBorder\n-) )\n- 546 {\n- 547 if( gridPtr_.nofElParam_ > 0 )\n- 548 std::swap( gridPtr_.elParam_[ indexSet.index( element ) ], elData_\n-[ idSet_.id( element ) ] );\n- 549\n- 550 if( gridPtr_.nofVtxParam_ > 0 )\n- 551 {\n- 552 for( unsigned int v = 0, n = element.subEntities( dimension ); v < n; ++v\n-)\n- 553 {\n- 554 const auto index = indexSet.subIndex( element, v, dimension );\n- 555 if ( !gridPtr_.vtxParam_[ index ].empty() )\n- 556 std::swap( gridPtr_.vtxParam_[ index ], vtxData_[ idSet_.subId( element,\n-v, dimension ) ] );\n- 557 }\n- 558 }\n- 559\n- 560 if( element.hasBoundaryIntersections() )\n- 561 {\n- 562 for( const auto &intersection : intersections( gridView, element ) )\n- 563 {\n- 564 // dirty hack: check for \"none\" to make corner point grid work\n- 565 if( !intersection.boundary() || intersection.type().isNone() )\n- 566 continue;\n- 567\n- 568 const int i = intersection.indexInInside();\n- 569 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ];\n- 570 bndData.first = gridPtr_.bndId_[ indexSet.subIndex( element, i, 1 ) ];\n- 571 if( gridPtr_.haveBndParam_ )\n- 572 std::swap( bndData.second, gridPtr_.bndParam_\n-[ intersection.boundarySegmentIndex() ] );\n- 573 }\n- 574 }\n- 575 }\n- 576 }\n- 577\n-578 DataHandle ( const DataHandle & ) = delete;\n-579 DataHandle ( DataHandle && ) = delete;\n- 580\n-581 ~DataHandle ()\n- 582 {\n- 583 const auto gridView = gridPtr_->levelGridView( 0 );\n- 584 const auto &indexSet = gridView.indexSet();\n- 585\n- 586 if( gridPtr_.nofElParam_ > 0 )\n- 587 gridPtr_.elParam_.resize( indexSet.size( 0 ) );\n- 588 if( gridPtr_.nofVtxParam_ > 0 )\n- 589 gridPtr_.vtxParam_.resize( indexSet.size( dimension ) );\n- 590 gridPtr_.bndId_.resize( indexSet.size( 1 ) );\n- 591 if( gridPtr_.haveBndParam_ )\n- 592 gridPtr_.bndParam_.resize( gridPtr_->numBoundarySegments() );\n- 593\n- 594 for( const auto &element : elements( gridView, Partitions::all ) )\n- 595 {\n- 596 if( gridPtr_.nofElParam_ > 0 )\n- 597 {\n- 598 std::swap( gridPtr_.elParam_[ indexSet.index( element ) ], elData_\n-[ idSet_.id( element ) ] );\n- 599 assert( gridPtr_.elParam_[ indexSet.index( element ) ].size() ==\n-static_cast< std::size_t >( gridPtr_.nofElParam_ ) );\n- 600 }\n- 601\n- 602 if( gridPtr_.nofVtxParam_ > 0 )\n- 603 {\n- 604 for( unsigned int v = 0; v < element.subEntities( dimension ); ++v )\n- 605 {\n- 606 const auto index = indexSet.subIndex( element, v, dimension );\n- 607 if( gridPtr_.vtxParam_[ index ].empty() )\n- 608 std::swap( gridPtr_.vtxParam_[ index ], vtxData_[ idSet_.subId( element,\n-v, dimension ) ] );\n- 609 assert( gridPtr_.vtxParam_[ index ].size() == static_cast< std::size_t >\n-( gridPtr_.nofVtxParam_ ) );\n- 610 }\n- 611 }\n- 612\n- 613 if( element.hasBoundaryIntersections() )\n- 614 {\n- 615 for( const auto &intersection : intersections( gridView, element ) )\n- 616 {\n- 617 // dirty hack: check for \"none\" to make corner point grid work\n- 618 if( !intersection.boundary() || intersection.type().isNone() )\n- 619 continue;\n- 620\n- 621 const int i = intersection.indexInInside();\n- 622 auto &bndData = bndData_[ idSet_.subId( element, i, 1 ) ];\n- 623 gridPtr_.bndId_[ indexSet.subIndex( element, i, 1 ) ] = bndData.first;\n- 624 if( gridPtr_.haveBndParam_ )\n- 625 std::swap( bndData.second, gridPtr_.bndParam_\n-[ intersection.boundarySegmentIndex() ] );\n- 626 }\n- 627 }\n- 628 }\n- 629 }\n- 630\n- 631 CommDataHandleIF<_DataHandle,_char_> &interface () { return *this; }\n- 632\n-633 bool contains ( int dim, int codim ) const\n- 634 {\n- 635 assert( dim == dimension );\n- 636 // do not use a switch statement, because dimension == 1 is possible\n- 637 return (codim == 1) || ((codim == dimension) && (gridPtr_.nofVtxParam_ >\n-0)) || ((codim == 0) && (gridPtr_.nofElParam_ > 0));\n- 638 }\n- 639\n-640 bool fixedSize (int /* dim */, int /* codim */) const { return false; }\n- 641\n- 642 template< class Entity >\n-643 std::size_t size ( const Entity &entity ) const\n- 644 {\n- 645 std::size_t totalSize = 0;\n- 646\n- 647 // do not use a switch statement, because dimension == 1 is possible\n- 648 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )\n- 649 {\n- 650 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t\n->( gridPtr_.nofElParam_ ) );\n- 651 for( double &v : elData_[ idSet_.id( entity ) ] )\n- 652 totalSize += dataSize( v );\n- 653 }\n- 654\n- 655 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )\n- 656 {\n- 657 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t\n->( gridPtr_.nofVtxParam_ ) );\n- 658 for( double &v : vtxData_[ idSet_.id( entity ) ] )\n- 659 totalSize += dataSize( v );\n- 660 }\n- 661\n- 662 if( Entity::codimension == 1 )\n- 663 {\n- 664 const auto bndData = bndData_.find( idSet_.id( entity ) );\n- 665 if( bndData != bndData_.end() )\n- 666 totalSize += dataSize( bndData->second.first ) + dataSize( bndData-\n->second.second );\n- 667 }\n- 668\n- 669 return totalSize;\n- 670 }\n- 671\n- 672 template< class Buffer, class Entity >\n-673 void gather ( Buffer &buffer, const Entity &entity ) const\n- 674 {\n- 675 // do not use a switch statement, because dimension == 1 is possible\n- 676 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )\n- 677 {\n- 678 assert( elData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t\n->( gridPtr_.nofElParam_ ) );\n- 679 for( double &v : elData_[ idSet_.id( entity ) ] )\n- 680 write( buffer, v );\n- 681 }\n- 682\n- 683 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )\n- 684 {\n- 685 assert( vtxData_[ idSet_.id( entity ) ].size() == static_cast< std::size_t\n->( gridPtr_.nofVtxParam_ ) );\n- 686 for( double &v : vtxData_[ idSet_.id( entity ) ] )\n- 687 write( buffer, v );\n- 688 }\n- 689\n- 690 if( Entity::codimension == 1 )\n- 691 {\n- 692 const auto bndData = bndData_.find( idSet_.id( entity ) );\n- 693 if( bndData != bndData_.end() )\n- 694 {\n- 695 write( buffer, bndData->second.first );\n- 696 write( buffer, bndData->second.second );\n- 697 }\n- 698 }\n- 699 }\n- 700\n- 701 template< class Buffer, class Entity >\n-702 void scatter ( Buffer &buffer, const Entity &entity, std::size_t n )\n- 703 {\n- 704 // do not use a switch statement, because dimension == 1 is possible\n- 705 if( (Entity::codimension == 0) && (gridPtr_.nofElParam_ > 0) )\n- 706 {\n- 707 auto &p = elData_[ idSet_.id( entity ) ];\n- 708 p.resize( gridPtr_.nofElParam_ );\n- 709 for( double &v : p )\n- 710 read( buffer, v, n );\n- 711 }\n- 712\n- 713 if( (Entity::codimension == dimension) && (gridPtr_.nofVtxParam_ > 0) )\n- 714 {\n- 715 auto &p = vtxData_[ idSet_.id( entity ) ];\n- 716 p.resize( gridPtr_.nofVtxParam_ );\n- 717 for( double &v : p )\n- 718 read( buffer, v, n );\n- 719 }\n- 720\n- 721 if( (Entity::codimension == 1) && (n > 0) )\n- 722 {\n- 723 auto &bndData = bndData_[ idSet_.id( entity ) ];\n- 724 read( buffer, bndData.first, n );\n- 725 read( buffer, bndData.second, n );\n- 726 }\n- 727\n- 728 assert( n == 0 );\n- 729 }\n- 730\n- 731 private:\n- 732 template< class T >\n- 733 static std::enable_if_t< std::is_trivially_copyable< T >::value, std::\n-size_t > dataSize ( const T & /* value */ )\n- 734 {\n- 735 return sizeof( T );\n- 736 }\n- 737\n- 738 static std::size_t dataSize ( const std::string &s )\n- 739 {\n- 740 return dataSize( s.size() ) + s.size();\n- 741 }\n- 742\n- 743 template< class Buffer, class T >\n- 744 static std::enable_if_t< std::is_trivially_copyable< T >::value > write\n-( Buffer &buffer, const T &value )\n- 745 {\n- 746 std::array< char, sizeof( T ) > bytes;\n- 747 std::memcpy( bytes.data(), &value, sizeof( T ) );\n- 748 for( char &b : bytes )\n- 749 buffer.write( b );\n- 750 }\n- 751\n- 752 template< class Buffer >\n- 753 static void write ( Buffer &buffer, const std::string &s )\n- 754 {\n- 755 write( buffer, s.size() );\n- 756 for( const char &c : s )\n- 757 buffer.write( c );\n- 758 }\n- 759\n- 760 template< class Buffer, class T >\n- 761 static std::enable_if_t< std::is_trivially_copyable< T >::value > read\n-( Buffer &buffer, T &value, std::size_t &n )\n- 762 {\n- 763 assert( n >= sizeof( T ) );\n- 764 n -= sizeof( T );\n- 765\n- 766 std::array< char, sizeof( T ) > bytes;\n- 767 for( char &b : bytes )\n- 768 buffer.read( b );\n- 769 std::memcpy( &value, bytes.data(), sizeof( T ) );\n- 770 }\n- 771\n- 772 template< class Buffer >\n- 773 static void read ( Buffer &buffer, std::string &s, std::size_t &n )\n- 774 {\n- 775 std::size_t size;\n- 776 read( buffer, size, n );\n- 777 s.resize( size );\n- 778\n- 779 assert( n >= size );\n- 780 n -= size;\n- 781\n- 782 for( char &c : s )\n- 783 buffer.read( c );\n- 784 }\n- 785\n- 786 GridPtr &gridPtr_;\n- 787 const typename GridType::LocalIdSet &idSet_;\n- 788 mutable std::map< typename GridType::LocalIdSet::IdType, std::vector<\n-double > > elData_, vtxData_;\n- 789 mutable std::map< typename GridType::LocalIdSet::IdType, std::pair< int,\n-DGFBoundaryParameter::type > > bndData_;\n- 790 };\n- 791\n- 792 // grid auto pointer\n-793 mutable mygrid_ptr gridPtr_;\n- 794 // element and vertex parameters\n-795 std::vector< std::vector< double > > elParam_;\n-796 std::vector< std::vector< double > > vtxParam_;\n-797 std::vector< DGFBoundaryParameter::type > bndParam_;\n-798 std::vector< int > bndId_;\n-799 std::vector< double > emptyParam_;\n- 800\n-801 int nofElParam_;\n-802 int nofVtxParam_;\n-803 bool haveBndParam_;\n- 804 }; // end of class GridPtr\n- 805\n- 806} // end namespace Dune\n- 807\n- 808#endif\n-partitionset.hh\n-rangegenerators.hh\n-gridenums.hh\n-datahandleif.hh\n-Describes the parallel communication interface class for MessageBuffers and\n-DataHandles.\n-dgfexception.hh\n-parser.hh\n-entitykey.hh\n-gmshreader.hh\n-Dune::ForwardCommunication\n-@ ForwardCommunication\n-communicate as given in InterfaceType\n-Definition: gridenums.hh:171\n-Dune::InteriorBorder_All_Interface\n-@ InteriorBorder_All_Interface\n-send interior and border, receive all entities\n-Definition: gridenums.hh:88\n-Dune::GridView::indexSet\n-const IndexSet & indexSet() const\n-obtain the index set\n-Definition: common/gridview.hh:191\n-std::swap\n-void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n-> &b)\n-Definition: utility/persistentcontainer.hh:83\n+ 121 // Plot element index\n+ 122 int element_id = elementmapper.index(entity);\n+ 123 plotfile << \"set label at \" << geo.center()[0] << \",\" << geo.center()[1]\n+<< \" '\"\n+ 124 << element_id << \"' center\" << std::endl;\n+ 125\n+ 126 for (int i = 0; i < geo.corners(); ++i) {\n+ 127 // Plot corner indices\n+ 128 const int globalNodeNumber1 = nodemapper.subIndex(entity, i, 2);\n+ 129 auto labelpos = centrify (geo, geo.corner(i), 0.7);\n+ 130 plotfile << \"set label at \" << labelpos[0] << \",\" << labelpos[1] << \" '\"\n+<< globalNodeNumber1;\n+ 131 if (local_corner_indices)\n+ 132 plotfile << \"(\" << i << \")\";\n+ 133 plotfile << \"' center\" << std::endl;\n+ 134\n+ 135 // Adapt min / max coordinates\n+ 136 for (int dim = 0; dim < 2; ++dim) {\n+ 137 if (geo.corner(i)[dim] < min_coord[dim])\n+ 138 min_coord[dim] = geo.corner(i)[dim];\n+ 139 else if (geo.corner(i)[dim] > max_coord[dim])\n+ 140 max_coord[dim] = geo.corner(i)[dim];\n+ 141 }\n+ 142 }\n+ 143\n+ 144 // Iterate over intersections\n+ 145 for (IntersectionIterator is = gv.ibegin(entity); is != gv.iend(entity);\n+++is) {\n+ 146\n+ 147 const auto& intersection = *is;\n+ 148 auto igeo = intersection.geometry();\n+ 149\n+ 150 // Draw intersection line\n+ 151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), \"fs empty border 1\");\n+ 152\n+ 153 // Plot local intersection index\n+ 154 if (local_intersection_indices) {\n+ 155 auto label_pos = centrify (geo, igeo.center(), 0.8);\n+ 156 plotfile << \"set label at \" << label_pos[0] << \",\" << label_pos[1]\n+ 157 << \" '\" << intersection.indexInInside() << \"' center\" << std::endl;\n+ 158 }\n+ 159\n+ 160 // Plot outer normal\n+ 161 if (outer_normals) {\n+ 162 auto intersection_pos = igeo.center();\n+ 163 auto normal = intersection.centerUnitOuterNormal();\n+ 164 normal *= 0.15 * igeo.volume();\n+ 165 auto normal_end = intersection_pos + normal;\n+ 166 plotfile << \"set arrow from \" << intersection_pos[0] << \",\" <<\n+intersection_pos[1]\n+ 167 << \" to \" << normal_end[0] << \",\" << normal_end[1] << \" lt rgb \\\"gray\\\"\"\n+<< std::endl;\n+ 168 }\n+ 169\n+ 170 // Get corners for inner intersection representation\n+ 171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5);\n+ 172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5);\n+ 173\n+ 174 // Thick line in case of boundary()\n+ 175 if (intersection.boundary())\n+ 176 draw_line (plotfile, inner_corner1, inner_corner2, \"fs empty border 3 lw\n+4\");\n+ 177\n+ 178 // Thin line with color according to neighbor()\n+ 179 if (intersection.neighbor())\n+ 180 draw_line (plotfile, inner_corner1, inner_corner2, \"fs empty border 2\");\n+ 181 else\n+ 182 draw_line (plotfile, inner_corner1, inner_corner2, \"fs empty border 1\");\n+ 183 }\n+ 184\n+ 185 }\n+ 186\n+ 187 // Finish plot, pass extend of the grid\n+ 188 Dune::FieldVector extend (max_coord -\n+min_coord);\n+ 189\n+ 190 extend *= 0.2;\n+ 191 min_coord -= extend;\n+ 192 max_coord += extend;\n+ 193 plotfile << \"plot [\" << min_coord[0] << \":\" << max_coord[0] << \"] [\" <<\n+min_coord[1]\n+ 194 << \":\" << max_coord[1] << \"] NaN notitle\" << std::endl;\n+ 195 plotfile.close();\n+ 196\n+ 197 if (execute_plot) {\n+ 198 std::string cmd = \"gnuplot -p '\" + plot_file_name + \"'\";\n+ 199 if (std::system (cmd.c_str()) != 0)\n+ 200 DUNE_THROW(Dune::Exception,\"Error running GNUPlot: \" << cmd);\n+ 201 }\n+ 202 }\n+ 203\n+ 204}\n+ 205\n+ 206#endif // #ifndef DUNE_PRINTGRID_HH\n+mcmgmapper.hh\n+Mapper for multiple codim and multiple geometry types.\n+Dune::mcmgElementLayout\n+MCMGLayout mcmgElementLayout()\n+layout for elements (codim-0 entities)\n+Definition: mcmgmapper.hh:97\n+Dune::mcmgVertexLayout\n+MCMGLayout mcmgVertexLayout()\n+layout for vertices (dim-0 entities)\n+Definition: mcmgmapper.hh:107\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Partitions::all\n-constexpr All all\n-PartitionSet for all partitions.\n-Definition: partitionset.hh:296\n-Dune::Partitions::interiorBorder\n-constexpr InteriorBorder interiorBorder\n-PartitionSet for the interior and border partitions.\n-Definition: partitionset.hh:287\n-Dune::DGFGridFactory\n-Definition: dgfgridfactory.hh:38\n-Dune::DGFGridFactory::boundaryId\n-int boundaryId(const Intersection &intersection) const\n-Definition: dgfgridfactory.hh:102\n-Dune::DGFGridFactory::boundaryParameter\n-const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II\n-> &intersection) const\n-Definition: dgfgridfactory.hh:158\n-Dune::DGFGridFactory::grid\n-Grid * grid()\n-Definition: dgfgridfactory.hh:90\n-Dune::DGFGridFactory::parameter\n-std::vector< double > & parameter(const Element &element)\n-Definition: dgfgridfactory.hh:124\n-Dune::DGFGridFactory::haveBoundaryParameters\n-bool haveBoundaryParameters() const\n-Definition: dgfgridfactory.hh:151\n-Dune::Intersection\n-Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n-element or with the d...\n-Definition: common/intersection.hh:164\n-Dune::Intersection::boundarySegmentIndex\n-size_t boundarySegmentIndex() const\n-index of the boundary segment within the macro grid\n-Definition: common/intersection.hh:236\n-Dune::CommDataHandleIF\n-CommDataHandleIF describes the features of a data handle for communication in\n-parallel runs using the...\n-Definition: datahandleif.hh:78\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::Entity::codimension\n-static constexpr int codimension\n-Know your own codimension.\n-Definition: common/entity.hh:106\n-Dune::GridError\n-Base class for exceptions in Dune grid modules.\n-Definition: exceptions.hh:20\n-Dune::GridFactoryInterface::insertionIndex\n-virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity)\n-const\n-obtain an element's insertion index\n-Definition: common/gridfactory.hh:220\n-Dune::GridFactory\n-Provide a generic factory class for unstructured grids.\n-Definition: common/gridfactory.hh:314\n-Dune::GridFactory::createGrid\n-virtual std::unique_ptr< GridType > createGrid()\n-Finalize grid creation and hand over the grid.\n-Definition: common/gridfactory.hh:372\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::DGFException\n-exception class for IO errors in the DGF parser\n-Definition: dgfexception.hh:16\n-Dune::GridPtr\n-Class for constructing grids from DGF files.\n-Definition: gridptr.hh:66\n-Dune::GridPtr::GridPtr\n-GridPtr(std::istream &input, MPICommunicatorType comm=MPIHelper::\n-getCommunicator())\n-constructor given a std::istream\n-Definition: gridptr.hh:199\n-Dune::GridPtr::parameters\n-const std::vector< double > & parameters(const Entity &entity) const\n-get parameters defined for each codim 0 und dim entity on the grid through the\n-grid file\n-Definition: gridptr.hh:325\n-Dune::GridPtr::GridPtr\n-GridPtr()\n-Default constructor, creating empty GridPtr.\n-Definition: gridptr.hh:217\n-Dune::GridPtr::operator*\n-const GridType & operator*() const\n-return const reference to GridType instance\n-Definition: gridptr.hh:288\n-Dune::GridPtr::haveBndParam_\n-bool haveBndParam_\n-Definition: gridptr.hh:803\n-Dune::GridPtr::dimension\n-static const int dimension\n-Definition: gridptr.hh:155\n-Dune::GridPtr::bndId_\n-std::vector< int > bndId_\n-Definition: gridptr.hh:798\n-Dune::GridPtr::setNofParams\n-void setNofParams(int cdim, int nofP)\n-Definition: gridptr.hh:528\n-Dune::GridPtr::loadBalance\n-void loadBalance()\n-Definition: gridptr.hh:369\n-Dune::GridPtr::bndParam_\n-std::vector< DGFBoundaryParameter::type > bndParam_\n-Definition: gridptr.hh:797\n-Dune::GridPtr::initialize\n-void initialize(GridFactory< GridType > &factory, std::vector< int >\n-&boundaryIds, std::vector< int > &elementIds)\n-Definition: gridptr.hh:456\n-Dune::GridPtr::GridPtr\n-GridPtr(GridType *grd)\n-Constructor storing given pointer to internal auto pointer.\n-Definition: gridptr.hh:230\n-Dune::GridPtr::nofElParam_\n-int nofElParam_\n-Definition: gridptr.hh:801\n-Dune::GridPtr::parameters\n-const DGFBoundaryParameter::type & parameters(const Intersection< GridImp,\n-IntersectionImp > &intersection) const\n-get parameters for intersection\n-Definition: gridptr.hh:351\n-Dune::GridPtr::operator*\n-GridType & operator*()\n-return reference to GridType instance\n-Definition: gridptr.hh:278\n-Dune::GridPtr::isEmpty\n-static bool isEmpty(Range &&range)\n-Definition: gridptr.hh:381\n-Dune::GridPtr::nofParameters\n-int nofParameters(const Entity &) const\n-get parameters defined for given entity\n-Definition: gridptr.hh:311\n-Dune::GridPtr::GridPtr\n-GridPtr(const std::string &filename, MPICommunicatorType comm=MPIHelper::\n-getCommunicator())\n-constructor given the name of a DGF file\n-Definition: gridptr.hh:158\n-Dune::GridPtr::elParam_\n-std::vector< std::vector< double > > elParam_\n-Definition: gridptr.hh:795\n-Dune::GridPtr::MPICommunicatorType\n-MPIHelper::MPICommunicator MPICommunicatorType\n-Definition: gridptr.hh:154\n-Dune::GridPtr::operator=\n-GridPtr & operator=(const GridPtr &org)\n-assignment of grid pointer\n-Definition: gridptr.hh:246\n-Dune::GridPtr::nofParameters\n-int nofParameters(int cdim) const\n-get number of parameters defined for a given codimension\n-Definition: gridptr.hh:301\n-Dune::GridPtr::nofParameters\n-int nofParameters(const Intersection< GridImp, IntersectionImp > &intersection)\n-const\n-get number of parameters defined for a given intersection\n-Definition: gridptr.hh:318\n-Dune::GridPtr::emptyParam_\n-std::vector< double > emptyParam_\n-Definition: gridptr.hh:799\n-Dune::GridPtr::gridPtr_\n-mygrid_ptr gridPtr_\n-Definition: gridptr.hh:793\n-Dune::GridPtr::readGmsh\n-void readGmsh(const std::string &filename, std::integral_constant< bool, false\n->)\n-Definition: gridptr.hh:147\n-Dune::GridPtr::readGmsh\n-void readGmsh(const std::string &filename, std::integral_constant< bool, true\n->)\n-Definition: gridptr.hh:137\n-Dune::GridPtr::params\n-std::vector< double > & params(const Entity &entity)\n-Definition: gridptr.hh:505\n-Dune::GridPtr::initialize\n-void initialize(DGFGridFactory< GridType > &dgfFactory)\n-Definition: gridptr.hh:386\n-Dune::GridPtr::GridPtr\n-GridPtr(const GridPtr &org)=default\n-Copy constructor, copies internal auto pointer.\n-Dune::GridPtr::getFileExtension\n-std::string getFileExtension(const std::string &filename) const\n-Definition: gridptr.hh:122\n-Dune::GridPtr::operator->\n-const GridType * operator->() const\n-return const pointer to GridType instance\n-Definition: gridptr.hh:293\n-Dune::GridPtr::release\n-GridType * release()\n-release pointer from internal ownership\n-Definition: gridptr.hh:298\n-Dune::GridPtr::communicate\n-void communicate()\n-Definition: gridptr.hh:360\n-Dune::GridPtr::vtxParam_\n-std::vector< std::vector< double > > vtxParam_\n-Definition: gridptr.hh:796\n-Dune::GridPtr::operator->\n-GridType * operator->()\n-return pointer to GridType instance\n-Definition: gridptr.hh:283\n-Dune::GridPtr::nofVtxParam_\n-int nofVtxParam_\n-Definition: gridptr.hh:802\n-Dune::GridPtr::mygrid_ptr\n-Definition: gridptr.hh:68\n-Dune::GridPtr::mygrid_ptr::mygrid_ptr\n-mygrid_ptr(GridType *grd)\n-Definition: gridptr.hh:99\n-Dune::GridPtr::mygrid_ptr::~mygrid_ptr\n-~mygrid_ptr()\n-Definition: gridptr.hh:102\n-Dune::GridPtr::mygrid_ptr::release\n-GridType * release()\n-Definition: gridptr.hh:112\n-Dune::GridPtr::mygrid_ptr::mygrid_ptr\n-mygrid_ptr(const mygrid_ptr &other)\n-Definition: gridptr.hh:97\n-Dune::GridPtr::mygrid_ptr::operator=\n-mygrid_ptr & operator=(const mygrid_ptr &other)\n-Definition: gridptr.hh:105\n-Dune::GridPtr::mygrid_ptr::mygrid_ptr\n-mygrid_ptr()\n-Definition: gridptr.hh:95\n-Dune::GridPtr::DataHandle\n-Definition: gridptr.hh:538\n-Dune::GridPtr::DataHandle::interface\n-CommDataHandleIF< DataHandle, char > & interface()\n-Definition: gridptr.hh:631\n-Dune::GridPtr::DataHandle::DataHandle\n-DataHandle(const DataHandle &)=delete\n-Dune::GridPtr::DataHandle::~DataHandle\n-~DataHandle()\n-Definition: gridptr.hh:581\n-Dune::GridPtr::DataHandle::DataHandle\n-DataHandle(GridPtr &gridPtr)\n-Definition: gridptr.hh:539\n-Dune::GridPtr::DataHandle::gather\n-void gather(Buffer &buffer, const Entity &entity) const\n-Definition: gridptr.hh:673\n-Dune::GridPtr::DataHandle::fixedSize\n-bool fixedSize(int, int) const\n-Definition: gridptr.hh:640\n-Dune::GridPtr::DataHandle::size\n-std::size_t size(const Entity &entity) const\n-Definition: gridptr.hh:643\n-Dune::GridPtr::DataHandle::DataHandle\n-DataHandle(DataHandle &&)=delete\n-Dune::GridPtr::DataHandle::scatter\n-void scatter(Buffer &buffer, const Entity &entity, std::size_t n)\n-Definition: gridptr.hh:702\n-Dune::GridPtr::DataHandle::contains\n-bool contains(int dim, int codim) const\n-Definition: gridptr.hh:633\n-Dune::DGFBoundaryParameter::defaultValue\n-static const type & defaultValue()\n-default constructor\n-Definition: parser.hh:28\n-Dune::DGFBoundaryParameter::type\n-std::string type\n-type of additional boundary parameters\n-Definition: parser.hh:25\n-Dune::GmshReader::read\n-static std::unique_ptr< Grid > read(const std::string &fileName, bool\n-verbose=true, bool insertBoundarySegments=true)\n-Definition: gmshreader.hh:902\n-intersection.hh\n+Dune::printGrid\n+void printGrid(const GridType &grid, const Dune::MPIHelper &helper, std::string\n+output_file=\"printgrid\", int size=2000, bool execute_plot=true, bool png=true,\n+bool local_corner_indices=true, bool local_intersection_indices=true, bool\n+outer_normals=true)\n+Print a grid as a gnuplot for testing and development.\n+Definition: printgrid.hh:73\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::IntersectionIterator\n+Mesh entities of codimension 0 (\"elements\") allow to visit all intersections\n+with \"neighboring\" eleme...\n+Definition: common/intersectioniterator.hh:83\n+Dune::Mapper\n+Mapper interface.\n+Definition: mapper.hh:110\n+Dune::Mapper::index\n+Index index(const EntityType &e) const\n+Map entity to array index.\n+Definition: mapper.hh:122\n+Dune::Mapper::subIndex\n+Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i,\n+unsigned int codim) const\n+Map subentity i of codim cc of a codim 0 entity to array index.\n+Definition: mapper.hh:136\n+Dune::MultipleCodimMultipleGeomTypeMapper\n+Implementation class for a multiple codim and multiple geometry type mapper.\n+Definition: mcmgmapper.hh:129\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00842.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00842.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfgeogrid.hh File Reference\n+dune-grid: dgfgridfactory.hh File Reference\n \n \n \n \n \n \n \n@@ -65,40 +65,33 @@\n
  • dune
  • grid
  • io
  • file
  • dgfparser
  • \n \n \n
    \n \n-
    dgfgeogrid.hh File Reference
    \n+
    dgfgridfactory.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/typetraits.hh>
    \n-#include <dune/grid/geometrygrid.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfparser.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/projection.hh>
    \n-#include <dune/grid/utility/hostgridaccess.hh>
    \n+
    #include <iostream>
    \n+#include <string>
    \n+#include <vector>
    \n+#include <map>
    \n+#include <assert.h>
    \n+#include <dune/common/parallel/mpihelper.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n+#include <dune/grid/io/file/dgfparser/macrogrid.hh>
    \n+#include <dune/grid/io/file/dgfparser/parser.hh>
    \n #include <dune/grid/common/intersection.hh>
    \n-#include <dune/grid/io/file/dgfparser/parser.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::DGFCoordFunction< dimD, dimR >
     
    struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
     
    struct  Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
     
    struct  Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
     
    struct  Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
     
    struct  Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
    struct  Dune::DGFGridFactory< G >
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,38 +8,28 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n Classes | Namespaces\n-dgfgeogrid.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+dgfgridfactory.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::DGFCoordFunction<_dimD,_dimR_>\n-\u00a0\n-struct \u00a0Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_false_>\n-\u00a0\n-struct \u00a0Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_true_>\n-\u00a0\n-struct \u00a0Dune::DGFCoordFunctionFactory<_HostGrid,_DGFCoordFunction<_dimD,_dimR\n- >,_false_>\n-\u00a0\n-struct \u00a0Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator\n- >_>\n-\u00a0\n-struct \u00a0Dune::DGFGridInfo<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>\n- >\n+struct \u00a0Dune::DGFGridFactory<_G_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00842_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfgeogrid.hh Source File\n+dune-grid: dgfgridfactory.hh Source File\n \n \n \n \n \n \n \n@@ -62,300 +62,245 @@\n \n \n \n
    \n-
    dgfgeogrid.hh
    \n+
    dgfgridfactory.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGFGEOGRID_HH
    \n-
    6#define DUNE_DGFGEOGRID_HH
    \n+
    5#ifndef DUNE_DGF_GRIDFACTORY_HH
    \n+
    6#define DUNE_DGF_GRIDFACTORY_HH
    \n
    7
    \n-
    8#include <dune/common/typetraits.hh>
    \n-
    9
    \n-\n-\n-\n-\n-\n-
    15
    \n-\n+
    8#include <iostream>
    \n+
    9#include <string>
    \n+
    10#include <vector>
    \n+
    11#include <map>
    \n+
    12#include <assert.h>
    \n+
    13
    \n+
    14#include <dune/common/parallel/mpihelper.hh>
    \n+\n+\n
    17
    \n-
    18
    \n-
    19namespace Dune
    \n-
    20{
    \n+\n+\n+
    20
    \n
    21
    \n-
    22 /************************************************************************
    \n-
    23 * Warning:
    \n-
    24 * Reading DGF files directly into a GeometryGrid is a dirty hack for
    \n-
    25 * two reasons:
    \n-
    26 * 1) The host grid and coordinate function are never deleted (dangling
    \n-
    27 * pointers).
    \n-
    28 * 2) The coordinate function has to provide a default constructor
    \n-
    29 ************************************************************************/
    \n+
    22namespace Dune
    \n+
    23{
    \n+
    24
    \n+
    25 // External Forward Declarations
    \n+
    26 // -----------------------------
    \n+
    27
    \n+
    28 template < class GridImp, class IntersectionImp >
    \n+
    29 class Intersection;
    \n
    30
    \n-
    31 // External Forward Declarations
    \n-
    32 // -----------------------------
    \n-
    33
    \n-
    34 template< class GridImp, class IntersectionImp >
    \n-
    35 class Intersection;
    \n-
    36
    \n-
    37
    \n-
    38
    \n-
    39 // DGFCoordFunction
    \n-
    40 // ----------------
    \n-
    41
    \n-
    42 template< int dimD, int dimR >
    \n-\n-
    44 : public AnalyticalCoordFunction< double, dimD, dimR, DGFCoordFunction< dimD, dimR > >
    \n-
    45 {
    \n-\n-\n-
    48
    \n-
    49 public:
    \n-\n-\n-
    52
    \n-\n-
    54
    \n-
    55 DGFCoordFunction ( const Expression *expression )
    \n-
    56 : expression_( expression )
    \n-
    57 {}
    \n-
    58
    \n-
    59 void evaluate ( const DomainVector &x, RangeVector &y ) const
    \n-
    60 {
    \n-
    61 std::vector< double > vx( dimD );
    \n-
    62 std::vector< double > vy;
    \n-
    63 for( int i = 0; i < dimD; ++i )
    \n-
    64 vx[ i ] = x[ i ];
    \n-
    65 expression_->evaluate( vx, vy );
    \n-
    66 assert( vy.size() == size_t( dimR ) );
    \n-
    67 for( int i = 0; i < dimR; ++i )
    \n-
    68 y[ i ] = vy[ i ];
    \n-
    69 }
    \n-
    70
    \n-
    71 private:
    \n-
    72 const Expression *expression_;
    \n-
    73 };
    \n-
    74
    \n-
    75
    \n-
    76
    \n-
    77 // DGFCoordFunctionFactory
    \n-
    78 // -----------------------
    \n-
    79
    \n-
    80 template< class HostGrid, class CoordFunction,
    \n-\n-\n-
    83
    \n+
    31
    \n+
    32
    \n+
    33 // DGFGridFactory
    \n+
    34 // --------------
    \n+
    35
    \n+
    36 template < class G >
    \n+\n+
    38 {
    \n+
    39 typedef G Grid;
    \n+
    40 const static int dimension = Grid::dimension;
    \n+
    41 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n+
    42
    \n+
    43 private:
    \n+
    44 typedef typename Grid::template Codim< 0 >::Entity Element;
    \n+
    45
    \n+
    46 typedef typename Grid::template Codim< dimension >::Entity Vertex;
    \n+
    47
    \n+
    48 public:
    \n+
    49
    \n+
    50 explicit DGFGridFactory ( const std::string &filename,
    \n+
    51 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n+
    52 : macroGrid_( filename.c_str(), comm )
    \n+
    53 {
    \n+
    54 grid_ = macroGrid_.template createGrid< Grid >();
    \n+
    55
    \n+
    56 if( macroGrid_.nofelparams > 0 )
    \n+
    57 {
    \n+
    58 const size_t nofElements = macroGrid_.elements.size();
    \n+
    59 for( size_t i = 0; i < nofElements; ++i )
    \n+
    60 {
    \n+
    61 std::vector< double > coord;
    \n+
    62
    \n+
    63 DomainType p(0);
    \n+
    64 const size_t nofCorners = macroGrid_.elements[i].size();
    \n+
    65 for (size_t k=0; k<nofCorners; ++k)
    \n+
    66 for (int j=0; j<DomainType::dimension; ++j)
    \n+
    67 p[j]+=macroGrid_.vtx[macroGrid_.elements[i][k]][j];
    \n+
    68 p/=double(nofCorners);
    \n+
    69
    \n+
    70 elInsertOrder_.insert( std::make_pair( p, i ) );
    \n+
    71 }
    \n+
    72 }
    \n+
    73
    \n+
    74 if( macroGrid_.nofvtxparams > 0 )
    \n+
    75 {
    \n+
    76 const size_t nofVertices = macroGrid_.vtx.size();
    \n+
    77 for( size_t i = 0; i < nofVertices; ++i )
    \n+
    78 {
    \n+
    79 std::vector< double > coord;
    \n+
    80
    \n+
    81 DomainType p;
    \n+
    82 for( int k = 0; k < DomainType::dimension; ++k )
    \n+
    83 p[ k ] = macroGrid_.vtx[i][k];
    \n
    84
    \n-
    85 template< class HostGrid, class CoordFunction >
    \n-
    86 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
    \n-
    87 {
    \n-
    88 static CoordFunction *create ( std::istream &, const HostGrid & )
    \n-
    89 {
    \n-
    90 return new CoordFunction;
    \n-
    91 }
    \n-
    92 };
    \n-
    93
    \n+
    85 vtxInsertOrder_.insert( std::make_pair( p, i ) );
    \n+
    86 }
    \n+
    87 }
    \n+
    88 }
    \n+
    89
    \n+\n+
    91 {
    \n+
    92 return grid_;
    \n+
    93 }
    \n
    94
    \n-
    95 template< class HostGrid, class CoordFunction >
    \n-
    96 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
    \n-
    97 {
    \n-
    98 static CoordFunction *create ( std::istream &, const HostGrid &hostGrid )
    \n-
    99 {
    \n-
    100 return new CoordFunction( hostGrid );
    \n-
    101 }
    \n-
    102 };
    \n-
    103
    \n-
    104
    \n-
    105 template< class HostGrid, int dimD, int dimR >
    \n-
    106 struct DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
    \n-
    107 {
    \n-\n-
    109
    \n-
    110 static CoordFunction *create ( std::istream &input, const HostGrid &hostGrid )
    \n-
    111 {
    \n-
    112 dgf::ProjectionBlock projectionBlock( input, dimR );
    \n-
    113 const typename CoordFunction::Expression *expression = projectionBlock.function( "coordfunction" );
    \n-
    114 if( expression == 0 )
    \n-
    115 DUNE_THROW( DGFException, "no coordfunction specified in DGF file." );
    \n-
    116 return new CoordFunction( expression );
    \n-
    117 }
    \n-
    118 };
    \n-
    119
    \n-
    120
    \n-
    121
    \n-
    122 // DGFGridFactory for GeometryGrid
    \n-
    123 // -------------------------------
    \n-
    124
    \n-
    125 template< class HostGrid, class CoordFunction, class Allocator >
    \n-
    126 struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
    \n-
    127 {
    \n-\n-
    129
    \n-
    130 const static int dimension = Grid::dimension;
    \n-
    131 typedef MPIHelper::MPICommunicator MPICommunicator;
    \n-
    132 typedef typename Grid::template Codim<0>::Entity Element;
    \n-
    133 typedef typename Grid::template Codim<dimension>::Entity Vertex;
    \n-
    134
    \n-\n-
    136
    \n-
    137 explicit DGFGridFactory ( std::istream &input,
    \n-
    138 MPICommunicator comm = MPIHelper::getCommunicator() )
    \n-
    139 : dgfHostFactory_( input, comm ),
    \n-
    140 grid_( 0 )
    \n-
    141 {
    \n-
    142 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
    \n-
    143 assert( hostGrid != 0 );
    \n-
    144 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
    \n-
    145 grid_ = new Grid( hostGrid, coordFunction );
    \n-
    146 }
    \n-
    147
    \n-
    148 explicit DGFGridFactory ( const std::string &filename,
    \n-
    149 MPICommunicator comm = MPIHelper::getCommunicator() )
    \n-
    150 : dgfHostFactory_( filename, comm ),
    \n-
    151 grid_( 0 )
    \n-
    152 {
    \n-
    153 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
    \n-
    154 assert( hostGrid != 0 );
    \n-
    155 std::ifstream input( filename.c_str() );
    \n-
    156 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
    \n-
    157 grid_ = new Grid( hostGrid, coordFunction );
    \n-
    158 }
    \n-
    159
    \n-
    160 Grid *grid () const
    \n-
    161 {
    \n-
    162 return grid_;
    \n-
    163 }
    \n-
    164
    \n-
    165 template< class Intersection >
    \n-
    166 bool wasInserted ( const Intersection &intersection ) const
    \n-
    167 {
    \n-
    168 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n-
    169 }
    \n-
    170
    \n-
    171 template< class Intersection >
    \n-
    172 int boundaryId ( const Intersection &intersection ) const
    \n-
    173 {
    \n-
    174 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n-
    175 }
    \n-
    176
    \n-
    177 template< int codim >
    \n-
    178 int numParameters () const
    \n-
    179 {
    \n-
    180 return dgfHostFactory_.template numParameters< codim >();
    \n-
    181 }
    \n-
    182
    \n-
    183 // return true if boundary parameters found
    \n-\n-
    185 {
    \n-
    186 return dgfHostFactory_.haveBoundaryParameters();
    \n-
    187 }
    \n-
    188
    \n-
    189 template< class GG, class II >
    \n-
    190 const typename DGFBoundaryParameter::type &
    \n-
    191 boundaryParameter ( const Dune::Intersection< GG, II > & intersection ) const
    \n-
    192 {
    \n-
    193 return dgfHostFactory_.boundaryParameter( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n-
    194 }
    \n-
    195
    \n-
    196 template< class Entity >
    \n-
    197 std::vector< double > &parameter ( const Entity &entity )
    \n-
    198 {
    \n-
    199 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
    \n-
    200 }
    \n-
    201
    \n-
    202 private:
    \n-
    203 DGFGridFactory< HostGrid > dgfHostFactory_;
    \n-
    204 Grid *grid_;
    \n-
    205 };
    \n-
    206
    \n-
    207
    \n-
    208
    \n-
    209 // DGFGridInfo for GeometryGrid
    \n-
    210 // ----------------------------
    \n-
    211
    \n-
    212 template< class HostGrid, class CoordFunction, class Allocator >
    \n-
    213 struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
    \n-
    214 {
    \n-
    215 static int refineStepsForHalf ()
    \n-
    216 {
    \n-\n-
    218 }
    \n-
    219
    \n-
    220 static double refineWeight ()
    \n-
    221 {
    \n-
    222 return -1.0;
    \n-
    223 }
    \n-
    224 };
    \n-
    225
    \n-
    226}
    \n-
    227
    \n-
    228#endif // #ifndef DUNE_DGFGEOGRID_HH
    \n-\n-\n-\n+
    95 template <class Intersection>
    \n+
    96 bool wasInserted(const Intersection &intersection) const
    \n+
    97 {
    \n+
    98 return intersection.boundary();
    \n+
    99 }
    \n+
    100
    \n+
    101 template <class Intersection>
    \n+
    102 int boundaryId(const Intersection &intersection) const
    \n+
    103 {
    \n+
    104 return (intersection.boundary()) ? int(intersection.indexInInside()+1) : int(0);
    \n+
    105 }
    \n+
    106
    \n+
    107 template< int codim >
    \n+
    108 int numParameters () const
    \n+
    109 {
    \n+
    110 if( codim == 0 )
    \n+
    111 return macroGrid_.nofelparams;
    \n+
    112 else if( codim == dimension )
    \n+
    113 return macroGrid_.nofvtxparams;
    \n+
    114 else
    \n+
    115 return 0;
    \n+
    116 }
    \n+
    117
    \n+
    118 template < class Entity >
    \n+
    119 int numParameters ( const Entity & ) const
    \n+
    120 {
    \n+
    121 return numParameters< Entity::codimension >();
    \n+
    122 }
    \n+
    123
    \n+
    124 std::vector<double>& parameter(const Element &element)
    \n+
    125 {
    \n+
    126 const typename Element::Geometry &geo = element.geometry();
    \n+
    127 DomainType coord( geo.corner( 0 ) );
    \n+
    128 for( int i = 1; i < geo.corners(); ++i )
    \n+
    129 coord += geo.corner( i );
    \n+
    130 coord /= double( geo.corners() );
    \n+
    131
    \n+
    132 InsertOrderIterator it = elInsertOrder_.find( coord );
    \n+
    133 if( it != elInsertOrder_.end() )
    \n+
    134 return macroGrid_.elParams[ it->second ];
    \n+
    135 assert(0);
    \n+
    136 return emptyParam;
    \n+
    137 }
    \n+
    138
    \n+
    139 std::vector<double>& parameter(const Vertex &vertex)
    \n+
    140 {
    \n+
    141 const typename Vertex::Geometry &geo = vertex.geometry();
    \n+
    142 DomainType coord( geo.corner( 0 ) );
    \n+
    143
    \n+
    144 InsertOrderIterator it = vtxInsertOrder_.find( coord );
    \n+
    145 if( it != vtxInsertOrder_.end() )
    \n+
    146 return macroGrid_.vtxParams[ it->second ];
    \n+
    147 return emptyParam;
    \n+
    148 }
    \n+
    149
    \n+
    150 // return true if boundary parameters found
    \n+\n+
    152 {
    \n+
    153 return false;
    \n+
    154 }
    \n+
    155
    \n+
    156 template< class GG, class II >
    \n+
    157 const typename DGFBoundaryParameter::type &
    \n+
    158 boundaryParameter ( const Intersection< GG, II > & intersection ) const
    \n+
    159 {
    \n+\n+
    161 }
    \n+
    162
    \n+
    163 private:
    \n+
    164 typedef FieldVector<typename Grid::ctype,Grid::dimensionworld> DomainType;
    \n+
    165 struct Compare
    \n+
    166 {
    \n+
    167 bool operator() ( const DomainType &a, const DomainType &b ) const
    \n+
    168 {
    \n+
    169 // returns true, if a < b; c[i] < -eps;
    \n+
    170 const DomainType c = a - b;
    \n+
    171 const double eps = 1e-8;
    \n+
    172
    \n+
    173 for( int i = 0; i < DomainType::dimension; ++i )
    \n+
    174 {
    \n+
    175 if( c[ i ] <= -eps )
    \n+
    176 return true;
    \n+
    177 if( c[ i ] >= eps )
    \n+
    178 return false;
    \n+
    179 }
    \n+
    180 return false;
    \n+
    181 }
    \n+
    182 };
    \n+
    183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap;
    \n+
    184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator;
    \n+
    185
    \n+
    186 MacroGrid macroGrid_;
    \n+
    187 Grid *grid_;
    \n+
    188 InsertOrderMap elInsertOrder_;
    \n+
    189 InsertOrderMap vtxInsertOrder_;
    \n+
    190 std::vector<double> emptyParam;
    \n+
    191 };
    \n+
    192
    \n+
    193} // end namespace Dune
    \n+
    194
    \n+
    195#endif
    \n+\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    @ vertex
    Definition: common.hh:133
    \n
    Definition: dgfgridfactory.hh:38
    \n+
    int numParameters() const
    Definition: dgfgridfactory.hh:108
    \n+
    int boundaryId(const Intersection &intersection) const
    Definition: dgfgridfactory.hh:102
    \n+
    const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
    Definition: dgfgridfactory.hh:158
    \n+
    std::vector< double > & parameter(const Vertex &vertex)
    Definition: dgfgridfactory.hh:139
    \n+
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfgridfactory.hh:41
    \n+
    int numParameters(const Entity &) const
    Definition: dgfgridfactory.hh:119
    \n+
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfgridfactory.hh:96
    \n+
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfgridfactory.hh:50
    \n
    G Grid
    Definition: dgfgridfactory.hh:39
    \n
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n+
    Grid * grid()
    Definition: dgfgridfactory.hh:90
    \n+
    std::vector< double > & parameter(const Element &element)
    Definition: dgfgridfactory.hh:124
    \n+
    bool haveBoundaryParameters() const
    Definition: dgfgridfactory.hh:151
    \n
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n+
    bool boundary() const
    Return true if intersection is with interior or exterior boundary (see the cases above)
    Definition: common/intersection.hh:216
    \n+
    int indexInInside() const
    Local index of codim 1 entity in the inside() entity where intersection is contained in.
    Definition: common/intersection.hh:346
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n-
    Derive an implementation of an analytical coordinate function from this class.
    Definition: coordfunction.hh:134
    \n-
    Base::DomainVector DomainVector
    Definition: coordfunction.hh:139
    \n-
    Base::RangeVector RangeVector
    Definition: coordfunction.hh:140
    \n-
    static const bool value
    Definition: coordfunction.hh:308
    \n-
    grid wrapper replacing the geometries
    Definition: geometrygrid/grid.hh:86
    \n-
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n-
    Definition: io/file/dgfparser/blocks/projection.hh:24
    \n-
    ExpressionPointer function(const std::string &name) const
    Definition: io/file/dgfparser/blocks/projection.hh:100
    \n-
    Definition: io/file/dgfparser/blocks/projection.hh:160
    \n-
    virtual void evaluate(const Vector &argument, Vector &result) const =0
    \n-
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n-
    Definition: dgfgeogrid.hh:45
    \n-
    Base::DomainVector DomainVector
    Definition: dgfgeogrid.hh:50
    \n-
    void evaluate(const DomainVector &x, RangeVector &y) const
    Definition: dgfgeogrid.hh:59
    \n-
    dgf::ProjectionBlock::Expression Expression
    Definition: dgfgeogrid.hh:53
    \n-
    DGFCoordFunction(const Expression *expression)
    Definition: dgfgeogrid.hh:55
    \n-
    Base::RangeVector RangeVector
    Definition: dgfgeogrid.hh:51
    \n-
    Definition: dgfgeogrid.hh:82
    \n-
    static CoordFunction * create(std::istream &, const HostGrid &)
    Definition: dgfgeogrid.hh:88
    \n-
    static CoordFunction * create(std::istream &, const HostGrid &hostGrid)
    Definition: dgfgeogrid.hh:98
    \n-
    static CoordFunction * create(std::istream &input, const HostGrid &hostGrid)
    Definition: dgfgeogrid.hh:110
    \n-
    DGFCoordFunction< dimD, dimR > CoordFunction
    Definition: dgfgeogrid.hh:108
    \n-
    Grid::template Codim< dimension >::Entity Vertex
    Definition: dgfgeogrid.hh:133
    \n-
    int boundaryId(const Intersection &intersection) const
    Definition: dgfgeogrid.hh:172
    \n-
    MPIHelper::MPICommunicator MPICommunicator
    Definition: dgfgeogrid.hh:131
    \n-
    const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
    Definition: dgfgeogrid.hh:191
    \n-
    DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::getCommunicator())
    Definition: dgfgeogrid.hh:137
    \n-
    Grid::template Codim< 0 >::Entity Element
    Definition: dgfgeogrid.hh:132
    \n-\n-
    DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory
    Definition: dgfgeogrid.hh:135
    \n-
    GeometryGrid< HostGrid, CoordFunction, Allocator > Grid
    Definition: dgfgeogrid.hh:128
    \n-\n-
    std::vector< double > & parameter(const Entity &entity)
    Definition: dgfgeogrid.hh:197
    \n-
    DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::getCommunicator())
    Definition: dgfgeogrid.hh:148
    \n-
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfgeogrid.hh:166
    \n-\n-
    static double refineWeight()
    Definition: dgfgeogrid.hh:220
    \n-\n-
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n-
    static int refineStepsForHalf()
    number of globalRefine steps needed to refuce h by 0.5
    \n+
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n-\n+
    int nofvtxparams
    Definition: parser.hh:163
    \n+
    std::vector< std::vector< double > > vtxParams
    Definition: parser.hh:165
    \n+
    int nofelparams
    Definition: parser.hh:163
    \n+
    std::vector< std::vector< double > > elParams
    Definition: parser.hh:165
    \n+
    std::vector< std::vector< double > > vtx
    Definition: parser.hh:125
    \n+
    std ::vector< std ::vector< unsigned int > > elements
    Definition: parser.hh:134
    \n \n-\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,425 +7,309 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n-dgfgeogrid.hh\n+dgfgridfactory.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGFGEOGRID_HH\n- 6#define DUNE_DGFGEOGRID_HH\n+ 5#ifndef DUNE_DGF_GRIDFACTORY_HH\n+ 6#define DUNE_DGF_GRIDFACTORY_HH\n 7\n- 8#include \n- 9\n- 10#include \n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15\n- 16#include \n+ 8#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16#include \n 17\n- 18\n- 19namespace Dune\n- 20{\n+ 18#include \n+ 19#include \n+ 20\n 21\n- 22 /************************************************************************\n- 23 * Warning:\n- 24 * Reading DGF files directly into a GeometryGrid is a dirty hack for\n- 25 * two reasons:\n- 26 * 1) The host grid and coordinate function are never deleted (dangling\n- 27 * pointers).\n- 28 * 2) The coordinate function has to provide a default constructor\n- 29 ************************************************************************/\n+ 22namespace Dune\n+ 23{\n+ 24\n+ 25 // External Forward Declarations\n+ 26 // -----------------------------\n+ 27\n+ 28 template < class GridImp, class IntersectionImp >\n+ 29 class Intersection;\n 30\n- 31 // External Forward Declarations\n- 32 // -----------------------------\n- 33\n- 34 template< class GridImp, class IntersectionImp >\n- 35 class Intersection;\n- 36\n- 37\n- 38\n- 39 // DGFCoordFunction\n- 40 // ----------------\n- 41\n- 42 template< int dimD, int dimR >\n-43 class DGFCoordFunction\n- 44 : public AnalyticalCoordFunction< double, dimD, dimR, DGFCoordFunction<\n-dimD, dimR > >\n- 45 {\n- 46 typedef DGFCoordFunction<_dimD,_dimR_> This;\n- 47 typedef AnalyticalCoordFunction<_double,_dimD,_dimR,_This_> Base;\n- 48\n- 49 public:\n-50 typedef typename Base::DomainVector DomainVector;\n-51 typedef typename Base::RangeVector RangeVector;\n- 52\n-53 typedef dgf::ProjectionBlock::Expression Expression;\n- 54\n-55 DGFCoordFunction ( const Expression *expression )\n- 56 : expression_( expression )\n- 57 {}\n- 58\n-59 void evaluate ( const DomainVector &x, RangeVector &y ) const\n+ 31\n+ 32\n+ 33 // DGFGridFactory\n+ 34 // --------------\n+ 35\n+ 36 template < class G >\n+37 struct DGFGridFactory\n+ 38 {\n+39 typedef G Grid;\n+40 const static int dimension = Grid::dimension;\n+41 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n+ 42\n+ 43 private:\n+ 44 typedef typename Grid::template Codim< 0 >::Entity Element;\n+ 45\n+ 46 typedef typename Grid::template Codim< dimension >::Entity Vertex;\n+ 47\n+ 48 public:\n+ 49\n+50 explicit DGFGridFactory ( const std::string &filename,\n+ 51 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n+ 52 : macroGrid_( filename.c_str(), comm )\n+ 53 {\n+ 54 grid_ = macroGrid_.template createGrid< Grid >();\n+ 55\n+ 56 if( macroGrid_.nofelparams > 0 )\n+ 57 {\n+ 58 const size_t nofElements = macroGrid_.elements.size();\n+ 59 for( size_t i = 0; i < nofElements; ++i )\n 60 {\n- 61 std::vector< double > vx( dimD );\n- 62 std::vector< double > vy;\n- 63 for( int i = 0; i < dimD; ++i )\n- 64 vx[ i ] = x[ i ];\n- 65 expression_->evaluate( vx, vy );\n- 66 assert( vy.size() == size_t( dimR ) );\n- 67 for( int i = 0; i < dimR; ++i )\n- 68 y[ i ] = vy[ i ];\n- 69 }\n- 70\n- 71 private:\n- 72 const Expression *expression_;\n- 73 };\n- 74\n- 75\n- 76\n- 77 // DGFCoordFunctionFactory\n- 78 // -----------------------\n- 79\n- 80 template< class HostGrid, class CoordFunction,\n- 81 bool discrete = GeoGrid::isDiscreteCoordFunctionInterface<_typename\n-CoordFunction::Interface_>::value >\n-82 struct DGFCoordFunctionFactory;\n- 83\n+ 61 std::vector< double > coord;\n+ 62\n+ 63 DomainType p(0);\n+ 64 const size_t nofCorners = macroGrid_.elements[i].size();\n+ 65 for (size_t k=0; k 0 )\n+ 75 {\n+ 76 const size_t nofVertices = macroGrid_.vtx.size();\n+ 77 for( size_t i = 0; i < nofVertices; ++i )\n+ 78 {\n+ 79 std::vector< double > coord;\n+ 80\n+ 81 DomainType p;\n+ 82 for( int k = 0; k < DomainType::dimension; ++k )\n+ 83 p[ k ] = macroGrid_.vtx[i][k];\n 84\n- 85 template< class HostGrid, class CoordFunction >\n-86 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, false >\n- 87 {\n-88 static CoordFunction *create ( std::istream &, const HostGrid & )\n- 89 {\n- 90 return new CoordFunction;\n- 91 }\n- 92 };\n- 93\n+ 85 vtxInsertOrder_.insert( std::make_pair( p, i ) );\n+ 86 }\n+ 87 }\n+ 88 }\n+ 89\n+90 Grid *grid()\n+ 91 {\n+ 92 return grid_;\n+ 93 }\n 94\n- 95 template< class HostGrid, class CoordFunction >\n-96 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, true >\n+ 95 template \n+96 bool wasInserted(const Intersection &intersection) const\n 97 {\n-98 static CoordFunction *create ( std::istream &, const HostGrid &hostGrid )\n- 99 {\n- 100 return new CoordFunction( hostGrid );\n- 101 }\n- 102 };\n- 103\n- 104\n- 105 template< class HostGrid, int dimD, int dimR >\n-106 struct DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >,\n-false >\n- 107 {\n-108 typedef DGFCoordFunction<_dimD,_dimR_> CoordFunction;\n- 109\n-110 static CoordFunction *create ( std::istream &input, const HostGrid\n-&hostGrid )\n- 111 {\n- 112 dgf::ProjectionBlock projectionBlock( input, dimR );\n- 113 const typename CoordFunction::Expression *expression =\n-projectionBlock.function( \"coordfunction\" );\n- 114 if( expression == 0 )\n- 115 DUNE_THROW( DGFException, \"no coordfunction specified in DGF file.\" );\n- 116 return new CoordFunction( expression );\n- 117 }\n- 118 };\n- 119\n- 120\n- 121\n- 122 // DGFGridFactory for GeometryGrid\n- 123 // -------------------------------\n- 124\n- 125 template< class HostGrid, class CoordFunction, class Allocator >\n-126 struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n- 127 {\n-128 typedef GeometryGrid<_HostGrid,_CoordFunction,_Allocator_> Grid;\n- 129\n-130 const static int dimension = Grid::dimension;\n-131 typedef MPIHelper::MPICommunicator MPICommunicator;\n-132 typedef typename Grid::template Codim<0>::Entity Element;\n-133 typedef typename Grid::template Codim::Entity Vertex;\n- 134\n-135 typedef DGFCoordFunctionFactory<_HostGrid,_CoordFunction_>\n-CoordFunctionFactory;\n- 136\n-137 explicit DGFGridFactory ( std::istream &input,\n- 138 MPICommunicator comm = MPIHelper::getCommunicator() )\n- 139 : dgfHostFactory_( input, comm ),\n- 140 grid_( 0 )\n- 141 {\n- 142 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid());\n- 143 assert( hostGrid != 0 );\n- 144 auto coordFunction = std::shared_ptr(CoordFunctionFactory::\n-create( input, *hostGrid ));\n- 145 grid_ = new Grid( hostGrid, coordFunction );\n- 146 }\n- 147\n-148 explicit DGFGridFactory ( const std::string &filename,\n- 149 MPICommunicator comm = MPIHelper::getCommunicator() )\n- 150 : dgfHostFactory_( filename, comm ),\n- 151 grid_( 0 )\n+ 98 return intersection.boundary();\n+ 99 }\n+ 100\n+ 101 template \n+102 int boundaryId(const Intersection &intersection) const\n+ 103 {\n+ 104 return (intersection.boundary()) ? int(intersection.indexInInside()+1) :\n+int(0);\n+ 105 }\n+ 106\n+ 107 template< int codim >\n+108 int numParameters () const\n+ 109 {\n+ 110 if( codim == 0 )\n+ 111 return macroGrid_.nofelparams;\n+ 112 else if( codim == dimension )\n+ 113 return macroGrid_.nofvtxparams;\n+ 114 else\n+ 115 return 0;\n+ 116 }\n+ 117\n+ 118 template < class Entity >\n+119 int numParameters ( const Entity & ) const\n+ 120 {\n+ 121 return numParameters< Entity::codimension >();\n+ 122 }\n+ 123\n+124 std::vector& parameter(const Element &element)\n+ 125 {\n+ 126 const typename Element::Geometry &geo = element.geometry();\n+ 127 DomainType coord( geo.corner( 0 ) );\n+ 128 for( int i = 1; i < geo.corners(); ++i )\n+ 129 coord += geo.corner( i );\n+ 130 coord /= double( geo.corners() );\n+ 131\n+ 132 InsertOrderIterator it = elInsertOrder_.find( coord );\n+ 133 if( it != elInsertOrder_.end() )\n+ 134 return macroGrid_.elParams[ it->second ];\n+ 135 assert(0);\n+ 136 return emptyParam;\n+ 137 }\n+ 138\n+139 std::vector& parameter(const Vertex &vertex)\n+ 140 {\n+ 141 const typename Vertex::Geometry &geo = vertex.geometry();\n+ 142 DomainType coord( geo.corner( 0 ) );\n+ 143\n+ 144 InsertOrderIterator it = vtxInsertOrder_.find( coord );\n+ 145 if( it != vtxInsertOrder_.end() )\n+ 146 return macroGrid_.vtxParams[ it->second ];\n+ 147 return emptyParam;\n+ 148 }\n+ 149\n+ 150 // return true if boundary parameters found\n+151 bool haveBoundaryParameters () const\n 152 {\n- 153 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid());\n- 154 assert( hostGrid != 0 );\n- 155 std::ifstream input( filename.c_str() );\n- 156 auto coordFunction = std::shared_ptr(CoordFunctionFactory::\n-create( input, *hostGrid ));\n- 157 grid_ = new Grid( hostGrid, coordFunction );\n- 158 }\n- 159\n-160 Grid *grid () const\n- 161 {\n- 162 return grid_;\n- 163 }\n- 164\n- 165 template< class Intersection >\n-166 bool wasInserted ( const Intersection &intersection ) const\n- 167 {\n- 168 return dgfHostFactory_.wasInserted( HostGridAccess<_Grid_>::\n-hostIntersection( intersection ) );\n- 169 }\n- 170\n- 171 template< class Intersection >\n-172 int boundaryId ( const Intersection &intersection ) const\n- 173 {\n- 174 return dgfHostFactory_.boundaryId( HostGridAccess<_Grid_>::\n-hostIntersection( intersection ) );\n- 175 }\n- 176\n- 177 template< int codim >\n-178 int numParameters () const\n- 179 {\n- 180 return dgfHostFactory_.template numParameters< codim >();\n+ 153 return false;\n+ 154 }\n+ 155\n+ 156 template< class GG, class II >\n+ 157 const typename DGFBoundaryParameter::type &\n+158 boundaryParameter ( const Intersection<_GG,_II_> & intersection ) const\n+ 159 {\n+ 160 return DGFBoundaryParameter::defaultValue();\n+ 161 }\n+ 162\n+ 163 private:\n+ 164 typedef FieldVector DomainType;\n+ 165 struct Compare\n+ 166 {\n+ 167 bool operator() ( const DomainType &a, const DomainType &b ) const\n+ 168 {\n+ 169 // returns true, if a < b; c[i] < -eps;\n+ 170 const DomainType c = a - b;\n+ 171 const double eps = 1e-8;\n+ 172\n+ 173 for( int i = 0; i < DomainType::dimension; ++i )\n+ 174 {\n+ 175 if( c[ i ] <= -eps )\n+ 176 return true;\n+ 177 if( c[ i ] >= eps )\n+ 178 return false;\n+ 179 }\n+ 180 return false;\n 181 }\n- 182\n- 183 // return true if boundary parameters found\n-184 bool haveBoundaryParameters () const\n- 185 {\n- 186 return dgfHostFactory_.haveBoundaryParameters();\n- 187 }\n- 188\n- 189 template< class GG, class II >\n- 190 const typename DGFBoundaryParameter::type &\n-191 boundaryParameter ( const Dune::Intersection<_GG,_II_> & intersection )\n-const\n- 192 {\n- 193 return dgfHostFactory_.boundaryParameter( HostGridAccess<_Grid_>::\n-hostIntersection( intersection ) );\n- 194 }\n- 195\n- 196 template< class Entity >\n-197 std::vector< double > ¶meter ( const Entity &entity )\n- 198 {\n- 199 return dgfHostFactory_.parameter( HostGridAccess<_Grid_>::hostEntity\n-( entity ) );\n- 200 }\n- 201\n- 202 private:\n- 203 DGFGridFactory<_HostGrid_> dgfHostFactory_;\n- 204 Grid *grid_;\n- 205 };\n- 206\n- 207\n- 208\n- 209 // DGFGridInfo for GeometryGrid\n- 210 // ----------------------------\n- 211\n- 212 template< class HostGrid, class CoordFunction, class Allocator >\n-213 struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n- 214 {\n-215 static int refineStepsForHalf ()\n- 216 {\n- 217 return DGFGridInfo<_HostGrid_>::refineStepsForHalf();\n- 218 }\n- 219\n-220 static double refineWeight ()\n- 221 {\n- 222 return -1.0;\n- 223 }\n- 224 };\n- 225\n- 226}\n- 227\n- 228#endif // #ifndef DUNE_DGFGEOGRID_HH\n-geometrygrid.hh\n+ 182 };\n+ 183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap;\n+ 184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator;\n+ 185\n+ 186 MacroGrid macroGrid_;\n+ 187 Grid *grid_;\n+ 188 InsertOrderMap elInsertOrder_;\n+ 189 InsertOrderMap vtxInsertOrder_;\n+ 190 std::vector emptyParam;\n+ 191 };\n+ 192\n+ 193} // end namespace Dune\n+ 194\n+ 195#endif\n+macrogrid.hh\n+dgfexception.hh\n parser.hh\n-hostgridaccess.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n Dune::DGFGridFactory\n Definition: dgfgridfactory.hh:38\n+Dune::DGFGridFactory::numParameters\n+int numParameters() const\n+Definition: dgfgridfactory.hh:108\n+Dune::DGFGridFactory::boundaryId\n+int boundaryId(const Intersection &intersection) const\n+Definition: dgfgridfactory.hh:102\n+Dune::DGFGridFactory::boundaryParameter\n+const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II\n+> &intersection) const\n+Definition: dgfgridfactory.hh:158\n+Dune::DGFGridFactory::parameter\n+std::vector< double > & parameter(const Vertex &vertex)\n+Definition: dgfgridfactory.hh:139\n+Dune::DGFGridFactory::MPICommunicatorType\n+MPIHelper::MPICommunicator MPICommunicatorType\n+Definition: dgfgridfactory.hh:41\n+Dune::DGFGridFactory::numParameters\n+int numParameters(const Entity &) const\n+Definition: dgfgridfactory.hh:119\n+Dune::DGFGridFactory::wasInserted\n+bool wasInserted(const Intersection &intersection) const\n+Definition: dgfgridfactory.hh:96\n+Dune::DGFGridFactory::DGFGridFactory\n+DGFGridFactory(const std::string &filename, MPICommunicatorType\n+comm=MPIHelper::getCommunicator())\n+Definition: dgfgridfactory.hh:50\n Dune::DGFGridFactory::Grid\n G Grid\n Definition: dgfgridfactory.hh:39\n Dune::DGFGridFactory::dimension\n static const int dimension\n Definition: dgfgridfactory.hh:40\n+Dune::DGFGridFactory::grid\n+Grid * grid()\n+Definition: dgfgridfactory.hh:90\n+Dune::DGFGridFactory::parameter\n+std::vector< double > & parameter(const Element &element)\n+Definition: dgfgridfactory.hh:124\n+Dune::DGFGridFactory::haveBoundaryParameters\n+bool haveBoundaryParameters() const\n+Definition: dgfgridfactory.hh:151\n Dune::Intersection\n Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n element or with the d...\n Definition: common/intersection.hh:164\n+Dune::Intersection::boundary\n+bool boundary() const\n+Return true if intersection is with interior or exterior boundary (see the\n+cases above)\n+Definition: common/intersection.hh:216\n+Dune::Intersection::indexInInside\n+int indexInInside() const\n+Local index of codim 1 entity in the inside() entity where intersection is\n+contained in.\n+Definition: common/intersection.hh:346\n Dune::Entity\n Wrapper class for entities.\n Definition: common/entity.hh:66\n-Dune::Grid\n-Grid abstract base class.\n-Definition: common/grid.hh:375\n Dune::Grid::dimension\n static constexpr int dimension\n The dimension of the grid.\n Definition: common/grid.hh:387\n-Dune::AnalyticalCoordFunction\n-Derive an implementation of an analytical coordinate function from this class.\n-Definition: coordfunction.hh:134\n-Dune::AnalyticalCoordFunction::DomainVector\n-Base::DomainVector DomainVector\n-Definition: coordfunction.hh:139\n-Dune::AnalyticalCoordFunction::RangeVector\n-Base::RangeVector RangeVector\n-Definition: coordfunction.hh:140\n-Dune::GeoGrid::isDiscreteCoordFunctionInterface::value\n-static const bool value\n-Definition: coordfunction.hh:308\n-Dune::GeometryGrid\n-grid wrapper replacing the geometries\n-Definition: geometrygrid/grid.hh:86\n-Dune::HostGridAccess\n-provides access to host grid objects from GeometryGrid\n-Definition: identitygrid.hh:37\n-Dune::dgf::ProjectionBlock\n-Definition: io/file/dgfparser/blocks/projection.hh:24\n-Dune::dgf::ProjectionBlock::function\n-ExpressionPointer function(const std::string &name) const\n-Definition: io/file/dgfparser/blocks/projection.hh:100\n-Dune::dgf::ProjectionBlock::Expression\n-Definition: io/file/dgfparser/blocks/projection.hh:160\n-Dune::dgf::ProjectionBlock::Expression::evaluate\n-virtual void evaluate(const Vector &argument, Vector &result) const =0\n-Dune::DGFException\n-exception class for IO errors in the DGF parser\n-Definition: dgfexception.hh:16\n-Dune::DGFCoordFunction\n-Definition: dgfgeogrid.hh:45\n-Dune::DGFCoordFunction::DomainVector\n-Base::DomainVector DomainVector\n-Definition: dgfgeogrid.hh:50\n-Dune::DGFCoordFunction::evaluate\n-void evaluate(const DomainVector &x, RangeVector &y) const\n-Definition: dgfgeogrid.hh:59\n-Dune::DGFCoordFunction::Expression\n-dgf::ProjectionBlock::Expression Expression\n-Definition: dgfgeogrid.hh:53\n-Dune::DGFCoordFunction::DGFCoordFunction\n-DGFCoordFunction(const Expression *expression)\n-Definition: dgfgeogrid.hh:55\n-Dune::DGFCoordFunction::RangeVector\n-Base::RangeVector RangeVector\n-Definition: dgfgeogrid.hh:51\n-Dune::DGFCoordFunctionFactory\n-Definition: dgfgeogrid.hh:82\n-Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_false_>::create\n-static CoordFunction * create(std::istream &, const HostGrid &)\n-Definition: dgfgeogrid.hh:88\n-Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_true_>::create\n-static CoordFunction * create(std::istream &, const HostGrid &hostGrid)\n-Definition: dgfgeogrid.hh:98\n-Dune::DGFCoordFunctionFactory<_HostGrid,_DGFCoordFunction<_dimD,_dimR_>,_false\n->::create\n-static CoordFunction * create(std::istream &input, const HostGrid &hostGrid)\n-Definition: dgfgeogrid.hh:110\n-Dune::DGFCoordFunctionFactory<_HostGrid,_DGFCoordFunction<_dimD,_dimR_>,_false\n->::CoordFunction\n-DGFCoordFunction< dimD, dimR > CoordFunction\n-Definition: dgfgeogrid.hh:108\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-Vertex\n-Grid::template Codim< dimension >::Entity Vertex\n-Definition: dgfgeogrid.hh:133\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-boundaryId\n-int boundaryId(const Intersection &intersection) const\n-Definition: dgfgeogrid.hh:172\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-MPICommunicator\n-MPIHelper::MPICommunicator MPICommunicator\n-Definition: dgfgeogrid.hh:131\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-boundaryParameter\n-const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection<\n-GG, II > &intersection) const\n-Definition: dgfgeogrid.hh:191\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-DGFGridFactory\n-DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::\n-getCommunicator())\n-Definition: dgfgeogrid.hh:137\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-Element\n-Grid::template Codim< 0 >::Entity Element\n-Definition: dgfgeogrid.hh:132\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-grid\n-Grid * grid() const\n-Definition: dgfgeogrid.hh:160\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-CoordFunctionFactory\n-DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory\n-Definition: dgfgeogrid.hh:135\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-Grid\n-GeometryGrid< HostGrid, CoordFunction, Allocator > Grid\n-Definition: dgfgeogrid.hh:128\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-numParameters\n-int numParameters() const\n-Definition: dgfgeogrid.hh:178\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-parameter\n-std::vector< double > & parameter(const Entity &entity)\n-Definition: dgfgeogrid.hh:197\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-DGFGridFactory\n-DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::\n-getCommunicator())\n-Definition: dgfgeogrid.hh:148\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-wasInserted\n-bool wasInserted(const Intersection &intersection) const\n-Definition: dgfgeogrid.hh:166\n-Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-haveBoundaryParameters\n-bool haveBoundaryParameters() const\n-Definition: dgfgeogrid.hh:184\n-Dune::DGFGridInfo<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-refineWeight\n-static double refineWeight()\n-Definition: dgfgeogrid.hh:220\n-Dune::DGFGridInfo<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n-refineStepsForHalf\n-static int refineStepsForHalf()\n-Definition: dgfgeogrid.hh:215\n-Dune::DGFGridInfo\n-Some simple static information for a given GridType.\n-Definition: io/file/dgfparser/dgfparser.hh:56\n-Dune::DGFGridInfo::refineStepsForHalf\n-static int refineStepsForHalf()\n-number of globalRefine steps needed to refuce h by 0.5\n+Dune::DGFBoundaryParameter::defaultValue\n+static const type & defaultValue()\n+default constructor\n+Definition: parser.hh:28\n Dune::DGFBoundaryParameter::type\n std::string type\n type of additional boundary parameters\n Definition: parser.hh:25\n-dgfparser.hh\n+Dune::DuneGridFormatParser::nofvtxparams\n+int nofvtxparams\n+Definition: parser.hh:163\n+Dune::DuneGridFormatParser::vtxParams\n+std::vector< std::vector< double > > vtxParams\n+Definition: parser.hh:165\n+Dune::DuneGridFormatParser::nofelparams\n+int nofelparams\n+Definition: parser.hh:163\n+Dune::DuneGridFormatParser::elParams\n+std::vector< std::vector< double > > elParams\n+Definition: parser.hh:165\n+Dune::DuneGridFormatParser::vtx\n+std::vector< std::vector< double > > vtx\n+Definition: parser.hh:125\n+Dune::DuneGridFormatParser::elements\n+std ::vector< std ::vector< unsigned int > > elements\n+Definition: parser.hh:134\n intersection.hh\n-projection.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00845.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00845.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: parser.hh File Reference\n+dune-grid: dgfug.cc File Reference\n \n \n \n \n \n \n \n@@ -63,41 +63,29 @@\n \n \n
    \n \n-
    parser.hh File Reference
    \n+
    dgfug.cc File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n-#include <string>
    \n-#include <vector>
    \n-#include <map>
    \n-#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n-\n-\n-\n-\n-

    \n-Classes

    struct  Dune::DGFBoundaryParameter
     Contains types for additional features. More...
     
    class  Dune::DuneGridFormatParser
     The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class. More...
     
    \n+
    #include <config.h>
    \n+#include <dune/geometry/utility/typefromvertexcount.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfug.hh>
    \n+
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,30 +7,21 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n-Classes | Namespaces\n-parser.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-struct \u00a0Dune::DGFBoundaryParameter\n-\u00a0 Contains types for additional features. More...\n-\u00a0\n- class \u00a0Dune::DuneGridFormatParser\n-\u00a0 The DuneGridFormatParser class: reads a DGF file and stores build\n- information in vector structures used by the MacroGrid class. More...\n-\u00a0\n+Namespaces\n+dgfug.cc File Reference\n+#include \n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::dgf\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00848.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00848.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfwriter.hh File Reference\n+dune-grid: basic.hh File Reference\n \n \n \n \n \n \n \n@@ -58,59 +58,54 @@\n \n
    \n \n \n \n
    \n \n-
    dgfwriter.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    basic.hh File Reference
    \n \n
    \n-\n-

    write a GridView to a DGF file \n-More...

    \n
    #include <cassert>
    \n-#include <cstddef>
    \n-#include <algorithm>
    \n-#include <fstream>
    \n+#include <cctype>
    \n+#include <iostream>
    \n #include <string>
    \n-#include <type_traits>
    \n-#include <utility>
    \n-#include <vector>
    \n-#include <dune/common/rangeutilities.hh>
    \n-#include <dune/common/typeutilities.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n-#include <dune/grid/common/rangegenerators.hh>
    \n+#include <sstream>
    \n+#include <dune/common/stdstreams.hh>
    \n+#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n+\n+\n+\n

    \n+Functions

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

    Detailed Description

    \n-

    write a GridView to a DGF file

    \n-
    Author
    Martin Nolte
    \n-
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,40 +7,34 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n-Classes | Namespaces\n-dgfwriter.hh File Reference\n-write a GridView to a DGF file More...\n+ * blocks\n+Classes | Namespaces | Functions\n+basic.hh File Reference\n #include \n-#include \n-#include \n-#include \n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::DGFWriter<_GV_>\n-\u00a0 write a GridView to a DGF file More...\n+class \u00a0Dune::dgf::BasicBlock\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-write a GridView to a DGF file\n- Author\n- Martin Nolte\n+namespace \u00a0Dune::dgf\n+\u00a0\n+ Functions\n+void\u00a0Dune::dgf::makeupcase (std ::string &s)\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00848_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfwriter.hh Source File\n+dune-grid: basic.hh Source File\n \n \n \n \n \n \n \n@@ -58,429 +58,153 @@\n \n \n \n \n \n
    \n-
    dgfwriter.hh
    \n+
    basic.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
    \n-
    6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
    \n+
    5#ifndef DUNE_DGF_BASICBLOCK_HH
    \n+
    6#define DUNE_DGF_BASICBLOCK_HH
    \n
    7
    \n-
    13#include <cassert>
    \n-
    14#include <cstddef>
    \n-
    15
    \n-
    16#include <algorithm>
    \n-
    17#include <fstream>
    \n-
    18#include <string>
    \n-
    19#include <type_traits>
    \n-
    20#include <utility>
    \n-
    21#include <vector>
    \n-
    22
    \n-
    23#include <dune/common/rangeutilities.hh>
    \n-
    24#include <dune/common/typeutilities.hh>
    \n-
    25
    \n-
    26#include <dune/geometry/referenceelements.hh>
    \n-
    27#include <dune/geometry/type.hh>
    \n-
    28
    \n-\n-\n-
    31
    \n-
    32namespace Dune
    \n-
    33{
    \n-
    34
    \n-
    44 template< class GV >
    \n-\n-
    46 {
    \n-
    47 typedef DGFWriter< GV > This;
    \n-
    48
    \n-
    49 public:
    \n-
    51 typedef GV GridView;
    \n-
    53 typedef typename GridView::Grid Grid;
    \n-
    54
    \n-
    56 static const int dimGrid = GridView::dimension;
    \n+
    8#include <cassert>
    \n+
    9#include <cctype>
    \n+
    10#include <iostream>
    \n+
    11#include <string>
    \n+
    12#include <sstream>
    \n+
    13
    \n+
    14#include <dune/common/stdstreams.hh>
    \n+\n+\n+
    17
    \n+
    18namespace Dune
    \n+
    19{
    \n+
    20
    \n+
    21 namespace dgf
    \n+
    22 {
    \n+
    23
    \n+
    24 inline void makeupcase( std :: string &s )
    \n+
    25 {
    \n+
    26 for (size_t i=0; i<s.size(); i++)
    \n+
    27 s[i]=std::toupper(s[i]);
    \n+
    28 }
    \n+
    29
    \n+\n+
    31 {
    \n+
    32 int pos; // line number
    \n+
    33 bool active; // block was found
    \n+
    34 bool empty; // block was found but was empty
    \n+
    35 std::string identifier; // identifier of this block
    \n+
    36 int linecount; // total number of lines in the block
    \n+
    37 std::stringstream block_; // the block itself
    \n+
    38 std::string oneline; // the active line in the block
    \n+
    39
    \n+
    40 // get the block (if it exists)
    \n+
    41 void getblock ( std::istream &in );
    \n+
    42
    \n+
    43 // count the number of lines in the block
    \n+
    44 // int countlines ();
    \n+
    45
    \n+
    46 protected:
    \n+
    47 std::stringstream line; // the active line as string buffer
    \n+
    48 // for use in the derived classes
    \n+
    49
    \n+
    50 // go back to beginning of block
    \n+
    51 void reset ()
    \n+
    52 {
    \n+
    53 pos = -1;
    \n+
    54 block_.clear();
    \n+
    55 block_.seekg( 0 );
    \n+
    56 }
    \n
    57
    \n-
    58 private:
    \n-
    59 typedef typename GridView::IndexSet IndexSet;
    \n-
    60 typedef typename GridView::template Codim< 0 >::Entity Element;
    \n-
    61 typedef typename GridView::Intersection Intersection;
    \n-
    62
    \n-
    63 typedef typename Element::EntitySeed ElementSeed;
    \n-
    64
    \n-
    65 typedef typename IndexSet::IndexType Index;
    \n-
    66
    \n-
    67 public:
    \n-
    72 DGFWriter ( const GridView &gridView )
    \n-
    73 : gridView_( gridView )
    \n-
    74 {}
    \n+
    58 // get next line and store in string stream
    \n+
    59 bool getnextline ();
    \n+
    60
    \n+
    61 // get next entry in line
    \n+
    62 template< class ENTRY >
    \n+
    63 bool getnextentry( ENTRY &entry )
    \n+
    64 {
    \n+
    65 line >> entry;
    \n+
    66 return static_cast< bool >( line );
    \n+
    67 }
    \n+
    68
    \n+
    69 bool gettokenparam ( std :: string token, std :: string &entry );
    \n+
    70 bool findtoken( std :: string token );
    \n+
    71
    \n+
    72 public:
    \n+
    73 // search for block in file and store in buffer
    \n+
    74 BasicBlock ( std::istream &in, const char* id );
    \n
    75
    \n-
    85 template< class BoundaryData >
    \n-
    86 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
    \n-
    87
    \n-
    96 template< class BoundaryData >
    \n-
    97 void write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
    \n-
    98
    \n-
    107 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams = std::stringstream() ) const
    \n-
    108 {
    \n-
    109 write( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
    \n-
    110 }
    \n+
    76 // some information on this block
    \n+
    77 bool isactive ()
    \n+
    78 {
    \n+
    79 return active;
    \n+
    80 }
    \n+
    81
    \n+
    82 bool isempty ()
    \n+
    83 {
    \n+
    84 return empty;
    \n+
    85 }
    \n+
    86
    \n+
    87 int &noflines ()
    \n+
    88 {
    \n+
    89 return linecount;
    \n+
    90 }
    \n+
    91
    \n+\n+
    93 {
    \n+
    94 return pos;
    \n+
    95 }
    \n+
    96
    \n+
    97 const std::string & id () const
    \n+
    98 {
    \n+
    99 return identifier;
    \n+
    100 }
    \n+
    101
    \n+
    102 // for error messages
    \n+
    103 friend std :: ostream &operator<< ( std :: ostream &os, const BasicBlock &b )
    \n+
    104 {
    \n+
    105 return os << "block " << b.identifier << " (line " << b.pos << ")";
    \n+
    106 }
    \n+
    107
    \n+
    108 };
    \n+
    109
    \n+
    110 } // end namespace dgf
    \n
    111
    \n-
    119 void write ( std::ostream &gridout, const std::stringstream &addParams = std::stringstream() ) const
    \n-
    120 {
    \n-
    121 write( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
    \n-
    122 }
    \n-
    123
    \n-
    130 template< class... Args >
    \n-
    131 auto write ( const std::string &fileName, Args &&... args ) const
    \n-
    132 -> std::void_t< decltype( this->write( std::declval< std::ostream & >(), std::declval< Args >()... ) ) >
    \n-
    133 {
    \n-
    134 std::ofstream gridout( fileName );
    \n-
    135 if( gridout )
    \n-
    136 write( gridout, std::forward< Args >( args )... );
    \n-
    137 else
    \n-
    138 std::cerr << "Couldn't open file `"<< fileName << "'!"<< std::endl;
    \n-
    139 }
    \n-
    140
    \n-
    141 protected:
    \n-
    142 auto elementsSeeds ( const std::vector< Index > &newElemOrder ) const
    \n-
    143 -> std::vector< ElementSeed >;
    \n-
    144
    \n-
    145 void writeHeader ( std::ostream &gridout ) const;
    \n-
    146 void writeFooter ( std::ostream &gridout ) const;
    \n-
    147
    \n-
    148 auto writeVertices ( std::ostream &gridout ) const
    \n-
    149 -> std::vector< Index >;
    \n-
    150
    \n-
    151 void writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const;
    \n-
    152
    \n-
    153 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
    \n-
    154 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
    \n-
    155
    \n-
    156 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
    \n-
    157 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
    \n-
    158
    \n-
    159 template< class... Args >
    \n-
    160 void writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const;
    \n-
    161
    \n-
    162 private:
    \n-
    163 template< class I >
    \n-
    164 static auto boundaryId ( const I &i, PriorityTag< 1 > )
    \n-
    165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl().boundaryId() ) >, int >::value, int >
    \n-
    166 {
    \n-
    167 return i.impl().boundaryId();
    \n-
    168 }
    \n-
    169
    \n-
    170 template< class I >
    \n-
    171 static int boundaryId ( const I &i, PriorityTag< 0 > )
    \n-
    172 {
    \n-
    173 return 1;
    \n-
    174 }
    \n-
    175
    \n-
    176 protected:
    \n-
    177 static int boundaryId ( const Intersection &i ) { return boundaryId( i, PriorityTag< 42 >() ); }
    \n-
    178
    \n-
    179 private:
    \n-
    180 static int boundaryId ( const Intersection &, int bndId ) { return bndId; }
    \n-
    181 static int boundaryId ( const Intersection &i, const std::string & ) { return boundaryId( i ); }
    \n-
    182 static int boundaryId ( const Intersection &i, const std::pair< int, std::string > &data ) { return boundrayId( i, data.first ); }
    \n-
    183
    \n-
    184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout << std::endl; }
    \n-
    185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int, std::string > &data ) { appendBoundaryData( gridout, data.second ); }
    \n-
    186 static void appendBoundaryData ( std::ostream &gridout, const std::string &s ) { gridout << " : " << s << std::endl; }
    \n-
    187
    \n-
    188 protected:
    \n-
    189 template< class BoundaryData >
    \n-
    190 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const;
    \n-
    191
    \n-
    192 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
    \n-
    193 {
    \n-
    194 writeBoundaries( gridout, dgfIndices, [] ( const Intersection &i ) -> int { return boundaryId( i ); } );
    \n-
    195 }
    \n-
    196
    \n-
    197 protected:
    \n-\n-
    199 };
    \n-
    200
    \n-
    201
    \n-
    202 template< class GV >
    \n-
    203 inline auto DGFWriter< GV >::elementsSeeds ( const std::vector< Index > &newElemOrder ) const
    \n-
    204 -> std::vector< ElementSeed >
    \n-
    205 {
    \n-
    206 const IndexSet &indexSet = gridView_.indexSet();
    \n-
    207
    \n-
    208 const std::size_t orderSize = newElemOrder.size() ;
    \n-
    209 std::vector< ElementSeed > elementSeeds( orderSize );
    \n-
    210
    \n-
    211 for( const Element &element : elements( gridView_ ) )
    \n-
    212 {
    \n-
    213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize );
    \n-
    214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed();
    \n-
    215 }
    \n-
    216
    \n-
    217 return elementSeeds;
    \n-
    218 }
    \n-
    219
    \n-
    220
    \n-
    221 template< class GV >
    \n-
    222 inline void DGFWriter< GV >::writeHeader ( std::ostream &gridout ) const
    \n-
    223 {
    \n-
    224 // set the stream to full double precision
    \n-
    225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield );
    \n-
    226 gridout.precision( 16 );
    \n-
    227
    \n-
    228 const IndexSet &indexSet = gridView_.indexSet();
    \n-
    229
    \n-
    230 // write DGF header
    \n-
    231 gridout << "DGF" << std::endl;
    \n-
    232 gridout << "%" << " Elements = " << indexSet.size( 0 ) << " | Vertices = " << indexSet.size( dimGrid ) << std::endl;
    \n-
    233 }
    \n-
    234
    \n-
    235
    \n-
    236 template< class GV >
    \n-
    237 inline void DGFWriter< GV >::writeFooter ( std::ostream &gridout ) const
    \n-
    238 {
    \n-
    239 gridout << std::endl << "#" << std::endl;
    \n-
    240 }
    \n-
    241
    \n-
    242
    \n-
    243 template< class GV >
    \n-
    244 inline auto DGFWriter< GV >::writeVertices ( std::ostream &gridout ) const
    \n-
    245 -> std::vector< Index >
    \n-
    246 {
    \n-
    247 const IndexSet &indexSet = gridView_.indexSet();
    \n-
    248
    \n-
    249 const Index vxSize = indexSet.size( dimGrid );
    \n-
    250 std::vector< Index > dgfIndices( vxSize, vxSize );
    \n-
    251
    \n-
    252 // write all vertices into the "vertex" block
    \n-
    253 gridout << std::endl << "VERTEX" << std::endl;
    \n-
    254 Index vertexCount = 0;
    \n-
    255 for( const Element &element : elements( gridView_ ) )
    \n-
    256 {
    \n-
    257 for( auto i : range( element.subEntities( dimGrid ) ) )
    \n-
    258 {
    \n-
    259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid );
    \n-
    260 assert( vxIndex < vxSize );
    \n-
    261 if( dgfIndices[ vxIndex ] == vxSize )
    \n-
    262 {
    \n-
    263 dgfIndices[ vxIndex ] = vertexCount++;
    \n-
    264 gridout << element.geometry().corner( i ) << std::endl;
    \n-
    265 }
    \n-
    266 }
    \n-
    267 }
    \n-
    268 gridout << "#" << std::endl;
    \n-
    269
    \n-
    270 if( vertexCount != vxSize )
    \n-
    271 DUNE_THROW( GridError, "IndexSet reports wrong number of vertices." );
    \n-
    272 return dgfIndices;
    \n-
    273 }
    \n-
    274
    \n-
    275
    \n-
    276 template< class GV >
    \n-
    277 inline void DGFWriter< GV >::writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const
    \n-
    278 {
    \n-
    279 // if element's type is not the same as the type to write the return
    \n-
    280 if( element.type() != elementType )
    \n-
    281 return;
    \n-
    282
    \n-
    283 // write vertex numbers of the element
    \n-
    284 const IndexSet &indexSet = gridView_.indexSet();
    \n-
    285 for( auto i : range( element.subEntities( Element::dimension ) ) )
    \n-
    286 gridout << (i > 0 ? " " : "") << dgfIndices[ indexSet.subIndex( element, i, dimGrid ) ];
    \n-
    287 gridout << std::endl;
    \n-
    288 }
    \n-
    289
    \n-
    290
    \n-
    291 template< class GV >
    \n-
    292 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
    \n-
    293 {
    \n-
    294 // write all simplices to the "simplex" block
    \n-
    295 gridout << std::endl << "SIMPLEX" << std::endl;
    \n-
    296
    \n-
    297 // write all simplex elements
    \n-
    298 for( const Element &element : elements( gridView_ ) )
    \n-
    299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex( dimGrid ) );
    \n-
    300
    \n-
    301 // write end marker for block
    \n-
    302 gridout << "#" << std::endl;
    \n-
    303 }
    \n-
    304
    \n-
    305
    \n-
    306 template< class GV >
    \n-
    307 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
    \n-
    308 {
    \n-
    309 // write all simplices to the "simplex" block
    \n-
    310 gridout << std::endl << "SIMPLEX" << std::endl;
    \n-
    311
    \n-
    312 // write all simplex elements
    \n-
    313 for( const ElementSeed &seed : elementSeeds )
    \n-
    314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::simplex( dimGrid ) );
    \n-
    315
    \n-
    316 // write end marker for block
    \n-
    317 gridout << "#" << std::endl;
    \n-
    318 }
    \n-
    319
    \n-
    320
    \n-
    321 template< class GV >
    \n-
    322 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
    \n-
    323 {
    \n-
    324 // write all cubes to the "cube" block
    \n-
    325 gridout << std::endl << "CUBE" << std::endl;
    \n-
    326
    \n-
    327 // write all cube elements
    \n-
    328 for( const Element &element : elements( gridView_ ) )
    \n-
    329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid ) );
    \n-
    330
    \n-
    331 // write end marker for block
    \n-
    332 gridout << "#" << std::endl;
    \n-
    333 }
    \n-
    334
    \n-
    335
    \n-
    336 template< class GV >
    \n-
    337 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
    \n-
    338 {
    \n-
    339 const IndexSet &indexSet = gridView_.indexSet();
    \n-
    340
    \n-
    341 // write all cubes to the "cube" block
    \n-
    342 gridout << std::endl << "CUBE" << std::endl;
    \n-
    343
    \n-
    344 // write all cube elements
    \n-
    345 for( const ElementSeed &seed : elementSeeds )
    \n-
    346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::cube( dimGrid ) );
    \n-
    347
    \n-
    348 // write end marker for block
    \n-
    349 gridout << "#" << std::endl;
    \n-
    350 }
    \n-
    351
    \n-
    352
    \n-
    353 template< class GV >
    \n-
    354 template< class... Args >
    \n-
    355 inline void DGFWriter< GV >::writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const
    \n-
    356 {
    \n-
    357 const IndexSet &indexSet = gridView_.indexSet();
    \n-
    358
    \n-
    359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) > 0) )
    \n-
    360 writeSimplices( gridout, dgfIndices, args... );
    \n-
    361
    \n-
    362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 )
    \n-
    363 writeCubes( gridout, dgfIndices, args... );
    \n-
    364 }
    \n-
    365
    \n-
    366
    \n-
    367 template< class GV >
    \n-
    368 template< class BoundaryData >
    \n-
    369 inline void DGFWriter< GV >::writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const
    \n-
    370 {
    \n-
    371 using std::max;
    \n-
    372
    \n-
    373 const IndexSet &indexSet = gridView_.indexSet();
    \n-
    374
    \n-
    375 // write all boundaries to the "boundarysegments" block
    \n-
    376 gridout << std::endl << "BOUNDARYSEGMENTS" << std::endl;
    \n-
    377
    \n-
    378 for( const Element &element : elements( gridView_ ) )
    \n-
    379 {
    \n-
    380 if( !element.hasBoundaryIntersections() )
    \n-
    381 continue;
    \n-
    382
    \n-
    383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid >::general( element.type() );
    \n-
    384 for( const Intersection &intersection : intersections( gridView_, element ) )
    \n-
    385 {
    \n-
    386 if( !intersection.boundary() )
    \n-
    387 continue;
    \n-
    388
    \n-
    389 const auto data = boundaryData( intersection );
    \n-
    390 const int bndId = max( boundaryId( intersection, data ), 1 );
    \n-
    391
    \n-
    392 const int faceNumber = intersection.indexInInside();
    \n-
    393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid );
    \n-
    394 gridout << bndId << " ";
    \n-
    395 for( auto i : range( faceSize ) )
    \n-
    396 {
    \n-
    397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid );
    \n-
    398 gridout << " " << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ];
    \n-
    399 }
    \n-
    400 appendBoundaryData( gridout, data );
    \n-
    401 }
    \n-
    402 }
    \n-
    403 gridout << "#" << std::endl;
    \n-
    404 }
    \n-
    405
    \n-
    406
    \n-
    407 template< class GV >
    \n-
    408 template< class BoundaryData >
    \n-
    409 inline void DGFWriter< GV >::write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
    \n-
    410 {
    \n-
    411 writeHeader( gridout );
    \n-
    412 auto dgfIndices = writeVertices( gridout );
    \n-
    413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) );
    \n-
    414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
    \n-
    415 gridout << addParams.str();
    \n-
    416 writeFooter( gridout );
    \n-
    417 }
    \n-
    418
    \n-
    419
    \n-
    420 template< class GV >
    \n-
    421 template< class BoundaryData >
    \n-
    422 inline void DGFWriter< GV >::write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
    \n-
    423 {
    \n-
    424 writeHeader( gridout );
    \n-
    425 auto dgfIndices = writeVertices( gridout );
    \n-
    426 writeElements( gridout, dgfIndices );
    \n-
    427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
    \n-
    428 gridout << addParams.str();
    \n-
    429 writeFooter( gridout );
    \n-
    430 }
    \n-
    431
    \n-
    432} // namespace Dune
    \n-
    433
    \n-
    434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
    \n-\n-
    Traits::Grid Grid
    type of the grid
    Definition: common/gridview.hh:83
    \n-
    Traits::IndexSet IndexSet
    type of the index set
    Definition: common/gridview.hh:86
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n-
    Traits::Intersection Intersection
    type of the intersection
    Definition: common/gridview.hh:89
    \n+
    112} // end namespace Dune
    \n+
    113
    \n+
    114#endif
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n-
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n-
    IndexTypeImp IndexType
    The type used for the indices.
    Definition: indexidset.hh:92
    \n-
    write a GridView to a DGF file
    Definition: dgfwriter.hh:46
    \n-
    static const int dimGrid
    dimension of the grid
    Definition: dgfwriter.hh:56
    \n-
    DGFWriter(const GridView &gridView)
    constructor
    Definition: dgfwriter.hh:72
    \n-
    void write(std::ostream &gridout, const std::stringstream &addParams=std::stringstream()) const
    write the GridView into a std::ostream
    Definition: dgfwriter.hh:119
    \n-
    auto write(const std::string &fileName, Args &&... args) const -> std::void_t< decltype(this->write(std::declval< std::ostream & >(), std::declval< Args >()...)) >
    write the GridView to a file
    Definition: dgfwriter.hh:131
    \n-
    void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData) const
    Definition: dgfwriter.hh:369
    \n-
    static int boundaryId(const Intersection &i)
    Definition: dgfwriter.hh:177
    \n-
    void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams=std::stringstream()) const
    write the GridView into a std::ostream
    Definition: dgfwriter.hh:107
    \n-
    void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams=std::stringstream()) const
    write the GridView into a std::ostream
    Definition: dgfwriter.hh:409
    \n-
    GridView gridView_
    Definition: dgfwriter.hh:198
    \n-
    void writeElement(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType) const
    Definition: dgfwriter.hh:277
    \n-
    GV GridView
    type of grid view
    Definition: dgfwriter.hh:51
    \n-
    void writeFooter(std::ostream &gridout) const
    Definition: dgfwriter.hh:237
    \n-
    GridView::Grid Grid
    type of underlying hierarchical grid
    Definition: dgfwriter.hh:53
    \n-
    auto writeVertices(std::ostream &gridout) const -> std::vector< Index >
    Definition: dgfwriter.hh:244
    \n-
    void writeElements(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args) const
    Definition: dgfwriter.hh:355
    \n-
    void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
    Definition: dgfwriter.hh:192
    \n-
    void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
    Definition: dgfwriter.hh:322
    \n-
    void writeSimplices(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
    Definition: dgfwriter.hh:292
    \n-
    void writeHeader(std::ostream &gridout) const
    Definition: dgfwriter.hh:222
    \n-
    auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std::vector< ElementSeed >
    Definition: dgfwriter.hh:203
    \n-
    Different resources needed by all grid implementations.
    \n+
    void makeupcase(std ::string &s)
    Definition: basic.hh:24
    \n+
    Definition: basic.hh:31
    \n+
    void reset()
    Definition: basic.hh:51
    \n+
    bool getnextline()
    Definition: basic.cc:94
    \n+
    BasicBlock(std::istream &in, const char *id)
    Definition: basic.cc:18
    \n+
    bool findtoken(std ::string token)
    Definition: basic.cc:123
    \n+
    bool getnextentry(ENTRY &entry)
    Definition: basic.hh:63
    \n+
    const std::string & id() const
    Definition: basic.hh:97
    \n+
    int & noflines()
    Definition: basic.hh:87
    \n+
    friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b)
    Definition: basic.hh:103
    \n+
    bool isempty()
    Definition: basic.hh:82
    \n+
    bool isactive()
    Definition: basic.hh:77
    \n+
    int linenumber()
    Definition: basic.hh:92
    \n+
    std::stringstream line
    Definition: basic.hh:47
    \n+
    bool gettokenparam(std ::string token, std ::string &entry)
    Definition: basic.cc:104
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,563 +7,178 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n-dgfwriter.hh\n+ * blocks\n+basic.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH\n- 6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH\n+ 5#ifndef DUNE_DGF_BASICBLOCK_HH\n+ 6#define DUNE_DGF_BASICBLOCK_HH\n 7\n- 13#include \n- 14#include \n- 15\n- 16#include \n- 17#include \n- 18#include \n- 19#include \n- 20#include \n- 21#include \n- 22\n- 23#include \n- 24#include \n- 25\n- 26#include \n- 27#include \n- 28\n- 29#include \n- 30#include \n- 31\n- 32namespace Dune\n- 33{\n- 34\n- 44 template< class GV >\n-45 class DGFWriter\n- 46 {\n- 47 typedef DGFWriter<_GV_> This;\n- 48\n- 49 public:\n-51 typedef GV GridView;\n-53 typedef typename GridView::Grid Grid;\n- 54\n-56 static const int dimGrid = GridView::dimension;\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16#include \n+ 17\n+ 18namespace Dune\n+ 19{\n+ 20\n+ 21 namespace dgf\n+ 22 {\n+ 23\n+24 inline void makeupcase( std :: string &s )\n+ 25 {\n+ 26 for (size_t i=0; i::Entity Element;\n- 61 typedef typename GridView::Intersection Intersection;\n- 62\n- 63 typedef typename Element::EntitySeed ElementSeed;\n- 64\n- 65 typedef typename IndexSet::IndexType Index;\n- 66\n- 67 public:\n-72 DGFWriter ( const GridView &gridView )\n- 73 : gridView_( gridView )\n- 74 {}\n+ 58 // get next line and store in string stream\n+ 59 bool getnextline ();\n+ 60\n+ 61 // get next entry in line\n+ 62 template< class ENTRY >\n+63 bool getnextentry( ENTRY &entry )\n+ 64 {\n+ 65 line >> entry;\n+ 66 return static_cast< bool >( line );\n+ 67 }\n+ 68\n+ 69 bool gettokenparam ( std :: string token, std :: string &entry );\n+ 70 bool findtoken( std :: string token );\n+ 71\n+ 72 public:\n+ 73 // search for block in file and store in buffer\n+ 74 BasicBlock ( std::istream &in, const char* id );\n 75\n- 85 template< class BoundaryData >\n- 86 void write ( std::ostream &gridout, const std::vector< Index >\n-&newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams\n-= std::stringstream() ) const;\n- 87\n- 96 template< class BoundaryData >\n- 97 void write ( std::ostream &gridout, BoundaryData &&boundaryData, const\n-std::stringstream &addParams = std::stringstream() ) const;\n- 98\n-107 void write ( std::ostream &gridout, const std::vector< Index >\n-&newElemOrder, const std::stringstream &addParams = std::stringstream() ) const\n- 108 {\n- 109 write( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return\n-boundaryId( i ); }, addParams );\n- 110 }\n+ 76 // some information on this block\n+77 bool isactive ()\n+ 78 {\n+ 79 return active;\n+ 80 }\n+ 81\n+82 bool isempty ()\n+ 83 {\n+ 84 return empty;\n+ 85 }\n+ 86\n+87 int &noflines ()\n+ 88 {\n+ 89 return linecount;\n+ 90 }\n+ 91\n+92 int linenumber ()\n+ 93 {\n+ 94 return pos;\n+ 95 }\n+ 96\n+97 const std::string & id () const\n+ 98 {\n+ 99 return identifier;\n+ 100 }\n+ 101\n+ 102 // for error messages\n+103 friend std :: ostream &operator<<( std :: ostream &os, const BasicBlock &b\n+)\n+ 104 {\n+ 105 return os << \"block \" << b.identifier << \" (line \" << b.pos << \")\";\n+ 106 }\n+ 107\n+ 108 };\n+ 109\n+ 110 } // end namespace dgf\n 111\n-119 void write ( std::ostream &gridout, const std::stringstream &addParams =\n-std::stringstream() ) const\n- 120 {\n- 121 write( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i\n-); }, addParams );\n- 122 }\n- 123\n- 130 template< class... Args >\n-131 auto write ( const std::string &fileName, Args &&... args ) const\n- 132 -> std::void_t< decltype( this->write( std::declval< std::ostream & >(),\n-std::declval< Args >()... ) ) >\n- 133 {\n- 134 std::ofstream gridout( fileName );\n- 135 if( gridout )\n- 136 write( gridout, std::forward< Args >( args )... );\n- 137 else\n- 138 std::cerr << \"Couldn't open file `\"<< fileName << \"'!\"<< std::endl;\n- 139 }\n- 140\n- 141 protected:\n- 142 auto elementsSeeds ( const std::vector< Index > &newElemOrder ) const\n- 143 -> std::vector< ElementSeed >;\n- 144\n- 145 void writeHeader ( std::ostream &gridout ) const;\n- 146 void writeFooter ( std::ostream &gridout ) const;\n- 147\n- 148 auto writeVertices ( std::ostream &gridout ) const\n- 149 -> std::vector< Index >;\n- 150\n- 151 void writeElement ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, const Element &element, const GeometryType &elementType ) const;\n- 152\n- 153 void writeSimplices ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices ) const;\n- 154 void writeSimplices ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;\n- 155\n- 156 void writeCubes ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices ) const;\n- 157 void writeCubes ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;\n- 158\n- 159 template< class... Args >\n- 160 void writeElements ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, const Args &... args ) const;\n- 161\n- 162 private:\n- 163 template< class I >\n- 164 static auto boundaryId ( const I &i, PriorityTag< 1 > )\n- 165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl\n-().boundaryId() ) >, int >::value, int >\n- 166 {\n- 167 return i.impl().boundaryId();\n- 168 }\n- 169\n- 170 template< class I >\n- 171 static int boundaryId ( const I &i, PriorityTag< 0 > )\n- 172 {\n- 173 return 1;\n- 174 }\n- 175\n- 176 protected:\n-177 static int boundaryId ( const Intersection &i ) { return boundaryId( i,\n-PriorityTag< 42 >() ); }\n- 178\n- 179 private:\n- 180 static int boundaryId ( const Intersection &, int bndId ) { return bndId;\n-}\n- 181 static int boundaryId ( const Intersection &i, const std::string & )\n-{ return boundaryId( i ); }\n- 182 static int boundaryId ( const Intersection &i, const std::pair< int, std::\n-string > &data ) { return boundrayId( i, data.first ); }\n- 183\n- 184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout <<\n-std::endl; }\n- 185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int,\n-std::string > &data ) { appendBoundaryData( gridout, data.second ); }\n- 186 static void appendBoundaryData ( std::ostream &gridout, const std::string\n-&s ) { gridout << \" : \" << s << std::endl; }\n- 187\n- 188 protected:\n- 189 template< class BoundaryData >\n- 190 void writeBoundaries ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, BoundaryData &&boundaryData ) const;\n- 191\n-192 void writeBoundaries ( std::ostream &gridout, const std::vector< Index >\n-&dgfIndices ) const\n- 193 {\n- 194 writeBoundaries( gridout, dgfIndices, [] ( const Intersection &i ) -> int\n-{ return boundaryId( i ); } );\n- 195 }\n- 196\n- 197 protected:\n-198 GridView gridView_;\n- 199 };\n- 200\n- 201\n- 202 template< class GV >\n-203 inline auto DGFWriter<_GV_>::elementsSeeds ( const std::vector< Index >\n-&newElemOrder ) const\n- 204 -> std::vector< ElementSeed >\n- 205 {\n- 206 const IndexSet &indexSet = gridView_.indexSet();\n- 207\n- 208 const std::size_t orderSize = newElemOrder.size() ;\n- 209 std::vector< ElementSeed > elementSeeds( orderSize );\n- 210\n- 211 for( const Element &element : elements( gridView_ ) )\n- 212 {\n- 213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize );\n- 214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed\n-();\n- 215 }\n- 216\n- 217 return elementSeeds;\n- 218 }\n- 219\n- 220\n- 221 template< class GV >\n-222 inline void DGFWriter<_GV_>::writeHeader ( std::ostream &gridout ) const\n- 223 {\n- 224 // set the stream to full double precision\n- 225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield );\n- 226 gridout.precision( 16 );\n- 227\n- 228 const IndexSet &indexSet = gridView_.indexSet();\n- 229\n- 230 // write DGF header\n- 231 gridout << \"DGF\" << std::endl;\n- 232 gridout << \"%\" << \" Elements = \" << indexSet.size( 0 ) << \" | Vertices = \"\n-<< indexSet.size( dimGrid ) << std::endl;\n- 233 }\n- 234\n- 235\n- 236 template< class GV >\n-237 inline void DGFWriter<_GV_>::writeFooter ( std::ostream &gridout ) const\n- 238 {\n- 239 gridout << std::endl << \"#\" << std::endl;\n- 240 }\n- 241\n- 242\n- 243 template< class GV >\n-244 inline auto DGFWriter<_GV_>::writeVertices ( std::ostream &gridout ) const\n- 245 -> std::vector< Index >\n- 246 {\n- 247 const IndexSet &indexSet = gridView_.indexSet();\n- 248\n- 249 const Index vxSize = indexSet.size( dimGrid );\n- 250 std::vector< Index > dgfIndices( vxSize, vxSize );\n- 251\n- 252 // write all vertices into the \"vertex\" block\n- 253 gridout << std::endl << \"VERTEX\" << std::endl;\n- 254 Index vertexCount = 0;\n- 255 for( const Element &element : elements( gridView_ ) )\n- 256 {\n- 257 for( auto i : range( element.subEntities( dimGrid ) ) )\n- 258 {\n- 259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid );\n- 260 assert( vxIndex < vxSize );\n- 261 if( dgfIndices[ vxIndex ] == vxSize )\n- 262 {\n- 263 dgfIndices[ vxIndex ] = vertexCount++;\n- 264 gridout << element.geometry().corner( i ) << std::endl;\n- 265 }\n- 266 }\n- 267 }\n- 268 gridout << \"#\" << std::endl;\n- 269\n- 270 if( vertexCount != vxSize )\n- 271 DUNE_THROW( GridError, \"IndexSet reports wrong number of vertices.\" );\n- 272 return dgfIndices;\n- 273 }\n- 274\n- 275\n- 276 template< class GV >\n-277 inline void DGFWriter<_GV_>::writeElement ( std::ostream &gridout, const\n-std::vector< Index > &dgfIndices, const Element &element, const GeometryType\n-&elementType ) const\n- 278 {\n- 279 // if element's type is not the same as the type to write the return\n- 280 if( element.type() != elementType )\n- 281 return;\n- 282\n- 283 // write vertex numbers of the element\n- 284 const IndexSet &indexSet = gridView_.indexSet();\n- 285 for( auto i : range( element.subEntities( Element::dimension ) ) )\n- 286 gridout << (i > 0 ? \" \" : \"\") << dgfIndices[ indexSet.subIndex( element,\n-i, dimGrid ) ];\n- 287 gridout << std::endl;\n- 288 }\n- 289\n- 290\n- 291 template< class GV >\n-292 inline void DGFWriter<_GV_>::writeSimplices ( std::ostream &gridout, const\n-std::vector< Index > &dgfIndices ) const\n- 293 {\n- 294 // write all simplices to the \"simplex\" block\n- 295 gridout << std::endl << \"SIMPLEX\" << std::endl;\n- 296\n- 297 // write all simplex elements\n- 298 for( const Element &element : elements( gridView_ ) )\n- 299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex\n-( dimGrid ) );\n- 300\n- 301 // write end marker for block\n- 302 gridout << \"#\" << std::endl;\n- 303 }\n- 304\n- 305\n- 306 template< class GV >\n-307 inline void DGFWriter<_GV_>::writeSimplices ( std::ostream &gridout, const\n-std::vector< Index > &dgfIndices, const std::vector< ElementSeed >\n-&elementSeeds ) const\n- 308 {\n- 309 // write all simplices to the \"simplex\" block\n- 310 gridout << std::endl << \"SIMPLEX\" << std::endl;\n- 311\n- 312 // write all simplex elements\n- 313 for( const ElementSeed &seed : elementSeeds )\n- 314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ),\n-GeometryTypes::simplex( dimGrid ) );\n- 315\n- 316 // write end marker for block\n- 317 gridout << \"#\" << std::endl;\n- 318 }\n- 319\n- 320\n- 321 template< class GV >\n-322 inline void DGFWriter<_GV_>::writeCubes ( std::ostream &gridout, const\n-std::vector< Index > &dgfIndices ) const\n- 323 {\n- 324 // write all cubes to the \"cube\" block\n- 325 gridout << std::endl << \"CUBE\" << std::endl;\n- 326\n- 327 // write all cube elements\n- 328 for( const Element &element : elements( gridView_ ) )\n- 329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid )\n-);\n- 330\n- 331 // write end marker for block\n- 332 gridout << \"#\" << std::endl;\n- 333 }\n- 334\n- 335\n- 336 template< class GV >\n-337 inline void DGFWriter<_GV_>::writeCubes ( std::ostream &gridout, const\n-std::vector< Index > &dgfIndices, const std::vector< ElementSeed >\n-&elementSeeds ) const\n- 338 {\n- 339 const IndexSet &indexSet = gridView_.indexSet();\n- 340\n- 341 // write all cubes to the \"cube\" block\n- 342 gridout << std::endl << \"CUBE\" << std::endl;\n- 343\n- 344 // write all cube elements\n- 345 for( const ElementSeed &seed : elementSeeds )\n- 346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ),\n-GeometryTypes::cube( dimGrid ) );\n- 347\n- 348 // write end marker for block\n- 349 gridout << \"#\" << std::endl;\n- 350 }\n- 351\n- 352\n- 353 template< class GV >\n- 354 template< class... Args >\n-355 inline void DGFWriter<_GV_>::writeElements ( std::ostream &gridout, const\n-std::vector< Index > &dgfIndices, const Args &... args ) const\n- 356 {\n- 357 const IndexSet &indexSet = gridView_.indexSet();\n- 358\n- 359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) >\n-0) )\n- 360 writeSimplices( gridout, dgfIndices, args... );\n- 361\n- 362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 )\n- 363 writeCubes( gridout, dgfIndices, args... );\n- 364 }\n- 365\n- 366\n- 367 template< class GV >\n- 368 template< class BoundaryData >\n-369 inline void DGFWriter<_GV_>::writeBoundaries ( std::ostream &gridout, const\n-std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const\n- 370 {\n- 371 using std::max;\n- 372\n- 373 const IndexSet &indexSet = gridView_.indexSet();\n- 374\n- 375 // write all boundaries to the \"boundarysegments\" block\n- 376 gridout << std::endl << \"BOUNDARYSEGMENTS\" << std::endl;\n- 377\n- 378 for( const Element &element : elements( gridView_ ) )\n- 379 {\n- 380 if( !element.hasBoundaryIntersections() )\n- 381 continue;\n- 382\n- 383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid\n->::general( element.type() );\n- 384 for( const Intersection &intersection : intersections( gridView_, element\n-) )\n- 385 {\n- 386 if( !intersection.boundary() )\n- 387 continue;\n- 388\n- 389 const auto data = boundaryData( intersection );\n- 390 const int bndId = max( boundaryId( intersection, data ), 1 );\n- 391\n- 392 const int faceNumber = intersection.indexInInside();\n- 393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid );\n- 394 gridout << bndId << \" \";\n- 395 for( auto i : range( faceSize ) )\n- 396 {\n- 397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid );\n- 398 gridout << \" \" << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ];\n- 399 }\n- 400 appendBoundaryData( gridout, data );\n- 401 }\n- 402 }\n- 403 gridout << \"#\" << std::endl;\n- 404 }\n- 405\n- 406\n- 407 template< class GV >\n- 408 template< class BoundaryData >\n-409 inline void DGFWriter<_GV_>::write ( std::ostream &gridout, const std::\n-vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::\n-stringstream &addParams ) const\n- 410 {\n- 411 writeHeader( gridout );\n- 412 auto dgfIndices = writeVertices( gridout );\n- 413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) );\n- 414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >\n-( boundaryData ) );\n- 415 gridout << addParams.str();\n- 416 writeFooter( gridout );\n- 417 }\n- 418\n- 419\n- 420 template< class GV >\n- 421 template< class BoundaryData >\n-422 inline void DGFWriter<_GV_>::write ( std::ostream &gridout, BoundaryData\n-&&boundaryData, const std::stringstream &addParams ) const\n- 423 {\n- 424 writeHeader( gridout );\n- 425 auto dgfIndices = writeVertices( gridout );\n- 426 writeElements( gridout, dgfIndices );\n- 427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >\n-( boundaryData ) );\n- 428 gridout << addParams.str();\n- 429 writeFooter( gridout );\n- 430 }\n- 431\n- 432} // namespace Dune\n- 433\n- 434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH\n-rangegenerators.hh\n-Dune::GridView::Grid\n-Traits::Grid Grid\n-type of the grid\n-Definition: common/gridview.hh:83\n-Dune::GridView::IndexSet\n-Traits::IndexSet IndexSet\n-type of the index set\n-Definition: common/gridview.hh:86\n-Dune::GridView::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/gridview.hh:148\n-Dune::GridView::Intersection\n-Traits::Intersection Intersection\n-type of the intersection\n-Definition: common/gridview.hh:89\n+ 112} // end namespace Dune\n+ 113\n+ 114#endif\n+entitykey.hh\n+dgfexception.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::max\n-int max(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:337\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::Intersection\n-Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n-element or with the d...\n-Definition: common/intersection.hh:164\n-Dune::GridError\n-Base class for exceptions in Dune grid modules.\n-Definition: exceptions.hh:20\n-Dune::IndexSet::IndexType\n-IndexTypeImp IndexType\n-The type used for the indices.\n-Definition: indexidset.hh:92\n-Dune::DGFWriter\n-write a GridView to a DGF file\n-Definition: dgfwriter.hh:46\n-Dune::DGFWriter::dimGrid\n-static const int dimGrid\n-dimension of the grid\n-Definition: dgfwriter.hh:56\n-Dune::DGFWriter::DGFWriter\n-DGFWriter(const GridView &gridView)\n-constructor\n-Definition: dgfwriter.hh:72\n-Dune::DGFWriter::write\n-void write(std::ostream &gridout, const std::stringstream &addParams=std::\n-stringstream()) const\n-write the GridView into a std::ostream\n-Definition: dgfwriter.hh:119\n-Dune::DGFWriter::write\n-auto write(const std::string &fileName, Args &&... args) const -> std::void_t<\n-decltype(this->write(std::declval< std::ostream & >(), std::declval< Args >\n-()...)) >\n-write the GridView to a file\n-Definition: dgfwriter.hh:131\n-Dune::DGFWriter::writeBoundaries\n-void writeBoundaries(std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, BoundaryData &&boundaryData) const\n-Definition: dgfwriter.hh:369\n-Dune::DGFWriter::boundaryId\n-static int boundaryId(const Intersection &i)\n-Definition: dgfwriter.hh:177\n-Dune::DGFWriter::write\n-void write(std::ostream &gridout, const std::vector< Index > &newElemOrder,\n-const std::stringstream &addParams=std::stringstream()) const\n-write the GridView into a std::ostream\n-Definition: dgfwriter.hh:107\n-Dune::DGFWriter::write\n-void write(std::ostream &gridout, const std::vector< Index > &newElemOrder,\n-BoundaryData &&boundaryData, const std::stringstream &addParams=std::\n-stringstream()) const\n-write the GridView into a std::ostream\n-Definition: dgfwriter.hh:409\n-Dune::DGFWriter::gridView_\n-GridView gridView_\n-Definition: dgfwriter.hh:198\n-Dune::DGFWriter::writeElement\n-void writeElement(std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, const Element &element, const GeometryType &elementType) const\n-Definition: dgfwriter.hh:277\n-Dune::DGFWriter::GridView\n-GV GridView\n-type of grid view\n-Definition: dgfwriter.hh:51\n-Dune::DGFWriter::writeFooter\n-void writeFooter(std::ostream &gridout) const\n-Definition: dgfwriter.hh:237\n-Dune::DGFWriter::Grid\n-GridView::Grid Grid\n-type of underlying hierarchical grid\n-Definition: dgfwriter.hh:53\n-Dune::DGFWriter::writeVertices\n-auto writeVertices(std::ostream &gridout) const -> std::vector< Index >\n-Definition: dgfwriter.hh:244\n-Dune::DGFWriter::writeElements\n-void writeElements(std::ostream &gridout, const std::vector< Index >\n-&dgfIndices, const Args &... args) const\n-Definition: dgfwriter.hh:355\n-Dune::DGFWriter::writeBoundaries\n-void writeBoundaries(std::ostream &gridout, const std::vector< Index >\n-&dgfIndices) const\n-Definition: dgfwriter.hh:192\n-Dune::DGFWriter::writeCubes\n-void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices)\n-const\n-Definition: dgfwriter.hh:322\n-Dune::DGFWriter::writeSimplices\n-void writeSimplices(std::ostream &gridout, const std::vector< Index >\n-&dgfIndices) const\n-Definition: dgfwriter.hh:292\n-Dune::DGFWriter::writeHeader\n-void writeHeader(std::ostream &gridout) const\n-Definition: dgfwriter.hh:222\n-Dune::DGFWriter::elementsSeeds\n-auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std::\n-vector< ElementSeed >\n-Definition: dgfwriter.hh:203\n-grid.hh\n-Different resources needed by all grid implementations.\n+Dune::dgf::makeupcase\n+void makeupcase(std ::string &s)\n+Definition: basic.hh:24\n+Dune::dgf::BasicBlock\n+Definition: basic.hh:31\n+Dune::dgf::BasicBlock::reset\n+void reset()\n+Definition: basic.hh:51\n+Dune::dgf::BasicBlock::getnextline\n+bool getnextline()\n+Definition: basic.cc:94\n+Dune::dgf::BasicBlock::BasicBlock\n+BasicBlock(std::istream &in, const char *id)\n+Definition: basic.cc:18\n+Dune::dgf::BasicBlock::findtoken\n+bool findtoken(std ::string token)\n+Definition: basic.cc:123\n+Dune::dgf::BasicBlock::getnextentry\n+bool getnextentry(ENTRY &entry)\n+Definition: basic.hh:63\n+Dune::dgf::BasicBlock::id\n+const std::string & id() const\n+Definition: basic.hh:97\n+Dune::dgf::BasicBlock::noflines\n+int & noflines()\n+Definition: basic.hh:87\n+Dune::dgf::BasicBlock::operator<<\n+friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b)\n+Definition: basic.hh:103\n+Dune::dgf::BasicBlock::isempty\n+bool isempty()\n+Definition: basic.hh:82\n+Dune::dgf::BasicBlock::isactive\n+bool isactive()\n+Definition: basic.hh:77\n+Dune::dgf::BasicBlock::linenumber\n+int linenumber()\n+Definition: basic.hh:92\n+Dune::dgf::BasicBlock::line\n+std::stringstream line\n+Definition: basic.hh:47\n+Dune::dgf::BasicBlock::gettokenparam\n+bool gettokenparam(std ::string token, std ::string &entry)\n+Definition: basic.cc:104\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00851.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00851.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridparameter.hh File Reference\n+dune-grid: general.hh File Reference\n \n \n \n \n \n \n \n@@ -65,27 +65,26 @@\n
  • dune
  • grid
  • io
  • file
  • dgfparser
  • blocks
  • \n \n \n
    \n \n-
    gridparameter.hh File Reference
    \n+
    general.hh File Reference
    \n
    \n
    \n
    #include <iostream>
    \n-#include <string>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+#include <vector>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n

    \n Classes

    class  Dune::dgf::GridParameterBlock
     Common Grid parameters. More...
    class  Dune::dgf::GeneralBlock
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,22 +9,21 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Classes | Namespaces\n-gridparameter.hh File Reference\n+general.hh File Reference\n #include \n-#include \n+#include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::dgf::GridParameterBlock\n-\u00a0 Common Grid parameters. More...\n+class \u00a0Dune::dgf::GeneralBlock\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00851_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridparameter.hh Source File\n+dune-grid: general.hh Source File\n \n \n \n \n \n \n \n@@ -62,120 +62,89 @@\n \n \n \n
    \n-
    gridparameter.hh
    \n+
    general.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
    \n-
    6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
    \n+
    5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
    \n+
    6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
    \n
    7
    \n
    8#include <iostream>
    \n-
    9#include <string>
    \n+
    9#include <vector>
    \n
    10
    \n-\n+\n
    12
    \n
    13
    \n
    14namespace Dune
    \n
    15{
    \n
    16
    \n
    17 namespace dgf
    \n
    18 {
    \n-\n-
    34 : public BasicBlock
    \n-
    35 {
    \n-
    36 public:
    \n-
    37 typedef unsigned int Flags;
    \n-
    38
    \n-
    39 static const Flags foundName = 1 << 0;
    \n-
    40 static const Flags foundDumpFileName = 1 << 1;
    \n-
    41 static const Flags foundLongestEdge = 1 << 5;
    \n-
    42
    \n-
    43 protected:
    \n-
    44 Flags foundFlags_; // supportFlags, this block was created with
    \n-
    45 std::string name_; // name of the grid
    \n-
    46 std::string dumpFileName_; // name of the grid
    \n-
    47 bool markLongestEdge_; // Mark longest edge for AlbertaGrid
    \n-
    48
    \n-
    49 private:
    \n-
    50 // copy not implemented
    \n-\n-
    52
    \n-
    53 public:
    \n-
    55 GridParameterBlock ( std::istream &in );
    \n-
    56
    \n-
    58 const std::string &name ( const std::string &defaultValue ) const
    \n-
    59 {
    \n-
    60 if( (foundFlags_ & foundName) == 0 )
    \n-
    61 {
    \n-
    62 dwarn << "GridParameterBlock: Parameter 'name' not specified, "
    \n-
    63 << "defaulting to '" << defaultValue << "'." << std::endl;
    \n-
    64 return defaultValue;
    \n-
    65 }
    \n-
    66 else
    \n-
    67 return name_;
    \n-
    68 }
    \n-
    69
    \n-
    70 const std::string &dumpFileName ( ) const
    \n-
    71 {
    \n-
    72 if( (foundFlags_ & foundDumpFileName) != 0 )
    \n-
    73 {
    \n-
    74 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', "
    \n-
    75 << "dumping file to `" << dumpFileName_ << "'" << std::endl;
    \n-
    76 }
    \n-
    77 return dumpFileName_;
    \n-
    78 }
    \n-
    79
    \n-
    81 bool markLongestEdge () const
    \n-
    82 {
    \n-
    83 if( (foundFlags_ & foundLongestEdge) == 0 )
    \n-
    84 {
    \n-
    85 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, "
    \n-
    86 << "defaulting to 'ARBITRARY'." << std::endl;
    \n-
    87 }
    \n-
    88 return markLongestEdge_;
    \n-
    89 }
    \n-
    90
    \n-
    91 // some information
    \n-
    92 bool ok()
    \n-
    93 {
    \n-
    94 return true;
    \n-
    95 }
    \n-
    96 };
    \n-
    97
    \n-
    98
    \n-
    99 } // end namespace dgf
    \n-
    100
    \n-
    101} // end namespace Dune
    \n-
    102
    \n-
    103#endif
    \n-\n+
    19
    \n+
    20 // GeneralBlock
    \n+
    21 // ---------
    \n+
    22
    \n+\n+
    24 : public BasicBlock
    \n+
    25 {
    \n+
    26 unsigned int nofvtx;
    \n+
    27 int dimgrid;
    \n+
    28 bool goodline; // active line describes a vertex
    \n+
    29 std :: vector< unsigned int > map; // active vertex
    \n+
    30 int nofparams;
    \n+
    31 int vtxoffset;
    \n+
    32
    \n+
    33 public:
    \n+
    34 GeneralBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
    \n+
    35
    \n+
    36 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
    \n+
    37 std :: vector< std :: vector< double > > &params,
    \n+
    38 int &nofp );
    \n+
    39
    \n+
    40 // some information
    \n+
    41 bool ok ()
    \n+
    42 {
    \n+
    43 return goodline;
    \n+
    44 }
    \n+
    45
    \n+\n+
    47 {
    \n+
    48 return noflines();
    \n+
    49 }
    \n+
    50
    \n+
    51 private:
    \n+
    52 // get the dimension of the grid
    \n+
    53 int getDimGrid ();
    \n+
    54 // get next simplex
    \n+
    55 bool next ( std :: vector< unsigned int > &simplex,
    \n+
    56 std :: vector< double > &param );
    \n+
    57 };
    \n+
    58
    \n+
    59 } // end namespace dgf
    \n+
    60
    \n+
    61} // end namespace Dune
    \n+
    62
    \n+
    63#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: basic.hh:31
    \n-
    Common Grid parameters.
    Definition: gridparameter.hh:35
    \n-
    static const Flags foundDumpFileName
    Definition: gridparameter.hh:40
    \n-
    const std::string & dumpFileName() const
    Definition: gridparameter.hh:70
    \n-
    static const Flags foundName
    Definition: gridparameter.hh:39
    \n-
    GridParameterBlock(std::istream &in)
    constructor: read commmon parameters
    \n-
    unsigned int Flags
    Definition: gridparameter.hh:37
    \n-
    std::string dumpFileName_
    Definition: gridparameter.hh:46
    \n-
    bool ok()
    Definition: gridparameter.hh:92
    \n-
    Flags foundFlags_
    Definition: gridparameter.hh:44
    \n-
    const std::string & name(const std::string &defaultValue) const
    return the name of the grid
    Definition: gridparameter.hh:58
    \n-
    std::string name_
    Definition: gridparameter.hh:45
    \n-
    bool markLongestEdge() const
    returns true if longest edge should be marked for AlbertaGrid
    Definition: gridparameter.hh:81
    \n-
    static const Flags foundLongestEdge
    Definition: gridparameter.hh:41
    \n-
    bool markLongestEdge_
    Definition: gridparameter.hh:47
    \n+
    int & noflines()
    Definition: basic.hh:87
    \n+
    Definition: general.hh:25
    \n+
    GeneralBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
    Definition: general.cc:19
    \n+
    int nofsimplex()
    Definition: general.hh:46
    \n+
    int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
    Definition: general.cc:101
    \n+
    bool ok()
    Definition: general.hh:41
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,149 +8,101 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-gridparameter.hh\n+general.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH\n- 6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH\n+ 5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH\n+ 6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH\n 7\n 8#include \n- 9#include \n+ 9#include \n 10\n 11#include \n 12\n 13\n 14namespace Dune\n 15{\n 16\n 17 namespace dgf\n 18 {\n-33 class GridParameterBlock\n- 34 : public BasicBlock\n- 35 {\n- 36 public:\n-37 typedef unsigned int Flags;\n- 38\n-39 static const Flags foundName = 1 << 0;\n-40 static const Flags foundDumpFileName = 1 << 1;\n-41 static const Flags foundLongestEdge = 1 << 5;\n- 42\n- 43 protected:\n-44 Flags foundFlags_; // supportFlags, this block was created with\n-45 std::string name_; // name of the grid\n-46 std::string dumpFileName_; // name of the grid\n-47 bool markLongestEdge_; // Mark longest edge for AlbertaGrid\n- 48\n- 49 private:\n- 50 // copy not implemented\n- 51 GridParameterBlock(const GridParameterBlock&);\n- 52\n- 53 public:\n-55 GridParameterBlock ( std::istream &in );\n- 56\n-58 const std::string &name ( const std::string &defaultValue ) const\n- 59 {\n- 60 if( (foundFlags_ & foundName) == 0 )\n- 61 {\n- 62 dwarn << \"GridParameterBlock: Parameter 'name' not specified, \"\n- 63 << \"defaulting to '\" << defaultValue << \"'.\" << std::endl;\n- 64 return defaultValue;\n- 65 }\n- 66 else\n- 67 return name_;\n- 68 }\n- 69\n-70 const std::string &dumpFileName ( ) const\n- 71 {\n- 72 if( (foundFlags_ & foundDumpFileName) != 0 )\n- 73 {\n- 74 dwarn << \"GridParameterBlock: found Parameter 'dumpfilename', \"\n- 75 << \"dumping file to `\" << dumpFileName_ << \"'\" << std::endl;\n- 76 }\n- 77 return dumpFileName_;\n- 78 }\n- 79\n-81 bool markLongestEdge () const\n- 82 {\n- 83 if( (foundFlags_ & foundLongestEdge) == 0 )\n- 84 {\n- 85 dwarn << \"GridParameterBlock: Parameter 'refinementedge' not specified, \"\n- 86 << \"defaulting to 'ARBITRARY'.\" << std::endl;\n- 87 }\n- 88 return markLongestEdge_;\n- 89 }\n- 90\n- 91 // some information\n-92 bool ok()\n- 93 {\n- 94 return true;\n- 95 }\n- 96 };\n- 97\n- 98\n- 99 } // end namespace dgf\n- 100\n- 101} // end namespace Dune\n- 102\n- 103#endif\n+ 19\n+ 20 // GeneralBlock\n+ 21 // ---------\n+ 22\n+23 class GeneralBlock\n+ 24 : public BasicBlock\n+ 25 {\n+ 26 unsigned int nofvtx;\n+ 27 int dimgrid;\n+ 28 bool goodline; // active line describes a vertex\n+ 29 std :: vector< unsigned int > map; // active vertex\n+ 30 int nofparams;\n+ 31 int vtxoffset;\n+ 32\n+ 33 public:\n+ 34 GeneralBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int\n+&pdimgrid );\n+ 35\n+ 36 int get ( std :: vector< std :: vector< unsigned int> > &simplex,\n+ 37 std :: vector< std :: vector< double > > ¶ms,\n+ 38 int &nofp );\n+ 39\n+ 40 // some information\n+41 bool ok ()\n+ 42 {\n+ 43 return goodline;\n+ 44 }\n+ 45\n+46 int nofsimplex ()\n+ 47 {\n+ 48 return noflines();\n+ 49 }\n+ 50\n+ 51 private:\n+ 52 // get the dimension of the grid\n+ 53 int getDimGrid ();\n+ 54 // get next simplex\n+ 55 bool next ( std :: vector< unsigned int > &simplex,\n+ 56 std :: vector< double > ¶m );\n+ 57 };\n+ 58\n+ 59 } // end namespace dgf\n+ 60\n+ 61} // end namespace Dune\n+ 62\n+ 63#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH\n basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n-Dune::dgf::GridParameterBlock\n-Common Grid parameters.\n-Definition: gridparameter.hh:35\n-Dune::dgf::GridParameterBlock::foundDumpFileName\n-static const Flags foundDumpFileName\n-Definition: gridparameter.hh:40\n-Dune::dgf::GridParameterBlock::dumpFileName\n-const std::string & dumpFileName() const\n-Definition: gridparameter.hh:70\n-Dune::dgf::GridParameterBlock::foundName\n-static const Flags foundName\n-Definition: gridparameter.hh:39\n-Dune::dgf::GridParameterBlock::GridParameterBlock\n-GridParameterBlock(std::istream &in)\n-constructor: read commmon parameters\n-Dune::dgf::GridParameterBlock::Flags\n-unsigned int Flags\n-Definition: gridparameter.hh:37\n-Dune::dgf::GridParameterBlock::dumpFileName_\n-std::string dumpFileName_\n-Definition: gridparameter.hh:46\n-Dune::dgf::GridParameterBlock::ok\n+Dune::dgf::BasicBlock::noflines\n+int & noflines()\n+Definition: basic.hh:87\n+Dune::dgf::GeneralBlock\n+Definition: general.hh:25\n+Dune::dgf::GeneralBlock::GeneralBlock\n+GeneralBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)\n+Definition: general.cc:19\n+Dune::dgf::GeneralBlock::nofsimplex\n+int nofsimplex()\n+Definition: general.hh:46\n+Dune::dgf::GeneralBlock::get\n+int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector<\n+std ::vector< double > > ¶ms, int &nofp)\n+Definition: general.cc:101\n+Dune::dgf::GeneralBlock::ok\n bool ok()\n-Definition: gridparameter.hh:92\n-Dune::dgf::GridParameterBlock::foundFlags_\n-Flags foundFlags_\n-Definition: gridparameter.hh:44\n-Dune::dgf::GridParameterBlock::name\n-const std::string & name(const std::string &defaultValue) const\n-return the name of the grid\n-Definition: gridparameter.hh:58\n-Dune::dgf::GridParameterBlock::name_\n-std::string name_\n-Definition: gridparameter.hh:45\n-Dune::dgf::GridParameterBlock::markLongestEdge\n-bool markLongestEdge() const\n-returns true if longest edge should be marked for AlbertaGrid\n-Definition: gridparameter.hh:81\n-Dune::dgf::GridParameterBlock::foundLongestEdge\n-static const Flags foundLongestEdge\n-Definition: gridparameter.hh:41\n-Dune::dgf::GridParameterBlock::markLongestEdge_\n-bool markLongestEdge_\n-Definition: gridparameter.hh:47\n+Definition: general.hh:41\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00854.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00854.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundaryseg.cc File Reference\n+dune-grid: dim.hh File Reference\n \n \n \n \n \n \n \n@@ -63,21 +63,29 @@\n \n \n
    \n \n-
    boundaryseg.cc File Reference
    \n+
    dim.hh File Reference
    \n
    \n
    \n-
    #include <config.h>
    \n-#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>
    \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+
    #include <iostream>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+

    \n+Classes

    class  Dune::dgf::DimBlock
     
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,18 +8,22 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Namespaces\n-boundaryseg.cc File Reference\n-#include \n-#include \n+Classes | Namespaces\n+dim.hh File Reference\n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::dgf::DimBlock\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00857.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00857.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: general.cc File Reference\n+dune-grid: interval.hh File Reference\n \n \n \n \n \n \n \n@@ -63,28 +63,46 @@\n \n \n
    \n \n-
    general.cc File Reference
    \n+Classes |\n+Namespaces |\n+Functions
    \n+
    interval.hh File Reference
    \n \n
    \n-
    #include <config.h>
    \n-#include <dune/grid/io/file/dgfparser/blocks/general.hh>
    \n-

    \n Namespaces

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

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+\n+\n+

    \n+Classes

    struct  Dune::dgf::IntervalBlock
     
    struct  Dune::dgf::IntervalBlock::Interval
     
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n+\n+\n+\n

    \n+Functions

    std::ostream & Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::Interval &interval)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,20 +8,32 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Namespaces\n-general.cc File Reference\n-#include \n-#include \n+Classes | Namespaces | Functions\n+interval.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+struct \u00a0Dune::dgf::IntervalBlock\n+\u00a0\n+struct \u00a0Dune::dgf::IntervalBlock::Interval\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n+ Functions\n+std::ostream &\u00a0Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::\n+ Interval &interval)\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00860.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00860.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dim.cc File Reference\n+dune-grid: polyhedron.hh File Reference\n \n \n \n \n \n \n \n@@ -63,21 +63,29 @@\n \n \n
    \n \n-
    dim.cc File Reference
    \n+
    polyhedron.hh File Reference
    \n
    \n
    \n-
    #include <config.h>
    \n-#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
    \n-
    \n+
    #include <algorithm>
    \n+#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+

    \n+Classes

    struct  Dune::dgf::PolyhedronBlock
     
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,18 +8,22 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Namespaces\n-dim.cc File Reference\n-#include \n-#include \n+Classes | Namespaces\n+polyhedron.hh File Reference\n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+struct \u00a0Dune::dgf::PolyhedronBlock\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00863.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00863.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: periodicfacetrans.cc File Reference\n+dune-grid: boundarydom.cc File Reference\n \n \n \n \n \n \n \n@@ -64,19 +64,19 @@\n \n \n \n
    \n \n-
    periodicfacetrans.cc File Reference
    \n+
    boundarydom.cc File Reference
    \n
    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,17 +9,17 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Namespaces\n-periodicfacetrans.cc File Reference\n+boundarydom.cc File Reference\n #include \n-#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00866.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00866.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: projection.cc File Reference\n+dune-grid: simplex.cc File Reference\n \n \n \n \n \n \n \n@@ -63,71 +63,28 @@\n \n \n
    \n \n-
    projection.cc File Reference
    \n+Namespaces
    \n+
    simplex.cc File Reference
    \n \n
    \n
    #include <config.h>
    \n-#include <dune/common/math.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/projection.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-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
     
    \n \n \n \n \n \n \n-\n-\n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    namespace  Dune::dgf::Expr
     
    \n-\n-\n-\n

    \n-Functions

    std::ostream & Dune::dgf::operator<< (std::ostream &out, const ProjectionBlock::Token &token)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,58 +8,20 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces | Functions\n-projection.cc File Reference\n+Namespaces\n+simplex.cc File Reference\n #include \n-#include \n-#include \n- Classes\n-struct \u00a0Dune::dgf::Expr::ConstantExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::VariableExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::FunctionCallExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::VectorExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::BracketExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::MinusExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::NormExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::SqrtExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::SinExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::CosExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::PowerExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::SumExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::DifferenceExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::ProductExpression\n-\u00a0\n-struct \u00a0Dune::dgf::Expr::QuotientExpression\n-\u00a0\n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n-namespace \u00a0Dune::dgf::Expr\n-\u00a0\n- Functions\n-std::ostream &\u00a0Dune::dgf::operator<< (std::ostream &out, const\n- ProjectionBlock::Token &token)\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00869.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00869.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: periodicfacetrans.hh File Reference\n+dune-grid: simplexgeneration.cc File Reference\n \n \n \n \n \n \n \n@@ -63,47 +63,28 @@\n \n \n
    \n \n-
    periodicfacetrans.hh File Reference
    \n+Namespaces
    \n+
    simplexgeneration.cc File Reference
    \n \n
    \n-
    #include <iostream>
    \n-#include <vector>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-Classes

    struct  Dune::dgf::PeriodicFaceTransformationBlock
     
    class  Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >
     
    struct  Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation
     
    \n+
    \n \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n-\n-\n-\n

    \n-Functions

    std::ostream & Dune::dgf::operator<< (std::ostream &out, const PeriodicFaceTransformationBlock::AffineTransformation &trafo)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,33 +8,20 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces | Functions\n-periodicfacetrans.hh File Reference\n-#include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-struct \u00a0Dune::dgf::PeriodicFaceTransformationBlock\n-\u00a0\n- class \u00a0Dune::dgf::PeriodicFaceTransformationBlock::Matrix<_T_>\n-\u00a0\n-struct \u00a0Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation\n-\u00a0\n+Namespaces\n+simplexgeneration.cc File Reference\n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n- Functions\n-std::ostream &\u00a0Dune::dgf::operator<< (std::ostream &out, const\n- PeriodicFaceTransformationBlock::AffineTransformation &trafo)\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00872.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00872.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundaryseg.hh File Reference\n+dune-grid: simplex.hh File Reference\n \n \n \n \n \n \n \n@@ -65,30 +65,26 @@\n
  • dune
  • grid
  • io
  • file
  • dgfparser
  • blocks
  • \n \n \n
    \n \n-
    boundaryseg.hh File Reference
    \n+
    simplex.hh File Reference
    \n
    \n
    \n-
    #include <cassert>
    \n-#include <iostream>
    \n-#include <string>
    \n+
    #include <iostream>
    \n #include <vector>
    \n-#include <map>
    \n-#include <dune/grid/io/file/dgfparser/parser.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n \n

    \n Classes

    class  Dune::dgf::BoundarySegBlock
    class  Dune::dgf::SimplexBlock
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,25 +9,21 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Classes | Namespaces\n-boundaryseg.hh File Reference\n-#include \n+simplex.hh File Reference\n #include \n-#include \n #include \n-#include \n-#include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::dgf::BoundarySegBlock\n+class \u00a0Dune::dgf::SimplexBlock\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00872_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundaryseg.hh Source File\n+dune-grid: simplex.hh Source File\n \n \n \n \n \n \n \n@@ -62,113 +62,93 @@\n \n \n \n
    \n-
    boundaryseg.hh
    \n+
    simplex.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH
    \n-
    6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH
    \n+
    5#ifndef DUNE_DGF_SIMPLEXBLOCK_HH
    \n+
    6#define DUNE_DGF_SIMPLEXBLOCK_HH
    \n
    7
    \n-
    8#include <cassert>
    \n-
    9#include <iostream>
    \n-
    10#include <string>
    \n-
    11#include <vector>
    \n-
    12#include <map>
    \n-
    13
    \n-\n-\n-
    16
    \n-
    17
    \n-
    18namespace Dune
    \n-
    19{
    \n+
    8#include <iostream>
    \n+
    9#include <vector>
    \n+
    10
    \n+\n+
    12
    \n+
    13namespace Dune
    \n+
    14{
    \n+
    15
    \n+
    16 namespace dgf
    \n+
    17 {
    \n+
    18 // SimplexBlock
    \n+
    19 // ------------
    \n
    20
    \n-
    21 namespace dgf
    \n-
    22 {
    \n-\n-
    24 : public BasicBlock
    \n-
    25 {
    \n-
    26 int dimworld; // the dimension of the vertices (is given from user)
    \n-
    27 bool goodline; // active line describes a vertex
    \n-
    28 std :: vector< unsigned int > p; // active vertex
    \n-
    29 int bndid;
    \n-
    30 typedef DGFBoundaryParameter::type BoundaryParameter;
    \n-
    31 BoundaryParameter parameter;
    \n-
    32 bool simplexgrid;
    \n-
    33
    \n-
    34 public:
    \n-\n-
    36 typedef std::pair < int, BoundaryParameter > BndParam;
    \n-
    37
    \n-
    38 // initialize vertex block and get first vertex
    \n-
    39 BoundarySegBlock ( std :: istream &in, int pnofvtx,
    \n-
    40 int pdimworld, bool psimplexgrid );
    \n-
    41
    \n-
    42 // some information
    \n-
    43 int get( std :: map< EntityKey, BndParam > & facemap,
    \n-
    44 bool fixedsize,
    \n-
    45 int vtxoffset
    \n-
    46 );
    \n-
    47
    \n-
    48 bool ok()
    \n-
    49 {
    \n-
    50 return goodline;
    \n-
    51 }
    \n-
    52
    \n-\n-
    54 {
    \n-
    55 return noflines();
    \n-
    56 }
    \n-
    57
    \n-
    58 private:
    \n-
    59 bool next();
    \n-
    60
    \n-
    61 // get coordinates of active vertex
    \n-
    62 int operator[] (int i)
    \n-
    63 {
    \n-
    64 assert(ok());
    \n-
    65 assert(linenumber()>=0);
    \n-
    66 assert(0<=i && i<dimworld+1);
    \n-
    67 return p[i];
    \n-
    68 }
    \n-
    69
    \n-
    70 int size()
    \n-
    71 {
    \n-
    72 return p.size();
    \n-
    73 }
    \n-
    74
    \n-
    75 };
    \n-
    76
    \n-
    77 } // end namespace dgf
    \n-
    78
    \n-
    79} // end namespace Dune
    \n-
    80
    \n-
    81#endif
    \n-\n-\n+\n+
    22 : public BasicBlock
    \n+
    23 {
    \n+
    24 unsigned int nofvtx;
    \n+
    25 int vtxoffset;
    \n+
    26 int dimgrid;
    \n+
    27 bool goodline; // active line describes a vertex
    \n+
    28 int nofparams; // nof parameters
    \n+
    29
    \n+
    30 public:
    \n+
    31 SimplexBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
    \n+
    32
    \n+
    33 int get ( std :: vector< std :: vector< unsigned int > > &simplex,
    \n+
    34 std :: vector< std :: vector< double > > &params,
    \n+
    35 int &nofp );
    \n+
    36
    \n+
    37 // cubes -> simplex
    \n+
    38 static int
    \n+
    39 cube2simplex ( std :: vector< std :: vector< double > > &vtx,
    \n+
    40 std :: vector< std :: vector< unsigned int > > &elements,
    \n+
    41 std :: vector< std :: vector< double > > &params );
    \n+
    42
    \n+
    43 // some information
    \n+
    44 bool ok ()
    \n+
    45 {
    \n+
    46 return goodline;
    \n+
    47 }
    \n+
    48
    \n+\n+
    50 {
    \n+
    51 return noflines();
    \n+
    52 }
    \n+
    53
    \n+
    54 private:
    \n+
    55 // get the dimension of the grid
    \n+
    56 int getDimGrid ();
    \n+
    57 // get next simplex
    \n+
    58 bool next ( std :: vector< unsigned int > &simplex,
    \n+
    59 std :: vector< double > &param );
    \n+
    60 };
    \n+
    61
    \n+
    62 } // end namespace dgf
    \n+
    63
    \n+
    64} // end namespace Dune
    \n+
    65
    \n+
    66#endif
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: basic.hh:31
    \n
    int & noflines()
    Definition: basic.hh:87
    \n-
    int linenumber()
    Definition: basic.hh:92
    \n-
    Definition: boundaryseg.hh:25
    \n-
    bool ok()
    Definition: boundaryseg.hh:48
    \n-
    int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int vtxoffset)
    Definition: boundaryseg.cc:35
    \n-
    std::pair< int, BoundaryParameter > BndParam
    Definition: boundaryseg.hh:36
    \n-
    BoundarySegBlock(std ::istream &in, int pnofvtx, int pdimworld, bool psimplexgrid)
    Definition: boundaryseg.cc:18
    \n-
    DGFEntityKey< unsigned int > EntityKey
    Definition: boundaryseg.hh:35
    \n-
    int nofbound()
    Definition: boundaryseg.hh:53
    \n-\n-
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n+
    Definition: simplex.hh:23
    \n+
    static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector< double > > &params)
    Definition: simplex.cc:146
    \n+
    int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
    Definition: simplex.cc:69
    \n+
    SimplexBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
    Definition: simplex.cc:19
    \n+
    int nofsimplex()
    Definition: simplex.hh:49
    \n+
    bool ok()
    Definition: simplex.hh:44
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,134 +8,109 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-boundaryseg.hh\n+simplex.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH\n- 6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH\n+ 5#ifndef DUNE_DGF_SIMPLEXBLOCK_HH\n+ 6#define DUNE_DGF_SIMPLEXBLOCK_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13\n- 14#include \n- 15#include \n- 16\n- 17\n- 18namespace Dune\n- 19{\n+ 8#include \n+ 9#include \n+ 10\n+ 11#include \n+ 12\n+ 13namespace Dune\n+ 14{\n+ 15\n+ 16 namespace dgf\n+ 17 {\n+ 18 // SimplexBlock\n+ 19 // ------------\n 20\n- 21 namespace dgf\n- 22 {\n-23 class BoundarySegBlock\n- 24 : public BasicBlock\n- 25 {\n- 26 int dimworld; // the dimension of the vertices (is given from user)\n+21 class SimplexBlock\n+ 22 : public BasicBlock\n+ 23 {\n+ 24 unsigned int nofvtx;\n+ 25 int vtxoffset;\n+ 26 int dimgrid;\n 27 bool goodline; // active line describes a vertex\n- 28 std :: vector< unsigned int > p; // active vertex\n- 29 int bndid;\n- 30 typedef DGFBoundaryParameter::type BoundaryParameter;\n- 31 BoundaryParameter parameter;\n- 32 bool simplexgrid;\n- 33\n- 34 public:\n-35 typedef DGFEntityKey<_unsigned_int> EntityKey;\n-36 typedef std::pair < int, BoundaryParameter > BndParam;\n- 37\n- 38 // initialize vertex block and get first vertex\n- 39 BoundarySegBlock ( std :: istream &in, int pnofvtx,\n- 40 int pdimworld, bool psimplexgrid );\n- 41\n- 42 // some information\n- 43 int get( std :: map< EntityKey, BndParam > & facemap,\n- 44 bool fixedsize,\n- 45 int vtxoffset\n- 46 );\n- 47\n-48 bool ok()\n- 49 {\n- 50 return goodline;\n- 51 }\n- 52\n-53 int nofbound()\n- 54 {\n- 55 return noflines();\n- 56 }\n- 57\n- 58 private:\n- 59 bool next();\n- 60\n- 61 // get coordinates of active vertex\n- 62 int operator[] (int i)\n- 63 {\n- 64 assert(ok());\n- 65 assert(linenumber()>=0);\n- 66 assert(0<=i && i > &simplex,\n+ 34 std :: vector< std :: vector< double > > ¶ms,\n+ 35 int &nofp );\n+ 36\n+ 37 // cubes -> simplex\n+ 38 static int\n+ 39 cube2simplex ( std :: vector< std :: vector< double > > &vtx,\n+ 40 std :: vector< std :: vector< unsigned int > > &elements,\n+ 41 std :: vector< std :: vector< double > > ¶ms );\n+ 42\n+ 43 // some information\n+44 bool ok ()\n+ 45 {\n+ 46 return goodline;\n+ 47 }\n+ 48\n+49 int nofsimplex ()\n+ 50 {\n+ 51 return noflines();\n+ 52 }\n+ 53\n+ 54 private:\n+ 55 // get the dimension of the grid\n+ 56 int getDimGrid ();\n+ 57 // get next simplex\n+ 58 bool next ( std :: vector< unsigned int > &simplex,\n+ 59 std :: vector< double > ¶m );\n+ 60 };\n+ 61\n+ 62 } // end namespace dgf\n+ 63\n+ 64} // end namespace Dune\n+ 65\n+ 66#endif\n basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n Dune::dgf::BasicBlock::noflines\n int & noflines()\n Definition: basic.hh:87\n-Dune::dgf::BasicBlock::linenumber\n-int linenumber()\n-Definition: basic.hh:92\n-Dune::dgf::BoundarySegBlock\n-Definition: boundaryseg.hh:25\n-Dune::dgf::BoundarySegBlock::ok\n+Dune::dgf::SimplexBlock\n+Definition: simplex.hh:23\n+Dune::dgf::SimplexBlock::cube2simplex\n+static int cube2simplex(std ::vector< std ::vector< double > > &vtx, std ::\n+vector< std ::vector< unsigned int > > &elements, std ::vector< std ::vector<\n+double > > ¶ms)\n+Definition: simplex.cc:146\n+Dune::dgf::SimplexBlock::get\n+int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector<\n+std ::vector< double > > ¶ms, int &nofp)\n+Definition: simplex.cc:69\n+Dune::dgf::SimplexBlock::SimplexBlock\n+SimplexBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)\n+Definition: simplex.cc:19\n+Dune::dgf::SimplexBlock::nofsimplex\n+int nofsimplex()\n+Definition: simplex.hh:49\n+Dune::dgf::SimplexBlock::ok\n bool ok()\n-Definition: boundaryseg.hh:48\n-Dune::dgf::BoundarySegBlock::get\n-int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int\n-vtxoffset)\n-Definition: boundaryseg.cc:35\n-Dune::dgf::BoundarySegBlock::BndParam\n-std::pair< int, BoundaryParameter > BndParam\n-Definition: boundaryseg.hh:36\n-Dune::dgf::BoundarySegBlock::BoundarySegBlock\n-BoundarySegBlock(std ::istream &in, int pnofvtx, int pdimworld, bool\n-psimplexgrid)\n-Definition: boundaryseg.cc:18\n-Dune::dgf::BoundarySegBlock::EntityKey\n-DGFEntityKey< unsigned int > EntityKey\n-Definition: boundaryseg.hh:35\n-Dune::dgf::BoundarySegBlock::nofbound\n-int nofbound()\n-Definition: boundaryseg.hh:53\n-Dune::DGFEntityKey<_unsigned_int_>\n-Dune::DGFBoundaryParameter::type\n-std::string type\n-type of additional boundary parameters\n-Definition: parser.hh:25\n+Definition: simplex.hh:44\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00875.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00875.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: simplex.cc File Reference\n+dune-grid: boundaryseg.hh File Reference\n \n \n \n \n \n \n \n@@ -63,21 +63,34 @@\n \n \n
    \n \n-
    simplex.cc File Reference
    \n+
    boundaryseg.hh File Reference
    \n
    \n
    \n-
    #include <config.h>
    \n-#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
    \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+
    #include <cassert>
    \n+#include <iostream>
    \n+#include <string>
    \n+#include <vector>
    \n+#include <map>
    \n+#include <dune/grid/io/file/dgfparser/parser.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+

    \n+Classes

    class  Dune::dgf::BoundarySegBlock
     
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,18 +8,27 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Namespaces\n-simplex.cc File Reference\n-#include \n-#include \n+Classes | Namespaces\n+boundaryseg.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::dgf::BoundarySegBlock\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00878.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00878.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: basic.cc File Reference\n+dune-grid: boundaryseg.cc File Reference\n \n \n \n \n \n \n \n@@ -64,19 +64,19 @@\n \n \n \n
    \n \n-
    basic.cc File Reference
    \n+
    boundaryseg.cc File Reference
    \n
    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,17 +9,17 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Namespaces\n-basic.cc File Reference\n+boundaryseg.cc File Reference\n #include \n-#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00881.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00881.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: general.hh File Reference\n+dune-grid: interval.cc File Reference\n \n \n \n \n \n \n \n@@ -63,30 +63,21 @@\n \n \n
    \n \n-
    general.hh File Reference
    \n+
    interval.cc File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n-#include <vector>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
    \n-\n-\n-\n-

    \n-Classes

    class  Dune::dgf::GeneralBlock
     
    \n+
    #include <config.h>
    \n+#include <dune/grid/io/file/dgfparser/blocks/interval.hh>
    \n+
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,23 +8,18 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces\n-general.hh File Reference\n-#include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::dgf::GeneralBlock\n-\u00a0\n+Namespaces\n+interval.cc File Reference\n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00884.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00884.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundarydom.hh File Reference\n+dune-grid: periodicfacetrans.hh File Reference\n \n \n \n \n \n \n \n@@ -64,42 +64,46 @@\n \n \n \n
    \n \n-
    boundarydom.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    periodicfacetrans.hh File Reference
    \n \n
    \n
    #include <iostream>
    \n-#include <string>
    \n #include <vector>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n-#include <dune/grid/io/file/dgfparser/parser.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n-\n+\n \n-\n+\n \n-\n+\n \n

    \n Classes

    struct  Dune::dgf::DomainData
    struct  Dune::dgf::PeriodicFaceTransformationBlock
     
    struct  Dune::dgf::Domain
    class  Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >
     
    class  Dune::dgf::BoundaryDomBlock
    struct  Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation
     
    \n \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n+\n+\n+\n

    \n+Functions

    std::ostream & Dune::dgf::operator<< (std::ostream &out, const PeriodicFaceTransformationBlock::AffineTransformation &trafo)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,31 +8,33 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces\n-boundarydom.hh File Reference\n+Classes | Namespaces | Functions\n+periodicfacetrans.hh File Reference\n #include \n-#include \n #include \n #include \n-#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::dgf::DomainData\n+struct \u00a0Dune::dgf::PeriodicFaceTransformationBlock\n \u00a0\n-struct \u00a0Dune::dgf::Domain\n+ class \u00a0Dune::dgf::PeriodicFaceTransformationBlock::Matrix<_T_>\n \u00a0\n- class \u00a0Dune::dgf::BoundaryDomBlock\n+struct \u00a0Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n+ Functions\n+std::ostream &\u00a0Dune::dgf::operator<< (std::ostream &out, const\n+ PeriodicFaceTransformationBlock::AffineTransformation &trafo)\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00884_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundarydom.hh Source File\n+dune-grid: periodicfacetrans.hh Source File\n \n \n \n \n \n \n \n@@ -62,364 +62,163 @@\n \n \n
    \n
    \n-
    boundarydom.hh
    \n+
    periodicfacetrans.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH
    \n-
    6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH
    \n+
    5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
    \n+
    6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
    \n
    7
    \n
    8#include <iostream>
    \n-
    9#include <string>
    \n-
    10#include <vector>
    \n-
    11
    \n-\n-\n-
    14
    \n-
    15
    \n-
    16namespace Dune
    \n-
    17{
    \n-
    18
    \n-
    19 namespace dgf
    \n-
    20 {
    \n-
    21
    \n-\n-
    23 {
    \n-\n-
    25
    \n-\n-
    27 : id_( 0 ),
    \n-
    28 parameter_( DGFBoundaryParameter::defaultValue() ),
    \n-
    29 defaultData_( false )
    \n-
    30 { }
    \n-
    31
    \n-\n+
    9#include <vector>
    \n+
    10
    \n+\n+
    12
    \n+
    13
    \n+
    14namespace Dune
    \n+
    15{
    \n+
    16
    \n+
    17 namespace dgf
    \n+
    18 {
    \n+
    19
    \n+
    20 // PeriodicFaceTransformationBlock
    \n+
    21 // -------------------------------
    \n+
    22
    \n+\n+
    24 : public BasicBlock
    \n+
    25 {
    \n+
    26 template< class T >
    \n+
    27 class Matrix;
    \n+
    28
    \n+\n+
    30
    \n+
    31 private:
    \n+
    32 std::vector< AffineTransformation > transformations_;
    \n
    33
    \n-
    34 // constructor
    \n-
    35 DomainData ( int id, BoundaryParameter parameter, bool defaultData = false )
    \n-
    36 : id_( id ),
    \n-
    37 parameter_( parameter ),
    \n-
    38 defaultData_( defaultData )
    \n-
    39 { }
    \n+
    34 // copy not implemented
    \n+\n+
    36
    \n+
    37 public:
    \n+
    38 // initialize block and get dimension of world
    \n+
    39 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );
    \n
    40
    \n-
    41 // return id
    \n-
    42 int id () const
    \n-
    43 {
    \n-
    44 return id_;
    \n+
    41 const AffineTransformation &transformation ( int i ) const
    \n+
    42 {
    \n+
    43 assert( i < numTransformations() );
    \n+
    44 return transformations_[ i ];
    \n
    45 }
    \n
    46
    \n-
    47 // return true, if additional parameters given
    \n-
    48 bool hasParameter () const
    \n-
    49 {
    \n-
    50 return (!parameter_.empty());
    \n-
    51 }
    \n-
    52
    \n-
    53 // return additional parameters
    \n-\n-
    55 {
    \n-
    56 return parameter_;
    \n-
    57 }
    \n-
    58
    \n-
    59 // reset data
    \n-
    60 void reset ( int id, BoundaryParameter parameter, bool defaultData = false )
    \n-
    61 {
    \n-
    62 id_ = id;
    \n-
    63 parameter_ = parameter;
    \n-
    64 defaultData_ = defaultData;
    \n-
    65 }
    \n+
    47 int numTransformations () const
    \n+
    48 {
    \n+
    49 return transformations_.size();
    \n+
    50 }
    \n+
    51
    \n+
    52 private:
    \n+
    53 void match ( char what );
    \n+
    54 };
    \n+
    55
    \n+
    56
    \n+
    57 // PeriodicFaceTransformationBlock::Matrix
    \n+
    58 // ---------------------------------------
    \n+
    59
    \n+
    60 template< class T >
    \n+\n+
    62 {
    \n+
    63 int rows_;
    \n+
    64 int cols_;
    \n+
    65 std::vector< T > fields_;
    \n
    66
    \n-
    67 // returns true if data origins from default boundary domain
    \n-
    68 bool isDefault () const
    \n-
    69 {
    \n-
    70 return defaultData_;
    \n-
    71 }
    \n-
    72
    \n-
    73 friend std::ostream & operator<< ( std :: ostream & os, const DomainData & ddata )
    \n-
    74 {
    \n-
    75 os << "domain data: id = " << ddata.id();
    \n-
    76 if( ddata.hasParameter() )
    \n-
    77 os << ", parameter = " << ddata.parameter();
    \n-
    78 return os;
    \n-
    79 }
    \n-
    80
    \n-
    81 private:
    \n-
    82 int id_;
    \n-
    83 BoundaryParameter parameter_;
    \n-
    84 bool defaultData_;
    \n-
    85
    \n-
    86 }; // end struct DomainData
    \n-
    87
    \n+
    67 public:
    \n+
    68 Matrix ( int rows, int cols )
    \n+
    69 : rows_( rows ),
    \n+
    70 cols_( cols ),
    \n+
    71 fields_( rows * cols )
    \n+
    72 {}
    \n+
    73
    \n+
    74 const T &operator() ( int i, int j ) const
    \n+
    75 {
    \n+
    76 return fields_[ i * cols_ + j ];
    \n+
    77 }
    \n+
    78
    \n+
    79 T &operator() ( int i, int j )
    \n+
    80 {
    \n+
    81 return fields_[ i * cols_ + j ];
    \n+
    82 }
    \n+
    83
    \n+
    84 int rows () const
    \n+
    85 {
    \n+
    86 return rows_;
    \n+
    87 }
    \n
    88
    \n-
    89 struct Domain
    \n-
    90 {
    \n-
    91 // dimension of world coordinates
    \n-
    92 const int dimensionworld;
    \n-
    93
    \n-\n+
    89 int cols () const
    \n+
    90 {
    \n+
    91 return cols_;
    \n+
    92 }
    \n+
    93 };
    \n+
    94
    \n
    95
    \n-
    96 // constructor
    \n-
    97 Domain( std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter & parameter )
    \n-
    98 : dimensionworld( p1.size() ),
    \n-
    99 left_( p1 ),
    \n-
    100 right_( p2 ),
    \n-
    101 data_( id, parameter )
    \n-
    102 {
    \n-
    103 if( int( p2.size() ) != dimensionworld )
    \n-
    104 {
    \n-
    105 DUNE_THROW(DGFException,
    \n-
    106 "ERROR in " << *this << "!");
    \n-
    107 }
    \n-
    108 }
    \n+
    96 // PeriodicFaceTransformationBlock::AffineTransformation
    \n+
    97 // -----------------------------------------------------
    \n+
    98
    \n+\n+
    100 {
    \n+\n+
    102 std::vector< double > shift;
    \n+
    103
    \n+
    104 explicit AffineTransformation ( int dimworld )
    \n+
    105 : matrix( dimworld, dimworld ),
    \n+
    106 shift( dimworld )
    \n+
    107 {}
    \n+
    108 };
    \n
    109
    \n-
    110 // constructor
    \n-
    111 Domain( std::vector< double > p1, std::vector< double > p2, DomainData & data )
    \n-
    112 : dimensionworld( p1.size() ),
    \n-
    113 left_( p1 ),
    \n-
    114 right_( p2 ),
    \n-
    115 data_( data )
    \n-
    116 {
    \n-
    117 if( int( p2.size() ) != dimensionworld )
    \n-
    118 {
    \n-
    119 DUNE_THROW(DGFException,
    \n-
    120 "ERROR in " << *this << "!");
    \n-
    121 }
    \n-
    122 }
    \n-
    123
    \n-
    124 // copy constructor
    \n-
    125 Domain ( const Domain & other )
    \n-\n-
    127 left_( other.left_ ),
    \n-
    128 right_( other.right_ ),
    \n-
    129 data_( other.data_ )
    \n-
    130 {
    \n-
    131 if( dimensionworld != other.dimensionworld )
    \n-
    132 {
    \n-
    133 DUNE_THROW(DGFException,
    \n-
    134 "ERROR in " << *this << "!");
    \n-
    135 }
    \n-
    136 }
    \n-
    137
    \n-
    138 // assignment
    \n-
    139 Domain & operator = ( const Domain & other )
    \n-
    140 {
    \n-
    141 if( dimensionworld != other.dimensionworld )
    \n-
    142 {
    \n-
    143 DUNE_THROW(DGFException,
    \n-
    144 "ERROR in " << *this << "!");
    \n-
    145 }
    \n-
    146
    \n-
    147 left_ = other.left_;
    \n-
    148 right_= other.right_;
    \n-
    149 data_= other.data_;
    \n-
    150 return *this;
    \n-
    151 }
    \n-
    152
    \n-
    153 // return true if point is contained in boundary domain
    \n-
    154 template< class Vector >
    \n-
    155 bool contains ( const Vector & x ) const
    \n-
    156 {
    \n-
    157 bool ret = true;
    \n-
    158 for( int i = 0; i < dimensionworld; ++i )
    \n-
    159 {
    \n-
    160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] )
    \n-
    161 ret = false;
    \n-
    162 }
    \n-
    163 return ret;
    \n-
    164 }
    \n-
    165
    \n-
    166 const DomainData & data () const
    \n-
    167 {
    \n-
    168 return data_;
    \n-
    169 }
    \n-
    170
    \n-
    171 // for error messages
    \n-
    172 friend std::ostream & operator<< ( std :: ostream &os, const Domain & domain )
    \n-
    173 {
    \n-
    174 os << "domain: " << std::endl;
    \n-
    175 os << "left = ";
    \n-
    176 for( int i = 0; i < domain.dimensionworld; ++i )
    \n-
    177 os << domain.left_[ i ] << " ";
    \n-
    178 os << std::endl;
    \n-
    179 os << "right = ";
    \n-
    180 for( int i = 0; i < domain.dimensionworld; ++i )
    \n-
    181 os << domain.right_[ i ] << " ";
    \n-
    182 os << std::endl;
    \n-
    183 os << domain.data();
    \n-
    184 return os;
    \n-
    185 }
    \n-
    186
    \n-
    187 private:
    \n-
    188 std::vector< double > left_, right_;
    \n-
    189 DomainData data_;
    \n-
    190
    \n-
    191 };
    \n-
    192
    \n-\n-
    194 : public BasicBlock
    \n-
    195 {
    \n-
    196 typedef DGFBoundaryParameter::type BoundaryParameter;
    \n-
    197
    \n-
    198 // the dimension of the vertices (is given from user)
    \n-
    199 int dimworld_;
    \n-
    200
    \n-
    201 // internal counter
    \n-
    202 int counter_;
    \n-
    203
    \n-
    204 // default values if given
    \n-
    205 DomainData * default_;
    \n-
    206
    \n-
    207 // storage for all domains;
    \n-
    208 int ndomains_;
    \n-
    209 std::vector< Domain > domains_;
    \n-
    210
    \n-
    211 public:
    \n-
    212 // initialize vertex block and get first vertex
    \n-
    213 BoundaryDomBlock ( std::istream & in, int cdimworld );
    \n-
    214
    \n-
    215 // destructor
    \n-\n-
    217 {
    \n-
    218 if( default_ )
    \n-
    219 delete default_;
    \n-
    220 }
    \n-
    221
    \n-
    222 // go to next domain in block
    \n-
    223 bool next ()
    \n-
    224 {
    \n-
    225 counter_++;
    \n-
    226 return ( counter_ < ndomains_ );
    \n-
    227 }
    \n-
    228
    \n-
    229 // return domain
    \n-
    230 const Domain & domain () const
    \n-
    231 {
    \n-
    232 return domains_.at( counter_ );
    \n-
    233 }
    \n-
    234
    \n-
    235 // return true if default is given
    \n-
    236 bool hasDefaultData () const
    \n-
    237 {
    \n-
    238 return bool( default_ );
    \n-
    239 }
    \n-
    240
    \n-
    241 // return default data
    \n-
    242 const DomainData * defaultData () const
    \n-
    243 {
    \n-
    244 return default_;
    \n-
    245 }
    \n-
    246
    \n-
    247 // return true if any boundary domain block has
    \n-
    248 // additional parameters
    \n-
    249 bool hasParameter () const;
    \n-
    250
    \n-
    251 void reset ()
    \n-
    252 {
    \n-\n-
    254 counter_ = -1;
    \n-
    255 }
    \n-
    256
    \n-
    257 // return true while block is active
    \n-
    258 bool ok ()
    \n-
    259 {
    \n-
    260 return ( counter_ <= ndomains_ );
    \n-
    261 }
    \n-
    262
    \n-
    263 // return data if all vectors in array are contained within
    \n-
    264 // a single domain
    \n-
    265 template< class Vector >
    \n-
    266 const DomainData * contains ( const std::vector< Vector > & v ) const
    \n-
    267 {
    \n-
    268 std::vector< int > index( ndomains_ );
    \n-
    269 for( int i = 0; i < ndomains_; ++i)
    \n-
    270 index[ i ] = i;
    \n-
    271
    \n-
    272 size_t N = v.size();
    \n-
    273 for( size_t i = 0; i < N; ++i )
    \n-
    274 {
    \n-
    275 if( index.empty() )
    \n-
    276 break;
    \n-
    277
    \n-
    278 const int n = index.size();
    \n-
    279 assert( n > 0 );
    \n-
    280 for( int j = n-1; j >= 0; --j )
    \n-
    281 {
    \n-
    282 bool inside = domains_[ index[ j ] ].contains( v[ i ] );
    \n-
    283 if( !inside )
    \n-
    284 index.erase( index.begin() + j );
    \n-
    285 }
    \n-
    286 }
    \n-
    287
    \n-
    288 // check wheter no boundary domain found
    \n-
    289 if( index.empty() )
    \n-
    290 return default_;
    \n-
    291
    \n-
    292 // check for ambiguity
    \n-
    293 if( index.size() > 1 )
    \n-
    294 dwarn << "WARNING: ambiguous boundary domain assignment, use first boundary domain in list" << std::endl;
    \n-
    295
    \n-
    296 return &domains_[ index[ 0 ] ].data();
    \n-
    297 }
    \n-
    298
    \n-
    299 private:
    \n-
    300 void readBlock ();
    \n-
    301 };
    \n-
    302
    \n-
    303 } // end namespace dgf
    \n-
    304
    \n-
    305} // end namespace Dune
    \n-
    306
    \n-
    307#endif
    \n-\n-\n+
    110
    \n+
    111 inline std::ostream &
    \n+\n+
    113 {
    \n+
    114 for( int i = 0; i < trafo.matrix.rows(); ++i )
    \n+
    115 {
    \n+
    116 out << (i > 0 ? ", " : "");
    \n+
    117 for( int j = 0; j < trafo.matrix.cols(); ++j )
    \n+
    118 out << (j > 0 ? " " : "") << trafo.matrix( i, j );
    \n+
    119 }
    \n+
    120 out << " +";
    \n+
    121 for( unsigned int i = 0; i < trafo.shift.size(); ++i )
    \n+
    122 out << " " << trafo.shift[ i ];
    \n+
    123 return out;
    \n+
    124 }
    \n+
    125
    \n+
    126 } // end namespace dgf
    \n+
    127
    \n+
    128} // end namespace Dune
    \n+
    129
    \n+
    130#endif
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
    Definition: interval.hh:123
    \n
    Definition: basic.hh:31
    \n-
    void reset()
    Definition: basic.hh:51
    \n-
    Definition: boundarydom.hh:23
    \n-
    void reset(int id, BoundaryParameter parameter, bool defaultData=false)
    Definition: boundarydom.hh:60
    \n-
    ~DomainData()
    Definition: boundarydom.hh:32
    \n-
    DGFBoundaryParameter::type BoundaryParameter
    Definition: boundarydom.hh:24
    \n-
    DomainData()
    Definition: boundarydom.hh:26
    \n-
    int id() const
    Definition: boundarydom.hh:42
    \n-
    const BoundaryParameter & parameter() const
    Definition: boundarydom.hh:54
    \n-
    friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata)
    Definition: boundarydom.hh:73
    \n-
    bool hasParameter() const
    Definition: boundarydom.hh:48
    \n-
    DomainData(int id, BoundaryParameter parameter, bool defaultData=false)
    Definition: boundarydom.hh:35
    \n-
    bool isDefault() const
    Definition: boundarydom.hh:68
    \n-
    Definition: boundarydom.hh:90
    \n-
    Domain(std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter &parameter)
    Definition: boundarydom.hh:97
    \n-
    Domain(const Domain &other)
    Definition: boundarydom.hh:125
    \n-
    const int dimensionworld
    Definition: boundarydom.hh:92
    \n-
    bool contains(const Vector &x) const
    Definition: boundarydom.hh:155
    \n-
    DGFBoundaryParameter::type BoundaryParameter
    Definition: boundarydom.hh:94
    \n-
    friend std::ostream & operator<<(std ::ostream &os, const Domain &domain)
    Definition: boundarydom.hh:172
    \n-
    Domain & operator=(const Domain &other)
    Definition: boundarydom.hh:139
    \n-
    const DomainData & data() const
    Definition: boundarydom.hh:166
    \n-
    Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data)
    Definition: boundarydom.hh:111
    \n-
    Definition: boundarydom.hh:195
    \n-
    ~BoundaryDomBlock()
    Definition: boundarydom.hh:216
    \n-
    bool hasParameter() const
    Definition: boundarydom.cc:138
    \n-
    const Domain & domain() const
    Definition: boundarydom.hh:230
    \n-
    const DomainData * contains(const std::vector< Vector > &v) const
    Definition: boundarydom.hh:266
    \n-
    bool next()
    Definition: boundarydom.hh:223
    \n-
    void reset()
    Definition: boundarydom.hh:251
    \n-
    bool ok()
    Definition: boundarydom.hh:258
    \n-
    bool hasDefaultData() const
    Definition: boundarydom.hh:236
    \n-
    BoundaryDomBlock(std::istream &in, int cdimworld)
    Definition: boundarydom.cc:18
    \n-
    const DomainData * defaultData() const
    Definition: boundarydom.hh:242
    \n-
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n-
    Contains types for additional features.
    Definition: parser.hh:23
    \n-
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n+
    Definition: periodicfacetrans.hh:25
    \n+
    int numTransformations() const
    Definition: periodicfacetrans.hh:47
    \n+
    const AffineTransformation & transformation(int i) const
    Definition: periodicfacetrans.hh:41
    \n+
    Definition: periodicfacetrans.hh:62
    \n+
    int rows() const
    Definition: periodicfacetrans.hh:84
    \n+
    const T & operator()(int i, int j) const
    Definition: periodicfacetrans.hh:74
    \n+
    int cols() const
    Definition: periodicfacetrans.hh:89
    \n+
    Matrix(int rows, int cols)
    Definition: periodicfacetrans.hh:68
    \n+\n+
    Matrix< double > matrix
    Definition: periodicfacetrans.hh:101
    \n+
    std::vector< double > shift
    Definition: periodicfacetrans.hh:102
    \n+
    AffineTransformation(int dimworld)
    Definition: periodicfacetrans.hh:104
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,439 +8,189 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-boundarydom.hh\n+periodicfacetrans.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH\n- 6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH\n+ 5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH\n+ 6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH\n 7\n 8#include \n- 9#include \n- 10#include \n- 11\n- 12#include \n- 13#include \n- 14\n- 15\n- 16namespace Dune\n- 17{\n- 18\n- 19 namespace dgf\n- 20 {\n- 21\n-22 struct DomainData\n- 23 {\n-24 typedef DGFBoundaryParameter::type BoundaryParameter;\n- 25\n-26 DomainData ()\n- 27 : id_( 0 ),\n- 28 parameter_( DGFBoundaryParameter::defaultValue() ),\n- 29 defaultData_( false )\n- 30 { }\n- 31\n-32 ~DomainData () { }\n+ 9#include \n+ 10\n+ 11#include \n+ 12\n+ 13\n+ 14namespace Dune\n+ 15{\n+ 16\n+ 17 namespace dgf\n+ 18 {\n+ 19\n+ 20 // PeriodicFaceTransformationBlock\n+ 21 // -------------------------------\n+ 22\n+23 struct PeriodicFaceTransformationBlock\n+ 24 : public BasicBlock\n+ 25 {\n+ 26 template< class T >\n+ 27 class Matrix;\n+ 28\n+ 29 struct AffineTransformation;\n+ 30\n+ 31 private:\n+ 32 std::vector< AffineTransformation > transformations_;\n 33\n- 34 // constructor\n-35 DomainData ( int id, BoundaryParameter parameter, bool defaultData = false )\n- 36 : id_( id ),\n- 37 parameter_( parameter ),\n- 38 defaultData_( defaultData )\n- 39 { }\n+ 34 // copy not implemented\n+ 35 PeriodicFaceTransformationBlock ( const PeriodicFaceTransformationBlock &\n+);\n+ 36\n+ 37 public:\n+ 38 // initialize block and get dimension of world\n+ 39 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );\n 40\n- 41 // return id\n-42 int id () const\n- 43 {\n- 44 return id_;\n+41 const AffineTransformation &transformation ( int i ) const\n+ 42 {\n+ 43 assert( i < numTransformations() );\n+ 44 return transformations_[ i ];\n 45 }\n 46\n- 47 // return true, if additional parameters given\n-48 bool hasParameter () const\n- 49 {\n- 50 return (!parameter_.empty());\n- 51 }\n- 52\n- 53 // return additional parameters\n-54 const BoundaryParameter & parameter () const\n- 55 {\n- 56 return parameter_;\n- 57 }\n- 58\n- 59 // reset data\n-60 void reset ( int id, BoundaryParameter parameter, bool defaultData = false )\n- 61 {\n- 62 id_ = id;\n- 63 parameter_ = parameter;\n- 64 defaultData_ = defaultData;\n- 65 }\n+47 int numTransformations () const\n+ 48 {\n+ 49 return transformations_.size();\n+ 50 }\n+ 51\n+ 52 private:\n+ 53 void match ( char what );\n+ 54 };\n+ 55\n+ 56\n+ 57 // PeriodicFaceTransformationBlock::Matrix\n+ 58 // ---------------------------------------\n+ 59\n+ 60 template< class T >\n+61 class PeriodicFaceTransformationBlock::Matrix\n+ 62 {\n+ 63 int rows_;\n+ 64 int cols_;\n+ 65 std::vector< T > fields_;\n 66\n- 67 // returns true if data origins from default boundary domain\n-68 bool isDefault () const\n- 69 {\n- 70 return defaultData_;\n- 71 }\n- 72\n-73 friend std::ostream & operator<<( std :: ostream & os, const DomainData &\n-ddata )\n- 74 {\n- 75 os << \"domain data: id = \" << ddata.id();\n- 76 if( ddata.hasParameter() )\n- 77 os << \", parameter = \" << ddata.parameter();\n- 78 return os;\n- 79 }\n- 80\n- 81 private:\n- 82 int id_;\n- 83 BoundaryParameter parameter_;\n- 84 bool defaultData_;\n- 85\n- 86 }; // end struct DomainData\n- 87\n+ 67 public:\n+68 Matrix ( int rows, int cols )\n+ 69 : rows_( rows ),\n+ 70 cols_( cols ),\n+ 71 fields_( rows * cols )\n+ 72 {}\n+ 73\n+74 const T &operator()( int i, int j ) const\n+ 75 {\n+ 76 return fields_[ i * cols_ + j ];\n+ 77 }\n+ 78\n+79 T &operator()( int i, int j )\n+ 80 {\n+ 81 return fields_[ i * cols_ + j ];\n+ 82 }\n+ 83\n+84 int rows () const\n+ 85 {\n+ 86 return rows_;\n+ 87 }\n 88\n-89 struct Domain\n+89 int cols () const\n 90 {\n- 91 // dimension of world coordinates\n-92 const int dimensionworld;\n- 93\n-94 typedef DGFBoundaryParameter::type BoundaryParameter;\n+ 91 return cols_;\n+ 92 }\n+ 93 };\n+ 94\n 95\n- 96 // constructor\n-97 Domain( std::vector< double > p1, std::vector< double > p2, int id,\n-BoundaryParameter & parameter )\n- 98 : dimensionworld( p1.size() ),\n- 99 left_( p1 ),\n- 100 right_( p2 ),\n- 101 data_( id, parameter )\n- 102 {\n- 103 if( int( p2.size() ) != dimensionworld )\n- 104 {\n- 105 DUNE_THROW(DGFException,\n- 106 \"ERROR in \" << *this << \"!\");\n- 107 }\n- 108 }\n+ 96 // PeriodicFaceTransformationBlock::AffineTransformation\n+ 97 // -----------------------------------------------------\n+ 98\n+99 struct PeriodicFaceTransformationBlock::AffineTransformation\n+ 100 {\n+101 Matrix<_double_> matrix;\n+102 std::vector< double > shift;\n+ 103\n+104 explicit AffineTransformation ( int dimworld )\n+ 105 : matrix( dimworld, dimworld ),\n+ 106 shift( dimworld )\n+ 107 {}\n+ 108 };\n 109\n- 110 // constructor\n-111 Domain( std::vector< double > p1, std::vector< double > p2, DomainData &\n-data )\n- 112 : dimensionworld( p1.size() ),\n- 113 left_( p1 ),\n- 114 right_( p2 ),\n- 115 data_( data )\n- 116 {\n- 117 if( int( p2.size() ) != dimensionworld )\n- 118 {\n- 119 DUNE_THROW(DGFException,\n- 120 \"ERROR in \" << *this << \"!\");\n- 121 }\n- 122 }\n- 123\n- 124 // copy constructor\n-125 Domain ( const Domain & other )\n- 126 : dimensionworld( other.dimensionworld ),\n- 127 left_( other.left_ ),\n- 128 right_( other.right_ ),\n- 129 data_( other.data_ )\n- 130 {\n- 131 if( dimensionworld != other.dimensionworld )\n- 132 {\n- 133 DUNE_THROW(DGFException,\n- 134 \"ERROR in \" << *this << \"!\");\n- 135 }\n- 136 }\n- 137\n- 138 // assignment\n-139 Domain & operator_=( const Domain & other )\n- 140 {\n- 141 if( dimensionworld != other.dimensionworld )\n- 142 {\n- 143 DUNE_THROW(DGFException,\n- 144 \"ERROR in \" << *this << \"!\");\n- 145 }\n- 146\n- 147 left_ = other.left_;\n- 148 right_= other.right_;\n- 149 data_= other.data_;\n- 150 return *this;\n- 151 }\n- 152\n- 153 // return true if point is contained in boundary domain\n- 154 template< class Vector >\n-155 bool contains ( const Vector & x ) const\n- 156 {\n- 157 bool ret = true;\n- 158 for( int i = 0; i < dimensionworld; ++i )\n- 159 {\n- 160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] )\n- 161 ret = false;\n- 162 }\n- 163 return ret;\n- 164 }\n- 165\n-166 const DomainData & data () const\n- 167 {\n- 168 return data_;\n- 169 }\n- 170\n- 171 // for error messages\n-172 friend std::ostream & operator<<( std :: ostream &os, const Domain & domain\n-)\n- 173 {\n- 174 os << \"domain: \" << std::endl;\n- 175 os << \"left = \";\n- 176 for( int i = 0; i < domain.dimensionworld; ++i )\n- 177 os << domain.left_[ i ] << \" \";\n- 178 os << std::endl;\n- 179 os << \"right = \";\n- 180 for( int i = 0; i < domain.dimensionworld; ++i )\n- 181 os << domain.right_[ i ] << \" \";\n- 182 os << std::endl;\n- 183 os << domain.data();\n- 184 return os;\n- 185 }\n- 186\n- 187 private:\n- 188 std::vector< double > left_, right_;\n- 189 DomainData data_;\n- 190\n- 191 };\n- 192\n-193 class BoundaryDomBlock\n- 194 : public BasicBlock\n- 195 {\n- 196 typedef DGFBoundaryParameter::type BoundaryParameter;\n- 197\n- 198 // the dimension of the vertices (is given from user)\n- 199 int dimworld_;\n- 200\n- 201 // internal counter\n- 202 int counter_;\n- 203\n- 204 // default values if given\n- 205 DomainData * default_;\n- 206\n- 207 // storage for all domains;\n- 208 int ndomains_;\n- 209 std::vector< Domain > domains_;\n- 210\n- 211 public:\n- 212 // initialize vertex block and get first vertex\n- 213 BoundaryDomBlock ( std::istream & in, int cdimworld );\n- 214\n- 215 // destructor\n-216 ~BoundaryDomBlock ()\n- 217 {\n- 218 if( default_ )\n- 219 delete default_;\n- 220 }\n- 221\n- 222 // go to next domain in block\n-223 bool next ()\n- 224 {\n- 225 counter_++;\n- 226 return ( counter_ < ndomains_ );\n- 227 }\n- 228\n- 229 // return domain\n-230 const Domain & domain () const\n- 231 {\n- 232 return domains_.at( counter_ );\n- 233 }\n- 234\n- 235 // return true if default is given\n-236 bool hasDefaultData () const\n- 237 {\n- 238 return bool( default_ );\n- 239 }\n- 240\n- 241 // return default data\n-242 const DomainData * defaultData () const\n- 243 {\n- 244 return default_;\n- 245 }\n- 246\n- 247 // return true if any boundary domain block has\n- 248 // additional parameters\n- 249 bool hasParameter () const;\n- 250\n-251 void reset ()\n- 252 {\n- 253 BasicBlock::reset();\n- 254 counter_ = -1;\n- 255 }\n- 256\n- 257 // return true while block is active\n-258 bool ok ()\n- 259 {\n- 260 return ( counter_ <= ndomains_ );\n- 261 }\n- 262\n- 263 // return data if all vectors in array are contained within\n- 264 // a single domain\n- 265 template< class Vector >\n-266 const DomainData * contains ( const std::vector< Vector > & v ) const\n- 267 {\n- 268 std::vector< int > index( ndomains_ );\n- 269 for( int i = 0; i < ndomains_; ++i)\n- 270 index[ i ] = i;\n- 271\n- 272 size_t N = v.size();\n- 273 for( size_t i = 0; i < N; ++i )\n- 274 {\n- 275 if( index.empty() )\n- 276 break;\n- 277\n- 278 const int n = index.size();\n- 279 assert( n > 0 );\n- 280 for( int j = n-1; j >= 0; --j )\n- 281 {\n- 282 bool inside = domains_[ index[ j ] ].contains( v[ i ] );\n- 283 if( !inside )\n- 284 index.erase( index.begin() + j );\n- 285 }\n- 286 }\n- 287\n- 288 // check wheter no boundary domain found\n- 289 if( index.empty() )\n- 290 return default_;\n- 291\n- 292 // check for ambiguity\n- 293 if( index.size() > 1 )\n- 294 dwarn << \"WARNING: ambiguous boundary domain assignment, use first\n-boundary domain in list\" << std::endl;\n- 295\n- 296 return &domains_[ index[ 0 ] ].data();\n- 297 }\n- 298\n- 299 private:\n- 300 void readBlock ();\n- 301 };\n- 302\n- 303 } // end namespace dgf\n- 304\n- 305} // end namespace Dune\n- 306\n- 307#endif\n-parser.hh\n+ 110\n+111 inline std::ostream &\n+ 112 operator<<( std::ostream &out, const PeriodicFaceTransformationBlock::\n+AffineTransformation &trafo )\n+ 113 {\n+ 114 for( int i = 0; i < trafo.matrix.rows(); ++i )\n+ 115 {\n+ 116 out << (i > 0 ? \", \" : \"\");\n+ 117 for( int j = 0; j < trafo.matrix.cols(); ++j )\n+ 118 out << (j > 0 ? \" \" : \"\") << trafo.matrix( i, j );\n+ 119 }\n+ 120 out << \" +\";\n+ 121 for( unsigned int i = 0; i < trafo.shift.size(); ++i )\n+ 122 out << \" \" << trafo.shift[ i ];\n+ 123 return out;\n+ 124 }\n+ 125\n+ 126 } // end namespace dgf\n+ 127\n+ 128} // end namespace Dune\n+ 129\n+ 130#endif\n basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::dgf::operator<<\n+std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval\n+&interval)\n+Definition: interval.hh:123\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n-Dune::dgf::BasicBlock::reset\n-void reset()\n-Definition: basic.hh:51\n-Dune::dgf::DomainData\n-Definition: boundarydom.hh:23\n-Dune::dgf::DomainData::reset\n-void reset(int id, BoundaryParameter parameter, bool defaultData=false)\n-Definition: boundarydom.hh:60\n-Dune::dgf::DomainData::~DomainData\n-~DomainData()\n-Definition: boundarydom.hh:32\n-Dune::dgf::DomainData::BoundaryParameter\n-DGFBoundaryParameter::type BoundaryParameter\n-Definition: boundarydom.hh:24\n-Dune::dgf::DomainData::DomainData\n-DomainData()\n-Definition: boundarydom.hh:26\n-Dune::dgf::DomainData::id\n-int id() const\n-Definition: boundarydom.hh:42\n-Dune::dgf::DomainData::parameter\n-const BoundaryParameter & parameter() const\n-Definition: boundarydom.hh:54\n-Dune::dgf::DomainData::operator<<\n-friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata)\n-Definition: boundarydom.hh:73\n-Dune::dgf::DomainData::hasParameter\n-bool hasParameter() const\n-Definition: boundarydom.hh:48\n-Dune::dgf::DomainData::DomainData\n-DomainData(int id, BoundaryParameter parameter, bool defaultData=false)\n-Definition: boundarydom.hh:35\n-Dune::dgf::DomainData::isDefault\n-bool isDefault() const\n-Definition: boundarydom.hh:68\n-Dune::dgf::Domain\n-Definition: boundarydom.hh:90\n-Dune::dgf::Domain::Domain\n-Domain(std::vector< double > p1, std::vector< double > p2, int id,\n-BoundaryParameter ¶meter)\n-Definition: boundarydom.hh:97\n-Dune::dgf::Domain::Domain\n-Domain(const Domain &other)\n-Definition: boundarydom.hh:125\n-Dune::dgf::Domain::dimensionworld\n-const int dimensionworld\n-Definition: boundarydom.hh:92\n-Dune::dgf::Domain::contains\n-bool contains(const Vector &x) const\n-Definition: boundarydom.hh:155\n-Dune::dgf::Domain::BoundaryParameter\n-DGFBoundaryParameter::type BoundaryParameter\n-Definition: boundarydom.hh:94\n-Dune::dgf::Domain::operator<<\n-friend std::ostream & operator<<(std ::ostream &os, const Domain &domain)\n-Definition: boundarydom.hh:172\n-Dune::dgf::Domain::operator=\n-Domain & operator=(const Domain &other)\n-Definition: boundarydom.hh:139\n-Dune::dgf::Domain::data\n-const DomainData & data() const\n-Definition: boundarydom.hh:166\n-Dune::dgf::Domain::Domain\n-Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data)\n-Definition: boundarydom.hh:111\n-Dune::dgf::BoundaryDomBlock\n-Definition: boundarydom.hh:195\n-Dune::dgf::BoundaryDomBlock::~BoundaryDomBlock\n-~BoundaryDomBlock()\n-Definition: boundarydom.hh:216\n-Dune::dgf::BoundaryDomBlock::hasParameter\n-bool hasParameter() const\n-Definition: boundarydom.cc:138\n-Dune::dgf::BoundaryDomBlock::domain\n-const Domain & domain() const\n-Definition: boundarydom.hh:230\n-Dune::dgf::BoundaryDomBlock::contains\n-const DomainData * contains(const std::vector< Vector > &v) const\n-Definition: boundarydom.hh:266\n-Dune::dgf::BoundaryDomBlock::next\n-bool next()\n-Definition: boundarydom.hh:223\n-Dune::dgf::BoundaryDomBlock::reset\n-void reset()\n-Definition: boundarydom.hh:251\n-Dune::dgf::BoundaryDomBlock::ok\n-bool ok()\n-Definition: boundarydom.hh:258\n-Dune::dgf::BoundaryDomBlock::hasDefaultData\n-bool hasDefaultData() const\n-Definition: boundarydom.hh:236\n-Dune::dgf::BoundaryDomBlock::BoundaryDomBlock\n-BoundaryDomBlock(std::istream &in, int cdimworld)\n-Definition: boundarydom.cc:18\n-Dune::dgf::BoundaryDomBlock::defaultData\n-const DomainData * defaultData() const\n-Definition: boundarydom.hh:242\n-Dune::DGFException\n-exception class for IO errors in the DGF parser\n-Definition: dgfexception.hh:16\n-Dune::DGFBoundaryParameter\n-Contains types for additional features.\n-Definition: parser.hh:23\n-Dune::DGFBoundaryParameter::type\n-std::string type\n-type of additional boundary parameters\n-Definition: parser.hh:25\n+Dune::dgf::PeriodicFaceTransformationBlock\n+Definition: periodicfacetrans.hh:25\n+Dune::dgf::PeriodicFaceTransformationBlock::numTransformations\n+int numTransformations() const\n+Definition: periodicfacetrans.hh:47\n+Dune::dgf::PeriodicFaceTransformationBlock::transformation\n+const AffineTransformation & transformation(int i) const\n+Definition: periodicfacetrans.hh:41\n+Dune::dgf::PeriodicFaceTransformationBlock::Matrix\n+Definition: periodicfacetrans.hh:62\n+Dune::dgf::PeriodicFaceTransformationBlock::Matrix::rows\n+int rows() const\n+Definition: periodicfacetrans.hh:84\n+Dune::dgf::PeriodicFaceTransformationBlock::Matrix::operator()\n+const T & operator()(int i, int j) const\n+Definition: periodicfacetrans.hh:74\n+Dune::dgf::PeriodicFaceTransformationBlock::Matrix::cols\n+int cols() const\n+Definition: periodicfacetrans.hh:89\n+Dune::dgf::PeriodicFaceTransformationBlock::Matrix::Matrix\n+Matrix(int rows, int cols)\n+Definition: periodicfacetrans.hh:68\n+Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation\n+Definition: periodicfacetrans.hh:100\n+Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation::matrix\n+Matrix< double > matrix\n+Definition: periodicfacetrans.hh:101\n+Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation::shift\n+std::vector< double > shift\n+Definition: periodicfacetrans.hh:102\n+Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation::\n+AffineTransformation\n+AffineTransformation(int dimworld)\n+Definition: periodicfacetrans.hh:104\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00887.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00887.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: polyhedron.hh File Reference\n+dune-grid: cube.cc File Reference\n \n \n \n \n \n \n \n@@ -63,29 +63,21 @@\n \n \n
    \n \n-
    polyhedron.hh File Reference
    \n+
    cube.cc File Reference
    \n
    \n
    \n-
    #include <algorithm>
    \n-#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-\n-\n-\n-\n-

    \n-Classes

    struct  Dune::dgf::PolyhedronBlock
     
    \n+
    #include <config.h>
    \n+#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
    \n+
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,22 +8,18 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces\n-polyhedron.hh File Reference\n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-struct \u00a0Dune::dgf::PolyhedronBlock\n-\u00a0\n+Namespaces\n+cube.cc File Reference\n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00890.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00890.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: interval.hh File Reference\n+dune-grid: cube.hh File Reference\n \n \n \n \n \n \n \n@@ -64,45 +64,37 @@\n \n \n \n
    \n \n-
    interval.hh File Reference
    \n+Namespaces
    \n+
    cube.hh File Reference
    \n \n
    \n-
    #include <iostream>
    \n+
    #include <cassert>
    \n+#include <iostream>
    \n #include <vector>
    \n-#include <array>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n-\n-\n-\n+\n \n

    \n Classes

    struct  Dune::dgf::IntervalBlock
     
    struct  Dune::dgf::IntervalBlock::Interval
    class  Dune::dgf::CubeBlock
     
    \n \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n-\n-\n-\n

    \n-Functions

    std::ostream & Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::Interval &interval)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,32 +8,26 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces | Functions\n-interval.hh File Reference\n+Classes | Namespaces\n+cube.hh File Reference\n+#include \n #include \n #include \n-#include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::dgf::IntervalBlock\n-\u00a0\n-struct \u00a0Dune::dgf::IntervalBlock::Interval\n+class \u00a0Dune::dgf::CubeBlock\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n- Functions\n-std::ostream &\u00a0Dune::dgf::operator<< (std::ostream &out, const IntervalBlock::\n- Interval &interval)\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00890_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: interval.hh Source File\n+dune-grid: cube.hh Source File\n \n \n \n \n \n \n \n@@ -62,183 +62,87 @@\n \n \n \n
    \n-
    interval.hh
    \n+
    cube.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_INTERVALBLOCK_HH
    \n-
    6#define DUNE_DGF_INTERVALBLOCK_HH
    \n+
    5#ifndef DUNE_DGF_CUBEBLOCK_HH
    \n+
    6#define DUNE_DGF_CUBEBLOCK_HH
    \n
    7
    \n-
    8#include <iostream>
    \n-
    9#include <vector>
    \n-
    10#include <array>
    \n+
    8#include <cassert>
    \n+
    9#include <iostream>
    \n+
    10#include <vector>
    \n
    11
    \n-\n+\n
    13
    \n
    14
    \n
    15namespace Dune
    \n
    16{
    \n
    17
    \n
    18 namespace dgf
    \n
    19 {
    \n
    20
    \n-\n+\n
    22 : public BasicBlock
    \n
    23 {
    \n-
    24 struct Interval
    \n-
    25 {
    \n-\n-
    27 Interval( const Interval& interval, const std::vector<int>& map )
    \n-
    28 {
    \n-
    29 copy( interval, map );
    \n-
    30 }
    \n-
    31 void copy(const Interval& interval, const std::vector<int>& map )
    \n-
    32 {
    \n-
    33 const int size = map.size();
    \n-
    34 p[0].resize( size );
    \n-
    35 p[1].resize( size );
    \n-
    36 n.resize( size );
    \n-
    37 h.resize( size );
    \n-
    38 assert( size == int(interval.n.size()) );
    \n-
    39 for( int i=0; i<size; ++i )
    \n-
    40 {
    \n-
    41 p[ 0 ][ i ] = interval.p[ 0 ][ map[ i ] ];
    \n-
    42 p[ 1 ][ i ] = interval.p[ 1 ][ map[ i ] ];
    \n-
    43 n[ i ] = interval.n[ map[ i ] ];
    \n-
    44 h[ i ] = interval.h[ map[ i ] ];
    \n-
    45 }
    \n-
    46 }
    \n-
    47 std::array< std::vector< double >, 2 > p; // lower and upper boundary points
    \n-
    48 std::vector< double > h; // width of the cells in each direction
    \n-
    49 std::vector< int > n; // number of cells in each direction
    \n-
    50 };
    \n-
    51
    \n-
    52 private:
    \n-
    53 std::vector< Interval > intervals_;
    \n-
    54 std::vector< int > map_;
    \n-
    55 bool good_; //data read correctly
    \n-
    56 int dimw_; //dimension of world
    \n-
    57
    \n-
    58 public:
    \n-
    59 explicit IntervalBlock ( std::istream &in );
    \n+
    24 unsigned int nofvtx;
    \n+
    25 int dimgrid;
    \n+
    26 bool goodline; // active line describes a vertex
    \n+
    27 std :: vector< unsigned int > map; // active vertex
    \n+
    28 int nofparams;
    \n+
    29 int vtxoffset;
    \n+
    30
    \n+
    31 public:
    \n+
    32 CubeBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
    \n+
    33
    \n+
    34 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
    \n+
    35 std :: vector< std :: vector< double > > &params,
    \n+
    36 int &nofp );
    \n+
    37
    \n+
    38 // some information
    \n+
    39 bool ok ()
    \n+
    40 {
    \n+
    41 return goodline;
    \n+
    42 }
    \n+
    43
    \n+\n+
    45 {
    \n+
    46 return noflines();
    \n+
    47 }
    \n+
    48
    \n+
    49 private:
    \n+
    50 // get the dimension of the grid
    \n+
    51 int getDimGrid ();
    \n+
    52 // get next simplex
    \n+
    53 bool next ( std :: vector< unsigned int > &simplex,
    \n+
    54 std :: vector< double > &param );
    \n+
    55 };
    \n+
    56
    \n+
    57 } // end namespace dgf
    \n+
    58
    \n+
    59} // end namespace Dune
    \n
    60
    \n-
    61 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx,
    \n-
    62 std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl )
    \n-
    63 {
    \n-
    64 for( size_t i = 0; i < intervals_.size(); ++i )
    \n-
    65 {
    \n-
    66 int oldvtx = nofvtx;
    \n-
    67 nofvtx += getVtx( i, vtx );
    \n-
    68 nofsimpl += getHexa( i, simplex, oldvtx );
    \n-
    69 }
    \n-
    70 }
    \n-
    71
    \n-
    72 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx )
    \n-
    73 {
    \n-
    74 for( size_t i = 0; i < intervals_.size(); ++i )
    \n-
    75 nofvtx += getVtx( i, vtx );
    \n-
    76 }
    \n-
    77
    \n-
    78 const Interval &get ( int block ) const
    \n-
    79 {
    \n-
    80 return intervals_[ block ];
    \n-
    81 }
    \n-
    82
    \n-
    83 int numIntervals () const
    \n-
    84 {
    \n-
    85 return intervals_.size();
    \n-
    86 }
    \n-
    87
    \n-
    88 int dimw () const
    \n-
    89 {
    \n-
    90 return dimw_;
    \n-
    91 }
    \n-
    92
    \n-
    93 int getVtx ( int block, std::vector< std::vector< double > > &vtx ) const;
    \n-
    94 int getHexa ( int block, std::vector< std::vector< unsigned int > > &cubes,
    \n-
    95 int offset = 0 ) const;
    \n-
    96
    \n-
    97 int nofvtx ( int block ) const
    \n-
    98 {
    \n-
    99 const Interval &interval = get( block );
    \n-
    100 int n = 1;
    \n-
    101 for( int i = 0; i < dimw_; ++i )
    \n-
    102 n *= (interval.n[ i ] + 1);
    \n-
    103 return n;
    \n-
    104 }
    \n-
    105
    \n-
    106 int nofhexa ( int block ) const
    \n-
    107 {
    \n-
    108 const Interval &interval = get( block );
    \n-
    109 int n = 1;
    \n-
    110 for( int i = 0; i < dimw_; ++i )
    \n-
    111 n *= interval.n[ i ];
    \n-
    112 return n;
    \n-
    113 }
    \n-
    114
    \n-
    115 private:
    \n-
    116 template< class T >
    \n-
    117 void parseLine ( std::vector< T > &v );
    \n-
    118
    \n-
    119 bool next ();
    \n-
    120 };
    \n-
    121
    \n-
    122 inline std::ostream &
    \n-
    123 operator<< ( std::ostream &out, const IntervalBlock::Interval &interval )
    \n-
    124 {
    \n-
    125 if( interval.p[ 0 ].empty() || interval.p[ 1 ].empty() || interval.n.empty() )
    \n-
    126 return out << "Interval {}";
    \n-
    127
    \n-
    128 out << "Interval { p0 = (" << interval.p[ 0 ][ 0 ];
    \n-
    129 for( size_t i = 1; i < interval.p[ 0 ].size(); ++i )
    \n-
    130 out << ", " << interval.p[ 0 ][ i ];
    \n-
    131 out << "), p1 = (" << interval.p[ 1 ][ 0 ];
    \n-
    132 for( size_t i = 1; i < interval.p[ 1 ].size(); ++i )
    \n-
    133 out << ", " << interval.p[ 1 ][ i ];
    \n-
    134 out << "), n = (" << interval.n[ 0 ];
    \n-
    135 for( size_t i = 1; i < interval.n.size(); ++i )
    \n-
    136 out << ", " << interval.n[ i ];
    \n-
    137 return out << ") }";
    \n-
    138 }
    \n-
    139
    \n-
    140 } // end namespace dgf
    \n-
    141
    \n-
    142} // end namespace Dune
    \n-
    143
    \n-
    144#endif
    \n-\n+
    61#endif
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
    Definition: interval.hh:123
    \n
    Definition: basic.hh:31
    \n-
    Definition: interval.hh:23
    \n-
    IntervalBlock(std::istream &in)
    Definition: interval.cc:18
    \n-
    void get(std::vector< std::vector< double > > &vtx, int &nofvtx, std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl)
    Definition: interval.hh:61
    \n-
    int numIntervals() const
    Definition: interval.hh:83
    \n-
    int getVtx(int block, std::vector< std::vector< double > > &vtx) const
    Definition: interval.cc:84
    \n-
    const Interval & get(int block) const
    Definition: interval.hh:78
    \n-
    int getHexa(int block, std::vector< std::vector< unsigned int > > &cubes, int offset=0) const
    Definition: interval.cc:122
    \n-
    int nofhexa(int block) const
    Definition: interval.hh:106
    \n-
    int dimw() const
    Definition: interval.hh:88
    \n-
    int nofvtx(int block) const
    Definition: interval.hh:97
    \n-
    void get(std::vector< std::vector< double > > &vtx, int &nofvtx)
    Definition: interval.hh:72
    \n-
    Definition: interval.hh:25
    \n-
    Interval()
    Definition: interval.hh:26
    \n-
    std::array< std::vector< double >, 2 > p
    Definition: interval.hh:47
    \n-
    std::vector< int > n
    Definition: interval.hh:49
    \n-
    Interval(const Interval &interval, const std::vector< int > &map)
    Definition: interval.hh:27
    \n-
    void copy(const Interval &interval, const std::vector< int > &map)
    Definition: interval.hh:31
    \n-
    std::vector< double > h
    Definition: interval.hh:48
    \n+
    int & noflines()
    Definition: basic.hh:87
    \n+
    Definition: cube.hh:23
    \n+
    int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
    Definition: cube.cc:103
    \n+
    int nofsimplex()
    Definition: cube.hh:44
    \n+
    bool ok()
    Definition: cube.hh:39
    \n+
    CubeBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
    Definition: cube.cc:19
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,222 +8,99 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-interval.hh\n+cube.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_INTERVALBLOCK_HH\n- 6#define DUNE_DGF_INTERVALBLOCK_HH\n+ 5#ifndef DUNE_DGF_CUBEBLOCK_HH\n+ 6#define DUNE_DGF_CUBEBLOCK_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n+ 8#include \n+ 9#include \n+ 10#include \n 11\n 12#include \n 13\n 14\n 15namespace Dune\n 16{\n 17\n 18 namespace dgf\n 19 {\n 20\n-21 struct IntervalBlock\n+21 class CubeBlock\n 22 : public BasicBlock\n 23 {\n-24 struct Interval\n- 25 {\n-26 Interval() {}\n-27 Interval( const Interval& interval, const std::vector& map )\n- 28 {\n- 29 copy( interval, map );\n- 30 }\n-31 void copy(const Interval& interval, const std::vector& map )\n- 32 {\n- 33 const int size = map.size();\n- 34 p[0].resize( size );\n- 35 p[1].resize( size );\n- 36 n.resize( size );\n- 37 h.resize( size );\n- 38 assert( size == int(interval.n.size()) );\n- 39 for( int i=0; i map; // active vertex\n+ 28 int nofparams;\n+ 29 int vtxoffset;\n+ 30\n+ 31 public:\n+ 32 CubeBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid\n+);\n+ 33\n+ 34 int get ( std :: vector< std :: vector< unsigned int> > &simplex,\n+ 35 std :: vector< std :: vector< double > > ¶ms,\n+ 36 int &nofp );\n+ 37\n+ 38 // some information\n+39 bool ok ()\n 40 {\n- 41 p[ 0 ][ i ] = interval.p[ 0 ][ map[ i ] ];\n- 42 p[ 1 ][ i ] = interval.p[ 1 ][ map[ i ] ];\n- 43 n[ i ] = interval.n[ map[ i ] ];\n- 44 h[ i ] = interval.h[ map[ i ] ];\n- 45 }\n- 46 }\n-47 std::array< std::vector< double >, 2 > p; // lower and upper boundary points\n-48 std::vector< double > h; // width of the cells in each direction\n-49 std::vector< int > n; // number of cells in each direction\n- 50 };\n- 51\n- 52 private:\n- 53 std::vector< Interval > intervals_;\n- 54 std::vector< int > map_;\n- 55 bool good_; //data read correctly\n- 56 int dimw_; //dimension of world\n- 57\n- 58 public:\n- 59 explicit IntervalBlock ( std::istream &in );\n+ 41 return goodline;\n+ 42 }\n+ 43\n+44 int nofsimplex ()\n+ 45 {\n+ 46 return noflines();\n+ 47 }\n+ 48\n+ 49 private:\n+ 50 // get the dimension of the grid\n+ 51 int getDimGrid ();\n+ 52 // get next simplex\n+ 53 bool next ( std :: vector< unsigned int > &simplex,\n+ 54 std :: vector< double > ¶m );\n+ 55 };\n+ 56\n+ 57 } // end namespace dgf\n+ 58\n+ 59} // end namespace Dune\n 60\n-61 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx,\n- 62 std::vector< std::vector< unsigned int > > &simplex, int &nofsimpl )\n- 63 {\n- 64 for( size_t i = 0; i < intervals_.size(); ++i )\n- 65 {\n- 66 int oldvtx = nofvtx;\n- 67 nofvtx += getVtx( i, vtx );\n- 68 nofsimpl += getHexa( i, simplex, oldvtx );\n- 69 }\n- 70 }\n- 71\n-72 void get ( std::vector< std::vector< double > > &vtx, int &nofvtx )\n- 73 {\n- 74 for( size_t i = 0; i < intervals_.size(); ++i )\n- 75 nofvtx += getVtx( i, vtx );\n- 76 }\n- 77\n-78 const Interval &get ( int block ) const\n- 79 {\n- 80 return intervals_[ block ];\n- 81 }\n- 82\n-83 int numIntervals () const\n- 84 {\n- 85 return intervals_.size();\n- 86 }\n- 87\n-88 int dimw () const\n- 89 {\n- 90 return dimw_;\n- 91 }\n- 92\n- 93 int getVtx ( int block, std::vector< std::vector< double > > &vtx ) const;\n- 94 int getHexa ( int block, std::vector< std::vector< unsigned int > > &cubes,\n- 95 int offset = 0 ) const;\n- 96\n-97 int nofvtx ( int block ) const\n- 98 {\n- 99 const Interval &interval = get( block );\n- 100 int n = 1;\n- 101 for( int i = 0; i < dimw_; ++i )\n- 102 n *= (interval.n[ i ] + 1);\n- 103 return n;\n- 104 }\n- 105\n-106 int nofhexa ( int block ) const\n- 107 {\n- 108 const Interval &interval = get( block );\n- 109 int n = 1;\n- 110 for( int i = 0; i < dimw_; ++i )\n- 111 n *= interval.n[ i ];\n- 112 return n;\n- 113 }\n- 114\n- 115 private:\n- 116 template< class T >\n- 117 void parseLine ( std::vector< T > &v );\n- 118\n- 119 bool next ();\n- 120 };\n- 121\n-122 inline std::ostream &\n- 123 operator<<( std::ostream &out, const IntervalBlock::Interval &interval )\n- 124 {\n- 125 if( interval.p[ 0 ].empty() || interval.p[ 1 ].empty() || interval.n.empty\n-() )\n- 126 return out << \"Interval {}\";\n- 127\n- 128 out << \"Interval { p0 = (\" << interval.p[ 0 ][ 0 ];\n- 129 for( size_t i = 1; i < interval.p[ 0 ].size(); ++i )\n- 130 out << \", \" << interval.p[ 0 ][ i ];\n- 131 out << \"), p1 = (\" << interval.p[ 1 ][ 0 ];\n- 132 for( size_t i = 1; i < interval.p[ 1 ].size(); ++i )\n- 133 out << \", \" << interval.p[ 1 ][ i ];\n- 134 out << \"), n = (\" << interval.n[ 0 ];\n- 135 for( size_t i = 1; i < interval.n.size(); ++i )\n- 136 out << \", \" << interval.n[ i ];\n- 137 return out << \") }\";\n- 138 }\n- 139\n- 140 } // end namespace dgf\n- 141\n- 142} // end namespace Dune\n- 143\n- 144#endif\n+ 61#endif\n basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::dgf::operator<<\n-std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval\n-&interval)\n-Definition: interval.hh:123\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n-Dune::dgf::IntervalBlock\n-Definition: interval.hh:23\n-Dune::dgf::IntervalBlock::IntervalBlock\n-IntervalBlock(std::istream &in)\n-Definition: interval.cc:18\n-Dune::dgf::IntervalBlock::get\n-void get(std::vector< std::vector< double > > &vtx, int &nofvtx, std::vector<\n-std::vector< unsigned int > > &simplex, int &nofsimpl)\n-Definition: interval.hh:61\n-Dune::dgf::IntervalBlock::numIntervals\n-int numIntervals() const\n-Definition: interval.hh:83\n-Dune::dgf::IntervalBlock::getVtx\n-int getVtx(int block, std::vector< std::vector< double > > &vtx) const\n-Definition: interval.cc:84\n-Dune::dgf::IntervalBlock::get\n-const Interval & get(int block) const\n-Definition: interval.hh:78\n-Dune::dgf::IntervalBlock::getHexa\n-int getHexa(int block, std::vector< std::vector< unsigned int > > &cubes, int\n-offset=0) const\n-Definition: interval.cc:122\n-Dune::dgf::IntervalBlock::nofhexa\n-int nofhexa(int block) const\n-Definition: interval.hh:106\n-Dune::dgf::IntervalBlock::dimw\n-int dimw() const\n-Definition: interval.hh:88\n-Dune::dgf::IntervalBlock::nofvtx\n-int nofvtx(int block) const\n-Definition: interval.hh:97\n-Dune::dgf::IntervalBlock::get\n-void get(std::vector< std::vector< double > > &vtx, int &nofvtx)\n-Definition: interval.hh:72\n-Dune::dgf::IntervalBlock::Interval\n-Definition: interval.hh:25\n-Dune::dgf::IntervalBlock::Interval::Interval\n-Interval()\n-Definition: interval.hh:26\n-Dune::dgf::IntervalBlock::Interval::p\n-std::array< std::vector< double >, 2 > p\n-Definition: interval.hh:47\n-Dune::dgf::IntervalBlock::Interval::n\n-std::vector< int > n\n-Definition: interval.hh:49\n-Dune::dgf::IntervalBlock::Interval::Interval\n-Interval(const Interval &interval, const std::vector< int > &map)\n-Definition: interval.hh:27\n-Dune::dgf::IntervalBlock::Interval::copy\n-void copy(const Interval &interval, const std::vector< int > &map)\n-Definition: interval.hh:31\n-Dune::dgf::IntervalBlock::Interval::h\n-std::vector< double > h\n-Definition: interval.hh:48\n+Dune::dgf::BasicBlock::noflines\n+int & noflines()\n+Definition: basic.hh:87\n+Dune::dgf::CubeBlock\n+Definition: cube.hh:23\n+Dune::dgf::CubeBlock::get\n+int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector<\n+std ::vector< double > > ¶ms, int &nofp)\n+Definition: cube.cc:103\n+Dune::dgf::CubeBlock::nofsimplex\n+int nofsimplex()\n+Definition: cube.hh:44\n+Dune::dgf::CubeBlock::ok\n+bool ok()\n+Definition: cube.hh:39\n+Dune::dgf::CubeBlock::CubeBlock\n+CubeBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)\n+Definition: cube.cc:19\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00893.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00893.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: cube.hh File Reference\n+dune-grid: dim.cc File Reference\n \n \n \n \n \n \n \n@@ -63,31 +63,21 @@\n \n \n
    \n \n-
    cube.hh File Reference
    \n+
    dim.cc File Reference
    \n
    \n
    \n-
    #include <cassert>
    \n-#include <iostream>
    \n-#include <vector>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::dgf::CubeBlock
     
    \n+
    #include <config.h>
    \n+#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
    \n+
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,24 +8,18 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces\n-cube.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::dgf::CubeBlock\n-\u00a0\n+Namespaces\n+dim.cc File Reference\n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00896.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00896.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Namespaces \n
    vertex.hh File Reference
    \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00896_source.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_DGF_VERTEXBLOCK_HH
    \n
    6#define DUNE_DGF_VERTEXBLOCK_HH
    \n
    7
    \n
    8#include <iostream>
    \n
    9#include <vector>
    \n
    10
    \n-\n+\n
    12
    \n
    13namespace Dune
    \n
    14{
    \n
    15
    \n
    16 namespace dgf
    \n
    17 {
    \n
    18
    \n@@ -124,15 +124,15 @@\n
    53 };
    \n
    54
    \n
    55 } // end namespace dgf
    \n
    56
    \n
    57} // end namespace Dune
    \n
    58
    \n
    59#endif
    \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: basic.hh:31
    \n
    Definition: vertex.hh:21
    \n
    int get(std ::vector< std ::vector< double > > &vtx, std ::vector< std ::vector< double > > &param, int &nofp)
    Definition: vertex.cc:63
    \n
    int offset() const
    Definition: vertex.hh:42
    \n
    VertexBlock(std ::istream &in, int &pdimworld)
    Definition: vertex.cc:18
    \n
    bool ok() const
    Definition: vertex.hh:37
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00899.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00899.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: simplex.hh File Reference\n+dune-grid: projection.cc File Reference\n \n \n \n \n \n \n \n@@ -64,36 +64,70 @@\n \n \n \n
    \n \n-
    simplex.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    projection.cc File Reference
    \n \n
    \n-
    #include <iostream>
    \n-#include <vector>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-

    \n Classes

    class  Dune::dgf::VertexBlock
     
    \n+
    #include <config.h>
    \n+#include <dune/common/math.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/projection.hh>
    \n+
    \n \n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::dgf::SimplexBlock
    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
     
    \n \n \n \n \n \n \n+\n+\n+

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    namespace  Dune::dgf::Expr
     
    \n+\n+\n+\n

    \n+Functions

    std::ostream & Dune::dgf::operator<< (std::ostream &out, const ProjectionBlock::Token &token)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,25 +8,58 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces\n-simplex.hh File Reference\n-#include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n+Classes | Namespaces | Functions\n+projection.cc File Reference\n+#include \n+#include \n+#include \n Classes\n-class \u00a0Dune::dgf::SimplexBlock\n+struct \u00a0Dune::dgf::Expr::ConstantExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::VariableExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::FunctionCallExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::VectorExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::BracketExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::MinusExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::NormExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::SqrtExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::SinExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::CosExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::PowerExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::SumExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::DifferenceExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::ProductExpression\n+\u00a0\n+struct \u00a0Dune::dgf::Expr::QuotientExpression\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n+namespace \u00a0Dune::dgf::Expr\n+\u00a0\n+ Functions\n+std::ostream &\u00a0Dune::dgf::operator<< (std::ostream &out, const\n+ ProjectionBlock::Token &token)\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00902.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00902.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundarydom.cc File Reference\n+dune-grid: vertex.cc File Reference\n \n \n \n \n \n \n \n@@ -64,19 +64,19 @@\n \n \n \n
    \n \n-
    boundarydom.cc File Reference
    \n+
    vertex.cc File Reference
    \n
    \n
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,17 +9,17 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Namespaces\n-boundarydom.cc File Reference\n+vertex.cc File Reference\n #include \n-#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00905.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00905.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: cube.cc File Reference\n+dune-grid: gridparameter.hh File Reference\n \n \n \n \n \n \n \n@@ -63,21 +63,31 @@\n \n \n
    \n \n-
    cube.cc File Reference
    \n+
    gridparameter.hh File Reference
    \n
    \n
    \n-
    #include <config.h>
    \n-#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
    \n-

    \n Namespaces

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

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::dgf::GridParameterBlock
     Common Grid parameters. More...
     
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,18 +8,24 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Namespaces\n-cube.cc File Reference\n-#include \n-#include \n+Classes | Namespaces\n+gridparameter.hh File Reference\n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::dgf::GridParameterBlock\n+\u00a0 Common Grid parameters. More...\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00908.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00908.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vertex.cc File Reference\n+dune-grid: basic.cc File Reference\n \n \n \n \n \n \n \n@@ -64,19 +64,19 @@\n \n \n \n
    \n \n-
    vertex.cc File Reference
    \n+
    basic.cc File Reference
    \n
    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,17 +9,17 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Namespaces\n-vertex.cc File Reference\n+basic.cc File Reference\n #include \n-#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00911.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00911.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: simplexgeneration.cc File Reference\n+dune-grid: simplexgeneration.hh File Reference\n \n \n \n \n \n \n \n@@ -63,21 +63,29 @@\n \n \n
    \n \n-
    simplexgeneration.cc File Reference
    \n+
    simplexgeneration.hh File Reference
    \n
    \n
    \n-

    \n Namespaces

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

    Go to the source code of this file.

    \n+
    \n+\n+\n+\n+

    \n+Classes

    class  Dune::dgf::SimplexGenerationBlock
     
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,18 +8,22 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Namespaces\n-simplexgeneration.cc File Reference\n-#include \n-#include \n+Classes | Namespaces\n+simplexgeneration.hh File Reference\n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::dgf::SimplexGenerationBlock\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00914.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00914.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: interval.cc File Reference\n+dune-grid: gridparameter.cc File Reference\n \n \n \n \n \n \n \n@@ -64,19 +64,19 @@\n \n \n \n
    \n \n-
    interval.cc File Reference
    \n+
    gridparameter.cc File Reference
    \n
    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,17 +9,17 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Namespaces\n-interval.cc File Reference\n+gridparameter.cc File Reference\n #include \n-#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00917.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00917.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dim.hh File Reference\n+dune-grid: general.cc File Reference\n \n \n \n \n \n \n \n@@ -63,29 +63,21 @@\n \n \n
    \n \n-
    dim.hh File Reference
    \n+
    general.cc File Reference
    \n
    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
    \n-\n-\n-\n-

    \n-Classes

    class  Dune::dgf::DimBlock
     
    \n+
    #include <config.h>
    \n+#include <dune/grid/io/file/dgfparser/blocks/general.hh>
    \n+
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,22 +8,18 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces\n-dim.hh File Reference\n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::dgf::DimBlock\n-\u00a0\n+Namespaces\n+general.cc File Reference\n+#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00920.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00920.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: simplexgeneration.hh File Reference\n+dune-grid: polygon.hh File Reference\n \n \n \n \n \n \n \n@@ -65,25 +65,27 @@\n
  • dune
  • grid
  • io
  • file
  • dgfparser
  • blocks
  • \n \n \n
    \n \n-
    simplexgeneration.hh File Reference
    \n+
    polygon.hh File Reference
    \n
    \n
    \n
    #include <iostream>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+#include <vector>
    \n+#include <dune/common/typetraits.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n \n-\n+\n \n

    \n Classes

    class  Dune::dgf::SimplexGenerationBlock
    struct  Dune::dgf::PolygonBlock
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,20 +9,22 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Classes | Namespaces\n-simplexgeneration.hh File Reference\n+polygon.hh File Reference\n #include \n+#include \n+#include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::dgf::SimplexGenerationBlock\n+struct \u00a0Dune::dgf::PolygonBlock\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00920_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: simplexgeneration.hh Source File\n+dune-grid: polygon.hh Source File\n \n \n \n \n \n \n \n@@ -62,129 +62,86 @@\n \n \n \n
    \n-
    simplexgeneration.hh
    \n+
    polygon.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
    \n-
    6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
    \n+
    3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    4// vi: set et ts=2 sw=2 sts=2:
    \n+
    5#ifndef DUNE_POLYGON_HH
    \n+
    6#define DUNE_POLYGON_HH
    \n
    7
    \n
    8#include <iostream>
    \n-
    9
    \n-\n-
    11
    \n-
    12namespace Dune
    \n-
    13{
    \n-
    14
    \n-
    15 namespace dgf
    \n-
    16 {
    \n-
    17
    \n-\n-
    19 : public BasicBlock
    \n-
    20 {
    \n-
    21 double area_;
    \n-
    22 double angle_;
    \n-
    23 bool display_;
    \n-
    24 std::string path_;
    \n-
    25 bool haspath_;
    \n-
    26 std::string filename_;
    \n-
    27 std::string filetype_;
    \n-
    28 std::string parameter_;
    \n-
    29 std::string dumpfilename_;
    \n-
    30 bool hasfile_;
    \n-
    31 int dimension_;
    \n-
    32
    \n-
    33 public:
    \n-
    34 SimplexGenerationBlock ( std :: istream &in );
    \n-
    35
    \n-
    36 double maxArea ()
    \n-
    37 {
    \n-
    38 return area_;
    \n-
    39 }
    \n-
    40
    \n-
    41 double minAngle ()
    \n-
    42 {
    \n-
    43 return angle_;
    \n-
    44 }
    \n-
    45
    \n-
    46 bool display ()
    \n-
    47 {
    \n-
    48 return display_;
    \n-
    49 }
    \n-
    50
    \n-
    51 bool haspath ()
    \n-
    52 {
    \n-
    53 return haspath_;
    \n-
    54 }
    \n+
    9#include <vector>
    \n+
    10
    \n+
    11#include <dune/common/typetraits.hh>
    \n+\n+
    13
    \n+
    14namespace Dune
    \n+
    15{
    \n+
    16
    \n+
    17 namespace dgf
    \n+
    18 {
    \n+
    19
    \n+
    20 // PolygonBlock
    \n+
    21 // ------------
    \n+
    22
    \n+\n+
    24 : public BasicBlock
    \n+
    25 {
    \n+
    26 PolygonBlock ( std::istream &in, int numVtx, int vtxOfs )
    \n+
    27 : BasicBlock( in, "Polygon" ), vtxBegin_( vtxOfs ), vtxEnd_( vtxOfs + numVtx )
    \n+
    28 {}
    \n+
    29
    \n+
    30 int get ( std::vector< std::vector< int > > &polygons )
    \n+
    31 {
    \n+
    32 reset();
    \n+
    33 std::vector< int > polygon;
    \n+
    34 while( getnextline() )
    \n+
    35 {
    \n+
    36 polygon.clear();
    \n+
    37 for( int vtxIdx; getnextentry( vtxIdx ); )
    \n+
    38 {
    \n+
    39 if( (vtxBegin_ > vtxIdx) || (vtxIdx >= vtxEnd_) )
    \n+
    40 DUNE_THROW( DGFException, "Error in " << *this << ": Invalid vertex index (" << vtxIdx << " not int [" << vtxBegin_ << ", " << vtxEnd_ << "[)" );
    \n+
    41 polygon.push_back( vtxIdx - vtxBegin_ );
    \n+
    42 }
    \n+
    43
    \n+
    44 polygons.push_back( polygon );
    \n+
    45 }
    \n+
    46 return polygons.size();
    \n+
    47 }
    \n+
    48
    \n+
    49 protected:
    \n+\n+
    51 };
    \n+
    52
    \n+
    53 } // namespace dgf
    \n+
    54} // end namespace Dune
    \n
    55
    \n-
    56 std :: string path ()
    \n-
    57 {
    \n-
    58 return path_;
    \n-
    59 }
    \n-
    60
    \n-
    61 bool hasfile ()
    \n-
    62 {
    \n-
    63 return hasfile_;
    \n-
    64 }
    \n-
    65
    \n-
    66 std :: string filename ()
    \n-
    67 {
    \n-
    68 return filename_;
    \n-
    69 }
    \n-
    70
    \n-
    71 std :: string filetype ()
    \n-
    72 {
    \n-
    73 return filetype_;
    \n-
    74 }
    \n-
    75
    \n-
    76 int dimension ()
    \n-
    77 {
    \n-
    78 return dimension_;
    \n-
    79 }
    \n-
    80
    \n-
    81 std :: string parameter ()
    \n-
    82 {
    \n-
    83 return parameter_;
    \n-
    84 }
    \n-
    85
    \n-
    86 const std::string dumpFileName ( ) const
    \n-
    87 {
    \n-
    88 return dumpfilename_;
    \n-
    89 }
    \n-
    90 };
    \n-
    91
    \n-
    92 } // end namespace dgf
    \n-
    93
    \n-
    94} // end namespace Dune
    \n-
    95
    \n-
    96#endif
    \n-\n+
    56#endif // #ifndef DUNE_POLYGON_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    @ polygon
    Definition: common.hh:136
    \n
    Definition: basic.hh:31
    \n-
    Definition: simplexgeneration.hh:20
    \n-
    std::string filename()
    Definition: simplexgeneration.hh:66
    \n-
    double maxArea()
    Definition: simplexgeneration.hh:36
    \n-
    bool haspath()
    Definition: simplexgeneration.hh:51
    \n-
    std::string parameter()
    Definition: simplexgeneration.hh:81
    \n-
    int dimension()
    Definition: simplexgeneration.hh:76
    \n-
    std::string path()
    Definition: simplexgeneration.hh:56
    \n-
    const std::string dumpFileName() const
    Definition: simplexgeneration.hh:86
    \n-
    bool display()
    Definition: simplexgeneration.hh:46
    \n-
    SimplexGenerationBlock(std ::istream &in)
    Definition: simplexgeneration.cc:18
    \n-
    double minAngle()
    Definition: simplexgeneration.hh:41
    \n-
    bool hasfile()
    Definition: simplexgeneration.hh:61
    \n-
    std::string filetype()
    Definition: simplexgeneration.hh:71
    \n+
    void reset()
    Definition: basic.hh:51
    \n+
    bool getnextline()
    Definition: basic.cc:94
    \n+
    bool getnextentry(ENTRY &entry)
    Definition: basic.hh:63
    \n+
    Definition: polygon.hh:25
    \n+
    PolygonBlock(std::istream &in, int numVtx, int vtxOfs)
    Definition: polygon.hh:26
    \n+
    int get(std::vector< std::vector< int > > &polygons)
    Definition: polygon.hh:30
    \n+
    int vtxEnd_
    Definition: polygon.hh:50
    \n+
    int vtxBegin_
    Definition: polygon.hh:50
    \n+
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,153 +8,106 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-simplexgeneration.hh\n+polygon.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n- 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH\n- 6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH\n+ 3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+ 4// vi: set et ts=2 sw=2 sts=2:\n+ 5#ifndef DUNE_POLYGON_HH\n+ 6#define DUNE_POLYGON_HH\n 7\n 8#include \n- 9\n- 10#include \n- 11\n- 12namespace Dune\n- 13{\n- 14\n- 15 namespace dgf\n- 16 {\n- 17\n-18 class SimplexGenerationBlock\n- 19 : public BasicBlock\n- 20 {\n- 21 double area_;\n- 22 double angle_;\n- 23 bool display_;\n- 24 std::string path_;\n- 25 bool haspath_;\n- 26 std::string filename_;\n- 27 std::string filetype_;\n- 28 std::string parameter_;\n- 29 std::string dumpfilename_;\n- 30 bool hasfile_;\n- 31 int dimension_;\n- 32\n- 33 public:\n- 34 SimplexGenerationBlock ( std :: istream &in );\n- 35\n-36 double maxArea ()\n- 37 {\n- 38 return area_;\n- 39 }\n- 40\n-41 double minAngle ()\n- 42 {\n- 43 return angle_;\n- 44 }\n- 45\n-46 bool display ()\n- 47 {\n- 48 return display_;\n- 49 }\n- 50\n-51 bool haspath ()\n- 52 {\n- 53 return haspath_;\n- 54 }\n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13\n+ 14namespace Dune\n+ 15{\n+ 16\n+ 17 namespace dgf\n+ 18 {\n+ 19\n+ 20 // PolygonBlock\n+ 21 // ------------\n+ 22\n+23 struct PolygonBlock\n+ 24 : public BasicBlock\n+ 25 {\n+26 PolygonBlock ( std::istream &in, int numVtx, int vtxOfs )\n+ 27 : BasicBlock( in, \"Polygon\" ), vtxBegin_( vtxOfs ), vtxEnd_( vtxOfs +\n+numVtx )\n+ 28 {}\n+ 29\n+30 int get ( std::vector< std::vector< int > > &polygons )\n+ 31 {\n+ 32 reset();\n+ 33 std::vector< int > polygon;\n+ 34 while( getnextline() )\n+ 35 {\n+ 36 polygon.clear();\n+ 37 for( int vtxIdx; getnextentry( vtxIdx ); )\n+ 38 {\n+ 39 if( (vtxBegin_ > vtxIdx) || (vtxIdx >= vtxEnd_) )\n+ 40 DUNE_THROW( DGFException, \"Error in \" << *this << \": Invalid vertex index\n+(\" << vtxIdx << \" not int [\" << vtxBegin_ << \", \" << vtxEnd_ << \"[)\" );\n+ 41 polygon.push_back( vtxIdx - vtxBegin_ );\n+ 42 }\n+ 43\n+ 44 polygons.push_back( polygon );\n+ 45 }\n+ 46 return polygons.size();\n+ 47 }\n+ 48\n+ 49 protected:\n+50 int vtxBegin_, vtxEnd_;\n+ 51 };\n+ 52\n+ 53 } // namespace dgf\n+ 54} // end namespace Dune\n 55\n-56 std :: string path ()\n- 57 {\n- 58 return path_;\n- 59 }\n- 60\n-61 bool hasfile ()\n- 62 {\n- 63 return hasfile_;\n- 64 }\n- 65\n-66 std :: string filename ()\n- 67 {\n- 68 return filename_;\n- 69 }\n- 70\n-71 std :: string filetype ()\n- 72 {\n- 73 return filetype_;\n- 74 }\n- 75\n-76 int dimension ()\n- 77 {\n- 78 return dimension_;\n- 79 }\n- 80\n-81 std :: string parameter ()\n- 82 {\n- 83 return parameter_;\n- 84 }\n- 85\n-86 const std::string dumpFileName ( ) const\n- 87 {\n- 88 return dumpfilename_;\n- 89 }\n- 90 };\n- 91\n- 92 } // end namespace dgf\n- 93\n- 94} // end namespace Dune\n- 95\n- 96#endif\n+ 56#endif // #ifndef DUNE_POLYGON_HH\n basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::VTK::polygon\n+@ polygon\n+Definition: common.hh:136\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n-Dune::dgf::SimplexGenerationBlock\n-Definition: simplexgeneration.hh:20\n-Dune::dgf::SimplexGenerationBlock::filename\n-std::string filename()\n-Definition: simplexgeneration.hh:66\n-Dune::dgf::SimplexGenerationBlock::maxArea\n-double maxArea()\n-Definition: simplexgeneration.hh:36\n-Dune::dgf::SimplexGenerationBlock::haspath\n-bool haspath()\n-Definition: simplexgeneration.hh:51\n-Dune::dgf::SimplexGenerationBlock::parameter\n-std::string parameter()\n-Definition: simplexgeneration.hh:81\n-Dune::dgf::SimplexGenerationBlock::dimension\n-int dimension()\n-Definition: simplexgeneration.hh:76\n-Dune::dgf::SimplexGenerationBlock::path\n-std::string path()\n-Definition: simplexgeneration.hh:56\n-Dune::dgf::SimplexGenerationBlock::dumpFileName\n-const std::string dumpFileName() const\n-Definition: simplexgeneration.hh:86\n-Dune::dgf::SimplexGenerationBlock::display\n-bool display()\n-Definition: simplexgeneration.hh:46\n-Dune::dgf::SimplexGenerationBlock::SimplexGenerationBlock\n-SimplexGenerationBlock(std ::istream &in)\n-Definition: simplexgeneration.cc:18\n-Dune::dgf::SimplexGenerationBlock::minAngle\n-double minAngle()\n-Definition: simplexgeneration.hh:41\n-Dune::dgf::SimplexGenerationBlock::hasfile\n-bool hasfile()\n-Definition: simplexgeneration.hh:61\n-Dune::dgf::SimplexGenerationBlock::filetype\n-std::string filetype()\n-Definition: simplexgeneration.hh:71\n+Dune::dgf::BasicBlock::reset\n+void reset()\n+Definition: basic.hh:51\n+Dune::dgf::BasicBlock::getnextline\n+bool getnextline()\n+Definition: basic.cc:94\n+Dune::dgf::BasicBlock::getnextentry\n+bool getnextentry(ENTRY &entry)\n+Definition: basic.hh:63\n+Dune::dgf::PolygonBlock\n+Definition: polygon.hh:25\n+Dune::dgf::PolygonBlock::PolygonBlock\n+PolygonBlock(std::istream &in, int numVtx, int vtxOfs)\n+Definition: polygon.hh:26\n+Dune::dgf::PolygonBlock::get\n+int get(std::vector< std::vector< int > > &polygons)\n+Definition: polygon.hh:30\n+Dune::dgf::PolygonBlock::vtxEnd_\n+int vtxEnd_\n+Definition: polygon.hh:50\n+Dune::dgf::PolygonBlock::vtxBegin_\n+int vtxBegin_\n+Definition: polygon.hh:50\n+Dune::DGFException\n+exception class for IO errors in the DGF parser\n+Definition: dgfexception.hh:16\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00923.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00923.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: basic.hh File Reference\n+dune-grid: boundarydom.hh File Reference\n \n \n \n \n \n \n \n@@ -64,47 +64,42 @@\n \n \n \n
    \n \n-
    basic.hh File Reference
    \n+Namespaces
    \n+
    boundarydom.hh File Reference
    \n \n
    \n-
    #include <cassert>
    \n-#include <cctype>
    \n-#include <iostream>
    \n+
    #include <iostream>
    \n #include <string>
    \n-#include <sstream>
    \n-#include <dune/common/stdstreams.hh>
    \n-#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n+#include <vector>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+#include <dune/grid/io/file/dgfparser/parser.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n \n-\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::dgf::BasicBlock
    struct  Dune::dgf::DomainData
     
    struct  Dune::dgf::Domain
     
    class  Dune::dgf::BoundaryDomBlock
     
    \n \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n-\n-\n-\n

    \n-Functions

    void Dune::dgf::makeupcase (std ::string &s)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,33 +8,31 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-Classes | Namespaces | Functions\n-basic.hh File Reference\n-#include \n-#include \n+Classes | Namespaces\n+boundarydom.hh File Reference\n #include \n #include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::dgf::BasicBlock\n+struct \u00a0Dune::dgf::DomainData\n+\u00a0\n+struct \u00a0Dune::dgf::Domain\n+\u00a0\n+ class \u00a0Dune::dgf::BoundaryDomBlock\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n- Functions\n-void\u00a0Dune::dgf::makeupcase (std ::string &s)\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00923_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: basic.hh Source File\n+dune-grid: boundarydom.hh Source File\n \n \n \n \n \n \n \n@@ -62,149 +62,364 @@\n \n \n \n
    \n-
    basic.hh
    \n+
    boundarydom.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_BASICBLOCK_HH
    \n-
    6#define DUNE_DGF_BASICBLOCK_HH
    \n+
    5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH
    \n+
    6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH
    \n
    7
    \n-
    8#include <cassert>
    \n-
    9#include <cctype>
    \n-
    10#include <iostream>
    \n-
    11#include <string>
    \n-
    12#include <sstream>
    \n-
    13
    \n-
    14#include <dune/common/stdstreams.hh>
    \n-\n-\n-
    17
    \n-
    18namespace Dune
    \n-
    19{
    \n-
    20
    \n-
    21 namespace dgf
    \n-
    22 {
    \n-
    23
    \n-
    24 inline void makeupcase( std :: string &s )
    \n-
    25 {
    \n-
    26 for (size_t i=0; i<s.size(); i++)
    \n-
    27 s[i]=std::toupper(s[i]);
    \n-
    28 }
    \n-
    29
    \n-\n-
    31 {
    \n-
    32 int pos; // line number
    \n-
    33 bool active; // block was found
    \n-
    34 bool empty; // block was found but was empty
    \n-
    35 std::string identifier; // identifier of this block
    \n-
    36 int linecount; // total number of lines in the block
    \n-
    37 std::stringstream block_; // the block itself
    \n-
    38 std::string oneline; // the active line in the block
    \n-
    39
    \n-
    40 // get the block (if it exists)
    \n-
    41 void getblock ( std::istream &in );
    \n-
    42
    \n-
    43 // count the number of lines in the block
    \n-
    44 // int countlines ();
    \n-
    45
    \n-
    46 protected:
    \n-
    47 std::stringstream line; // the active line as string buffer
    \n-
    48 // for use in the derived classes
    \n-
    49
    \n-
    50 // go back to beginning of block
    \n-
    51 void reset ()
    \n-
    52 {
    \n-
    53 pos = -1;
    \n-
    54 block_.clear();
    \n-
    55 block_.seekg( 0 );
    \n-
    56 }
    \n-
    57
    \n-
    58 // get next line and store in string stream
    \n-
    59 bool getnextline ();
    \n-
    60
    \n-
    61 // get next entry in line
    \n-
    62 template< class ENTRY >
    \n-
    63 bool getnextentry( ENTRY &entry )
    \n-
    64 {
    \n-
    65 line >> entry;
    \n-
    66 return static_cast< bool >( line );
    \n-
    67 }
    \n-
    68
    \n-
    69 bool gettokenparam ( std :: string token, std :: string &entry );
    \n-
    70 bool findtoken( std :: string token );
    \n-
    71
    \n-
    72 public:
    \n-
    73 // search for block in file and store in buffer
    \n-
    74 BasicBlock ( std::istream &in, const char* id );
    \n-
    75
    \n-
    76 // some information on this block
    \n-
    77 bool isactive ()
    \n-
    78 {
    \n-
    79 return active;
    \n-
    80 }
    \n-
    81
    \n-
    82 bool isempty ()
    \n-
    83 {
    \n-
    84 return empty;
    \n-
    85 }
    \n-
    86
    \n-
    87 int &noflines ()
    \n-
    88 {
    \n-
    89 return linecount;
    \n-
    90 }
    \n-
    91
    \n-\n-
    93 {
    \n-
    94 return pos;
    \n-
    95 }
    \n-
    96
    \n-
    97 const std::string & id () const
    \n-
    98 {
    \n-
    99 return identifier;
    \n-
    100 }
    \n-
    101
    \n-
    102 // for error messages
    \n-
    103 friend std :: ostream &operator<< ( std :: ostream &os, const BasicBlock &b )
    \n-
    104 {
    \n-
    105 return os << "block " << b.identifier << " (line " << b.pos << ")";
    \n-
    106 }
    \n-
    107
    \n-
    108 };
    \n+
    8#include <iostream>
    \n+
    9#include <string>
    \n+
    10#include <vector>
    \n+
    11
    \n+\n+\n+
    14
    \n+
    15
    \n+
    16namespace Dune
    \n+
    17{
    \n+
    18
    \n+
    19 namespace dgf
    \n+
    20 {
    \n+
    21
    \n+\n+
    23 {
    \n+\n+
    25
    \n+\n+
    27 : id_( 0 ),
    \n+
    28 parameter_( DGFBoundaryParameter::defaultValue() ),
    \n+
    29 defaultData_( false )
    \n+
    30 { }
    \n+
    31
    \n+\n+
    33
    \n+
    34 // constructor
    \n+
    35 DomainData ( int id, BoundaryParameter parameter, bool defaultData = false )
    \n+
    36 : id_( id ),
    \n+
    37 parameter_( parameter ),
    \n+
    38 defaultData_( defaultData )
    \n+
    39 { }
    \n+
    40
    \n+
    41 // return id
    \n+
    42 int id () const
    \n+
    43 {
    \n+
    44 return id_;
    \n+
    45 }
    \n+
    46
    \n+
    47 // return true, if additional parameters given
    \n+
    48 bool hasParameter () const
    \n+
    49 {
    \n+
    50 return (!parameter_.empty());
    \n+
    51 }
    \n+
    52
    \n+
    53 // return additional parameters
    \n+\n+
    55 {
    \n+
    56 return parameter_;
    \n+
    57 }
    \n+
    58
    \n+
    59 // reset data
    \n+
    60 void reset ( int id, BoundaryParameter parameter, bool defaultData = false )
    \n+
    61 {
    \n+
    62 id_ = id;
    \n+
    63 parameter_ = parameter;
    \n+
    64 defaultData_ = defaultData;
    \n+
    65 }
    \n+
    66
    \n+
    67 // returns true if data origins from default boundary domain
    \n+
    68 bool isDefault () const
    \n+
    69 {
    \n+
    70 return defaultData_;
    \n+
    71 }
    \n+
    72
    \n+
    73 friend std::ostream & operator<< ( std :: ostream & os, const DomainData & ddata )
    \n+
    74 {
    \n+
    75 os << "domain data: id = " << ddata.id();
    \n+
    76 if( ddata.hasParameter() )
    \n+
    77 os << ", parameter = " << ddata.parameter();
    \n+
    78 return os;
    \n+
    79 }
    \n+
    80
    \n+
    81 private:
    \n+
    82 int id_;
    \n+
    83 BoundaryParameter parameter_;
    \n+
    84 bool defaultData_;
    \n+
    85
    \n+
    86 }; // end struct DomainData
    \n+
    87
    \n+
    88
    \n+
    89 struct Domain
    \n+
    90 {
    \n+
    91 // dimension of world coordinates
    \n+
    92 const int dimensionworld;
    \n+
    93
    \n+\n+
    95
    \n+
    96 // constructor
    \n+
    97 Domain( std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter & parameter )
    \n+
    98 : dimensionworld( p1.size() ),
    \n+
    99 left_( p1 ),
    \n+
    100 right_( p2 ),
    \n+
    101 data_( id, parameter )
    \n+
    102 {
    \n+
    103 if( int( p2.size() ) != dimensionworld )
    \n+
    104 {
    \n+
    105 DUNE_THROW(DGFException,
    \n+
    106 "ERROR in " << *this << "!");
    \n+
    107 }
    \n+
    108 }
    \n
    109
    \n-
    110 } // end namespace dgf
    \n-
    111
    \n-
    112} // end namespace Dune
    \n-
    113
    \n-
    114#endif
    \n-\n-\n+
    110 // constructor
    \n+
    111 Domain( std::vector< double > p1, std::vector< double > p2, DomainData & data )
    \n+
    112 : dimensionworld( p1.size() ),
    \n+
    113 left_( p1 ),
    \n+
    114 right_( p2 ),
    \n+
    115 data_( data )
    \n+
    116 {
    \n+
    117 if( int( p2.size() ) != dimensionworld )
    \n+
    118 {
    \n+
    119 DUNE_THROW(DGFException,
    \n+
    120 "ERROR in " << *this << "!");
    \n+
    121 }
    \n+
    122 }
    \n+
    123
    \n+
    124 // copy constructor
    \n+
    125 Domain ( const Domain & other )
    \n+\n+
    127 left_( other.left_ ),
    \n+
    128 right_( other.right_ ),
    \n+
    129 data_( other.data_ )
    \n+
    130 {
    \n+
    131 if( dimensionworld != other.dimensionworld )
    \n+
    132 {
    \n+
    133 DUNE_THROW(DGFException,
    \n+
    134 "ERROR in " << *this << "!");
    \n+
    135 }
    \n+
    136 }
    \n+
    137
    \n+
    138 // assignment
    \n+
    139 Domain & operator = ( const Domain & other )
    \n+
    140 {
    \n+
    141 if( dimensionworld != other.dimensionworld )
    \n+
    142 {
    \n+
    143 DUNE_THROW(DGFException,
    \n+
    144 "ERROR in " << *this << "!");
    \n+
    145 }
    \n+
    146
    \n+
    147 left_ = other.left_;
    \n+
    148 right_= other.right_;
    \n+
    149 data_= other.data_;
    \n+
    150 return *this;
    \n+
    151 }
    \n+
    152
    \n+
    153 // return true if point is contained in boundary domain
    \n+
    154 template< class Vector >
    \n+
    155 bool contains ( const Vector & x ) const
    \n+
    156 {
    \n+
    157 bool ret = true;
    \n+
    158 for( int i = 0; i < dimensionworld; ++i )
    \n+
    159 {
    \n+
    160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] )
    \n+
    161 ret = false;
    \n+
    162 }
    \n+
    163 return ret;
    \n+
    164 }
    \n+
    165
    \n+
    166 const DomainData & data () const
    \n+
    167 {
    \n+
    168 return data_;
    \n+
    169 }
    \n+
    170
    \n+
    171 // for error messages
    \n+
    172 friend std::ostream & operator<< ( std :: ostream &os, const Domain & domain )
    \n+
    173 {
    \n+
    174 os << "domain: " << std::endl;
    \n+
    175 os << "left = ";
    \n+
    176 for( int i = 0; i < domain.dimensionworld; ++i )
    \n+
    177 os << domain.left_[ i ] << " ";
    \n+
    178 os << std::endl;
    \n+
    179 os << "right = ";
    \n+
    180 for( int i = 0; i < domain.dimensionworld; ++i )
    \n+
    181 os << domain.right_[ i ] << " ";
    \n+
    182 os << std::endl;
    \n+
    183 os << domain.data();
    \n+
    184 return os;
    \n+
    185 }
    \n+
    186
    \n+
    187 private:
    \n+
    188 std::vector< double > left_, right_;
    \n+
    189 DomainData data_;
    \n+
    190
    \n+
    191 };
    \n+
    192
    \n+\n+
    194 : public BasicBlock
    \n+
    195 {
    \n+
    196 typedef DGFBoundaryParameter::type BoundaryParameter;
    \n+
    197
    \n+
    198 // the dimension of the vertices (is given from user)
    \n+
    199 int dimworld_;
    \n+
    200
    \n+
    201 // internal counter
    \n+
    202 int counter_;
    \n+
    203
    \n+
    204 // default values if given
    \n+
    205 DomainData * default_;
    \n+
    206
    \n+
    207 // storage for all domains;
    \n+
    208 int ndomains_;
    \n+
    209 std::vector< Domain > domains_;
    \n+
    210
    \n+
    211 public:
    \n+
    212 // initialize vertex block and get first vertex
    \n+
    213 BoundaryDomBlock ( std::istream & in, int cdimworld );
    \n+
    214
    \n+
    215 // destructor
    \n+\n+
    217 {
    \n+
    218 if( default_ )
    \n+
    219 delete default_;
    \n+
    220 }
    \n+
    221
    \n+
    222 // go to next domain in block
    \n+
    223 bool next ()
    \n+
    224 {
    \n+
    225 counter_++;
    \n+
    226 return ( counter_ < ndomains_ );
    \n+
    227 }
    \n+
    228
    \n+
    229 // return domain
    \n+
    230 const Domain & domain () const
    \n+
    231 {
    \n+
    232 return domains_.at( counter_ );
    \n+
    233 }
    \n+
    234
    \n+
    235 // return true if default is given
    \n+
    236 bool hasDefaultData () const
    \n+
    237 {
    \n+
    238 return bool( default_ );
    \n+
    239 }
    \n+
    240
    \n+
    241 // return default data
    \n+
    242 const DomainData * defaultData () const
    \n+
    243 {
    \n+
    244 return default_;
    \n+
    245 }
    \n+
    246
    \n+
    247 // return true if any boundary domain block has
    \n+
    248 // additional parameters
    \n+
    249 bool hasParameter () const;
    \n+
    250
    \n+
    251 void reset ()
    \n+
    252 {
    \n+\n+
    254 counter_ = -1;
    \n+
    255 }
    \n+
    256
    \n+
    257 // return true while block is active
    \n+
    258 bool ok ()
    \n+
    259 {
    \n+
    260 return ( counter_ <= ndomains_ );
    \n+
    261 }
    \n+
    262
    \n+
    263 // return data if all vectors in array are contained within
    \n+
    264 // a single domain
    \n+
    265 template< class Vector >
    \n+
    266 const DomainData * contains ( const std::vector< Vector > & v ) const
    \n+
    267 {
    \n+
    268 std::vector< int > index( ndomains_ );
    \n+
    269 for( int i = 0; i < ndomains_; ++i)
    \n+
    270 index[ i ] = i;
    \n+
    271
    \n+
    272 size_t N = v.size();
    \n+
    273 for( size_t i = 0; i < N; ++i )
    \n+
    274 {
    \n+
    275 if( index.empty() )
    \n+
    276 break;
    \n+
    277
    \n+
    278 const int n = index.size();
    \n+
    279 assert( n > 0 );
    \n+
    280 for( int j = n-1; j >= 0; --j )
    \n+
    281 {
    \n+
    282 bool inside = domains_[ index[ j ] ].contains( v[ i ] );
    \n+
    283 if( !inside )
    \n+
    284 index.erase( index.begin() + j );
    \n+
    285 }
    \n+
    286 }
    \n+
    287
    \n+
    288 // check wheter no boundary domain found
    \n+
    289 if( index.empty() )
    \n+
    290 return default_;
    \n+
    291
    \n+
    292 // check for ambiguity
    \n+
    293 if( index.size() > 1 )
    \n+
    294 dwarn << "WARNING: ambiguous boundary domain assignment, use first boundary domain in list" << std::endl;
    \n+
    295
    \n+
    296 return &domains_[ index[ 0 ] ].data();
    \n+
    297 }
    \n+
    298
    \n+
    299 private:
    \n+
    300 void readBlock ();
    \n+
    301 };
    \n+
    302
    \n+
    303 } // end namespace dgf
    \n+
    304
    \n+
    305} // end namespace Dune
    \n+
    306
    \n+
    307#endif
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    void makeupcase(std ::string &s)
    Definition: basic.hh:24
    \n
    Definition: basic.hh:31
    \n
    void reset()
    Definition: basic.hh:51
    \n-
    bool getnextline()
    Definition: basic.cc:94
    \n-
    BasicBlock(std::istream &in, const char *id)
    Definition: basic.cc:18
    \n-
    bool findtoken(std ::string token)
    Definition: basic.cc:123
    \n-
    bool getnextentry(ENTRY &entry)
    Definition: basic.hh:63
    \n-
    const std::string & id() const
    Definition: basic.hh:97
    \n-
    int & noflines()
    Definition: basic.hh:87
    \n-
    friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b)
    Definition: basic.hh:103
    \n-
    bool isempty()
    Definition: basic.hh:82
    \n-
    bool isactive()
    Definition: basic.hh:77
    \n-
    int linenumber()
    Definition: basic.hh:92
    \n-
    std::stringstream line
    Definition: basic.hh:47
    \n-
    bool gettokenparam(std ::string token, std ::string &entry)
    Definition: basic.cc:104
    \n+
    Definition: boundarydom.hh:23
    \n+
    void reset(int id, BoundaryParameter parameter, bool defaultData=false)
    Definition: boundarydom.hh:60
    \n+
    ~DomainData()
    Definition: boundarydom.hh:32
    \n+
    DGFBoundaryParameter::type BoundaryParameter
    Definition: boundarydom.hh:24
    \n+
    DomainData()
    Definition: boundarydom.hh:26
    \n+
    int id() const
    Definition: boundarydom.hh:42
    \n+
    const BoundaryParameter & parameter() const
    Definition: boundarydom.hh:54
    \n+
    friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata)
    Definition: boundarydom.hh:73
    \n+
    bool hasParameter() const
    Definition: boundarydom.hh:48
    \n+
    DomainData(int id, BoundaryParameter parameter, bool defaultData=false)
    Definition: boundarydom.hh:35
    \n+
    bool isDefault() const
    Definition: boundarydom.hh:68
    \n+
    Definition: boundarydom.hh:90
    \n+
    Domain(std::vector< double > p1, std::vector< double > p2, int id, BoundaryParameter &parameter)
    Definition: boundarydom.hh:97
    \n+
    Domain(const Domain &other)
    Definition: boundarydom.hh:125
    \n+
    const int dimensionworld
    Definition: boundarydom.hh:92
    \n+
    bool contains(const Vector &x) const
    Definition: boundarydom.hh:155
    \n+
    DGFBoundaryParameter::type BoundaryParameter
    Definition: boundarydom.hh:94
    \n+
    friend std::ostream & operator<<(std ::ostream &os, const Domain &domain)
    Definition: boundarydom.hh:172
    \n+
    Domain & operator=(const Domain &other)
    Definition: boundarydom.hh:139
    \n+
    const DomainData & data() const
    Definition: boundarydom.hh:166
    \n+
    Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data)
    Definition: boundarydom.hh:111
    \n+
    Definition: boundarydom.hh:195
    \n+
    ~BoundaryDomBlock()
    Definition: boundarydom.hh:216
    \n+
    bool hasParameter() const
    Definition: boundarydom.cc:138
    \n+
    const Domain & domain() const
    Definition: boundarydom.hh:230
    \n+
    const DomainData * contains(const std::vector< Vector > &v) const
    Definition: boundarydom.hh:266
    \n+
    bool next()
    Definition: boundarydom.hh:223
    \n+
    void reset()
    Definition: boundarydom.hh:251
    \n+
    bool ok()
    Definition: boundarydom.hh:258
    \n+
    bool hasDefaultData() const
    Definition: boundarydom.hh:236
    \n+
    BoundaryDomBlock(std::istream &in, int cdimworld)
    Definition: boundarydom.cc:18
    \n+
    const DomainData * defaultData() const
    Definition: boundarydom.hh:242
    \n+
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n+
    Contains types for additional features.
    Definition: parser.hh:23
    \n+
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,177 +8,439 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-basic.hh\n+boundarydom.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_BASICBLOCK_HH\n- 6#define DUNE_DGF_BASICBLOCK_HH\n+ 5#ifndef DUNE_DGF_BOUNDARYDOMBLOCK_HH\n+ 6#define DUNE_DGF_BOUNDARYDOMBLOCK_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13\n- 14#include \n- 15#include \n- 16#include \n- 17\n- 18namespace Dune\n- 19{\n- 20\n- 21 namespace dgf\n- 22 {\n- 23\n-24 inline void makeupcase( std :: string &s )\n- 25 {\n- 26 for (size_t i=0; i\n-63 bool getnextentry( ENTRY &entry )\n- 64 {\n- 65 line >> entry;\n- 66 return static_cast< bool >( line );\n- 67 }\n- 68\n- 69 bool gettokenparam ( std :: string token, std :: string &entry );\n- 70 bool findtoken( std :: string token );\n- 71\n- 72 public:\n- 73 // search for block in file and store in buffer\n- 74 BasicBlock ( std::istream &in, const char* id );\n- 75\n- 76 // some information on this block\n-77 bool isactive ()\n- 78 {\n- 79 return active;\n- 80 }\n- 81\n-82 bool isempty ()\n- 83 {\n- 84 return empty;\n- 85 }\n- 86\n-87 int &noflines ()\n- 88 {\n- 89 return linecount;\n- 90 }\n- 91\n-92 int linenumber ()\n- 93 {\n- 94 return pos;\n- 95 }\n- 96\n-97 const std::string & id () const\n- 98 {\n- 99 return identifier;\n- 100 }\n- 101\n- 102 // for error messages\n-103 friend std :: ostream &operator<<( std :: ostream &os, const BasicBlock &b\n-)\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11\n+ 12#include \n+ 13#include \n+ 14\n+ 15\n+ 16namespace Dune\n+ 17{\n+ 18\n+ 19 namespace dgf\n+ 20 {\n+ 21\n+22 struct DomainData\n+ 23 {\n+24 typedef DGFBoundaryParameter::type BoundaryParameter;\n+ 25\n+26 DomainData ()\n+ 27 : id_( 0 ),\n+ 28 parameter_( DGFBoundaryParameter::defaultValue() ),\n+ 29 defaultData_( false )\n+ 30 { }\n+ 31\n+32 ~DomainData () { }\n+ 33\n+ 34 // constructor\n+35 DomainData ( int id, BoundaryParameter parameter, bool defaultData = false )\n+ 36 : id_( id ),\n+ 37 parameter_( parameter ),\n+ 38 defaultData_( defaultData )\n+ 39 { }\n+ 40\n+ 41 // return id\n+42 int id () const\n+ 43 {\n+ 44 return id_;\n+ 45 }\n+ 46\n+ 47 // return true, if additional parameters given\n+48 bool hasParameter () const\n+ 49 {\n+ 50 return (!parameter_.empty());\n+ 51 }\n+ 52\n+ 53 // return additional parameters\n+54 const BoundaryParameter & parameter () const\n+ 55 {\n+ 56 return parameter_;\n+ 57 }\n+ 58\n+ 59 // reset data\n+60 void reset ( int id, BoundaryParameter parameter, bool defaultData = false )\n+ 61 {\n+ 62 id_ = id;\n+ 63 parameter_ = parameter;\n+ 64 defaultData_ = defaultData;\n+ 65 }\n+ 66\n+ 67 // returns true if data origins from default boundary domain\n+68 bool isDefault () const\n+ 69 {\n+ 70 return defaultData_;\n+ 71 }\n+ 72\n+73 friend std::ostream & operator<<( std :: ostream & os, const DomainData &\n+ddata )\n+ 74 {\n+ 75 os << \"domain data: id = \" << ddata.id();\n+ 76 if( ddata.hasParameter() )\n+ 77 os << \", parameter = \" << ddata.parameter();\n+ 78 return os;\n+ 79 }\n+ 80\n+ 81 private:\n+ 82 int id_;\n+ 83 BoundaryParameter parameter_;\n+ 84 bool defaultData_;\n+ 85\n+ 86 }; // end struct DomainData\n+ 87\n+ 88\n+89 struct Domain\n+ 90 {\n+ 91 // dimension of world coordinates\n+92 const int dimensionworld;\n+ 93\n+94 typedef DGFBoundaryParameter::type BoundaryParameter;\n+ 95\n+ 96 // constructor\n+97 Domain( std::vector< double > p1, std::vector< double > p2, int id,\n+BoundaryParameter & parameter )\n+ 98 : dimensionworld( p1.size() ),\n+ 99 left_( p1 ),\n+ 100 right_( p2 ),\n+ 101 data_( id, parameter )\n+ 102 {\n+ 103 if( int( p2.size() ) != dimensionworld )\n 104 {\n- 105 return os << \"block \" << b.identifier << \" (line \" << b.pos << \")\";\n- 106 }\n- 107\n- 108 };\n+ 105 DUNE_THROW(DGFException,\n+ 106 \"ERROR in \" << *this << \"!\");\n+ 107 }\n+ 108 }\n 109\n- 110 } // end namespace dgf\n- 111\n- 112} // end namespace Dune\n- 113\n- 114#endif\n-dgfexception.hh\n-entitykey.hh\n+ 110 // constructor\n+111 Domain( std::vector< double > p1, std::vector< double > p2, DomainData &\n+data )\n+ 112 : dimensionworld( p1.size() ),\n+ 113 left_( p1 ),\n+ 114 right_( p2 ),\n+ 115 data_( data )\n+ 116 {\n+ 117 if( int( p2.size() ) != dimensionworld )\n+ 118 {\n+ 119 DUNE_THROW(DGFException,\n+ 120 \"ERROR in \" << *this << \"!\");\n+ 121 }\n+ 122 }\n+ 123\n+ 124 // copy constructor\n+125 Domain ( const Domain & other )\n+ 126 : dimensionworld( other.dimensionworld ),\n+ 127 left_( other.left_ ),\n+ 128 right_( other.right_ ),\n+ 129 data_( other.data_ )\n+ 130 {\n+ 131 if( dimensionworld != other.dimensionworld )\n+ 132 {\n+ 133 DUNE_THROW(DGFException,\n+ 134 \"ERROR in \" << *this << \"!\");\n+ 135 }\n+ 136 }\n+ 137\n+ 138 // assignment\n+139 Domain & operator_=( const Domain & other )\n+ 140 {\n+ 141 if( dimensionworld != other.dimensionworld )\n+ 142 {\n+ 143 DUNE_THROW(DGFException,\n+ 144 \"ERROR in \" << *this << \"!\");\n+ 145 }\n+ 146\n+ 147 left_ = other.left_;\n+ 148 right_= other.right_;\n+ 149 data_= other.data_;\n+ 150 return *this;\n+ 151 }\n+ 152\n+ 153 // return true if point is contained in boundary domain\n+ 154 template< class Vector >\n+155 bool contains ( const Vector & x ) const\n+ 156 {\n+ 157 bool ret = true;\n+ 158 for( int i = 0; i < dimensionworld; ++i )\n+ 159 {\n+ 160 if( x[ i ] < left_[ i ] || x[ i ] > right_[ i ] )\n+ 161 ret = false;\n+ 162 }\n+ 163 return ret;\n+ 164 }\n+ 165\n+166 const DomainData & data () const\n+ 167 {\n+ 168 return data_;\n+ 169 }\n+ 170\n+ 171 // for error messages\n+172 friend std::ostream & operator<<( std :: ostream &os, const Domain & domain\n+)\n+ 173 {\n+ 174 os << \"domain: \" << std::endl;\n+ 175 os << \"left = \";\n+ 176 for( int i = 0; i < domain.dimensionworld; ++i )\n+ 177 os << domain.left_[ i ] << \" \";\n+ 178 os << std::endl;\n+ 179 os << \"right = \";\n+ 180 for( int i = 0; i < domain.dimensionworld; ++i )\n+ 181 os << domain.right_[ i ] << \" \";\n+ 182 os << std::endl;\n+ 183 os << domain.data();\n+ 184 return os;\n+ 185 }\n+ 186\n+ 187 private:\n+ 188 std::vector< double > left_, right_;\n+ 189 DomainData data_;\n+ 190\n+ 191 };\n+ 192\n+193 class BoundaryDomBlock\n+ 194 : public BasicBlock\n+ 195 {\n+ 196 typedef DGFBoundaryParameter::type BoundaryParameter;\n+ 197\n+ 198 // the dimension of the vertices (is given from user)\n+ 199 int dimworld_;\n+ 200\n+ 201 // internal counter\n+ 202 int counter_;\n+ 203\n+ 204 // default values if given\n+ 205 DomainData * default_;\n+ 206\n+ 207 // storage for all domains;\n+ 208 int ndomains_;\n+ 209 std::vector< Domain > domains_;\n+ 210\n+ 211 public:\n+ 212 // initialize vertex block and get first vertex\n+ 213 BoundaryDomBlock ( std::istream & in, int cdimworld );\n+ 214\n+ 215 // destructor\n+216 ~BoundaryDomBlock ()\n+ 217 {\n+ 218 if( default_ )\n+ 219 delete default_;\n+ 220 }\n+ 221\n+ 222 // go to next domain in block\n+223 bool next ()\n+ 224 {\n+ 225 counter_++;\n+ 226 return ( counter_ < ndomains_ );\n+ 227 }\n+ 228\n+ 229 // return domain\n+230 const Domain & domain () const\n+ 231 {\n+ 232 return domains_.at( counter_ );\n+ 233 }\n+ 234\n+ 235 // return true if default is given\n+236 bool hasDefaultData () const\n+ 237 {\n+ 238 return bool( default_ );\n+ 239 }\n+ 240\n+ 241 // return default data\n+242 const DomainData * defaultData () const\n+ 243 {\n+ 244 return default_;\n+ 245 }\n+ 246\n+ 247 // return true if any boundary domain block has\n+ 248 // additional parameters\n+ 249 bool hasParameter () const;\n+ 250\n+251 void reset ()\n+ 252 {\n+ 253 BasicBlock::reset();\n+ 254 counter_ = -1;\n+ 255 }\n+ 256\n+ 257 // return true while block is active\n+258 bool ok ()\n+ 259 {\n+ 260 return ( counter_ <= ndomains_ );\n+ 261 }\n+ 262\n+ 263 // return data if all vectors in array are contained within\n+ 264 // a single domain\n+ 265 template< class Vector >\n+266 const DomainData * contains ( const std::vector< Vector > & v ) const\n+ 267 {\n+ 268 std::vector< int > index( ndomains_ );\n+ 269 for( int i = 0; i < ndomains_; ++i)\n+ 270 index[ i ] = i;\n+ 271\n+ 272 size_t N = v.size();\n+ 273 for( size_t i = 0; i < N; ++i )\n+ 274 {\n+ 275 if( index.empty() )\n+ 276 break;\n+ 277\n+ 278 const int n = index.size();\n+ 279 assert( n > 0 );\n+ 280 for( int j = n-1; j >= 0; --j )\n+ 281 {\n+ 282 bool inside = domains_[ index[ j ] ].contains( v[ i ] );\n+ 283 if( !inside )\n+ 284 index.erase( index.begin() + j );\n+ 285 }\n+ 286 }\n+ 287\n+ 288 // check wheter no boundary domain found\n+ 289 if( index.empty() )\n+ 290 return default_;\n+ 291\n+ 292 // check for ambiguity\n+ 293 if( index.size() > 1 )\n+ 294 dwarn << \"WARNING: ambiguous boundary domain assignment, use first\n+boundary domain in list\" << std::endl;\n+ 295\n+ 296 return &domains_[ index[ 0 ] ].data();\n+ 297 }\n+ 298\n+ 299 private:\n+ 300 void readBlock ();\n+ 301 };\n+ 302\n+ 303 } // end namespace dgf\n+ 304\n+ 305} // end namespace Dune\n+ 306\n+ 307#endif\n+basic.hh\n+parser.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::dgf::makeupcase\n-void makeupcase(std ::string &s)\n-Definition: basic.hh:24\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n Dune::dgf::BasicBlock::reset\n void reset()\n Definition: basic.hh:51\n-Dune::dgf::BasicBlock::getnextline\n-bool getnextline()\n-Definition: basic.cc:94\n-Dune::dgf::BasicBlock::BasicBlock\n-BasicBlock(std::istream &in, const char *id)\n-Definition: basic.cc:18\n-Dune::dgf::BasicBlock::findtoken\n-bool findtoken(std ::string token)\n-Definition: basic.cc:123\n-Dune::dgf::BasicBlock::getnextentry\n-bool getnextentry(ENTRY &entry)\n-Definition: basic.hh:63\n-Dune::dgf::BasicBlock::id\n-const std::string & id() const\n-Definition: basic.hh:97\n-Dune::dgf::BasicBlock::noflines\n-int & noflines()\n-Definition: basic.hh:87\n-Dune::dgf::BasicBlock::operator<<\n-friend std::ostream & operator<<(std ::ostream &os, const BasicBlock &b)\n-Definition: basic.hh:103\n-Dune::dgf::BasicBlock::isempty\n-bool isempty()\n-Definition: basic.hh:82\n-Dune::dgf::BasicBlock::isactive\n-bool isactive()\n-Definition: basic.hh:77\n-Dune::dgf::BasicBlock::linenumber\n-int linenumber()\n-Definition: basic.hh:92\n-Dune::dgf::BasicBlock::line\n-std::stringstream line\n-Definition: basic.hh:47\n-Dune::dgf::BasicBlock::gettokenparam\n-bool gettokenparam(std ::string token, std ::string &entry)\n-Definition: basic.cc:104\n+Dune::dgf::DomainData\n+Definition: boundarydom.hh:23\n+Dune::dgf::DomainData::reset\n+void reset(int id, BoundaryParameter parameter, bool defaultData=false)\n+Definition: boundarydom.hh:60\n+Dune::dgf::DomainData::~DomainData\n+~DomainData()\n+Definition: boundarydom.hh:32\n+Dune::dgf::DomainData::BoundaryParameter\n+DGFBoundaryParameter::type BoundaryParameter\n+Definition: boundarydom.hh:24\n+Dune::dgf::DomainData::DomainData\n+DomainData()\n+Definition: boundarydom.hh:26\n+Dune::dgf::DomainData::id\n+int id() const\n+Definition: boundarydom.hh:42\n+Dune::dgf::DomainData::parameter\n+const BoundaryParameter & parameter() const\n+Definition: boundarydom.hh:54\n+Dune::dgf::DomainData::operator<<\n+friend std::ostream & operator<<(std ::ostream &os, const DomainData &ddata)\n+Definition: boundarydom.hh:73\n+Dune::dgf::DomainData::hasParameter\n+bool hasParameter() const\n+Definition: boundarydom.hh:48\n+Dune::dgf::DomainData::DomainData\n+DomainData(int id, BoundaryParameter parameter, bool defaultData=false)\n+Definition: boundarydom.hh:35\n+Dune::dgf::DomainData::isDefault\n+bool isDefault() const\n+Definition: boundarydom.hh:68\n+Dune::dgf::Domain\n+Definition: boundarydom.hh:90\n+Dune::dgf::Domain::Domain\n+Domain(std::vector< double > p1, std::vector< double > p2, int id,\n+BoundaryParameter ¶meter)\n+Definition: boundarydom.hh:97\n+Dune::dgf::Domain::Domain\n+Domain(const Domain &other)\n+Definition: boundarydom.hh:125\n+Dune::dgf::Domain::dimensionworld\n+const int dimensionworld\n+Definition: boundarydom.hh:92\n+Dune::dgf::Domain::contains\n+bool contains(const Vector &x) const\n+Definition: boundarydom.hh:155\n+Dune::dgf::Domain::BoundaryParameter\n+DGFBoundaryParameter::type BoundaryParameter\n+Definition: boundarydom.hh:94\n+Dune::dgf::Domain::operator<<\n+friend std::ostream & operator<<(std ::ostream &os, const Domain &domain)\n+Definition: boundarydom.hh:172\n+Dune::dgf::Domain::operator=\n+Domain & operator=(const Domain &other)\n+Definition: boundarydom.hh:139\n+Dune::dgf::Domain::data\n+const DomainData & data() const\n+Definition: boundarydom.hh:166\n+Dune::dgf::Domain::Domain\n+Domain(std::vector< double > p1, std::vector< double > p2, DomainData &data)\n+Definition: boundarydom.hh:111\n+Dune::dgf::BoundaryDomBlock\n+Definition: boundarydom.hh:195\n+Dune::dgf::BoundaryDomBlock::~BoundaryDomBlock\n+~BoundaryDomBlock()\n+Definition: boundarydom.hh:216\n+Dune::dgf::BoundaryDomBlock::hasParameter\n+bool hasParameter() const\n+Definition: boundarydom.cc:138\n+Dune::dgf::BoundaryDomBlock::domain\n+const Domain & domain() const\n+Definition: boundarydom.hh:230\n+Dune::dgf::BoundaryDomBlock::contains\n+const DomainData * contains(const std::vector< Vector > &v) const\n+Definition: boundarydom.hh:266\n+Dune::dgf::BoundaryDomBlock::next\n+bool next()\n+Definition: boundarydom.hh:223\n+Dune::dgf::BoundaryDomBlock::reset\n+void reset()\n+Definition: boundarydom.hh:251\n+Dune::dgf::BoundaryDomBlock::ok\n+bool ok()\n+Definition: boundarydom.hh:258\n+Dune::dgf::BoundaryDomBlock::hasDefaultData\n+bool hasDefaultData() const\n+Definition: boundarydom.hh:236\n+Dune::dgf::BoundaryDomBlock::BoundaryDomBlock\n+BoundaryDomBlock(std::istream &in, int cdimworld)\n+Definition: boundarydom.cc:18\n+Dune::dgf::BoundaryDomBlock::defaultData\n+const DomainData * defaultData() const\n+Definition: boundarydom.hh:242\n+Dune::DGFException\n+exception class for IO errors in the DGF parser\n+Definition: dgfexception.hh:16\n+Dune::DGFBoundaryParameter\n+Contains types for additional features.\n+Definition: parser.hh:23\n+Dune::DGFBoundaryParameter::type\n+std::string type\n+type of additional boundary parameters\n+Definition: parser.hh:25\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00926.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00926.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridparameter.cc File Reference\n+dune-grid: periodicfacetrans.cc File Reference\n \n \n \n \n \n \n \n@@ -64,19 +64,19 @@\n \n \n \n
    \n \n-
    gridparameter.cc File Reference
    \n+
    periodicfacetrans.cc File Reference
    \n
    \n
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -9,17 +9,17 @@\n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n Namespaces\n-gridparameter.cc File Reference\n+periodicfacetrans.cc File Reference\n #include \n-#include \n+#include \n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::dgf\n \u00a0\n \n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00929.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00929.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: polygon.hh File Reference\n+dune-grid: gridptr.hh File Reference\n \n \n \n \n \n \n \n@@ -58,43 +58,62 @@\n \n \n \n \n \n
    \n \n-
    polygon.hh File Reference
    \n+
    gridptr.hh File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n+
    #include <cassert>
    \n+#include <cctype>
    \n+#include <array>
    \n+#include <iostream>
    \n+#include <map>
    \n+#include <memory>
    \n+#include <string>
    \n+#include <type_traits>
    \n #include <vector>
    \n-#include <dune/common/typetraits.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+#include <dune/common/parallel/mpihelper.hh>
    \n+#include <dune/common/shared_ptr.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/grid/common/intersection.hh>
    \n+#include <dune/grid/common/partitionset.hh>
    \n+#include <dune/grid/common/rangegenerators.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n+#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n+#include <dune/grid/io/file/dgfparser/parser.hh>
    \n+#include <dune/grid/io/file/gmshreader.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
    \n \n-\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

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

    \n Namespaces

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

    a small program converting a gmsh file into a DGF file \n-More...

    \n-
    #include <config.h>
    \n-#include <iostream>
    \n-#include <dune/common/parallel/mpihelper.hh>
    \n-#include <dune/grid/io/file/gmshreader.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
    \n-
    \n-\n-\n-\n+
    #include <iostream>
    \n+#include <vector>
    \n+#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n+#include "entitykey_inline.hh"
    \n+
    \n+

    Go to the source code of this file.

    \n+

    \n-Functions

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

    \n+Classes

    struct  Dune::DGFEntityKey< A >
     
    struct  Dune::ElementFaceUtil
     
    \n+\n+\n+\n+\n

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-

    Detailed Description

    \n-

    a small program converting a gmsh file into a DGF file

    \n-
    Author
    Matrin Nolte
    \n-

    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.

    \n-

    The program's usage is as follows:

    ./gmsh2dgf <gmshfile>
    \n-

    Function Documentation

    \n-\n-

    ◆ main()

    \n-\n-
    \n-
    \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n-
    int main (int argc,
    char * argv[] 
    )
    \n-
    \n-\n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,35 +7,26 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n- * utils\n-Functions\n-gmsh2dgf.cc File Reference\n-a small program converting a gmsh file into a DGF file More...\n-#include \n+Classes | Namespaces\n+entitykey.hh File Reference\n #include \n-#include \n-#include \n-#include \n- Functions\n-int\u00a0main (int argc, char *argv[])\n+#include \n+#include \n+#include \"entitykey_inline.hh\"\n+Go_to_the_source_code_of_this_file.\n+ Classes\n+struct \u00a0Dune::DGFEntityKey<_A_>\n+\u00a0\n+struct \u00a0Dune::ElementFaceUtil\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-a small program converting a gmsh file into a DGF file\n- Author\n- Matrin Nolte\n-gmsh2dgf is a small example program for the DGFWriter. It reads a gmsh file\n-into any grid (selected by gridtype.hh) and writes it back as a DGF file.\n-The program's usage is as follows:\n-./gmsh2dgf \n-***** Function Documentation *****\n-***** \u25c6\u00a0main() *****\n-int main ( int\u00a0 argc,\n- char *\u00a0argv[]\u00a0\n- )\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00938.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00938.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgf2dgf.cc File Reference\n+dune-grid: dgfgeogrid.hh File Reference\n \n \n \n \n \n \n \n@@ -58,75 +58,55 @@\n \n \n \n \n \n
    \n \n-
    dgf2dgf.cc File Reference
    \n+Classes |\n+Namespaces
    \n+
    dgfgeogrid.hh File Reference
    \n \n
    \n-\n-

    a small program converting a DGF file into a DGF file \n-More...

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

    Go to the source code of this file.

    \n+

    \n-Functions

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

    \n+Classes

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

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-

    Detailed Description

    \n-

    a small program converting a DGF file into a DGF file

    \n-
    Author
    Matrin Nolte
    \n-

    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.

    \n-

    The program's usage is as follows:

    ./dgf2dgf <dgffile> [refinement level]
    \n-

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

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

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

    \n-

    Function Documentation

    \n-\n-

    ◆ main()

    \n-\n-
    \n-
    \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n-
    int main (int argc,
    char * argv[] 
    )
    \n-
    \n-\n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,43 +7,40 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n- * utils\n-Functions\n-dgf2dgf.cc File Reference\n-a small program converting a DGF file into a DGF file More...\n-#include \n-#include \n-#include \n- Functions\n-int\u00a0main (int argc, char *argv[])\n-\u00a0\n-***** Detailed Description *****\n-a small program converting a DGF file into a DGF file\n- Author\n- Matrin Nolte\n-dgf2dgf is a small example program for the DGFWriter. It reads a DGF file into\n-any grid, optionally refining the grid globally. The leaf grid is then written\n-back as a DGF file.\n-The program's usage is as follows:\n-./dgf2dgf [refinement level]\n-While the program may seem completely useless, it has the following usages:\n- * Convert an interval block into a simplex or cube grid (depending on the\n- grid implementation used).\n- * Resolve the simplex generator block into a vertex and a simplex block, so\n- that it can be used without triangle or tetgen.\n- * Construct a refined macro grid, which is very useful when setting up\n- parallel computations with dune-ALUGrid.\n-The source code of this program also demonstrates the easy use of the DGF\n-parser and the DGFWriter.\n-***** Function Documentation *****\n-***** \u25c6\u00a0main() *****\n-int main ( int\u00a0 argc,\n- char *\u00a0argv[]\u00a0\n- )\n+Classes | Namespaces\n+dgfgeogrid.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+Go_to_the_source_code_of_this_file.\n+ Classes\n+ class \u00a0Dune::DGFCoordFunction<_dimD,_dimR_>\n+\u00a0\n+struct \u00a0Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_false_>\n+\u00a0\n+struct \u00a0Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_true_>\n+\u00a0\n+struct \u00a0Dune::DGFCoordFunctionFactory<_HostGrid,_DGFCoordFunction<_dimD,_dimR\n+ >,_false_>\n+\u00a0\n+struct \u00a0Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator\n+ >_>\n+\u00a0\n+struct \u00a0Dune::DGFGridInfo<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>\n+ >\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00941.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00941.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfgridfactory.hh File Reference\n+dune-grid: dgfidentitygrid.hh File Reference\n \n \n \n \n \n \n \n@@ -65,33 +65,29 @@\n
  • dune
  • grid
  • io
  • file
  • dgfparser
  • \n \n \n
    \n \n-
    dgfgridfactory.hh File Reference
    \n+
    dgfidentitygrid.hh File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n-#include <string>
    \n-#include <vector>
    \n-#include <map>
    \n-#include <assert.h>
    \n-#include <dune/common/parallel/mpihelper.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n-#include <dune/grid/io/file/dgfparser/macrogrid.hh>
    \n-#include <dune/grid/io/file/dgfparser/parser.hh>
    \n-#include <dune/grid/common/intersection.hh>
    \n+
    #include <dune/common/typetraits.hh>
    \n+#include <dune/grid/identitygrid.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfparser.hh>
    \n+#include <dune/grid/utility/hostgridaccess.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n \n

    \n Classes

    struct  Dune::DGFGridFactory< G >
    struct  Dune::DGFGridFactory< IdentityGrid< HostGrid > >
     
    struct  Dune::DGFGridInfo< IdentityGrid< HostGrid > >
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,28 +8,24 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n Classes | Namespaces\n-dgfgridfactory.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+dgfidentitygrid.hh File Reference\n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::DGFGridFactory<_G_>\n+struct \u00a0Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>\n+\u00a0\n+struct \u00a0Dune::DGFGridInfo<_IdentityGrid<_HostGrid_>_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00941_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dgfgridfactory.hh Source File\n+dune-grid: dgfidentitygrid.hh Source File\n \n \n \n \n \n \n \n@@ -62,245 +62,152 @@\n \n \n \n
    \n-
    dgfgridfactory.hh
    \n+
    dgfidentitygrid.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_GRIDFACTORY_HH
    \n-
    6#define DUNE_DGF_GRIDFACTORY_HH
    \n+
    5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
    \n+
    6#define DUNE_DGFPARSER_DGFIDENTITYGRID_HH
    \n
    7
    \n-
    8#include <iostream>
    \n-
    9#include <string>
    \n-
    10#include <vector>
    \n-
    11#include <map>
    \n-
    12#include <assert.h>
    \n+
    8#include <dune/common/typetraits.hh>
    \n+
    9
    \n+\n+\n+\n
    13
    \n-
    14#include <dune/common/parallel/mpihelper.hh>
    \n-\n-\n-
    17
    \n-\n-\n-
    20
    \n-
    21
    \n-
    22namespace Dune
    \n-
    23{
    \n+
    14namespace Dune
    \n+
    15{
    \n+
    16
    \n+
    17 // DGFGridFactory for IdentityGrid
    \n+
    18 // -------------------------------
    \n+
    19
    \n+
    20 template< class HostGrid >
    \n+
    21 struct DGFGridFactory< IdentityGrid< HostGrid > >
    \n+
    22 {
    \n+\n
    24
    \n-
    25 // External Forward Declarations
    \n-
    26 // -----------------------------
    \n-
    27
    \n-
    28 template < class GridImp, class IntersectionImp >
    \n-
    29 class Intersection;
    \n-
    30
    \n-
    31
    \n-
    32
    \n-
    33 // DGFGridFactory
    \n-
    34 // --------------
    \n-
    35
    \n-
    36 template < class G >
    \n-\n-
    38 {
    \n-
    39 typedef G Grid;
    \n-
    40 const static int dimension = Grid::dimension;
    \n-
    41 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n-
    42
    \n-
    43 private:
    \n-
    44 typedef typename Grid::template Codim< 0 >::Entity Element;
    \n-
    45
    \n-
    46 typedef typename Grid::template Codim< dimension >::Entity Vertex;
    \n-
    47
    \n-
    48 public:
    \n-
    49
    \n-
    50 explicit DGFGridFactory ( const std::string &filename,
    \n-
    51 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n-
    52 : macroGrid_( filename.c_str(), comm )
    \n-
    53 {
    \n-
    54 grid_ = macroGrid_.template createGrid< Grid >();
    \n+
    25 const static int dimension = Grid::dimension;
    \n+
    26 typedef MPIHelper::MPICommunicator MPICommunicator;
    \n+
    27 typedef typename Grid::template Codim<0>::Entity Element;
    \n+
    28 typedef typename Grid::template Codim<dimension>::Entity Vertex;
    \n+
    29
    \n+
    30 explicit DGFGridFactory ( std::istream &input,
    \n+
    31 MPICommunicator comm = MPIHelper::getCommunicator() )
    \n+
    32 : dgfHostFactory_( input, comm ),
    \n+
    33 grid_( 0 )
    \n+
    34 {
    \n+
    35 HostGrid *hostGrid = dgfHostFactory_.grid();
    \n+
    36 assert( hostGrid != 0 );
    \n+
    37 grid_ = new Grid( *hostGrid );
    \n+
    38 }
    \n+
    39
    \n+
    40 explicit DGFGridFactory ( const std::string &filename,
    \n+
    41 MPICommunicator comm = MPIHelper::getCommunicator() )
    \n+
    42 : dgfHostFactory_( filename, comm ),
    \n+
    43 grid_( 0 )
    \n+
    44 {
    \n+
    45 HostGrid *hostGrid = dgfHostFactory_.grid();
    \n+
    46 assert( hostGrid != 0 );
    \n+
    47 std::ifstream input( filename.c_str() );
    \n+
    48 grid_ = new Grid( *hostGrid );
    \n+
    49 }
    \n+
    50
    \n+
    51 Grid *grid () const
    \n+
    52 {
    \n+
    53 return grid_;
    \n+
    54 }
    \n
    55
    \n-
    56 if( macroGrid_.nofelparams > 0 )
    \n-
    57 {
    \n-
    58 const size_t nofElements = macroGrid_.elements.size();
    \n-
    59 for( size_t i = 0; i < nofElements; ++i )
    \n-
    60 {
    \n-
    61 std::vector< double > coord;
    \n-
    62
    \n-
    63 DomainType p(0);
    \n-
    64 const size_t nofCorners = macroGrid_.elements[i].size();
    \n-
    65 for (size_t k=0; k<nofCorners; ++k)
    \n-
    66 for (int j=0; j<DomainType::dimension; ++j)
    \n-
    67 p[j]+=macroGrid_.vtx[macroGrid_.elements[i][k]][j];
    \n-
    68 p/=double(nofCorners);
    \n-
    69
    \n-
    70 elInsertOrder_.insert( std::make_pair( p, i ) );
    \n-
    71 }
    \n-
    72 }
    \n+
    56 template< class Intersection >
    \n+
    57 bool wasInserted ( const Intersection &intersection ) const
    \n+
    58 {
    \n+
    59 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n+
    60 }
    \n+
    61
    \n+
    62 template< class Intersection >
    \n+
    63 int boundaryId ( const Intersection &intersection ) const
    \n+
    64 {
    \n+
    65 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n+
    66 }
    \n+
    67
    \n+
    68 template< int codim >
    \n+
    69 int numParameters () const
    \n+
    70 {
    \n+
    71 return dgfHostFactory_.template numParameters< codim >();
    \n+
    72 }
    \n
    73
    \n-
    74 if( macroGrid_.nofvtxparams > 0 )
    \n-
    75 {
    \n-
    76 const size_t nofVertices = macroGrid_.vtx.size();
    \n-
    77 for( size_t i = 0; i < nofVertices; ++i )
    \n-
    78 {
    \n-
    79 std::vector< double > coord;
    \n-
    80
    \n-
    81 DomainType p;
    \n-
    82 for( int k = 0; k < DomainType::dimension; ++k )
    \n-
    83 p[ k ] = macroGrid_.vtx[i][k];
    \n+
    74 template< class Entity >
    \n+
    75 std::vector< double > &parameter ( const Entity &entity )
    \n+
    76 {
    \n+
    77 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
    \n+
    78 }
    \n+
    79
    \n+
    80 private:
    \n+
    81 DGFGridFactory< HostGrid > dgfHostFactory_;
    \n+
    82 Grid *grid_;
    \n+
    83 };
    \n
    84
    \n-
    85 vtxInsertOrder_.insert( std::make_pair( p, i ) );
    \n-
    86 }
    \n-
    87 }
    \n-
    88 }
    \n+
    85
    \n+
    86
    \n+
    87 // DGFGridInfo for IdGrid
    \n+
    88 // ----------------------
    \n
    89
    \n-\n-
    91 {
    \n-
    92 return grid_;
    \n-
    93 }
    \n-
    94
    \n-
    95 template <class Intersection>
    \n-
    96 bool wasInserted(const Intersection &intersection) const
    \n-
    97 {
    \n-
    98 return intersection.boundary();
    \n-
    99 }
    \n-
    100
    \n-
    101 template <class Intersection>
    \n-
    102 int boundaryId(const Intersection &intersection) const
    \n-
    103 {
    \n-
    104 return (intersection.boundary()) ? int(intersection.indexInInside()+1) : int(0);
    \n-
    105 }
    \n-
    106
    \n-
    107 template< int codim >
    \n-
    108 int numParameters () const
    \n-
    109 {
    \n-
    110 if( codim == 0 )
    \n-
    111 return macroGrid_.nofelparams;
    \n-
    112 else if( codim == dimension )
    \n-
    113 return macroGrid_.nofvtxparams;
    \n-
    114 else
    \n-
    115 return 0;
    \n-
    116 }
    \n-
    117
    \n-
    118 template < class Entity >
    \n-
    119 int numParameters ( const Entity & ) const
    \n-
    120 {
    \n-
    121 return numParameters< Entity::codimension >();
    \n-
    122 }
    \n-
    123
    \n-
    124 std::vector<double>& parameter(const Element &element)
    \n-
    125 {
    \n-
    126 const typename Element::Geometry &geo = element.geometry();
    \n-
    127 DomainType coord( geo.corner( 0 ) );
    \n-
    128 for( int i = 1; i < geo.corners(); ++i )
    \n-
    129 coord += geo.corner( i );
    \n-
    130 coord /= double( geo.corners() );
    \n-
    131
    \n-
    132 InsertOrderIterator it = elInsertOrder_.find( coord );
    \n-
    133 if( it != elInsertOrder_.end() )
    \n-
    134 return macroGrid_.elParams[ it->second ];
    \n-
    135 assert(0);
    \n-
    136 return emptyParam;
    \n-
    137 }
    \n-
    138
    \n-
    139 std::vector<double>& parameter(const Vertex &vertex)
    \n-
    140 {
    \n-
    141 const typename Vertex::Geometry &geo = vertex.geometry();
    \n-
    142 DomainType coord( geo.corner( 0 ) );
    \n-
    143
    \n-
    144 InsertOrderIterator it = vtxInsertOrder_.find( coord );
    \n-
    145 if( it != vtxInsertOrder_.end() )
    \n-
    146 return macroGrid_.vtxParams[ it->second ];
    \n-
    147 return emptyParam;
    \n-
    148 }
    \n-
    149
    \n-
    150 // return true if boundary parameters found
    \n-\n-
    152 {
    \n-
    153 return false;
    \n-
    154 }
    \n-
    155
    \n-
    156 template< class GG, class II >
    \n-
    157 const typename DGFBoundaryParameter::type &
    \n-
    158 boundaryParameter ( const Intersection< GG, II > & intersection ) const
    \n-
    159 {
    \n-\n-
    161 }
    \n-
    162
    \n-
    163 private:
    \n-
    164 typedef FieldVector<typename Grid::ctype,Grid::dimensionworld> DomainType;
    \n-
    165 struct Compare
    \n-
    166 {
    \n-
    167 bool operator() ( const DomainType &a, const DomainType &b ) const
    \n-
    168 {
    \n-
    169 // returns true, if a < b; c[i] < -eps;
    \n-
    170 const DomainType c = a - b;
    \n-
    171 const double eps = 1e-8;
    \n-
    172
    \n-
    173 for( int i = 0; i < DomainType::dimension; ++i )
    \n-
    174 {
    \n-
    175 if( c[ i ] <= -eps )
    \n-
    176 return true;
    \n-
    177 if( c[ i ] >= eps )
    \n-
    178 return false;
    \n-
    179 }
    \n-
    180 return false;
    \n-
    181 }
    \n-
    182 };
    \n-
    183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap;
    \n-
    184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator;
    \n-
    185
    \n-
    186 MacroGrid macroGrid_;
    \n-
    187 Grid *grid_;
    \n-
    188 InsertOrderMap elInsertOrder_;
    \n-
    189 InsertOrderMap vtxInsertOrder_;
    \n-
    190 std::vector<double> emptyParam;
    \n-
    191 };
    \n-
    192
    \n-
    193} // end namespace Dune
    \n-
    194
    \n-
    195#endif
    \n-\n-\n-\n+
    90 template< class HostGrid >
    \n+
    91 struct DGFGridInfo< IdentityGrid< HostGrid > >
    \n+
    92 {
    \n+
    93 static int refineStepsForHalf ()
    \n+
    94 {
    \n+\n+
    96 }
    \n+
    97
    \n+
    98 static double refineWeight ()
    \n+
    99 {
    \n+\n+
    101 }
    \n+
    102 };
    \n+
    103
    \n+
    104}
    \n+
    105
    \n+
    106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH
    \n+
    The IdentityGrid class.
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    @ vertex
    Definition: common.hh:133
    \n
    Definition: dgfgridfactory.hh:38
    \n-
    int numParameters() const
    Definition: dgfgridfactory.hh:108
    \n-
    int boundaryId(const Intersection &intersection) const
    Definition: dgfgridfactory.hh:102
    \n-
    const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
    Definition: dgfgridfactory.hh:158
    \n-
    std::vector< double > & parameter(const Vertex &vertex)
    Definition: dgfgridfactory.hh:139
    \n-
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfgridfactory.hh:41
    \n-
    int numParameters(const Entity &) const
    Definition: dgfgridfactory.hh:119
    \n-
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfgridfactory.hh:96
    \n-
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfgridfactory.hh:50
    \n
    G Grid
    Definition: dgfgridfactory.hh:39
    \n
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n-
    Grid * grid()
    Definition: dgfgridfactory.hh:90
    \n-
    std::vector< double > & parameter(const Element &element)
    Definition: dgfgridfactory.hh:124
    \n-
    bool haveBoundaryParameters() const
    Definition: dgfgridfactory.hh:151
    \n
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n-
    bool boundary() const
    Return true if intersection is with interior or exterior boundary (see the cases above)
    Definition: common/intersection.hh:216
    \n-
    int indexInInside() const
    Local index of codim 1 entity in the inside() entity where intersection is contained in.
    Definition: common/intersection.hh:346
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n-
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n-
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n-
    int nofvtxparams
    Definition: parser.hh:163
    \n-
    std::vector< std::vector< double > > vtxParams
    Definition: parser.hh:165
    \n-
    int nofelparams
    Definition: parser.hh:163
    \n-
    std::vector< std::vector< double > > elParams
    Definition: parser.hh:165
    \n-
    std::vector< std::vector< double > > vtx
    Definition: parser.hh:125
    \n-
    std ::vector< std ::vector< unsigned int > > elements
    Definition: parser.hh:134
    \n-\n+
    Provides a meta grid that is identical to its host.
    Definition: identitygrid.hh:88
    \n+
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n+
    Grid::template Codim< dimension >::Entity Vertex
    Definition: dgfidentitygrid.hh:28
    \n+
    IdentityGrid< HostGrid > Grid
    Definition: dgfidentitygrid.hh:23
    \n+
    std::vector< double > & parameter(const Entity &entity)
    Definition: dgfidentitygrid.hh:75
    \n+
    int numParameters() const
    Definition: dgfidentitygrid.hh:69
    \n+
    Grid * grid() const
    Definition: dgfidentitygrid.hh:51
    \n+
    DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::getCommunicator())
    Definition: dgfidentitygrid.hh:40
    \n+
    DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::getCommunicator())
    Definition: dgfidentitygrid.hh:30
    \n+
    int boundaryId(const Intersection &intersection) const
    Definition: dgfidentitygrid.hh:63
    \n+
    MPIHelper::MPICommunicator MPICommunicator
    Definition: dgfidentitygrid.hh:26
    \n+
    Grid::template Codim< 0 >::Entity Element
    Definition: dgfidentitygrid.hh:27
    \n+
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfidentitygrid.hh:57
    \n+
    static int refineStepsForHalf()
    Definition: dgfidentitygrid.hh:93
    \n+
    static double refineWeight()
    Definition: dgfidentitygrid.hh:98
    \n+
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n+
    static double refineWeight()
    \n+
    static int refineStepsForHalf()
    number of globalRefine steps needed to refuce h by 0.5
    \n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,309 +7,206 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n-dgfgridfactory.hh\n+dgfidentitygrid.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_GRIDFACTORY_HH\n- 6#define DUNE_DGF_GRIDFACTORY_HH\n+ 5#ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH\n+ 6#define DUNE_DGFPARSER_DGFIDENTITYGRID_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12#include \n+ 8#include \n+ 9\n+ 10#include \n+ 11#include \n+ 12#include \n 13\n- 14#include \n- 15#include \n- 16#include \n- 17\n- 18#include \n- 19#include \n- 20\n- 21\n- 22namespace Dune\n- 23{\n+ 14namespace Dune\n+ 15{\n+ 16\n+ 17 // DGFGridFactory for IdentityGrid\n+ 18 // -------------------------------\n+ 19\n+ 20 template< class HostGrid >\n+21 struct DGFGridFactory< IdentityGrid< HostGrid > >\n+ 22 {\n+23 typedef IdentityGrid<_HostGrid_> Grid;\n 24\n- 25 // External Forward Declarations\n- 26 // -----------------------------\n- 27\n- 28 template < class GridImp, class IntersectionImp >\n- 29 class Intersection;\n- 30\n- 31\n- 32\n- 33 // DGFGridFactory\n- 34 // --------------\n- 35\n- 36 template < class G >\n-37 struct DGFGridFactory\n- 38 {\n-39 typedef G Grid;\n-40 const static int dimension = Grid::dimension;\n-41 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n- 42\n- 43 private:\n- 44 typedef typename Grid::template Codim< 0 >::Entity Element;\n- 45\n- 46 typedef typename Grid::template Codim< dimension >::Entity Vertex;\n- 47\n- 48 public:\n- 49\n-50 explicit DGFGridFactory ( const std::string &filename,\n- 51 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n- 52 : macroGrid_( filename.c_str(), comm )\n- 53 {\n- 54 grid_ = macroGrid_.template createGrid< Grid >();\n+25 const static int dimension = Grid::dimension;\n+26 typedef MPIHelper::MPICommunicator MPICommunicator;\n+27 typedef typename Grid::template Codim<0>::Entity Element;\n+28 typedef typename Grid::template Codim::Entity Vertex;\n+ 29\n+30 explicit DGFGridFactory ( std::istream &input,\n+ 31 MPICommunicator comm = MPIHelper::getCommunicator() )\n+ 32 : dgfHostFactory_( input, comm ),\n+ 33 grid_( 0 )\n+ 34 {\n+ 35 HostGrid *hostGrid = dgfHostFactory_.grid();\n+ 36 assert( hostGrid != 0 );\n+ 37 grid_ = new Grid( *hostGrid );\n+ 38 }\n+ 39\n+40 explicit DGFGridFactory ( const std::string &filename,\n+ 41 MPICommunicator comm = MPIHelper::getCommunicator() )\n+ 42 : dgfHostFactory_( filename, comm ),\n+ 43 grid_( 0 )\n+ 44 {\n+ 45 HostGrid *hostGrid = dgfHostFactory_.grid();\n+ 46 assert( hostGrid != 0 );\n+ 47 std::ifstream input( filename.c_str() );\n+ 48 grid_ = new Grid( *hostGrid );\n+ 49 }\n+ 50\n+51 Grid *grid () const\n+ 52 {\n+ 53 return grid_;\n+ 54 }\n 55\n- 56 if( macroGrid_.nofelparams > 0 )\n- 57 {\n- 58 const size_t nofElements = macroGrid_.elements.size();\n- 59 for( size_t i = 0; i < nofElements; ++i )\n- 60 {\n- 61 std::vector< double > coord;\n- 62\n- 63 DomainType p(0);\n- 64 const size_t nofCorners = macroGrid_.elements[i].size();\n- 65 for (size_t k=0; k\n+57 bool wasInserted ( const Intersection &intersection ) const\n+ 58 {\n+ 59 return dgfHostFactory_.wasInserted( HostGridAccess<_Grid_>::\n+hostIntersection( intersection ) );\n+ 60 }\n+ 61\n+ 62 template< class Intersection >\n+63 int boundaryId ( const Intersection &intersection ) const\n+ 64 {\n+ 65 return dgfHostFactory_.boundaryId( HostGridAccess<_Grid_>::hostIntersection\n+( intersection ) );\n+ 66 }\n+ 67\n+ 68 template< int codim >\n+69 int numParameters () const\n+ 70 {\n+ 71 return dgfHostFactory_.template numParameters< codim >();\n 72 }\n 73\n- 74 if( macroGrid_.nofvtxparams > 0 )\n- 75 {\n- 76 const size_t nofVertices = macroGrid_.vtx.size();\n- 77 for( size_t i = 0; i < nofVertices; ++i )\n- 78 {\n- 79 std::vector< double > coord;\n- 80\n- 81 DomainType p;\n- 82 for( int k = 0; k < DomainType::dimension; ++k )\n- 83 p[ k ] = macroGrid_.vtx[i][k];\n+ 74 template< class Entity >\n+75 std::vector< double > ¶meter ( const Entity &entity )\n+ 76 {\n+ 77 return dgfHostFactory_.parameter( HostGridAccess<_Grid_>::hostEntity\n+( entity ) );\n+ 78 }\n+ 79\n+ 80 private:\n+ 81 DGFGridFactory<_HostGrid_> dgfHostFactory_;\n+ 82 Grid *grid_;\n+ 83 };\n 84\n- 85 vtxInsertOrder_.insert( std::make_pair( p, i ) );\n- 86 }\n- 87 }\n- 88 }\n+ 85\n+ 86\n+ 87 // DGFGridInfo for IdGrid\n+ 88 // ----------------------\n 89\n-90 Grid *grid()\n- 91 {\n- 92 return grid_;\n- 93 }\n- 94\n- 95 template \n-96 bool wasInserted(const Intersection &intersection) const\n- 97 {\n- 98 return intersection.boundary();\n- 99 }\n- 100\n- 101 template \n-102 int boundaryId(const Intersection &intersection) const\n- 103 {\n- 104 return (intersection.boundary()) ? int(intersection.indexInInside()+1) :\n-int(0);\n- 105 }\n- 106\n- 107 template< int codim >\n-108 int numParameters () const\n- 109 {\n- 110 if( codim == 0 )\n- 111 return macroGrid_.nofelparams;\n- 112 else if( codim == dimension )\n- 113 return macroGrid_.nofvtxparams;\n- 114 else\n- 115 return 0;\n- 116 }\n- 117\n- 118 template < class Entity >\n-119 int numParameters ( const Entity & ) const\n- 120 {\n- 121 return numParameters< Entity::codimension >();\n- 122 }\n- 123\n-124 std::vector& parameter(const Element &element)\n- 125 {\n- 126 const typename Element::Geometry &geo = element.geometry();\n- 127 DomainType coord( geo.corner( 0 ) );\n- 128 for( int i = 1; i < geo.corners(); ++i )\n- 129 coord += geo.corner( i );\n- 130 coord /= double( geo.corners() );\n- 131\n- 132 InsertOrderIterator it = elInsertOrder_.find( coord );\n- 133 if( it != elInsertOrder_.end() )\n- 134 return macroGrid_.elParams[ it->second ];\n- 135 assert(0);\n- 136 return emptyParam;\n- 137 }\n- 138\n-139 std::vector& parameter(const Vertex &vertex)\n- 140 {\n- 141 const typename Vertex::Geometry &geo = vertex.geometry();\n- 142 DomainType coord( geo.corner( 0 ) );\n- 143\n- 144 InsertOrderIterator it = vtxInsertOrder_.find( coord );\n- 145 if( it != vtxInsertOrder_.end() )\n- 146 return macroGrid_.vtxParams[ it->second ];\n- 147 return emptyParam;\n- 148 }\n- 149\n- 150 // return true if boundary parameters found\n-151 bool haveBoundaryParameters () const\n- 152 {\n- 153 return false;\n- 154 }\n- 155\n- 156 template< class GG, class II >\n- 157 const typename DGFBoundaryParameter::type &\n-158 boundaryParameter ( const Intersection<_GG,_II_> & intersection ) const\n- 159 {\n- 160 return DGFBoundaryParameter::defaultValue();\n- 161 }\n- 162\n- 163 private:\n- 164 typedef FieldVector DomainType;\n- 165 struct Compare\n- 166 {\n- 167 bool operator() ( const DomainType &a, const DomainType &b ) const\n- 168 {\n- 169 // returns true, if a < b; c[i] < -eps;\n- 170 const DomainType c = a - b;\n- 171 const double eps = 1e-8;\n- 172\n- 173 for( int i = 0; i < DomainType::dimension; ++i )\n- 174 {\n- 175 if( c[ i ] <= -eps )\n- 176 return true;\n- 177 if( c[ i ] >= eps )\n- 178 return false;\n- 179 }\n- 180 return false;\n- 181 }\n- 182 };\n- 183 typedef std::map< DomainType, size_t, Compare > InsertOrderMap;\n- 184 typedef typename InsertOrderMap::const_iterator InsertOrderIterator;\n- 185\n- 186 MacroGrid macroGrid_;\n- 187 Grid *grid_;\n- 188 InsertOrderMap elInsertOrder_;\n- 189 InsertOrderMap vtxInsertOrder_;\n- 190 std::vector emptyParam;\n- 191 };\n- 192\n- 193} // end namespace Dune\n- 194\n- 195#endif\n-dgfexception.hh\n-parser.hh\n-macrogrid.hh\n+ 90 template< class HostGrid >\n+91 struct DGFGridInfo< IdentityGrid< HostGrid > >\n+ 92 {\n+93 static int refineStepsForHalf ()\n+ 94 {\n+ 95 return DGFGridInfo<_HostGrid_>::refineStepsForHalf();\n+ 96 }\n+ 97\n+98 static double refineWeight ()\n+ 99 {\n+ 100 return DGFGridInfo<_HostGrid_>::refineWeight();\n+ 101 }\n+ 102 };\n+ 103\n+ 104}\n+ 105\n+ 106#endif // #ifndef DUNE_DGFPARSER_DGFIDENTITYGRID_HH\n+identitygrid.hh\n+The IdentityGrid class.\n+hostgridaccess.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n Dune::DGFGridFactory\n Definition: dgfgridfactory.hh:38\n-Dune::DGFGridFactory::numParameters\n-int numParameters() const\n-Definition: dgfgridfactory.hh:108\n-Dune::DGFGridFactory::boundaryId\n-int boundaryId(const Intersection &intersection) const\n-Definition: dgfgridfactory.hh:102\n-Dune::DGFGridFactory::boundaryParameter\n-const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II\n-> &intersection) const\n-Definition: dgfgridfactory.hh:158\n-Dune::DGFGridFactory::parameter\n-std::vector< double > & parameter(const Vertex &vertex)\n-Definition: dgfgridfactory.hh:139\n-Dune::DGFGridFactory::MPICommunicatorType\n-MPIHelper::MPICommunicator MPICommunicatorType\n-Definition: dgfgridfactory.hh:41\n-Dune::DGFGridFactory::numParameters\n-int numParameters(const Entity &) const\n-Definition: dgfgridfactory.hh:119\n-Dune::DGFGridFactory::wasInserted\n-bool wasInserted(const Intersection &intersection) const\n-Definition: dgfgridfactory.hh:96\n-Dune::DGFGridFactory::DGFGridFactory\n-DGFGridFactory(const std::string &filename, MPICommunicatorType\n-comm=MPIHelper::getCommunicator())\n-Definition: dgfgridfactory.hh:50\n Dune::DGFGridFactory::Grid\n G Grid\n Definition: dgfgridfactory.hh:39\n Dune::DGFGridFactory::dimension\n static const int dimension\n Definition: dgfgridfactory.hh:40\n-Dune::DGFGridFactory::grid\n-Grid * grid()\n-Definition: dgfgridfactory.hh:90\n-Dune::DGFGridFactory::parameter\n-std::vector< double > & parameter(const Element &element)\n-Definition: dgfgridfactory.hh:124\n-Dune::DGFGridFactory::haveBoundaryParameters\n-bool haveBoundaryParameters() const\n-Definition: dgfgridfactory.hh:151\n Dune::Intersection\n Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n element or with the d...\n Definition: common/intersection.hh:164\n-Dune::Intersection::boundary\n-bool boundary() const\n-Return true if intersection is with interior or exterior boundary (see the\n-cases above)\n-Definition: common/intersection.hh:216\n-Dune::Intersection::indexInInside\n-int indexInInside() const\n-Local index of codim 1 entity in the inside() entity where intersection is\n-contained in.\n-Definition: common/intersection.hh:346\n Dune::Entity\n Wrapper class for entities.\n Definition: common/entity.hh:66\n+Dune::Grid\n+Grid abstract base class.\n+Definition: common/grid.hh:375\n Dune::Grid::dimension\n static constexpr int dimension\n The dimension of the grid.\n Definition: common/grid.hh:387\n-Dune::DGFBoundaryParameter::defaultValue\n-static const type & defaultValue()\n-default constructor\n-Definition: parser.hh:28\n-Dune::DGFBoundaryParameter::type\n-std::string type\n-type of additional boundary parameters\n-Definition: parser.hh:25\n-Dune::DuneGridFormatParser::nofvtxparams\n-int nofvtxparams\n-Definition: parser.hh:163\n-Dune::DuneGridFormatParser::vtxParams\n-std::vector< std::vector< double > > vtxParams\n-Definition: parser.hh:165\n-Dune::DuneGridFormatParser::nofelparams\n-int nofelparams\n-Definition: parser.hh:163\n-Dune::DuneGridFormatParser::elParams\n-std::vector< std::vector< double > > elParams\n-Definition: parser.hh:165\n-Dune::DuneGridFormatParser::vtx\n-std::vector< std::vector< double > > vtx\n-Definition: parser.hh:125\n-Dune::DuneGridFormatParser::elements\n-std ::vector< std ::vector< unsigned int > > elements\n-Definition: parser.hh:134\n-intersection.hh\n+Dune::IdentityGrid\n+Provides a meta grid that is identical to its host.\n+Definition: identitygrid.hh:88\n+Dune::HostGridAccess\n+provides access to host grid objects from GeometryGrid\n+Definition: identitygrid.hh:37\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::Vertex\n+Grid::template Codim< dimension >::Entity Vertex\n+Definition: dgfidentitygrid.hh:28\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::Grid\n+IdentityGrid< HostGrid > Grid\n+Definition: dgfidentitygrid.hh:23\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::parameter\n+std::vector< double > & parameter(const Entity &entity)\n+Definition: dgfidentitygrid.hh:75\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::numParameters\n+int numParameters() const\n+Definition: dgfidentitygrid.hh:69\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::grid\n+Grid * grid() const\n+Definition: dgfidentitygrid.hh:51\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::DGFGridFactory\n+DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::\n+getCommunicator())\n+Definition: dgfidentitygrid.hh:40\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::DGFGridFactory\n+DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::\n+getCommunicator())\n+Definition: dgfidentitygrid.hh:30\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::boundaryId\n+int boundaryId(const Intersection &intersection) const\n+Definition: dgfidentitygrid.hh:63\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::MPICommunicator\n+MPIHelper::MPICommunicator MPICommunicator\n+Definition: dgfidentitygrid.hh:26\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::Element\n+Grid::template Codim< 0 >::Entity Element\n+Definition: dgfidentitygrid.hh:27\n+Dune::DGFGridFactory<_IdentityGrid<_HostGrid_>_>::wasInserted\n+bool wasInserted(const Intersection &intersection) const\n+Definition: dgfidentitygrid.hh:57\n+Dune::DGFGridInfo<_IdentityGrid<_HostGrid_>_>::refineStepsForHalf\n+static int refineStepsForHalf()\n+Definition: dgfidentitygrid.hh:93\n+Dune::DGFGridInfo<_IdentityGrid<_HostGrid_>_>::refineWeight\n+static double refineWeight()\n+Definition: dgfidentitygrid.hh:98\n+Dune::DGFGridInfo\n+Some simple static information for a given GridType.\n+Definition: io/file/dgfparser/dgfparser.hh:56\n+Dune::DGFGridInfo::refineWeight\n+static double refineWeight()\n+Dune::DGFGridInfo::refineStepsForHalf\n+static int refineStepsForHalf()\n+number of globalRefine steps needed to refuce h by 0.5\n+dgfparser.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00944.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00944.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Namespaces \n
    macrogrid.hh File Reference
    \n \n
    \n
    #include <iostream>
    \n #include <dune/common/parallel/mpihelper.hh>
    \n-#include <dune/grid/io/file/dgfparser/parser.hh>
    \n+#include <dune/grid/io/file/dgfparser/parser.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00944_source.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    5#ifndef DUNE_DGF_MACROGRID_HH
    \n
    6#define DUNE_DGF_MACROGRID_HH
    \n
    7
    \n
    8
    \n
    9#include <iostream>
    \n
    10
    \n
    11#include <dune/common/parallel/mpihelper.hh>
    \n-\n+\n
    13
    \n
    14
    \n
    15namespace Dune
    \n
    16{
    \n
    17 // forward declarations
    \n
    18 // --------------------
    \n
    19 class DuneGridFormatParser;
    \n@@ -145,15 +145,15 @@\n
    88 const char* filename_;
    \n
    89 MPICommunicatorType MPICOMM_;
    \n
    90 };
    \n
    91
    \n
    92} // end namespace Dune
    \n
    93
    \n
    94#endif
    \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: dgfgridfactory.hh:38
    \n
    Definition: macrogrid.hh:23
    \n
    MacroGrid(const char *filename, MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
    constructor given the name of a DGF file
    Definition: macrogrid.hh:32
    \n
    MacroGrid(MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
    constructor given the name of a DGF file
    Definition: macrogrid.hh:38
    \n
    GridType * createGrid()
    returns pointer to a new instance of type GridType created from a DGF file
    Definition: macrogrid.hh:45
    \n
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: macrogrid.hh:28
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00947.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00947.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entitykey.hh File Reference\n+dune-grid: dgfexception.hh File Reference\n \n \n \n \n \n \n \n@@ -65,29 +65,25 @@\n
  • dune
  • grid
  • io
  • file
  • dgfparser
  • \n \n \n
    \n \n-
    entitykey.hh File Reference
    \n+
    dgfexception.hh File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n-#include <vector>
    \n-#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n-#include "entitykey_inline.hh"
    \n+
    #include <dune/common/exceptions.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::MacroGrid
     
    \n \n-\n-\n-\n+\n+\n \n

    \n Classes

    struct  Dune::DGFEntityKey< A >
     
    struct  Dune::ElementFaceUtil
    class  Dune::DGFException
     exception class for IO errors in the DGF parser More...
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,24 +8,20 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n Classes | Namespaces\n-entitykey.hh File Reference\n-#include \n-#include \n-#include \n-#include \"entitykey_inline.hh\"\n+dgfexception.hh File Reference\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::DGFEntityKey<_A_>\n-\u00a0\n-struct \u00a0Dune::ElementFaceUtil\n+class \u00a0Dune::DGFException\n+\u00a0 exception class for IO errors in the DGF parser More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00947_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entitykey.hh Source File\n+dune-grid: dgfexception.hh Source File\n \n \n \n \n \n \n \n@@ -62,190 +62,38 @@\n \n \n \n
    \n-
    entitykey.hh
    \n+
    dgfexception.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGFEnTITYKEY_HH
    \n-
    6#define DUNE_DGFEnTITYKEY_HH
    \n+
    5#ifndef DUNE_GRID_DGFEXCEPTION_HH
    \n+
    6#define DUNE_GRID_DGFEXCEPTION_HH
    \n
    7
    \n-
    8#include <iostream>
    \n-
    9#include <vector>
    \n-
    10
    \n-\n+
    8#include <dune/common/exceptions.hh>
    \n+
    9
    \n+
    10namespace Dune
    \n+
    11{
    \n
    12
    \n-
    13namespace Dune
    \n-
    14{
    \n-
    15
    \n-
    16 // DGFEntityKey
    \n-
    17 // ------------
    \n-
    18
    \n-
    19 template< class A >
    \n-\n-
    21 {
    \n-
    22 DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey = true );
    \n-
    23 DGFEntityKey ( const std::vector< A > &key,
    \n-
    24 int N, int offset, bool setOrigKey = true );
    \n-\n-
    26
    \n-\n-
    28
    \n-
    29 inline const A &operator[] ( int i ) const;
    \n-
    30 inline bool operator < ( const DGFEntityKey< A > &k ) const;
    \n-
    31
    \n-
    32 void orientation ( int base, std :: vector< std :: vector< double > > &vtx );
    \n-
    33 void print( std :: ostream &out = std :: cerr ) const;
    \n-
    34
    \n-
    35 inline bool origKeySet () const;
    \n-
    36 inline const A &origKey ( int i ) const;
    \n-
    37 inline int size () const;
    \n-
    38
    \n-
    39 private:
    \n-
    40 std :: vector< A > key_, origKey_;
    \n-
    41 bool origKeySet_;
    \n-
    42 };
    \n-
    43
    \n-
    44
    \n-
    45 template< class A >
    \n-
    46 inline const A &DGFEntityKey< A > :: operator[] ( int i ) const
    \n-
    47 {
    \n-
    48 return key_[ i ];
    \n-
    49 }
    \n-
    50
    \n-
    51
    \n-
    52 template< class A >
    \n-\n-
    54 {
    \n-
    55 // assert(k.key_.size()==key_.size());
    \n-
    56 return key_ < k.key_;
    \n-
    57 }
    \n-
    58
    \n-
    59
    \n-
    60 template< class A >
    \n-\n-
    62 {
    \n-
    63 return origKeySet_;
    \n-
    64 }
    \n-
    65
    \n-
    66
    \n-
    67 template< class A >
    \n-
    68 inline const A &DGFEntityKey< A > :: origKey ( int i ) const
    \n-
    69 {
    \n-
    70 return origKey_[ i ];
    \n-
    71 }
    \n-
    72
    \n-
    73
    \n-
    74 template< class A >
    \n-
    75 inline int DGFEntityKey< A > :: size () const
    \n-
    76 {
    \n-
    77 return key_.size();
    \n-
    78 }
    \n-
    79
    \n-
    80
    \n-
    81
    \n-
    82 // ElementFaceUtil
    \n-
    83 // ---------------
    \n-
    84
    \n-\n-
    86 {
    \n-
    87 inline static int nofFaces ( int dim, const std::vector< unsigned int > &element );
    \n-
    88 inline static int faceSize ( int dim, bool simpl );
    \n-
    89
    \n-\n-
    91 generateFace ( int dim, const std::vector< unsigned int > &element, int f );
    \n-
    92
    \n-
    93 private:
    \n-
    94 template< int dim >
    \n-\n-
    96 generateCubeFace( const std::vector< unsigned int > &element, int f );
    \n-
    97
    \n-
    98 template< int dim >
    \n-\n-
    100 generateSimplexFace ( const std::vector< unsigned int > &element, int f );
    \n-
    101 };
    \n-
    102
    \n-
    103
    \n-
    104 inline int ElementFaceUtil::nofFaces ( int dim, const std::vector< unsigned int > &element )
    \n-
    105 {
    \n-
    106 switch( dim )
    \n-
    107 {
    \n-
    108 case 1 :
    \n-
    109 return 2;
    \n-
    110 case 2 :
    \n-
    111 switch( element.size() )
    \n-
    112 {
    \n-
    113 case 3 :
    \n-
    114 return 3;
    \n-
    115 case 4 :
    \n-
    116 return 4;
    \n-
    117 default :
    \n-
    118 return -1;
    \n-
    119 }
    \n-
    120 case 3 :
    \n-
    121 switch( element.size() )
    \n-
    122 {
    \n-
    123 case 4 :
    \n-
    124 return 4;
    \n-
    125 case 8 :
    \n-
    126 return 6;
    \n-
    127 default :
    \n-
    128 return -1;
    \n-
    129 }
    \n-
    130 default :
    \n-
    131 return -1;
    \n-
    132 }
    \n-
    133 }
    \n-
    134
    \n-
    135
    \n-
    136 inline int ElementFaceUtil::faceSize( int dim, bool simpl )
    \n-
    137 {
    \n-
    138 switch( dim )
    \n-
    139 {
    \n-
    140 case 1 :
    \n-
    141 return 1;
    \n-
    142 case 2 :
    \n-
    143 return 2;
    \n-
    144 case 3 :
    \n-
    145 return (simpl ? 3 : 4);
    \n-
    146 default :
    \n-
    147 return -1;
    \n-
    148 }
    \n-
    149 }
    \n-
    150
    \n-
    151} //end namespace Dune
    \n-
    152
    \n-
    153// inlcude inline implementation
    \n-
    154#include "entitykey_inline.hh"
    \n-
    155#endif
    \n-\n-\n+\n+
    15 : public IOError
    \n+
    16 {};
    \n+
    17
    \n+
    18}
    \n+
    19
    \n+
    20#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: entitykey.hh:21
    \n-
    bool operator<(const DGFEntityKey< A > &k) const
    Definition: entitykey.hh:53
    \n-
    DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)
    Definition: entitykey_inline.hh:64
    \n-
    bool origKeySet() const
    Definition: entitykey.hh:61
    \n-
    int size() const
    Definition: entitykey.hh:75
    \n-
    void orientation(int base, std ::vector< std ::vector< double > > &vtx)
    Definition: entitykey_inline.hh:78
    \n-
    const A & origKey(int i) const
    Definition: entitykey.hh:68
    \n-
    DGFEntityKey(const std::vector< A > &key, int N, int offset, bool setOrigKey=true)
    \n-
    void print(std ::ostream &out=std ::cerr) const
    Definition: entitykey_inline.hh:105
    \n-
    DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)
    Definition: entitykey_inline.hh:19
    \n-
    const A & operator[](int i) const
    Definition: entitykey.hh:46
    \n-
    Definition: entitykey.hh:86
    \n-
    static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
    Definition: entitykey_inline.hh:145
    \n-
    static int faceSize(int dim, bool simpl)
    Definition: entitykey.hh:136
    \n-
    static int nofFaces(int dim, const std::vector< unsigned int > &element)
    Definition: entitykey.hh:104
    \n+
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,222 +7,38 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n-entitykey.hh\n+dgfexception.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGFEnTITYKEY_HH\n- 6#define DUNE_DGFEnTITYKEY_HH\n+ 5#ifndef DUNE_GRID_DGFEXCEPTION_HH\n+ 6#define DUNE_GRID_DGFEXCEPTION_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11#include \n+ 8#include \n+ 9\n+ 10namespace Dune\n+ 11{\n 12\n- 13namespace Dune\n- 14{\n- 15\n- 16 // DGFEntityKey\n- 17 // ------------\n- 18\n- 19 template< class A >\n-20 struct DGFEntityKey\n- 21 {\n- 22 DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey = true );\n-23 DGFEntityKey ( const std::vector< A > &key,\n- 24 int N, int offset, bool setOrigKey = true );\n- 25 DGFEntityKey ( const DGFEntityKey<_A_> &k );\n- 26\n- 27 DGFEntityKey<_A_> &operator=( const DGFEntityKey<_A_> &k );\n- 28\n-29 inline const A &operator[]( int i ) const;\n-30 inline bool operator_<( const DGFEntityKey<_A_> &k ) const;\n- 31\n- 32 void orientation ( int base, std :: vector< std :: vector< double > > &vtx\n-);\n- 33 void print( std :: ostream &out = std :: cerr ) const;\n- 34\n-35 inline bool origKeySet () const;\n-36 inline const A &origKey ( int i ) const;\n-37 inline int size () const;\n- 38\n- 39 private:\n- 40 std :: vector< A > key_, origKey_;\n- 41 bool origKeySet_;\n- 42 };\n- 43\n- 44\n- 45 template< class A >\n-46 inline const A &DGFEntityKey<_A_>_::_operator[]( int i ) const\n- 47 {\n- 48 return key_[ i ];\n- 49 }\n- 50\n- 51\n- 52 template< class A >\n-53 inline bool DGFEntityKey<_A_>_::_operator<( const DGFEntityKey<_A_> &k )\n-const\n- 54 {\n- 55 // assert(k.key_.size()==key_.size());\n- 56 return key_ < k.key_;\n- 57 }\n- 58\n- 59\n- 60 template< class A >\n-61 inline bool DGFEntityKey<_A_>_::_origKeySet () const\n- 62 {\n- 63 return origKeySet_;\n- 64 }\n- 65\n- 66\n- 67 template< class A >\n-68 inline const A &DGFEntityKey<_A_>_::_origKey ( int i ) const\n- 69 {\n- 70 return origKey_[ i ];\n- 71 }\n- 72\n- 73\n- 74 template< class A >\n-75 inline int DGFEntityKey<_A_>_::_size () const\n- 76 {\n- 77 return key_.size();\n- 78 }\n- 79\n- 80\n- 81\n- 82 // ElementFaceUtil\n- 83 // ---------------\n- 84\n-85 struct ElementFaceUtil\n- 86 {\n- 87 inline static int nofFaces ( int dim, const std::vector< unsigned int >\n-&element );\n- 88 inline static int faceSize ( int dim, bool simpl );\n- 89\n- 90 static DGFEntityKey<_unsigned_int_>\n- 91 generateFace ( int dim, const std::vector< unsigned int > &element, int f\n-);\n- 92\n- 93 private:\n- 94 template< int dim >\n- 95 static DGFEntityKey<_unsigned_int_>\n- 96 generateCubeFace( const std::vector< unsigned int > &element, int f );\n- 97\n- 98 template< int dim >\n- 99 static DGFEntityKey<_unsigned_int_>\n- 100 generateSimplexFace ( const std::vector< unsigned int > &element, int f );\n- 101 };\n- 102\n- 103\n-104 inline int ElementFaceUtil::nofFaces ( int dim, const std::vector< unsigned\n-int > &element )\n- 105 {\n- 106 switch( dim )\n- 107 {\n- 108 case 1 :\n- 109 return 2;\n- 110 case 2 :\n- 111 switch( element.size() )\n- 112 {\n- 113 case 3 :\n- 114 return 3;\n- 115 case 4 :\n- 116 return 4;\n- 117 default :\n- 118 return -1;\n- 119 }\n- 120 case 3 :\n- 121 switch( element.size() )\n- 122 {\n- 123 case 4 :\n- 124 return 4;\n- 125 case 8 :\n- 126 return 6;\n- 127 default :\n- 128 return -1;\n- 129 }\n- 130 default :\n- 131 return -1;\n- 132 }\n- 133 }\n- 134\n- 135\n-136 inline int ElementFaceUtil::faceSize( int dim, bool simpl )\n- 137 {\n- 138 switch( dim )\n- 139 {\n- 140 case 1 :\n- 141 return 1;\n- 142 case 2 :\n- 143 return 2;\n- 144 case 3 :\n- 145 return (simpl ? 3 : 4);\n- 146 default :\n- 147 return -1;\n- 148 }\n- 149 }\n- 150\n- 151} //end namespace Dune\n- 152\n- 153// inlcude inline implementation\n- 154#include \"entitykey_inline.hh\"\n- 155#endif\n-entitykey_inline.hh\n-dgfexception.hh\n+14 class DGFException\n+ 15 : public IOError\n+ 16 {};\n+ 17\n+ 18}\n+ 19\n+ 20#endif\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::DGFEntityKey\n-Definition: entitykey.hh:21\n-Dune::DGFEntityKey::operator<\n-bool operator<(const DGFEntityKey< A > &k) const\n-Definition: entitykey.hh:53\n-Dune::DGFEntityKey::operator=\n-DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)\n-Definition: entitykey_inline.hh:64\n-Dune::DGFEntityKey::origKeySet\n-bool origKeySet() const\n-Definition: entitykey.hh:61\n-Dune::DGFEntityKey::size\n-int size() const\n-Definition: entitykey.hh:75\n-Dune::DGFEntityKey::orientation\n-void orientation(int base, std ::vector< std ::vector< double > > &vtx)\n-Definition: entitykey_inline.hh:78\n-Dune::DGFEntityKey::origKey\n-const A & origKey(int i) const\n-Definition: entitykey.hh:68\n-Dune::DGFEntityKey::DGFEntityKey\n-DGFEntityKey(const std::vector< A > &key, int N, int offset, bool\n-setOrigKey=true)\n-Dune::DGFEntityKey::print\n-void print(std ::ostream &out=std ::cerr) const\n-Definition: entitykey_inline.hh:105\n-Dune::DGFEntityKey::DGFEntityKey\n-DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)\n-Definition: entitykey_inline.hh:19\n-Dune::DGFEntityKey::operator[]\n-const A & operator[](int i) const\n-Definition: entitykey.hh:46\n-Dune::ElementFaceUtil\n-Definition: entitykey.hh:86\n-Dune::ElementFaceUtil::generateFace\n-static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector<\n-unsigned int > &element, int f)\n-Definition: entitykey_inline.hh:145\n-Dune::ElementFaceUtil::faceSize\n-static int faceSize(int dim, bool simpl)\n-Definition: entitykey.hh:136\n-Dune::ElementFaceUtil::nofFaces\n-static int nofFaces(int dim, const std::vector< unsigned int > &element)\n-Definition: entitykey.hh:104\n+Dune::DGFException\n+exception class for IO errors in the DGF parser\n+Definition: dgfexception.hh:16\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00950.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00950.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gnuplot.cc File Reference\n+dune-grid: gmsh2dgf.cc File Reference\n \n \n \n \n \n \n \n@@ -58,37 +58,71 @@\n \n \n \n \n \n
    \n \n-
    gnuplot.cc File Reference
    \n+Functions
    \n+
    gmsh2dgf.cc File Reference
    \n \n
    \n \n-

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

    a small program converting a gmsh file into a DGF file \n More...

    \n-
    #include "../gnuplot.hh"
    \n+
    #include <config.h>
    \n+#include <iostream>
    \n+#include <dune/common/parallel/mpihelper.hh>
    \n+#include <dune/grid/io/file/gmshreader.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n-\n+\n+\n+\n

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     

    \n+Functions

    int main (int argc, char *argv[])
     
    \n

    Detailed Description

    \n-

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

    \n-
    Author
    Christian Engwer
    \n-
    \n+

    a small program converting a gmsh file into a DGF file

    \n+
    Author
    Matrin Nolte
    \n+

    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.

    \n+

    The program's usage is as follows:

    ./gmsh2dgf <gmshfile>
    \n+

    Function Documentation

    \n+\n+

    ◆ main()

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+
    int main (int argc,
    char * argv[] 
    )
    \n+
    \n+\n+
    \n+
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,23 +6,36 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n- * gnuplot\n-Namespaces\n-gnuplot.cc File Reference\n-Implementation of gnuplot output for 1D and 2D grids. More...\n-#include \"../gnuplot.hh\"\n- Namespaces\n-namespace \u00a0Dune\n-\u00a0 Include standard header files.\n+ * dgfparser\n+ * utils\n+Functions\n+gmsh2dgf.cc File Reference\n+a small program converting a gmsh file into a DGF file More...\n+#include \n+#include \n+#include \n+#include \n+#include \n+ Functions\n+int\u00a0main (int argc, char *argv[])\n \u00a0\n ***** Detailed Description *****\n-Implementation of gnuplot output for 1D and 2D grids.\n+a small program converting a gmsh file into a DGF file\n Author\n- Christian Engwer\n+ Matrin Nolte\n+gmsh2dgf is a small example program for the DGFWriter. It reads a gmsh file\n+into any grid (selected by gridtype.hh) and writes it back as a DGF file.\n+The program's usage is as follows:\n+./gmsh2dgf \n+***** Function Documentation *****\n+***** \u25c6\u00a0main() *****\n+int main ( int\u00a0 argc,\n+ char *\u00a0argv[]\u00a0\n+ )\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00953.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00953.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gmshwriter.hh File Reference\n+dune-grid: dgf2dgf.cc File Reference\n \n \n \n \n \n \n \n@@ -58,49 +58,75 @@\n \n \n \n \n \n
    \n \n-
    gmshwriter.hh File Reference
    \n+Functions
    \n+
    dgf2dgf.cc File Reference
    \n \n
    \n-
    #include <fstream>
    \n+\n+

    a small program converting a DGF file into a DGF file \n+More...

    \n+
    #include <config.h>
    \n #include <iostream>
    \n-#include <iomanip>
    \n-#include <string>
    \n-#include <vector>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n-\n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::GmshWriter< GridView >
     Write Gmsh mesh file. More...
     
    \n-\n-\n-\n-\n+#include <dune/grid/io/file/dgfparser/dgfwriter.hh>
    \n+

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n+\n+\n

    \n+Functions

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

    Detailed Description

    \n+

    a small program converting a DGF file into a DGF file

    \n+
    Author
    Matrin Nolte
    \n+

    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.

    \n+

    The program's usage is as follows:

    ./dgf2dgf <dgffile> [refinement level]
    \n+

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

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

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

    \n+

    Function Documentation

    \n+\n+

    ◆ main()

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+
    int main (int argc,
    char * argv[] 
    )
    \n+
    \n+\n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,31 +6,44 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-Classes | Namespaces\n-gmshwriter.hh File Reference\n-#include \n+ * dgfparser\n+ * utils\n+Functions\n+dgf2dgf.cc File Reference\n+a small program converting a DGF file into a DGF file More...\n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::GmshWriter<_GridView_>\n-\u00a0 Write Gmsh mesh file. More...\n-\u00a0\n- Namespaces\n-namespace \u00a0Dune\n-\u00a0 Include standard header files.\n+#include \n+ Functions\n+int\u00a0main (int argc, char *argv[])\n \u00a0\n+***** Detailed Description *****\n+a small program converting a DGF file into a DGF file\n+ Author\n+ Matrin Nolte\n+dgf2dgf is a small example program for the DGFWriter. It reads a DGF file into\n+any grid, optionally refining the grid globally. The leaf grid is then written\n+back as a DGF file.\n+The program's usage is as follows:\n+./dgf2dgf [refinement level]\n+While the program may seem completely useless, it has the following usages:\n+ * Convert an interval block into a simplex or cube grid (depending on the\n+ grid implementation used).\n+ * Resolve the simplex generator block into a vertex and a simplex block, so\n+ that it can be used without triangle or tetgen.\n+ * Construct a refined macro grid, which is very useful when setting up\n+ parallel computations with dune-ALUGrid.\n+The source code of this program also demonstrates the easy use of the DGF\n+parser and the DGFWriter.\n+***** Function Documentation *****\n+***** \u25c6\u00a0main() *****\n+int main ( int\u00a0 argc,\n+ char *\u00a0argv[]\u00a0\n+ )\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00956.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00956.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gmshreader.hh File Reference\n+dune-grid: dgfug.hh File Reference\n \n \n \n \n \n \n \n@@ -58,83 +58,54 @@\n \n
    \n \n \n \n
    \n \n-
    gmshreader.hh File Reference
    \n+Namespaces
    \n+
    dgfug.hh File Reference
    \n \n
    \n-
    #include <cstdarg>
    \n-#include <cstdio>
    \n-#include <cstring>
    \n-#include <fstream>
    \n-#include <iostream>
    \n-#include <map>
    \n-#include <memory>
    \n+
    #include <fstream>
    \n+#include <istream>
    \n #include <string>
    \n-#include <tuple>
    \n #include <vector>
    \n-#include <utility>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/common/fvector.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/boundarysegment.hh>
    \n-#include <dune/grid/common/gridfactory.hh>
    \n+#include <dune/common/parallel/mpihelper.hh>
    \n+#include <dune/grid/common/intersection.hh>
    \n+#include <dune/grid/uggrid.hh>
    \n+#include "dgfparser.hh"
    \n+#include "blocks/gridparameter.hh"
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n-\n-\n+\n \n-\n-\n+\n \n

    \n Classes

    struct  Dune::GmshReaderOptions
     Options for read operation. More...
    struct  Dune::dgf::UGGridParameterBlock
     
    class  Dune::GmshReaderParser< GridType >
     dimension independent parts for GmshReaderParser More...
    struct  Dune::DGFGridInfo< UGGrid< dim > >
     
    class  Dune::GmshReader< GridType >
     Read Gmsh mesh file. More...
    struct  Dune::DGFGridFactory< UGGrid< dim > >
     
    \n \n \n \n \n-\n+\n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::Gmsh
    namespace  Dune::dgf
     
    \n-\n-\n-\n-\n-

    \n-Enumerations

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

    \n-Functions

    constexpr ReaderOptions Dune::Gmsh::operator| (ReaderOptions a, ReaderOptions b)
     composition operator for reader options More...
     
    constexpr bool Dune::Gmsh::operator& (ReaderOptions a, ReaderOptions b)
     query operator for reader options (is b set in a) More...
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,62 +6,38 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-Classes | Namespaces | Enumerations | Functions\n-gmshreader.hh File Reference\n-#include \n-#include \n-#include \n+ * dgfparser\n+Classes | Namespaces\n+dgfug.hh File Reference\n #include \n-#include \n-#include \n-#include \n+#include \n #include \n-#include \n #include \n-#include \n #include \n #include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \"dgfparser.hh\"\n+#include \"blocks/gridparameter.hh\"\n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::GmshReaderOptions\n-\u00a0 Options for read operation. More...\n+struct \u00a0Dune::dgf::UGGridParameterBlock\n \u00a0\n- class \u00a0Dune::GmshReaderParser<_GridType_>\n-\u00a0 dimension independent parts for GmshReaderParser More...\n+struct \u00a0Dune::DGFGridInfo<_UGGrid<_dim_>_>\n \u00a0\n- class \u00a0Dune::GmshReader<_GridType_>\n-\u00a0 Read Gmsh mesh file. More...\n+struct \u00a0Dune::DGFGridFactory<_UGGrid<_dim_>_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::Gmsh\n-\u00a0\n- Enumerations\n-enum class \u00a0Dune::Gmsh::ReaderOptions { Dune::Gmsh::ReaderOptions::verbose = 1\n- , Dune::Gmsh::ReaderOptions::insertBoundarySegments = 2 , Dune::\n- Gmsh::ReaderOptions::readElementData = 4 , Dune::Gmsh::\n- ReaderOptions::readBoundaryData = 8 }\n-\u00a0 Option for the Gmsh mesh file reader. More...\n-\u00a0\n- Functions\n-constexpr ReaderOptions\u00a0Dune::Gmsh::operator| (ReaderOptions a, ReaderOptions\n- b)\n-\u00a0 composition operator for reader options More...\n-\u00a0\n- constexpr bool\u00a0Dune::Gmsh::operator& (ReaderOptions a, ReaderOptions\n- b)\n-\u00a0 query operator for reader options (is b set in a)\n- More...\n+namespace \u00a0Dune::dgf\n \u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00956_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gmshreader.hh Source File\n+dune-grid: dgfug.hh Source File\n \n \n \n \n \n \n \n@@ -58,1110 +58,285 @@\n \n
    \n \n \n \n
    \n-
    gmshreader.hh
    \n+
    dgfug.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GMSHREADER_HH
    \n-
    7#define DUNE_GMSHREADER_HH
    \n-
    8
    \n-
    9#include <cstdarg>
    \n-
    10#include <cstdio>
    \n-
    11#include <cstring>
    \n-
    12#include <fstream>
    \n-
    13#include <iostream>
    \n-
    14#include <map>
    \n-
    15#include <memory>
    \n-
    16#include <string>
    \n-
    17#include <tuple>
    \n-
    18#include <vector>
    \n-
    19#include <utility>
    \n-
    20
    \n-
    21#include <dune/common/exceptions.hh>
    \n-
    22#include <dune/common/fvector.hh>
    \n-
    23
    \n-
    24#include <dune/geometry/type.hh>
    \n-
    25
    \n-\n-\n-
    28
    \n-
    29namespace Dune
    \n-
    30{
    \n-
    31
    \n-\n-
    39 {
    \n-\n-\n-\n-
    45 };
    \n-
    46 };
    \n-
    47
    \n-
    48 namespace {
    \n+
    5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
    \n+
    6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
    \n+
    7
    \n+
    8//- C++ includes
    \n+
    9#include <fstream>
    \n+
    10#include <istream>
    \n+
    11#include <string>
    \n+
    12#include <vector>
    \n+
    13
    \n+
    14//- dune-common includes
    \n+
    15#include <dune/common/exceptions.hh>
    \n+
    16#include <dune/common/fvector.hh>
    \n+
    17#include <dune/common/parallel/mpihelper.hh>
    \n+
    18
    \n+
    19//- dune-grid includes
    \n+\n+
    21#include <dune/grid/uggrid.hh>
    \n+
    22
    \n+
    23//- local includes
    \n+
    24#include "dgfparser.hh"
    \n+\n+
    26
    \n+
    27
    \n+
    28namespace Dune
    \n+
    29{
    \n+
    30
    \n+
    31 namespace dgf
    \n+
    32 {
    \n+
    33
    \n+
    34 // UGGridParameterBlock
    \n+
    35 // --------------------
    \n+
    36
    \n+\n+
    38 : public GridParameterBlock
    \n+
    39 {
    \n+
    41 explicit UGGridParameterBlock ( std::istream &input );
    \n+
    42
    \n+
    44 bool noClosure () const { return noClosure_; }
    \n+
    46 bool noCopy () const { return noCopy_; }
    \n+
    48 size_t heapSize () const { return heapSize_; }
    \n
    49
    \n-
    50 // arbitrary dimension, implementation is in specialization
    \n-
    51 template< int dimension, int dimWorld = dimension >
    \n-
    52 class GmshReaderQuadraticBoundarySegment
    \n-
    53 {
    \n-
    54 public:
    \n-
    55 // empty function since this class does not implement anything
    \n-
    56 static void registerFactory() {}
    \n-
    57 };
    \n+
    50 protected:
    \n+
    51 bool noClosure_; // no closure for UGGrid
    \n+
    52 bool noCopy_; // no copies for UGGrid
    \n+
    53 size_t heapSize_; // heap size for UGGrid
    \n+
    54 };
    \n+
    55
    \n+
    56 } // namespace dgf
    \n+
    57
    \n
    58
    \n-
    59 // quadratic boundary segments in 1d
    \n-
    60 /*
    \n-
    61 Note the points
    \n-
    62
    \n-
    63 (0) (alpha) (1)
    \n-
    64
    \n-
    65 are mapped to the points in global coordinates
    \n-
    66
    \n-
    67 p0 p2 p1
    \n-
    68
    \n-
    69 alpha is determined automatically from the given points.
    \n-
    70 */
    \n-
    71 template< int dimWorld >
    \n-
    72 struct GmshReaderQuadraticBoundarySegment< 2, dimWorld >
    \n-
    73 : public Dune::BoundarySegment< 2, dimWorld >
    \n-
    74 {
    \n-
    75 typedef GmshReaderQuadraticBoundarySegment< 2, dimWorld > ThisType;
    \n-
    76 typedef typename Dune::BoundarySegment< 2, dimWorld > :: ObjectStreamType ObjectStreamType;
    \n-
    77 typedef Dune::FieldVector< double, dimWorld > GlobalVector;
    \n-
    78
    \n-
    79 GmshReaderQuadraticBoundarySegment ( const GlobalVector &p0_, const GlobalVector &p1_, const GlobalVector &p2_)
    \n-
    80 : p0(p0_), p1(p1_), p2(p2_)
    \n-
    81 {
    \n-
    82 init();
    \n-
    83 }
    \n-
    84
    \n-
    85 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )
    \n-
    86 {
    \n-
    87 // key is read before by the factory
    \n-
    88 const int bytes = sizeof(double)*dimWorld;
    \n-
    89 in.read( (char *) &p0[ 0 ], bytes );
    \n-
    90 in.read( (char *) &p1[ 0 ], bytes );
    \n-
    91 in.read( (char *) &p2[ 0 ], bytes );
    \n-
    92 init();
    \n-
    93 }
    \n-
    94
    \n-
    95 static void registerFactory()
    \n-
    96 {
    \n-
    97 if( key() < 0 )
    \n-
    98 {
    \n-
    99 key() = Dune::BoundarySegment< 2, dimWorld >::template registerFactory< ThisType >();
    \n-
    100 }
    \n-
    101 }
    \n-
    102
    \n-
    103 virtual GlobalVector operator() ( const Dune::FieldVector<double,1> &local ) const
    \n-
    104 {
    \n-
    105 GlobalVector y;
    \n-
    106 y = 0.0;
    \n-
    107 y.axpy((local[0]-alpha)*(local[0]-1.0)/alpha,p0);
    \n-
    108 y.axpy(local[0]*(local[0]-1.0)/(alpha*(alpha-1.0)),p1);
    \n-
    109 y.axpy(local[0]*(local[0]-alpha)/(1.0-alpha),p2);
    \n-
    110 return y;
    \n-
    111 }
    \n+
    59
    \n+
    60#if HAVE_DUNE_UGGRID
    \n+
    61 template< int dim >
    \n+
    62 struct DGFGridInfo< UGGrid< dim > >
    \n+
    63 {
    \n+
    64 static int refineStepsForHalf ()
    \n+
    65 {
    \n+
    66 return 1;
    \n+
    67 }
    \n+
    68
    \n+
    69 static double refineWeight ()
    \n+
    70 {
    \n+
    71 return -1.;
    \n+
    72 }
    \n+
    73 };
    \n+
    74
    \n+
    75
    \n+
    76
    \n+
    77 // DGFGridFactory< UGGrid< dim > >
    \n+
    78 // -------------------------------
    \n+
    79
    \n+
    80 template< int dim >
    \n+
    81 struct DGFGridFactory< UGGrid< dim > >
    \n+
    82 {
    \n+\n+
    86 static const int dimension = dim;
    \n+
    88 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n+
    89
    \n+
    91 explicit DGFGridFactory ( std::istream &input,
    \n+
    92 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n+
    93 : grid_( 0 ),
    \n+
    94 factory_(),
    \n+
    95 dgf_( rank( comm ), size( comm ) )
    \n+
    96 {
    \n+
    97 generate( input );
    \n+
    98 }
    \n+
    99
    \n+
    101 explicit DGFGridFactory ( const std::string &filename,
    \n+
    102 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n+
    103 : grid_( 0 ),
    \n+
    104 factory_(),
    \n+
    105 dgf_( rank( comm ), size( comm ) )
    \n+
    106 {
    \n+
    107 std::ifstream input( filename.c_str() );
    \n+
    108 if ( !input )
    \n+
    109 DUNE_THROW( DGFException, "Error: Macrofile " << filename << " not found" );
    \n+
    110 generate( input );
    \n+
    111 }
    \n
    112
    \n-
    113 void backup( ObjectStreamType& out ) const
    \n-
    114 {
    \n-
    115 // backup key to identify object
    \n-
    116 out.write( (const char *) &key(), sizeof( int ) );
    \n-
    117 // backup data
    \n-
    118 const int bytes = sizeof(double)*dimWorld;
    \n-
    119 out.write( (const char*) &p0[ 0 ], bytes );
    \n-
    120 out.write( (const char*) &p1[ 0 ], bytes );
    \n-
    121 out.write( (const char*) &p2[ 0 ], bytes );
    \n-
    122 }
    \n-
    123
    \n-
    124 protected:
    \n-
    125 void init()
    \n-
    126 {
    \n-
    127 GlobalVector d1 = p1;
    \n-
    128 d1 -= p0;
    \n-
    129 GlobalVector d2 = p2;
    \n-
    130 d2 -= p1;
    \n-
    131
    \n-
    132 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());
    \n-
    133 if (alpha<1E-6 || alpha>1-1E-6)
    \n-
    134 DUNE_THROW(Dune::IOError, "ration in quadratic boundary segment bad");
    \n-
    135 }
    \n-
    136
    \n-
    137 static int& key() {
    \n-
    138 static int k = -1;
    \n-
    139 return k;
    \n-
    140 }
    \n-
    141
    \n-
    142 private:
    \n-
    143 GlobalVector p0,p1,p2;
    \n-
    144 double alpha;
    \n-
    145 };
    \n-
    146
    \n-
    147
    \n-
    148 // quadratic boundary segments in 2d
    \n-
    149 /* numbering of points corresponding to gmsh:
    \n-
    150
    \n-
    151 2
    \n-
    152
    \n-
    153 5 4
    \n-
    154
    \n-
    155 0 3 1
    \n-
    156
    \n-
    157 Note: The vertices 3, 4, 5 are not necessarily at the edge midpoints but can
    \n-
    158 be placed with parameters alpha, beta , gamma at the following positions
    \n-
    159 in local coordinates:
    \n-
    160
    \n-
    161
    \n-
    162 2 = (0,1)
    \n-
    163
    \n-
    164 5 = (0,beta) 4 = (1-gamma/sqrt(2),gamma/sqrt(2))
    \n-
    165
    \n-
    166 0 = (0,0) 3 = (alpha,0) 1 = (1,0)
    \n-
    167
    \n-
    168 The parameters alpha, beta, gamma are determined from the given vertices in
    \n-
    169 global coordinates.
    \n-
    170 */
    \n-
    171 template<>
    \n-
    172 class GmshReaderQuadraticBoundarySegment< 3, 3 >
    \n-
    173 : public Dune::BoundarySegment< 3 >
    \n-
    174 {
    \n-
    175 typedef GmshReaderQuadraticBoundarySegment< 3, 3 > ThisType;
    \n-
    176 typedef typename Dune::BoundarySegment< 3 > :: ObjectStreamType ObjectStreamType;
    \n-
    177 public:
    \n-
    178 GmshReaderQuadraticBoundarySegment (Dune::FieldVector<double,3> p0_, Dune::FieldVector<double,3> p1_,
    \n-
    179 Dune::FieldVector<double,3> p2_, Dune::FieldVector<double,3> p3_,
    \n-
    180 Dune::FieldVector<double,3> p4_, Dune::FieldVector<double,3> p5_)
    \n-
    181 : p0(p0_), p1(p1_), p2(p2_), p3(p3_), p4(p4_), p5(p5_)
    \n-
    182 {
    \n-
    183 init();
    \n-
    184 }
    \n-
    185
    \n-
    186 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )
    \n-
    187 {
    \n-
    188 const int bytes = sizeof(double)*3;
    \n-
    189 in.read( (char *) &p0[ 0 ], bytes );
    \n-
    190 in.read( (char *) &p1[ 0 ], bytes );
    \n-
    191 in.read( (char *) &p2[ 0 ], bytes );
    \n-
    192 in.read( (char *) &p3[ 0 ], bytes );
    \n-
    193 in.read( (char *) &p4[ 0 ], bytes );
    \n-
    194 in.read( (char *) &p5[ 0 ], bytes );
    \n-
    195 init();
    \n-
    196 }
    \n-
    197
    \n-
    198 static void registerFactory()
    \n-
    199 {
    \n-
    200 if( key() < 0 )
    \n-
    201 {
    \n-
    202 key() = Dune::BoundarySegment< 3 >::template registerFactory< ThisType >();
    \n-
    203 }
    \n-
    204 }
    \n-
    205
    \n-
    206 virtual Dune::FieldVector<double,3> operator() (const Dune::FieldVector<double,2>& local) const
    \n-
    207 {
    \n-
    208 Dune::FieldVector<double,3> y;
    \n-
    209 y = 0.0;
    \n-
    210 y.axpy(phi0(local),p0);
    \n-
    211 y.axpy(phi1(local),p1);
    \n-
    212 y.axpy(phi2(local),p2);
    \n-
    213 y.axpy(phi3(local),p3);
    \n-
    214 y.axpy(phi4(local),p4);
    \n-
    215 y.axpy(phi5(local),p5);
    \n-
    216 return y;
    \n-
    217 }
    \n+\n+
    115 {
    \n+
    116 return grid_;
    \n+
    117 }
    \n+
    118
    \n+
    120 template< class GG, class II >
    \n+
    121 bool wasInserted ( const Dune::Intersection< GG, II > &intersection ) const
    \n+
    122 {
    \n+
    123 return factory_.wasInserted( intersection );
    \n+
    124 }
    \n+
    125
    \n+
    127 template< class GG, class II >
    \n+
    128 int boundaryId ( const Dune::Intersection< GG, II > &intersection ) const
    \n+
    129 {
    \n+
    130 return intersection.boundarySegmentIndex();
    \n+
    131 }
    \n+
    132
    \n+
    134 template< int codim >
    \n+
    135 int numParameters () const
    \n+
    136 {
    \n+
    137 if( codim == 0 )
    \n+
    138 return dgf_.nofelparams;
    \n+
    139 else if( codim == dimension )
    \n+
    140 return dgf_.nofvtxparams;
    \n+
    141 else
    \n+
    142 return 0;
    \n+
    143 }
    \n+
    144
    \n+
    146 template< class Entity >
    \n+
    147 int numParameters ( const Entity & ) const
    \n+
    148 {
    \n+
    149 return numParameters< Entity::codimension >();
    \n+
    150 }
    \n+
    151
    \n+
    153 std::vector< double > &parameter ( const typename Grid::template Codim< 0 >::Entity &element )
    \n+
    154 {
    \n+
    155 if( numParameters< 0 >() <= 0 )
    \n+
    156 {
    \n+
    157 DUNE_THROW( InvalidStateException,
    \n+
    158 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
    \n+
    159 }
    \n+
    160 return dgf_.elParams[ factory_.insertionIndex( element ) ];
    \n+
    161 }
    \n+
    162
    \n+
    164 std::vector< double > &parameter ( const typename Grid::template Codim< dimension >::Entity &vertex )
    \n+
    165 {
    \n+
    166 if( numParameters< dimension >() <= 0 )
    \n+
    167 {
    \n+
    168 DUNE_THROW( InvalidStateException,
    \n+
    169 "Calling DGFGridFactory::parameter is only allowed if there are parameters." );
    \n+
    170 }
    \n+
    171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];
    \n+
    172 }
    \n+
    173
    \n+\n+
    176 {
    \n+
    177 return dgf_.haveBndParameters;
    \n+
    178 }
    \n+
    179
    \n+
    181 template< class GG, class II >
    \n+\n+
    183 {
    \n+\n+
    185 typename Intersection::Entity entity = intersection.inside();
    \n+
    186 const int face = intersection.indexInInside();
    \n+
    187
    \n+
    188 auto refElem = referenceElement< double, dimension >( entity.type() );
    \n+
    189 int corners = refElem.size( face, 1, dimension );
    \n+
    190 std::vector< unsigned int > bound( corners );
    \n+
    191 for( int i = 0; i < corners; ++i )
    \n+
    192 {
    \n+
    193 const int k = refElem.subEntity( face, 1, i, dimension );
    \n+
    194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension >( k ) );
    \n+
    195 }
    \n+
    196
    \n+
    197 DuneGridFormatParser::facemap_t::key_type key( bound, false );
    \n+
    198 const DuneGridFormatParser::facemap_t::const_iterator pos = dgf_.facemap.find( key );
    \n+
    199 if( pos != dgf_.facemap.end() )
    \n+
    200 return dgf_.facemap.find( key )->second.second;
    \n+
    201 else
    \n+\n+
    203 }
    \n+
    204
    \n+
    205 private:
    \n+
    206 // create grid
    \n+
    207 void generate ( std::istream &input );
    \n+
    208
    \n+
    209 // return rank
    \n+
    210 static int rank( MPICommunicatorType MPICOMM )
    \n+
    211 {
    \n+
    212 int rank = 0;
    \n+
    213#if HAVE_MPI
    \n+
    214 MPI_Comm_rank( MPICOMM, &rank );
    \n+
    215#endif
    \n+
    216 return rank;
    \n+
    217 }
    \n
    218
    \n-
    219 void backup( ObjectStreamType& out ) const
    \n-
    220 {
    \n-
    221 // backup key to identify object in factory
    \n-
    222 out.write( (const char*) &key(), sizeof( int ) );
    \n-
    223 // backup data
    \n-
    224 const int bytes = sizeof(double)*3;
    \n-
    225 out.write( (const char*) &p0[ 0 ], bytes );
    \n-
    226 out.write( (const char*) &p1[ 0 ], bytes );
    \n-
    227 out.write( (const char*) &p2[ 0 ], bytes );
    \n-
    228 out.write( (const char*) &p3[ 0 ], bytes );
    \n-
    229 out.write( (const char*) &p4[ 0 ], bytes );
    \n-
    230 out.write( (const char*) &p5[ 0 ], bytes );
    \n-
    231 }
    \n-
    232
    \n-
    233 protected:
    \n-
    234 void init()
    \n-
    235 {
    \n-
    236 using std::sqrt;
    \n-
    237 sqrt2 = sqrt(2.0);
    \n-
    238 Dune::FieldVector<double,3> d1,d2;
    \n-
    239
    \n-
    240 d1 = p3; d1 -= p0;
    \n-
    241 d2 = p1; d2 -= p3;
    \n-
    242 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());
    \n-
    243 if (alpha<1E-6 || alpha>1-1E-6)
    \n-
    244 DUNE_THROW(Dune::IOError, "alpha in quadratic boundary segment bad");
    \n-
    245
    \n-
    246 d1 = p5; d1 -= p0;
    \n-
    247 d2 = p2; d2 -= p5;
    \n-
    248 beta=d1.two_norm()/(d1.two_norm()+d2.two_norm());
    \n-
    249 if (beta<1E-6 || beta>1-1E-6)
    \n-
    250 DUNE_THROW(Dune::IOError, "beta in quadratic boundary segment bad");
    \n-
    251
    \n-
    252 d1 = p4; d1 -= p1;
    \n-
    253 d2 = p2; d2 -= p4;
    \n-
    254 gamma=sqrt2*(d1.two_norm()/(d1.two_norm()+d2.two_norm()));
    \n-
    255 if (gamma<1E-6 || gamma>1-1E-6)
    \n-
    256 DUNE_THROW(Dune::IOError, "gamma in quadratic boundary segment bad");
    \n-
    257 }
    \n-
    258
    \n-
    259 static int& key() {
    \n-
    260 static int k = -1;
    \n-
    261 return k;
    \n-
    262 }
    \n-
    263
    \n-
    264 private:
    \n-
    265 // The six Lagrange basis function on the reference element
    \n-
    266 // for the points given above
    \n-
    267
    \n-
    268 double phi0 (const Dune::FieldVector<double,2>& local) const
    \n-
    269 {
    \n-
    270 return (alpha*beta-beta*local[0]-alpha*local[1])*(1-local[0]-local[1])/(alpha*beta);
    \n-
    271 }
    \n-
    272 double phi3 (const Dune::FieldVector<double,2>& local) const
    \n-
    273 {
    \n-
    274 return local[0]*(1-local[0]-local[1])/(alpha*(1-alpha));
    \n-
    275 }
    \n-
    276 double phi1 (const Dune::FieldVector<double,2>& local) const
    \n-
    277 {
    \n-
    278 return local[0]*(gamma*local[0]-(sqrt2-gamma-sqrt2*alpha)*local[1]-alpha*gamma)/(gamma*(1-alpha));
    \n-
    279 }
    \n-
    280 double phi5 (const Dune::FieldVector<double,2>& local) const
    \n-
    281 {
    \n-
    282 return local[1]*(1-local[0]-local[1])/(beta*(1-beta));
    \n-
    283 }
    \n-
    284 double phi4 (const Dune::FieldVector<double,2>& local) const
    \n-
    285 {
    \n-
    286 return local[0]*local[1]/((1-gamma/sqrt2)*gamma/sqrt2);
    \n-
    287 }
    \n-
    288 double phi2 (const Dune::FieldVector<double,2>& local) const
    \n-
    289 {
    \n-
    290 return local[1]*(beta*(1-gamma/sqrt2)-local[0]*(beta-gamma/sqrt2)-local[1]*(1-gamma/sqrt2))/((1-gamma/sqrt2)*(beta-1));
    \n-
    291 }
    \n-
    292
    \n-
    293 Dune::FieldVector<double,3> p0,p1,p2,p3,p4,p5;
    \n-
    294 double alpha,beta,gamma,sqrt2;
    \n-
    295 };
    \n-
    296
    \n-
    297 } // end empty namespace
    \n-
    298
    \n-
    300 template<typename GridType>
    \n-\n-
    302 {
    \n-
    303 protected:
    \n-
    304 // private data
    \n-\n-\n-\n-\n-\n-\n-
    311 // read buffer
    \n-
    312 char buf[512];
    \n-
    313 std::string fileName;
    \n-
    314 // exported data
    \n-\n-\n-
    317
    \n-
    318 // static data
    \n-
    319 static const int dim = GridType::dimension;
    \n-
    320 static const int dimWorld = GridType::dimensionworld;
    \n-
    321 static_assert( (dimWorld <= 3), "GmshReader requires dimWorld <= 3." );
    \n-
    322
    \n-
    323 // typedefs
    \n-
    324 typedef FieldVector< double, dimWorld > GlobalVector;
    \n-
    325
    \n-
    326 // don't use something like
    \n-
    327 // readfile(file, 1, "%s\\n", buf);
    \n-
    328 // to skip the rest of of the line -- that will only skip the next
    \n-
    329 // whitespace-separated word! Use skipline() instead.
    \n-
    330 void readfile(FILE * file, int cnt, const char * format,
    \n-
    331 void* t1, void* t2 = 0, void* t3 = 0, void* t4 = 0,
    \n-
    332 void* t5 = 0, void* t6 = 0, void* t7 = 0, void* t8 = 0,
    \n-
    333 void* t9 = 0, void* t10 = 0)
    \n-
    334 {
    \n-
    335 off_t pos = ftello(file);
    \n-
    336 int c = fscanf(file, format, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);
    \n-
    337 if (c != cnt)
    \n-
    338 DUNE_THROW(Dune::IOError, "Error parsing " << fileName << " "
    \n-
    339 "file pos " << pos
    \n-
    340 << ": Expected '" << format << "', only read " << c << " entries instead of " << cnt << ".");
    \n-
    341 }
    \n-
    342
    \n-
    343 // skip over the rest of the line, including the terminating newline
    \n-
    344 void skipline(FILE * file)
    \n-
    345 {
    \n-
    346 int c;
    \n-
    347 do {
    \n-
    348 c = std::fgetc(file);
    \n-
    349 } while(c != '\\n' && c != EOF);
    \n-
    350 }
    \n-
    351
    \n-
    352 public:
    \n-
    353
    \n-\n-
    355 factory(_factory), verbose(v), insert_boundary_segments(i) {}
    \n-
    356
    \n-
    357 std::vector<int> & boundaryIdMap()
    \n-
    358 {
    \n-\n-
    360 }
    \n-
    361
    \n-
    362 std::vector<int> & elementIndexMap()
    \n-
    363 {
    \n-\n-
    365 }
    \n-
    366
    \n-
    367 void read (const std::string& f)
    \n-
    368 {
    \n-
    369 if (verbose) std::cout << "Reading " << dim << "d Gmsh grid..." << std::endl;
    \n-
    370
    \n-
    371 // open file name, we use C I/O
    \n-
    372 fileName = f;
    \n-
    373 FILE* file = fopen(fileName.c_str(),"rb");
    \n-
    374 if (file==0)
    \n-
    375 DUNE_THROW(Dune::IOError, "Could not open " << fileName);
    \n-
    376
    \n-
    377 //=========================================
    \n-
    378 // Header: Read vertices into vector
    \n-
    379 // Check vertices that are needed
    \n-
    380 //=========================================
    \n-
    381
    \n-\n-\n-
    384 element_count = 0;
    \n-
    385
    \n-
    386 // process header
    \n-
    387 double version_number;
    \n-
    388 int file_type, data_size;
    \n-
    389
    \n-
    390 readfile(file,1,"%s\\n",buf);
    \n-
    391 if (strcmp(buf,"$MeshFormat")!=0)
    \n-
    392 DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line");
    \n-
    393 readfile(file,3,"%lg %d %d\\n",&version_number,&file_type,&data_size);
    \n-
    394 if( (version_number < 2.0) || (version_number > 2.2) )
    \n-
    395 DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files");
    \n-
    396 if (verbose) std::cout << "version " << version_number << " Gmsh file detected" << std::endl;
    \n-
    397 readfile(file,1,"%s\\n",buf);
    \n-
    398 if (strcmp(buf,"$EndMeshFormat")!=0)
    \n-
    399 DUNE_THROW(Dune::IOError, "expected $EndMeshFormat");
    \n-
    400
    \n-
    401 // node section
    \n-
    402 int number_of_nodes;
    \n-
    403
    \n-
    404 readfile(file,1,"%s\\n",buf);
    \n-
    405 if (strcmp(buf,"$Nodes")!=0)
    \n-
    406 DUNE_THROW(Dune::IOError, "expected $Nodes");
    \n-
    407 readfile(file,1,"%d\\n",&number_of_nodes);
    \n-
    408 if (verbose) std::cout << "file contains " << number_of_nodes << " nodes" << std::endl;
    \n-
    409
    \n-
    410 // read nodes
    \n-
    411 // The '+1' is due to the fact that gmsh numbers node starting from 1 rather than from 0
    \n-
    412 std::vector< GlobalVector > nodes( number_of_nodes+1 );
    \n-
    413 {
    \n-
    414 int id;
    \n-
    415 double x[ 3 ];
    \n-
    416 for( int i = 1; i <= number_of_nodes; ++i )
    \n-
    417 {
    \n-
    418 readfile(file,4, "%d %lg %lg %lg\\n", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] );
    \n-
    419
    \n-
    420 if (id > number_of_nodes) {
    \n-
    421 DUNE_THROW(Dune::IOError,
    \n-
    422 "Only dense sequences of node indices are currently supported (node index "
    \n-
    423 << id << " is invalid).");
    \n-
    424 }
    \n-
    425
    \n-
    426 // just store node position
    \n-
    427 for( int j = 0; j < dimWorld; ++j )
    \n-
    428 nodes[ id ][ j ] = x[ j ];
    \n-
    429 }
    \n-
    430 readfile(file,1,"%s\\n",buf);
    \n-
    431 if (strcmp(buf,"$EndNodes")!=0)
    \n-
    432 DUNE_THROW(Dune::IOError, "expected $EndNodes");
    \n-
    433 }
    \n-
    434
    \n-
    435 // element section
    \n-
    436 readfile(file,1,"%s\\n",buf);
    \n-
    437 if (strcmp(buf,"$Elements")!=0)
    \n-
    438 DUNE_THROW(Dune::IOError, "expected $Elements");
    \n-
    439 int number_of_elements;
    \n-
    440 readfile(file,1,"%d\\n",&number_of_elements);
    \n-
    441 if (verbose) std::cout << "file contains " << number_of_elements << " elements" << std::endl;
    \n-
    442
    \n-
    443 //=========================================
    \n-
    444 // Pass 1: Select and insert those vertices in the file that
    \n-
    445 // actually occur as corners of an element.
    \n-
    446 //=========================================
    \n-
    447
    \n-
    448 off_t section_element_offset = ftello(file);
    \n-
    449 std::map<int,unsigned int> renumber;
    \n-
    450 for (int i=1; i<=number_of_elements; i++)
    \n-
    451 {
    \n-
    452 int id, elm_type, number_of_tags;
    \n-
    453 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
    \n-
    454 for (int k=1; k<=number_of_tags; k++)
    \n-
    455 {
    \n-
    456 int blub;
    \n-
    457 readfile(file,1,"%d ",&blub);
    \n-
    458 // k == 1: physical entity (not used here)
    \n-
    459 // k == 2: elementary entity (not used here either)
    \n-
    460 // if version_number < 2.2:
    \n-
    461 // k == 3: mesh partition 0
    \n-
    462 // else
    \n-
    463 // k == 3: number of mesh partitions
    \n-
    464 // k => 4: mesh partition k-4
    \n-
    465 }
    \n-
    466 pass1HandleElement(file, elm_type, renumber, nodes);
    \n-
    467 }
    \n-
    468 if (verbose) std::cout << "number of real vertices = " << number_of_real_vertices << std::endl;
    \n-
    469 if (verbose) std::cout << "number of boundary elements = " << boundary_element_count << std::endl;
    \n-
    470 if (verbose) std::cout << "number of elements = " << element_count << std::endl;
    \n-
    471 readfile(file,1,"%s\\n",buf);
    \n-
    472 if (strcmp(buf,"$EndElements")!=0)
    \n-
    473 DUNE_THROW(Dune::IOError, "expected $EndElements");
    \n-\n-\n-
    476
    \n-
    477 //==============================================
    \n-
    478 // Pass 2: Insert boundary segments and elements
    \n-
    479 //==============================================
    \n-
    480
    \n-
    481 fseeko(file, section_element_offset, SEEK_SET);
    \n-\n-
    483 element_count = 0;
    \n-
    484 for (int i=1; i<=number_of_elements; i++)
    \n-
    485 {
    \n-
    486 int id, elm_type, number_of_tags;
    \n-
    487 readfile(file,3,"%d %d %d ",&id,&elm_type,&number_of_tags);
    \n-
    488 int physical_entity = -1;
    \n-
    489
    \n-
    490 for (int k=1; k<=number_of_tags; k++)
    \n-
    491 {
    \n-
    492 int blub;
    \n-
    493 readfile(file,1,"%d ",&blub);
    \n-
    494 if (k==1) physical_entity = blub;
    \n-
    495 }
    \n-
    496 pass2HandleElement(file, elm_type, renumber, nodes, physical_entity);
    \n-
    497 }
    \n-
    498 readfile(file,1,"%s\\n",buf);
    \n-
    499 if (strcmp(buf,"$EndElements")!=0)
    \n-
    500 DUNE_THROW(Dune::IOError, "expected $EndElements");
    \n-
    501
    \n-
    502 fclose(file);
    \n-
    503 }
    \n-
    504
    \n-
    510 void pass1HandleElement(FILE* file, const int elm_type,
    \n-
    511 std::map<int,unsigned int> & renumber,
    \n-
    512 const std::vector< GlobalVector > & nodes)
    \n-
    513 {
    \n-
    514 // some data about gmsh elements
    \n-
    515 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
    \n-
    516 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
    \n-
    517 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
    \n-
    518
    \n-
    519 // test whether we support the element type
    \n-
    520 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
    \n-
    521 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
    \n-
    522 {
    \n-
    523 skipline(file); // skip rest of line if element is unknown
    \n-
    524 return;
    \n-
    525 }
    \n-
    526
    \n-
    527 // The format string for parsing is n times '%d' in a row
    \n-
    528 std::string formatString = "%d";
    \n-
    529 for (int i=1; i<nDofs[elm_type]; i++)
    \n-
    530 formatString += " %d";
    \n-
    531 formatString += "\\n";
    \n-
    532
    \n-
    533 // '10' is the largest number of dofs we may encounter in a .msh file
    \n-
    534 std::vector<int> elementDofs(10);
    \n-
    535
    \n-
    536 readfile(file,nDofs[elm_type], formatString.c_str(),
    \n-
    537 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
    \n-
    538 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
    \n-
    539 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
    \n-
    540 &(elementDofs[9]));
    \n-
    541
    \n-
    542 // insert each vertex if it hasn't been inserted already
    \n-
    543 for (int i=0; i<nVertices[elm_type]; i++)
    \n-
    544 if (renumber.find(elementDofs[i])==renumber.end())
    \n-
    545 {
    \n-
    546 renumber[elementDofs[i]] = number_of_real_vertices++;
    \n-
    547 factory.insertVertex(nodes[elementDofs[i]]);
    \n-
    548 }
    \n-
    549
    \n-
    550 // count elements and boundary elements
    \n-
    551 if (elementDim[elm_type] == dim)
    \n-\n-
    553 else
    \n-\n-
    555
    \n-
    556 }
    \n-
    557
    \n-
    558
    \n-
    559
    \n-
    560 // generic-case: This is not supposed to be used at runtime.
    \n-
    561 template <class E, class V, class V2>
    \n-\n-
    563 const V&,
    \n-
    564 const E&,
    \n-
    565 const V2&
    \n-
    566 )
    \n-
    567 {
    \n-
    568 DUNE_THROW(Dune::IOError, "tried to create a 3D boundary segment in a non-3D Grid");
    \n-
    569 }
    \n-
    570
    \n-
    571 // 3d-case:
    \n-
    572 template <class E, class V>
    \n-\n-
    574 const std::vector<FieldVector<double, 3> >& nodes,
    \n-
    575 const E& elementDofs,
    \n-
    576 const V& vertices
    \n-
    577 )
    \n-
    578 {
    \n-
    579 std::array<FieldVector<double,dimWorld>, 6> v;
    \n-
    580 for (int i=0; i<6; i++)
    \n-
    581 for (int j=0; j<dimWorld; j++)
    \n-
    582 v[i][j] = nodes[elementDofs[i]][j];
    \n-
    583
    \n-
    584 BoundarySegment<dim,dimWorld>* newBoundarySegment
    \n-
    585 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 3, 3 >( v[0], v[1], v[2],
    \n-
    586 v[3], v[4], v[5] );
    \n-
    587
    \n-
    588 factory.insertBoundarySegment( vertices,
    \n-
    589 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment) );
    \n-
    590 }
    \n-
    591
    \n-
    592
    \n-
    593
    \n-
    598 virtual void pass2HandleElement(FILE* file, const int elm_type,
    \n-
    599 std::map<int,unsigned int> & renumber,
    \n-
    600 const std::vector< GlobalVector > & nodes,
    \n-
    601 const int physical_entity)
    \n-
    602 {
    \n-
    603 // some data about gmsh elements
    \n-
    604 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1, 1};
    \n-
    605 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -1, 1};
    \n-
    606 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1, -1, 0};
    \n-
    607
    \n-
    608 // test whether we support the element type
    \n-
    609 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?
    \n-
    610 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) // real element or boundary element?
    \n-
    611 {
    \n-
    612 skipline(file); // skip rest of line if element is unknown
    \n-
    613 return;
    \n-
    614 }
    \n-
    615
    \n-
    616 // The format string for parsing is n times '%d' in a row
    \n-
    617 std::string formatString = "%d";
    \n-
    618 for (int i=1; i<nDofs[elm_type]; i++)
    \n-
    619 formatString += " %d";
    \n-
    620 formatString += "\\n";
    \n-
    621
    \n-
    622 // '10' is the largest number of dofs we may encounter in a .msh file
    \n-
    623 std::vector<int> elementDofs(10);
    \n-
    624
    \n-
    625 readfile(file,nDofs[elm_type], formatString.c_str(),
    \n-
    626 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),
    \n-
    627 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),
    \n-
    628 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),
    \n-
    629 &(elementDofs[9]));
    \n-
    630
    \n-
    631 // correct differences between gmsh and Dune in the local vertex numbering
    \n-
    632 switch (elm_type)
    \n-
    633 {
    \n-
    634 case 3 : // 4-node quadrilateral
    \n-
    635 std::swap(elementDofs[2],elementDofs[3]);
    \n-
    636 break;
    \n-
    637 case 5 : // 8-node hexahedron
    \n-
    638 std::swap(elementDofs[2],elementDofs[3]);
    \n-
    639 std::swap(elementDofs[6],elementDofs[7]);
    \n-
    640 break;
    \n-
    641 case 7 : // 5-node pyramid
    \n-
    642 std::swap(elementDofs[2],elementDofs[3]);
    \n-
    643 break;
    \n-
    644 }
    \n-
    645
    \n-
    646 // renumber corners to account for the explicitly given vertex
    \n-
    647 // numbering in the file
    \n-
    648 std::vector<unsigned int> vertices(nVertices[elm_type]);
    \n-
    649
    \n-
    650 for (int i=0; i<nVertices[elm_type]; i++)
    \n-
    651 vertices[i] = renumber[elementDofs[i]];
    \n-
    652
    \n-
    653 // If it is an element, insert it as such
    \n-
    654 if (elementDim[elm_type] == dim) {
    \n-
    655
    \n-
    656 switch (elm_type)
    \n-
    657 {
    \n-
    658 case 1 : // 2-node line
    \n-
    659 factory.insertElement(Dune::GeometryTypes::line,vertices);
    \n-
    660 break;
    \n-
    661 case 2 : // 3-node triangle
    \n-
    662 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
    \n-
    663 break;
    \n-
    664 case 3 : // 4-node quadrilateral
    \n-
    665 factory.insertElement(Dune::GeometryTypes::quadrilateral,vertices);
    \n-
    666 break;
    \n-
    667 case 4 : // 4-node tetrahedron
    \n-
    668 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
    \n-
    669 break;
    \n-
    670 case 5 : // 8-node hexahedron
    \n-
    671 factory.insertElement(Dune::GeometryTypes::hexahedron,vertices);
    \n-
    672 break;
    \n-
    673 case 6 : // 6-node prism
    \n-
    674 factory.insertElement(Dune::GeometryTypes::prism,vertices);
    \n-
    675 break;
    \n-
    676 case 7 : // 5-node pyramid
    \n-
    677 factory.insertElement(Dune::GeometryTypes::pyramid,vertices);
    \n-
    678 break;
    \n-
    679 case 9 : // 6-node triangle
    \n-
    680 factory.insertElement(Dune::GeometryTypes::triangle,vertices);
    \n-
    681 break;
    \n-
    682 case 11 : // 10-node tetrahedron
    \n-
    683 factory.insertElement(Dune::GeometryTypes::tetrahedron,vertices);
    \n-
    684 break;
    \n-
    685 }
    \n-
    686
    \n-
    687 } else {
    \n-
    688 // it must be a boundary segment then
    \n-\n-
    690
    \n-
    691 switch (elm_type)
    \n-
    692 {
    \n-
    693 case 1 : // 2-node line
    \n-
    694 factory.insertBoundarySegment(vertices);
    \n-
    695 break;
    \n-
    696
    \n-
    697 case 2 : // 3-node triangle
    \n-
    698 factory.insertBoundarySegment(vertices);
    \n-
    699 break;
    \n-
    700
    \n-
    701 case 3 : // 4-node quadrilateral
    \n-
    702 factory.insertBoundarySegment(vertices);
    \n-
    703 break;
    \n-
    704
    \n-
    705 case 15 : // 1-node point
    \n-
    706 factory.insertBoundarySegment(vertices);
    \n-
    707 break;
    \n-
    708
    \n-
    709 case 8 : { // 3-node line
    \n-
    710 std::array<FieldVector<double,dimWorld>, 3> v;
    \n-
    711 for (int i=0; i<dimWorld; i++) {
    \n-
    712 v[0][i] = nodes[elementDofs[0]][i];
    \n-
    713 v[1][i] = nodes[elementDofs[2]][i]; // yes, the renumbering is intended!
    \n-
    714 v[2][i] = nodes[elementDofs[1]][i];
    \n-
    715 }
    \n-
    716 BoundarySegment<dim,dimWorld>* newBoundarySegment
    \n-
    717 = (BoundarySegment<dim,dimWorld>*) new GmshReaderQuadraticBoundarySegment< 2, dimWorld >(v[0], v[1], v[2]);
    \n-
    718 factory.insertBoundarySegment(vertices,
    \n-
    719 std::shared_ptr<BoundarySegment<dim,dimWorld> >(newBoundarySegment));
    \n-
    720 break;
    \n-
    721 }
    \n-
    722 case 9 : { // 6-node triangle
    \n-
    723 boundarysegment_insert(nodes, elementDofs, vertices);
    \n-
    724 break;
    \n-
    725 }
    \n-
    726 default: {
    \n-
    727 DUNE_THROW(Dune::IOError, "GmshReader does not support using element-type " << elm_type << " for boundary segments");
    \n-
    728 break;
    \n-
    729 }
    \n-
    730
    \n-
    731 }
    \n-
    732
    \n-
    733 }
    \n-
    734 }
    \n-
    735
    \n-
    736 // count elements and boundary elements
    \n-
    737 if (elementDim[elm_type] == dim) {
    \n-\n-\n-
    740 } else {
    \n-\n-\n-
    743 }
    \n-
    744
    \n-
    745 }
    \n-
    746
    \n-
    747 };
    \n-
    748
    \n-
    749 namespace Gmsh {
    \n-
    755 enum class ReaderOptions
    \n-
    756 {
    \n-
    757 verbose = 1,
    \n-\n-
    759 readElementData = 4,
    \n-\n-
    761 };
    \n-
    762
    \n-\n-
    765 {
    \n-
    766 return static_cast<ReaderOptions>(
    \n-
    767 static_cast<int>(a) | static_cast<int>(b)
    \n-
    768 );
    \n-
    769 }
    \n-
    770
    \n-\n-
    773 {
    \n-
    774 return static_cast<int>(a) & static_cast<int>(b);
    \n-
    775 }
    \n-
    776
    \n-
    777 } // end namespace Gmsh
    \n-
    778
    \n-
    803 template<typename GridType>
    \n-\n-
    805 {
    \n-
    807
    \n-
    826 static void doRead(Dune::GridFactory<GridType> &factory,
    \n-
    827 const std::string &fileName,
    \n-
    828 std::vector<int>& boundarySegmentToPhysicalEntity,
    \n-
    829 std::vector<int>& elementToPhysicalEntity,
    \n-
    830 bool verbose, bool insertBoundarySegments)
    \n-
    831 {
    \n-
    832 // register boundary segment to boundary segment factory for possible load balancing
    \n-
    833 // this needs to be done on all cores since the type might not be known otherwise
    \n-
    834 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld >::registerFactory();
    \n-
    835
    \n-
    836#ifndef NDEBUG
    \n-
    837 // check that this method is called on all cores
    \n-
    838 factory.comm().barrier();
    \n-
    839#endif
    \n-
    840
    \n-
    841 // create parse object and read grid on process 0
    \n-
    842 if (factory.comm().rank() == 0)
    \n-
    843 {
    \n-
    844 GmshReaderParser<Grid> parser(factory,verbose,insertBoundarySegments);
    \n-
    845 parser.read(fileName);
    \n-
    846
    \n-
    847 boundarySegmentToPhysicalEntity = std::move(parser.boundaryIdMap());
    \n-
    848 elementToPhysicalEntity = std::move(parser.elementIndexMap());
    \n-
    849 }
    \n-
    850 else
    \n-
    851 {
    \n-
    852 boundarySegmentToPhysicalEntity = {};
    \n-
    853 elementToPhysicalEntity = {};
    \n-
    854 }
    \n-
    855 }
    \n-
    856
    \n-
    858
    \n-
    877 template<class T>
    \n-
    878 static T &discarded(T &&value) { return value; }
    \n-
    879
    \n-
    880 struct DataArg {
    \n-
    881 std::vector<int> *data_ = nullptr;
    \n-
    882 DataArg(std::vector<int> &data) : data_(&data) {}
    \n-
    883 DataArg(const decltype(std::ignore)&) {}
    \n-
    884 DataArg() = default;
    \n-
    885 };
    \n-
    886
    \n-
    887 struct DataFlagArg : DataArg {
    \n-
    888 bool flag_ = false;
    \n-
    889 using DataArg::DataArg;
    \n-
    890 DataFlagArg(bool flag) : flag_(flag) {}
    \n-
    891 };
    \n-
    892
    \n-
    893 public:
    \n-
    894 typedef GridType Grid;
    \n-
    895
    \n-
    902 static std::unique_ptr<Grid> read (const std::string& fileName, bool verbose = true, bool insertBoundarySegments=true)
    \n-
    903 {
    \n-
    904 // make a grid factory
    \n-\n-
    906
    \n-
    907 read(factory, fileName, verbose, insertBoundarySegments);
    \n-
    908
    \n-
    909 return factory.createGrid();
    \n-
    910 }
    \n-
    911
    \n-
    931 static std::unique_ptr<Grid> read (const std::string& fileName,
    \n-
    932 std::vector<int>& boundarySegmentToPhysicalEntity,
    \n-
    933 std::vector<int>& elementToPhysicalEntity,
    \n-
    934 bool verbose = true, bool insertBoundarySegments=true)
    \n-
    935 {
    \n-
    936 // make a grid factory
    \n-\n-
    938
    \n-
    939 doRead(
    \n-
    940 factory, fileName, boundarySegmentToPhysicalEntity,
    \n-
    941 elementToPhysicalEntity, verbose, insertBoundarySegments
    \n-
    942 );
    \n-
    943
    \n-
    944 return factory.createGrid();
    \n-
    945 }
    \n-
    946
    \n-
    948 static void read (Dune::GridFactory<Grid>& factory, const std::string& fileName,
    \n-
    949 bool verbose = true, bool insertBoundarySegments=true)
    \n-
    950 {
    \n-
    951 doRead(
    \n-
    952 factory, fileName, discarded(std::vector<int>{}),
    \n-
    953 discarded(std::vector<int>{}), verbose, insertBoundarySegments
    \n-
    954 );
    \n-
    955 }
    \n-
    956
    \n-
    958
    \n-
    981 static void read (Dune::GridFactory<Grid> &factory,
    \n-
    982 const std::string &fileName,
    \n-
    983 DataFlagArg boundarySegmentData,
    \n-
    984 DataArg elementData,
    \n-
    985 bool verbose=true)
    \n-
    986 {
    \n-
    987 doRead(
    \n-
    988 factory, fileName,
    \n-
    989 boundarySegmentData.data_
    \n-
    990 ? *boundarySegmentData.data_ : discarded(std::vector<int>{}),
    \n-
    991 elementData.data_
    \n-
    992 ? *elementData.data_ : discarded(std::vector<int>{}),
    \n-
    993 verbose,
    \n-
    994 boundarySegmentData.flag_ || boundarySegmentData.data_
    \n-
    995 );
    \n-
    996 }
    \n-
    997
    \n-
    1018 static void read (Dune::GridFactory<Grid>& factory,
    \n-
    1019 const std::string& fileName,
    \n-
    1020 std::vector<int>& boundarySegmentToPhysicalEntity,
    \n-
    1021 std::vector<int>& elementToPhysicalEntity,
    \n-
    1022 bool verbose, bool insertBoundarySegments)
    \n-
    1023 {
    \n-
    1024 doRead(
    \n-
    1025 factory, fileName, boundarySegmentToPhysicalEntity,
    \n-
    1026 elementToPhysicalEntity, verbose, insertBoundarySegments
    \n-
    1027 );
    \n-
    1028 }
    \n-
    1029
    \n-
    1031 //\\{
    \n-
    1032
    \n-
    1033 [[deprecated("Will be removed after 2.8. Either use other constructors or use static methods without constructing an object")]]
    \n-
    1034 GmshReader() = default;
    \n-
    1035
    \n-\n-
    1037
    \n-
    1038 static constexpr Opts defaultOpts =
    \n-
    1039 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | Opts::readBoundaryData;
    \n-
    1040
    \n-
    1042
    \n-
    1065 GmshReader(const std::string& fileName,
    \n-\n-
    1067 {
    \n-
    1068 gridFactory_ = std::make_unique<Dune::GridFactory<Grid>>();
    \n-
    1069 readGridFile(fileName, *gridFactory_, options);
    \n-
    1070 }
    \n-
    1071
    \n-
    1079 GmshReader(const std::string& fileName, GridFactory<Grid>& factory,
    \n-\n-
    1081 {
    \n-
    1082 readGridFile(fileName, factory, options);
    \n-
    1083 }
    \n-
    1084
    \n-
    1086 const std::vector<int>& elementData () const
    \n-
    1087 {
    \n-
    1088 checkElementData();
    \n-
    1089 return elementIndexToGmshPhysicalEntity_;
    \n-
    1090 }
    \n-
    1091
    \n-
    1093 const std::vector<int>& boundaryData () const
    \n-
    1094 {
    \n-
    1095 checkBoundaryData();
    \n-
    1096 return boundarySegmentIndexToGmshPhysicalEntity_;
    \n-
    1097 }
    \n-
    1098
    \n-
    1103 bool hasElementData () const
    \n-
    1104 { return hasElementData_ && !extractedElementData_; }
    \n-
    1105
    \n-
    1110 bool hasBoundaryData () const
    \n-
    1111 { return hasBoundaryData_ && !extractedBoundaryData_; }
    \n-
    1112
    \n-
    1114 std::vector<int> extractElementData ()
    \n-
    1115 {
    \n-
    1116 checkElementData();
    \n-
    1117 extractedElementData_ = true;
    \n-
    1118 return std::move(elementIndexToGmshPhysicalEntity_);
    \n-
    1119 }
    \n-
    1120
    \n-
    1122 std::vector<int> extractBoundaryData ()
    \n-
    1123 {
    \n-
    1124 checkBoundaryData();
    \n-
    1125 extractedBoundaryData_ = true;
    \n-
    1126 return std::move(boundarySegmentIndexToGmshPhysicalEntity_);
    \n-
    1127 }
    \n-
    1128
    \n-
    1130 std::unique_ptr<Grid> createGrid ()
    \n-
    1131 {
    \n-
    1132 if (!gridFactory_)
    \n-
    1133 DUNE_THROW(Dune::InvalidStateException,
    \n-
    1134 "This GmshReader has been constructed with a Dune::GridFactory. "
    \n-
    1135 << "This grid factory has been filled with all information to create a grid. "
    \n-
    1136 << "Please use this factory to create the grid by calling factory.createGrid(). "
    \n-
    1137 << "Alternatively use the constructor without passing the factory in combination with this member function."
    \n-
    1138 );
    \n-
    1139
    \n-
    1140 return gridFactory_->createGrid();
    \n-
    1141 }
    \n-
    1142
    \n-
    1143 //\\}
    \n-
    1144
    \n-
    1145 private:
    \n-
    1146 void checkElementData () const
    \n-
    1147 {
    \n-
    1148 if (!hasElementData_)
    \n-
    1149 DUNE_THROW(Dune::InvalidStateException,
    \n-
    1150 "This GmshReader has been constructed without the option 'readElementData'. "
    \n-
    1151 << "Please enable reading element data by passing the option 'Gmsh::ReaderOpts::readElementData' "
    \n-
    1152 << "to the constructor of this class."
    \n-
    1153 );
    \n-
    1154
    \n-
    1155 if (extractedElementData_)
    \n-
    1156 DUNE_THROW(Dune::InvalidStateException,
    \n-
    1157 "The element data has already been extracted from this GmshReader "
    \n-
    1158 << "via a function call to reader.extractElementData(). Use the extraced data or "
    \n-
    1159 << "read the grid data from file again by constructing a new reader."
    \n-
    1160 );
    \n-
    1161 }
    \n-
    1162
    \n-
    1163 void checkBoundaryData () const
    \n-
    1164 {
    \n-
    1165 if (!hasBoundaryData_)
    \n-
    1166 DUNE_THROW(Dune::InvalidStateException,
    \n-
    1167 "This GmshReader has been constructed without the option 'readBoundaryData'. "
    \n-
    1168 << "Please enable reading boundary data by passing the option 'Gmsh::ReaderOpts::readBoundaryData' "
    \n-
    1169 << "to the constructor of this class."
    \n-
    1170 );
    \n-
    1171
    \n-
    1172 if (extractedBoundaryData_)
    \n-
    1173 DUNE_THROW(Dune::InvalidStateException,
    \n-
    1174 "The boundary data has already been extracted from this GmshReader "
    \n-
    1175 << "via a function call to reader.extractBoundaryData(). Use the extraced data or "
    \n-
    1176 << "read the grid data from file again by constructing a new reader."
    \n-
    1177 );
    \n-
    1178 }
    \n-
    1179
    \n-
    1180 void readGridFile (const std::string& fileName, GridFactory<Grid>& factory, Gmsh::ReaderOptions options)
    \n-
    1181 {
    \n-
    1182 const bool verbose = options & Opts::verbose;
    \n-
    1183 const bool insertBoundarySegments = options & Opts::insertBoundarySegments;
    \n-
    1184 const bool readBoundaryData = options & Opts::readBoundaryData;
    \n-
    1185 const bool readElementData = options & Opts::readElementData;
    \n-
    1186
    \n-
    1187 doRead(
    \n-
    1188 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_,
    \n-
    1189 elementIndexToGmshPhysicalEntity_, verbose,
    \n-
    1190 readBoundaryData || insertBoundarySegments
    \n-
    1191 );
    \n-
    1192
    \n-
    1193 // clear unwanted data
    \n-
    1194 if (!readBoundaryData)
    \n-
    1195 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector<int>{};
    \n-
    1196 if (!readElementData)
    \n-
    1197 elementIndexToGmshPhysicalEntity_ = std::vector<int>{};
    \n-
    1198
    \n-
    1199 hasElementData_ = readElementData;
    \n-
    1200 hasBoundaryData_ = readBoundaryData;
    \n-
    1201 }
    \n-
    1202
    \n-
    1203 std::unique_ptr<Dune::GridFactory<Grid>> gridFactory_;
    \n-
    1204
    \n-
    1205 std::vector<int> elementIndexToGmshPhysicalEntity_;
    \n-
    1206 std::vector<int> boundarySegmentIndexToGmshPhysicalEntity_;
    \n-
    1207
    \n-
    1208 bool hasElementData_;
    \n-
    1209 bool hasBoundaryData_;
    \n-
    1210
    \n-
    1211 // for better error messages, we keep track of these separately
    \n-
    1212 bool extractedElementData_ = false;
    \n-
    1213 bool extractedBoundaryData_ = false;
    \n-
    1214 };
    \n-
    1215
    \n-
    1218} // namespace Dune
    \n-
    1219
    \n-
    1220#endif
    \n-
    Base class for grid boundary segments of arbitrary geometry.
    \n-
    ReaderOptions
    Option for the Gmsh mesh file reader.
    Definition: gmshreader.hh:756
    \n-\n-\n-\n-\n-
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n+
    219 // return size
    \n+
    220 static int size( MPICommunicatorType MPICOMM )
    \n+
    221 {
    \n+
    222 int size = 1;
    \n+
    223#if HAVE_MPI
    \n+
    224 MPI_Comm_size( MPICOMM, &size );
    \n+
    225#endif
    \n+
    226 return size;
    \n+
    227 }
    \n+
    228
    \n+
    229 Grid *grid_;
    \n+
    230 GridFactory< UGGrid< dim > > factory_;
    \n+
    231 DuneGridFormatParser dgf_;
    \n+
    232 };
    \n+
    233#endif // #if HAVE_DUNE_UGGRID
    \n+
    234
    \n+
    235} // namespace Dune
    \n+
    236
    \n+
    237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH
    \n+\n+
    The UGGrid class.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    static const int dimWorld
    Definition: misc.hh:46
    \n-
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n-
    constexpr bool operator&(ReaderOptions a, ReaderOptions b)
    query operator for reader options (is b set in a)
    Definition: gmshreader.hh:772
    \n-
    constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)
    composition operator for reader options
    Definition: gmshreader.hh:764
    \n-
    int renumber(const Dune::GeometryType &t, int i)
    renumber VTK <-> Dune
    Definition: common.hh:186
    \n-
    @ line
    Definition: common.hh:134
    \n-
    @ pyramid
    Definition: common.hh:141
    \n-
    @ quadrilateral
    Definition: common.hh:137
    \n-
    @ tetrahedron
    Definition: common.hh:138
    \n-
    @ prism
    Definition: common.hh:140
    \n-
    @ hexahedron
    Definition: common.hh:139
    \n-
    @ triangle
    Definition: common.hh:135
    \n-
    Base class for classes implementing geometries of boundary segments.
    Definition: boundarysegment.hh:94
    \n-
    Communication comm() const
    Return the Communication used by the grid factory.
    Definition: common/gridfactory.hh:297
    \n-
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:314
    \n-
    virtual std::unique_ptr< GridType > createGrid()
    Finalize grid creation and hand over the grid.
    Definition: common/gridfactory.hh:372
    \n-
    Options for read operation.
    Definition: gmshreader.hh:39
    \n-
    GeometryOrder
    Definition: gmshreader.hh:40
    \n-
    @ firstOrder
    edges are straight lines.
    Definition: gmshreader.hh:42
    \n-
    @ secondOrder
    quadratic boundary approximation.
    Definition: gmshreader.hh:44
    \n-
    dimension independent parts for GmshReaderParser
    Definition: gmshreader.hh:302
    \n-
    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:510
    \n-
    static const int dimWorld
    Definition: gmshreader.hh:320
    \n-
    Dune::GridFactory< GridType > & factory
    Definition: gmshreader.hh:305
    \n-
    std::vector< int > & boundaryIdMap()
    Definition: gmshreader.hh:357
    \n-
    std::vector< int > & elementIndexMap()
    Definition: gmshreader.hh:362
    \n-
    unsigned int number_of_real_vertices
    Definition: gmshreader.hh:308
    \n-
    void boundarysegment_insert(const std::vector< FieldVector< double, 3 > > &nodes, const E &elementDofs, const V &vertices)
    Definition: gmshreader.hh:573
    \n-
    GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)
    Definition: gmshreader.hh:354
    \n-
    int element_count
    Definition: gmshreader.hh:310
    \n-
    void read(const std::string &f)
    Definition: gmshreader.hh:367
    \n-
    void skipline(FILE *file)
    Definition: gmshreader.hh:344
    \n-
    void readfile(FILE *file, int cnt, const char *format, void *t1, void *t2=0, void *t3=0, void *t4=0, void *t5=0, void *t6=0, void *t7=0, void *t8=0, void *t9=0, void *t10=0)
    Definition: gmshreader.hh:330
    \n-
    std::vector< int > element_index_to_physical_entity
    Definition: gmshreader.hh:316
    \n-
    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:598
    \n-
    static const int dim
    Definition: gmshreader.hh:319
    \n-
    FieldVector< double, dimWorld > GlobalVector
    Definition: gmshreader.hh:324
    \n-
    std::string fileName
    Definition: gmshreader.hh:313
    \n-
    int boundary_element_count
    Definition: gmshreader.hh:309
    \n-
    void boundarysegment_insert(const V &, const E &, const V2 &)
    Definition: gmshreader.hh:562
    \n-
    bool verbose
    Definition: gmshreader.hh:306
    \n-
    std::vector< int > boundary_id_to_physical_entity
    Definition: gmshreader.hh:315
    \n-
    char buf[512]
    Definition: gmshreader.hh:312
    \n-
    bool insert_boundary_segments
    Definition: gmshreader.hh:307
    \n-
    Read Gmsh mesh file.
    Definition: gmshreader.hh:805
    \n-
    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:931
    \n-
    const std::vector< int > & elementData() const
    Access element data (maps element index to Gmsh physical entity)
    Definition: gmshreader.hh:1086
    \n-
    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:981
    \n-
    static std::unique_ptr< Grid > read(const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
    Definition: gmshreader.hh:902
    \n-
    static void read(Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true)
    Definition: gmshreader.hh:948
    \n-
    GridType Grid
    Definition: gmshreader.hh:894
    \n-
    std::unique_ptr< Grid > createGrid()
    Create the grid.
    Definition: gmshreader.hh:1130
    \n-
    std::vector< int > extractBoundaryData()
    Erase boundary data from reader and return the data.
    Definition: gmshreader.hh:1122
    \n-
    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:1018
    \n-
    bool hasElementData() const
    If element data is available.
    Definition: gmshreader.hh:1103
    \n-
    bool hasBoundaryData() const
    If boundary data is available.
    Definition: gmshreader.hh:1110
    \n-
    static constexpr Opts defaultOpts
    Definition: gmshreader.hh:1038
    \n-
    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:1079
    \n-
    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:1065
    \n-
    std::vector< int > extractElementData()
    Erase element data from reader and return the data.
    Definition: gmshreader.hh:1114
    \n-
    const std::vector< int > & boundaryData() const
    Access boundary data (maps boundary segment index to Gmsh physical entity)
    Definition: gmshreader.hh:1093
    \n-
    GmshReader()=default
    Dynamic Gmsh reader interface.
    \n-
    Provide a generic factory class for unstructured grids.
    \n+
    @ vertex
    Definition: common.hh:133
    \n+
    Definition: dgfgridfactory.hh:38
    \n+
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfgridfactory.hh:41
    \n+
    G Grid
    Definition: dgfgridfactory.hh:39
    \n+
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n+
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n+
    int indexInInside() const
    Local index of codim 1 entity in the inside() entity where intersection is contained in.
    Definition: common/intersection.hh:346
    \n+
    size_t boundarySegmentIndex() const
    index of the boundary segment within the macro grid
    Definition: common/intersection.hh:236
    \n+
    Entity inside() const
    return Entity on the inside of this intersection. That is the Entity where we started this.
    Definition: common/intersection.hh:250
    \n+
    GridImp::template Codim< 0 >::Entity Entity
    Type of entity that this Intersection belongs to.
    Definition: common/intersection.hh:192
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    Common Grid parameters.
    Definition: gridparameter.hh:35
    \n+
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n+
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n+
    Definition: dgfug.hh:39
    \n+
    size_t heapSize() const
    returns heap size used on construction of the grid
    Definition: dgfug.hh:48
    \n+
    bool noCopy_
    Definition: dgfug.hh:52
    \n+
    UGGridParameterBlock(std::istream &input)
    constructor taking istream
    Definition: dgfug.cc:20
    \n+
    size_t heapSize_
    Definition: dgfug.hh:53
    \n+
    bool noClosure_
    Definition: dgfug.hh:51
    \n+
    bool noCopy() const
    returns true if no copies are made for UGGrid elements
    Definition: dgfug.hh:46
    \n+
    bool noClosure() const
    returns true if no closure should be used for UGGrid
    Definition: dgfug.hh:44
    \n+
    static double refineWeight()
    Definition: dgfug.hh:69
    \n+
    static int refineStepsForHalf()
    Definition: dgfug.hh:64
    \n+
    const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
    return invalid value
    Definition: dgfug.hh:182
    \n+
    std::vector< double > & parameter(const typename Grid::template Codim< dimension >::Entity &vertex)
    return parameter for vertex
    Definition: dgfug.hh:164
    \n+
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    constructor taking filename
    Definition: dgfug.hh:101
    \n+
    MPIHelper::MPICommunicator MPICommunicatorType
    MPI communicator type.
    Definition: dgfug.hh:88
    \n+
    int numParameters(const Entity &) const
    return number of parameters
    Definition: dgfug.hh:147
    \n+
    int boundaryId(const Dune::Intersection< GG, II > &intersection) const
    will return boundary segment index
    Definition: dgfug.hh:128
    \n+
    UGGrid< dim > Grid
    grid type
    Definition: dgfug.hh:84
    \n+
    bool wasInserted(const Dune::Intersection< GG, II > &intersection) const
    please doc me
    Definition: dgfug.hh:121
    \n+
    DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
    constructor taking istream
    Definition: dgfug.hh:91
    \n+
    int numParameters() const
    return number of parameters
    Definition: dgfug.hh:135
    \n+
    bool haveBoundaryParameters() const
    UGGrid does not support boundary parameters.
    Definition: dgfug.hh:175
    \n+
    std::vector< double > & parameter(const typename Grid::template Codim< 0 >::Entity &element)
    return parameter for codim 0 entity
    Definition: dgfug.hh:153
    \n+
    Grid * grid()
    return grid
    Definition: dgfug.hh:114
    \n+
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n+
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n+
    Front-end for the grid manager of the finite element toolbox UG3.
    Definition: uggrid.hh:207
    \n+\n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,1331 +6,398 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-gmshreader.hh\n+ * dgfparser\n+dgfug.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GMSHREADER_HH\n- 7#define DUNE_GMSHREADER_HH\n- 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15#include \n- 16#include \n- 17#include \n- 18#include \n- 19#include \n- 20\n- 21#include \n- 22#include \n- 23\n- 24#include \n- 25\n- 26#include \n- 27#include \n- 28\n- 29namespace Dune\n- 30{\n- 31\n-38 struct GmshReaderOptions\n+ 5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH\n+ 6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH\n+ 7\n+ 8//- C++ includes\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14//- dune-common includes\n+ 15#include \n+ 16#include \n+ 17#include \n+ 18\n+ 19//- dune-grid includes\n+ 20#include \n+ 21#include \n+ 22\n+ 23//- local includes\n+ 24#include \"dgfparser.hh\"\n+ 25#include \"blocks/gridparameter.hh\"\n+ 26\n+ 27\n+ 28namespace Dune\n+ 29{\n+ 30\n+ 31 namespace dgf\n+ 32 {\n+ 33\n+ 34 // UGGridParameterBlock\n+ 35 // --------------------\n+ 36\n+37 struct UGGridParameterBlock\n+ 38 : public GridParameterBlock\n 39 {\n-40 enum GeometryOrder {\n-42 firstOrder,\n- 44 secondOrder\n-45 };\n- 46 };\n- 47\n- 48 namespace {\n+ 41 explicit UGGridParameterBlock ( std::istream &input );\n+ 42\n+44 bool noClosure () const { return noClosure_; }\n+46 bool noCopy () const { return noCopy_; }\n+48 size_t heapSize () const { return heapSize_; }\n 49\n- 50 // arbitrary dimension, implementation is in specialization\n- 51 template< int dimension, int dimWorld = dimension >\n- 52 class GmshReaderQuadraticBoundarySegment\n- 53 {\n- 54 public:\n- 55 // empty function since this class does not implement anything\n- 56 static void registerFactory() {}\n- 57 };\n+ 50 protected:\n+51 bool noClosure_; // no closure for UGGrid\n+52 bool noCopy_; // no copies for UGGrid\n+53 size_t heapSize_; // heap size for UGGrid\n+ 54 };\n+ 55\n+ 56 } // namespace dgf\n+ 57\n 58\n- 59 // quadratic boundary segments in 1d\n- 60 /*\n- 61 Note the points\n- 62\n- 63 (0) (alpha) (1)\n- 64\n- 65 are mapped to the points in global coordinates\n- 66\n- 67 p0 p2 p1\n+ 59\n+ 60#if HAVE_DUNE_UGGRID\n+ 61 template< int dim >\n+62 struct DGFGridInfo< UGGrid< dim > >\n+ 63 {\n+64 static int refineStepsForHalf ()\n+ 65 {\n+ 66 return 1;\n+ 67 }\n 68\n- 69 alpha is determined automatically from the given points.\n- 70 */\n- 71 template< int dimWorld >\n- 72 struct GmshReaderQuadraticBoundarySegment< 2, dimWorld >\n- 73 : public Dune::BoundarySegment< 2, dimWorld >\n- 74 {\n- 75 typedef GmshReaderQuadraticBoundarySegment< 2, dimWorld > ThisType;\n- 76 typedef typename Dune::BoundarySegment<_2,_dimWorld_> :: ObjectStreamType\n-ObjectStreamType;\n- 77 typedef Dune::FieldVector< double, dimWorld > GlobalVector;\n- 78\n- 79 GmshReaderQuadraticBoundarySegment ( const GlobalVector &p0_, const\n-GlobalVector &p1_, const GlobalVector &p2_)\n- 80 : p0(p0_), p1(p1_), p2(p2_)\n- 81 {\n- 82 init();\n- 83 }\n- 84\n- 85 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )\n- 86 {\n- 87 // key is read before by the factory\n- 88 const int bytes = sizeof(double)*dimWorld;\n- 89 in.read( (char *) &p0[ 0 ], bytes );\n- 90 in.read( (char *) &p1[ 0 ], bytes );\n- 91 in.read( (char *) &p2[ 0 ], bytes );\n- 92 init();\n- 93 }\n- 94\n- 95 static void registerFactory()\n+69 static double refineWeight ()\n+ 70 {\n+ 71 return -1.;\n+ 72 }\n+ 73 };\n+ 74\n+ 75\n+ 76\n+ 77 // DGFGridFactory< UGGrid< dim > >\n+ 78 // -------------------------------\n+ 79\n+ 80 template< int dim >\n+81 struct DGFGridFactory< UGGrid< dim > >\n+ 82 {\n+84 typedef UGGrid<_dim_> Grid;\n+86 static const int dimension = dim;\n+88 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n+ 89\n+91 explicit DGFGridFactory ( std::istream &input,\n+ 92 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n+ 93 : grid_( 0 ),\n+ 94 factory_(),\n+ 95 dgf_( rank( comm ), size( comm ) )\n 96 {\n- 97 if( key() < 0 )\n- 98 {\n- 99 key() = Dune::BoundarySegment<_2,_dimWorld_>::template registerFactory<\n-ThisType >();\n- 100 }\n- 101 }\n- 102\n- 103 virtual GlobalVector operator() ( const Dune::FieldVector &local\n-) const\n- 104 {\n- 105 GlobalVector y;\n- 106 y = 0.0;\n- 107 y.axpy((local[0]-alpha)*(local[0]-1.0)/alpha,p0);\n- 108 y.axpy(local[0]*(local[0]-1.0)/(alpha*(alpha-1.0)),p1);\n- 109 y.axpy(local[0]*(local[0]-alpha)/(1.0-alpha),p2);\n- 110 return y;\n+ 97 generate( input );\n+ 98 }\n+ 99\n+101 explicit DGFGridFactory ( const std::string &filename,\n+ 102 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n+ 103 : grid_( 0 ),\n+ 104 factory_(),\n+ 105 dgf_( rank( comm ), size( comm ) )\n+ 106 {\n+ 107 std::ifstream input( filename.c_str() );\n+ 108 if ( !input )\n+ 109 DUNE_THROW( DGFException, \"Error: Macrofile \" << filename << \" not found\"\n+);\n+ 110 generate( input );\n 111 }\n 112\n- 113 void backup( ObjectStreamType& out ) const\n- 114 {\n- 115 // backup key to identify object\n- 116 out.write( (const char *) &key(), sizeof( int ) );\n- 117 // backup data\n- 118 const int bytes = sizeof(double)*dimWorld;\n- 119 out.write( (const char*) &p0[ 0 ], bytes );\n- 120 out.write( (const char*) &p1[ 0 ], bytes );\n- 121 out.write( (const char*) &p2[ 0 ], bytes );\n- 122 }\n- 123\n- 124 protected:\n- 125 void init()\n- 126 {\n- 127 GlobalVector d1 = p1;\n- 128 d1 -= p0;\n- 129 GlobalVector d2 = p2;\n- 130 d2 -= p1;\n- 131\n- 132 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());\n- 133 if (alpha<1E-6 || alpha>1-1E-6)\n- 134 DUNE_THROW(Dune::IOError, \"ration in quadratic boundary segment bad\");\n- 135 }\n- 136\n- 137 static int& key() {\n- 138 static int k = -1;\n- 139 return k;\n- 140 }\n- 141\n- 142 private:\n- 143 GlobalVector p0,p1,p2;\n- 144 double alpha;\n- 145 };\n- 146\n- 147\n- 148 // quadratic boundary segments in 2d\n- 149 /* numbering of points corresponding to gmsh:\n- 150\n- 151 2\n- 152\n- 153 5 4\n- 154\n- 155 0 3 1\n- 156\n- 157 Note: The vertices 3, 4, 5 are not necessarily at the edge midpoints but\n-can\n- 158 be placed with parameters alpha, beta , gamma at the following positions\n- 159 in local coordinates:\n- 160\n- 161\n- 162 2 = (0,1)\n- 163\n- 164 5 = (0,beta) 4 = (1-gamma/sqrt(2),gamma/sqrt(2))\n- 165\n- 166 0 = (0,0) 3 = (alpha,0) 1 = (1,0)\n- 167\n- 168 The parameters alpha, beta, gamma are determined from the given vertices\n-in\n- 169 global coordinates.\n- 170 */\n- 171 template<>\n- 172 class GmshReaderQuadraticBoundarySegment< 3, 3 >\n- 173 : public Dune::BoundarySegment< 3 >\n- 174 {\n- 175 typedef GmshReaderQuadraticBoundarySegment< 3, 3 > ThisType;\n- 176 typedef typename Dune::BoundarySegment<_3_> :: ObjectStreamType\n-ObjectStreamType;\n- 177 public:\n- 178 GmshReaderQuadraticBoundarySegment (Dune::FieldVector p0_,\n-Dune::FieldVector p1_,\n- 179 Dune::FieldVector p2_, Dune::FieldVector p3_,\n- 180 Dune::FieldVector p4_, Dune::FieldVector p5_)\n- 181 : p0(p0_), p1(p1_), p2(p2_), p3(p3_), p4(p4_), p5(p5_)\n- 182 {\n- 183 init();\n- 184 }\n- 185\n- 186 GmshReaderQuadraticBoundarySegment( ObjectStreamType& in )\n- 187 {\n- 188 const int bytes = sizeof(double)*3;\n- 189 in.read( (char *) &p0[ 0 ], bytes );\n- 190 in.read( (char *) &p1[ 0 ], bytes );\n- 191 in.read( (char *) &p2[ 0 ], bytes );\n- 192 in.read( (char *) &p3[ 0 ], bytes );\n- 193 in.read( (char *) &p4[ 0 ], bytes );\n- 194 in.read( (char *) &p5[ 0 ], bytes );\n- 195 init();\n- 196 }\n- 197\n- 198 static void registerFactory()\n- 199 {\n- 200 if( key() < 0 )\n- 201 {\n- 202 key() = Dune::BoundarySegment<_3_>::template registerFactory< ThisType >\n-();\n+114 Grid *grid ()\n+ 115 {\n+ 116 return grid_;\n+ 117 }\n+ 118\n+ 120 template< class GG, class II >\n+121 bool wasInserted ( const Dune::Intersection<_GG,_II_> &intersection ) const\n+ 122 {\n+ 123 return factory_.wasInserted( intersection );\n+ 124 }\n+ 125\n+ 127 template< class GG, class II >\n+128 int boundaryId ( const Dune::Intersection<_GG,_II_> &intersection ) const\n+ 129 {\n+ 130 return intersection.boundarySegmentIndex();\n+ 131 }\n+ 132\n+ 134 template< int codim >\n+135 int numParameters () const\n+ 136 {\n+ 137 if( codim == 0 )\n+ 138 return dgf_.nofelparams;\n+ 139 else if( codim == dimension )\n+ 140 return dgf_.nofvtxparams;\n+ 141 else\n+ 142 return 0;\n+ 143 }\n+ 144\n+ 146 template< class Entity >\n+147 int numParameters ( const Entity & ) const\n+ 148 {\n+ 149 return numParameters< Entity::codimension >();\n+ 150 }\n+ 151\n+153 std::vector< double > ¶meter ( const typename Grid::template Codim< 0\n+>::Entity &element )\n+ 154 {\n+ 155 if( numParameters< 0 >() <= 0 )\n+ 156 {\n+ 157 DUNE_THROW( InvalidStateException,\n+ 158 \"Calling DGFGridFactory::parameter is only allowed if there are\n+parameters.\" );\n+ 159 }\n+ 160 return dgf_.elParams[ factory_.insertionIndex( element ) ];\n+ 161 }\n+ 162\n+164 std::vector< double > ¶meter ( const typename Grid::template Codim<\n+dimension >::Entity &vertex )\n+ 165 {\n+ 166 if( numParameters< dimension >() <= 0 )\n+ 167 {\n+ 168 DUNE_THROW( InvalidStateException,\n+ 169 \"Calling DGFGridFactory::parameter is only allowed if there are\n+parameters.\" );\n+ 170 }\n+ 171 return dgf_.vtxParams[ factory_.insertionIndex( vertex ) ];\n+ 172 }\n+ 173\n+175 bool haveBoundaryParameters () const\n+ 176 {\n+ 177 return dgf_.haveBndParameters;\n+ 178 }\n+ 179\n+ 181 template< class GG, class II >\n+182 const DGFBoundaryParameter::type &boundaryParameter ( const Dune::\n+Intersection<_GG,_II_> &intersection ) const\n+ 183 {\n+ 184 typedef Dune::Intersection<_GG,_II_> Intersection;\n+ 185 typename Intersection::Entity entity = intersection.inside();\n+ 186 const int face = intersection.indexInInside();\n+ 187\n+ 188 auto refElem = referenceElement< double, dimension >( entity.type() );\n+ 189 int corners = refElem.size( face, 1, dimension );\n+ 190 std::vector< unsigned int > bound( corners );\n+ 191 for( int i = 0; i < corners; ++i )\n+ 192 {\n+ 193 const int k = refElem.subEntity( face, 1, i, dimension );\n+ 194 bound[ i ] = factory_.insertionIndex( entity.template subEntity< dimension\n+>( k ) );\n+ 195 }\n+ 196\n+ 197 DuneGridFormatParser::facemap_t::key_type key( bound, false );\n+ 198 const DuneGridFormatParser::facemap_t::const_iterator pos =\n+dgf_.facemap.find( key );\n+ 199 if( pos != dgf_.facemap.end() )\n+ 200 return dgf_.facemap.find( key )->second.second;\n+ 201 else\n+ 202 return DGFBoundaryParameter::defaultValue();\n 203 }\n- 204 }\n- 205\n- 206 virtual Dune::FieldVector operator() (const Dune::\n-FieldVector& local) const\n- 207 {\n- 208 Dune::FieldVector y;\n- 209 y = 0.0;\n- 210 y.axpy(phi0(local),p0);\n- 211 y.axpy(phi1(local),p1);\n- 212 y.axpy(phi2(local),p2);\n- 213 y.axpy(phi3(local),p3);\n- 214 y.axpy(phi4(local),p4);\n- 215 y.axpy(phi5(local),p5);\n- 216 return y;\n+ 204\n+ 205 private:\n+ 206 // create grid\n+ 207 void generate ( std::istream &input );\n+ 208\n+ 209 // return rank\n+ 210 static int rank( MPICommunicatorType MPICOMM )\n+ 211 {\n+ 212 int rank = 0;\n+ 213#if HAVE_MPI\n+ 214 MPI_Comm_rank( MPICOMM, &rank );\n+ 215#endif\n+ 216 return rank;\n 217 }\n 218\n- 219 void backup( ObjectStreamType& out ) const\n- 220 {\n- 221 // backup key to identify object in factory\n- 222 out.write( (const char*) &key(), sizeof( int ) );\n- 223 // backup data\n- 224 const int bytes = sizeof(double)*3;\n- 225 out.write( (const char*) &p0[ 0 ], bytes );\n- 226 out.write( (const char*) &p1[ 0 ], bytes );\n- 227 out.write( (const char*) &p2[ 0 ], bytes );\n- 228 out.write( (const char*) &p3[ 0 ], bytes );\n- 229 out.write( (const char*) &p4[ 0 ], bytes );\n- 230 out.write( (const char*) &p5[ 0 ], bytes );\n- 231 }\n- 232\n- 233 protected:\n- 234 void init()\n- 235 {\n- 236 using std::sqrt;\n- 237 sqrt2 = sqrt(2.0);\n- 238 Dune::FieldVector d1,d2;\n- 239\n- 240 d1 = p3; d1 -= p0;\n- 241 d2 = p1; d2 -= p3;\n- 242 alpha=d1.two_norm()/(d1.two_norm()+d2.two_norm());\n- 243 if (alpha<1E-6 || alpha>1-1E-6)\n- 244 DUNE_THROW(Dune::IOError, \"alpha in quadratic boundary segment bad\");\n- 245\n- 246 d1 = p5; d1 -= p0;\n- 247 d2 = p2; d2 -= p5;\n- 248 beta=d1.two_norm()/(d1.two_norm()+d2.two_norm());\n- 249 if (beta<1E-6 || beta>1-1E-6)\n- 250 DUNE_THROW(Dune::IOError, \"beta in quadratic boundary segment bad\");\n- 251\n- 252 d1 = p4; d1 -= p1;\n- 253 d2 = p2; d2 -= p4;\n- 254 gamma=sqrt2*(d1.two_norm()/(d1.two_norm()+d2.two_norm()));\n- 255 if (gamma<1E-6 || gamma>1-1E-6)\n- 256 DUNE_THROW(Dune::IOError, \"gamma in quadratic boundary segment bad\");\n- 257 }\n- 258\n- 259 static int& key() {\n- 260 static int k = -1;\n- 261 return k;\n- 262 }\n- 263\n- 264 private:\n- 265 // The six Lagrange basis function on the reference element\n- 266 // for the points given above\n- 267\n- 268 double phi0 (const Dune::FieldVector& local) const\n- 269 {\n- 270 return (alpha*beta-beta*local[0]-alpha*local[1])*(1-local[0]-local[1])/\n-(alpha*beta);\n- 271 }\n- 272 double phi3 (const Dune::FieldVector& local) const\n- 273 {\n- 274 return local[0]*(1-local[0]-local[1])/(alpha*(1-alpha));\n- 275 }\n- 276 double phi1 (const Dune::FieldVector& local) const\n- 277 {\n- 278 return local[0]*(gamma*local[0]-(sqrt2-gamma-sqrt2*alpha)*local[1]-\n-alpha*gamma)/(gamma*(1-alpha));\n- 279 }\n- 280 double phi5 (const Dune::FieldVector& local) const\n- 281 {\n- 282 return local[1]*(1-local[0]-local[1])/(beta*(1-beta));\n- 283 }\n- 284 double phi4 (const Dune::FieldVector& local) const\n- 285 {\n- 286 return local[0]*local[1]/((1-gamma/sqrt2)*gamma/sqrt2);\n- 287 }\n- 288 double phi2 (const Dune::FieldVector& local) const\n- 289 {\n- 290 return local[1]*(beta*(1-gamma/sqrt2)-local[0]*(beta-gamma/sqrt2)-local\n-[1]*(1-gamma/sqrt2))/((1-gamma/sqrt2)*(beta-1));\n- 291 }\n- 292\n- 293 Dune::FieldVector p0,p1,p2,p3,p4,p5;\n- 294 double alpha,beta,gamma,sqrt2;\n- 295 };\n- 296\n- 297 } // end empty namespace\n- 298\n- 300 template\n-301 class GmshReaderParser\n- 302 {\n- 303 protected:\n- 304 // private data\n-305 Dune::GridFactory& factory;\n-306 bool verbose;\n-307 bool insert_boundary_segments;\n-308 unsigned int number_of_real_vertices;\n-309 int boundary_element_count;\n-310 int element_count;\n- 311 // read buffer\n-312 char buf[512];\n-313 std::string fileName;\n- 314 // exported data\n-315 std::vector boundary_id_to_physical_entity;\n-316 std::vector element_index_to_physical_entity;\n- 317\n- 318 // static data\n-319 static const int dim = GridType::dimension;\n-320 static const int dimWorld = GridType::dimensionworld;\n- 321 static_assert( (dimWorld <= 3), \"GmshReader requires dimWorld <= 3.\" );\n- 322\n- 323 // typedefs\n-324 typedef FieldVector< double, dimWorld > GlobalVector;\n- 325\n- 326 // don't use something like\n- 327 // readfile(file, 1, \"%s\\n\", buf);\n- 328 // to skip the rest of of the line -- that will only skip the next\n- 329 // whitespace-separated word! Use skipline() instead.\n-330 void readfile(FILE * file, int cnt, const char * format,\n- 331 void* t1, void* t2 = 0, void* t3 = 0, void* t4 = 0,\n- 332 void* t5 = 0, void* t6 = 0, void* t7 = 0, void* t8 = 0,\n- 333 void* t9 = 0, void* t10 = 0)\n- 334 {\n- 335 off_t pos = ftello(file);\n- 336 int c = fscanf(file, format, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10);\n- 337 if (c != cnt)\n- 338 DUNE_THROW(Dune::IOError, \"Error parsing \" << fileName << \" \"\n- 339 \"file pos \" << pos\n- 340 << \": Expected '\" << format << \"', only read \" << c << \" entries instead\n-of \" << cnt << \".\");\n- 341 }\n- 342\n- 343 // skip over the rest of the line, including the terminating newline\n-344 void skipline(FILE * file)\n- 345 {\n- 346 int c;\n- 347 do {\n- 348 c = std::fgetc(file);\n- 349 } while(c != '\\n' && c != EOF);\n- 350 }\n- 351\n- 352 public:\n- 353\n-354 GmshReaderParser(Dune::GridFactory& _factory, bool v, bool i) :\n- 355 factory(_factory), verbose(v), insert_boundary_segments(i) {}\n- 356\n-357 std::vector & boundaryIdMap()\n- 358 {\n- 359 return boundary_id_to_physical_entity;\n- 360 }\n- 361\n-362 std::vector & elementIndexMap()\n- 363 {\n- 364 return element_index_to_physical_entity;\n- 365 }\n- 366\n-367 void read (const std::string& f)\n- 368 {\n- 369 if (verbose) std::cout << \"Reading \" << dim << \"d Gmsh grid...\" << std::\n-endl;\n- 370\n- 371 // open file name, we use C I/O\n- 372 fileName = f;\n- 373 FILE* file = fopen(fileName.c_str(),\"rb\");\n- 374 if (file==0)\n- 375 DUNE_THROW(Dune::IOError, \"Could not open \" << fileName);\n- 376\n- 377 //=========================================\n- 378 // Header: Read vertices into vector\n- 379 // Check vertices that are needed\n- 380 //=========================================\n- 381\n- 382 number_of_real_vertices = 0;\n- 383 boundary_element_count = 0;\n- 384 element_count = 0;\n- 385\n- 386 // process header\n- 387 double version_number;\n- 388 int file_type, data_size;\n- 389\n- 390 readfile(file,1,\"%s\\n\",buf);\n- 391 if (strcmp(buf,\"$MeshFormat\")!=0)\n- 392 DUNE_THROW(Dune::IOError, \"expected $MeshFormat in first line\");\n- 393 readfile(file,3,\"%lg %d %d\\n\",&version_number,&file_type,&data_size);\n- 394 if( (version_number < 2.0) || (version_number > 2.2) )\n- 395 DUNE_THROW(Dune::IOError, \"can only read Gmsh version 2 files\");\n- 396 if (verbose) std::cout << \"version \" << version_number << \" Gmsh file\n-detected\" << std::endl;\n- 397 readfile(file,1,\"%s\\n\",buf);\n- 398 if (strcmp(buf,\"$EndMeshFormat\")!=0)\n- 399 DUNE_THROW(Dune::IOError, \"expected $EndMeshFormat\");\n- 400\n- 401 // node section\n- 402 int number_of_nodes;\n- 403\n- 404 readfile(file,1,\"%s\\n\",buf);\n- 405 if (strcmp(buf,\"$Nodes\")!=0)\n- 406 DUNE_THROW(Dune::IOError, \"expected $Nodes\");\n- 407 readfile(file,1,\"%d\\n\",&number_of_nodes);\n- 408 if (verbose) std::cout << \"file contains \" << number_of_nodes << \" nodes\"\n-<< std::endl;\n- 409\n- 410 // read nodes\n- 411 // The '+1' is due to the fact that gmsh numbers node starting from 1\n-rather than from 0\n- 412 std::vector< GlobalVector > nodes( number_of_nodes+1 );\n- 413 {\n- 414 int id;\n- 415 double x[ 3 ];\n- 416 for( int i = 1; i <= number_of_nodes; ++i )\n- 417 {\n- 418 readfile(file,4, \"%d %lg %lg %lg\\n\", &id, &x[ 0 ], &x[ 1 ], &x[ 2 ] );\n- 419\n- 420 if (id > number_of_nodes) {\n- 421 DUNE_THROW(Dune::IOError,\n- 422 \"Only dense sequences of node indices are currently supported (node index\n-\"\n- 423 << id << \" is invalid).\");\n- 424 }\n- 425\n- 426 // just store node position\n- 427 for( int j = 0; j < dimWorld; ++j )\n- 428 nodes[ id ][ j ] = x[ j ];\n- 429 }\n- 430 readfile(file,1,\"%s\\n\",buf);\n- 431 if (strcmp(buf,\"$EndNodes\")!=0)\n- 432 DUNE_THROW(Dune::IOError, \"expected $EndNodes\");\n- 433 }\n- 434\n- 435 // element section\n- 436 readfile(file,1,\"%s\\n\",buf);\n- 437 if (strcmp(buf,\"$Elements\")!=0)\n- 438 DUNE_THROW(Dune::IOError, \"expected $Elements\");\n- 439 int number_of_elements;\n- 440 readfile(file,1,\"%d\\n\",&number_of_elements);\n- 441 if (verbose) std::cout << \"file contains \" << number_of_elements << \"\n-elements\" << std::endl;\n- 442\n- 443 //=========================================\n- 444 // Pass 1: Select and insert those vertices in the file that\n- 445 // actually occur as corners of an element.\n- 446 //=========================================\n- 447\n- 448 off_t section_element_offset = ftello(file);\n- 449 std::map renumber;\n- 450 for (int i=1; i<=number_of_elements; i++)\n- 451 {\n- 452 int id, elm_type, number_of_tags;\n- 453 readfile(file,3,\"%d %d %d \",&id,&elm_type,&number_of_tags);\n- 454 for (int k=1; k<=number_of_tags; k++)\n- 455 {\n- 456 int blub;\n- 457 readfile(file,1,\"%d \",&blub);\n- 458 // k == 1: physical entity (not used here)\n- 459 // k == 2: elementary entity (not used here either)\n- 460 // if version_number < 2.2:\n- 461 // k == 3: mesh partition 0\n- 462 // else\n- 463 // k == 3: number of mesh partitions\n- 464 // k => 4: mesh partition k-4\n- 465 }\n- 466 pass1HandleElement(file, elm_type, renumber, nodes);\n- 467 }\n- 468 if (verbose) std::cout << \"number of real vertices = \" <<\n-number_of_real_vertices << std::endl;\n- 469 if (verbose) std::cout << \"number of boundary elements = \" <<\n-boundary_element_count << std::endl;\n- 470 if (verbose) std::cout << \"number of elements = \" << element_count <<\n-std::endl;\n- 471 readfile(file,1,\"%s\\n\",buf);\n- 472 if (strcmp(buf,\"$EndElements\")!=0)\n- 473 DUNE_THROW(Dune::IOError, \"expected $EndElements\");\n- 474 boundary_id_to_physical_entity.resize(boundary_element_count);\n- 475 element_index_to_physical_entity.resize(element_count);\n- 476\n- 477 //==============================================\n- 478 // Pass 2: Insert boundary segments and elements\n- 479 //==============================================\n- 480\n- 481 fseeko(file, section_element_offset, SEEK_SET);\n- 482 boundary_element_count = 0;\n- 483 element_count = 0;\n- 484 for (int i=1; i<=number_of_elements; i++)\n- 485 {\n- 486 int id, elm_type, number_of_tags;\n- 487 readfile(file,3,\"%d %d %d \",&id,&elm_type,&number_of_tags);\n- 488 int physical_entity = -1;\n- 489\n- 490 for (int k=1; k<=number_of_tags; k++)\n- 491 {\n- 492 int blub;\n- 493 readfile(file,1,\"%d \",&blub);\n- 494 if (k==1) physical_entity = blub;\n- 495 }\n- 496 pass2HandleElement(file, elm_type, renumber, nodes, physical_entity);\n- 497 }\n- 498 readfile(file,1,\"%s\\n\",buf);\n- 499 if (strcmp(buf,\"$EndElements\")!=0)\n- 500 DUNE_THROW(Dune::IOError, \"expected $EndElements\");\n- 501\n- 502 fclose(file);\n- 503 }\n- 504\n-510 void pass1HandleElement(FILE* file, const int elm_type,\n- 511 std::map & renumber,\n- 512 const std::vector< GlobalVector > & nodes)\n- 513 {\n- 514 // some data about gmsh elements\n- 515 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1,\n-1};\n- 516 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -\n-1, 1};\n- 517 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1,\n--1, 0};\n- 518\n- 519 // test whether we support the element type\n- 520 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?\n- 521 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) /\n-/ real element or boundary element?\n- 522 {\n- 523 skipline(file); // skip rest of line if element is unknown\n- 524 return;\n- 525 }\n- 526\n- 527 // The format string for parsing is n times '%d' in a row\n- 528 std::string formatString = \"%d\";\n- 529 for (int i=1; i elementDofs(10);\n- 535\n- 536 readfile(file,nDofs[elm_type], formatString.c_str(),\n- 537 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),\n- 538 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),\n- 539 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),\n- 540 &(elementDofs[9]));\n- 541\n- 542 // insert each vertex if it hasn't been inserted already\n- 543 for (int i=0; i\n-562 void boundarysegment_insert(\n- 563 const V&,\n- 564 const E&,\n- 565 const V2&\n- 566 )\n- 567 {\n- 568 DUNE_THROW(Dune::IOError, \"tried to create a 3D boundary segment in a non-\n-3D Grid\");\n- 569 }\n- 570\n- 571 // 3d-case:\n- 572 template \n-573 void boundarysegment_insert(\n- 574 const std::vector >& nodes,\n- 575 const E& elementDofs,\n- 576 const V& vertices\n- 577 )\n- 578 {\n- 579 std::array, 6> v;\n- 580 for (int i=0; i<6; i++)\n- 581 for (int j=0; j* newBoundarySegment\n- 585 = (BoundarySegment*) new GmshReaderQuadraticBoundarySegment<\n-3, 3 >( v[0], v[1], v[2],\n- 586 v[3], v[4], v[5] );\n- 587\n- 588 factory.insertBoundarySegment( vertices,\n- 589 std::shared_ptr >(newBoundarySegment) );\n- 590 }\n- 591\n- 592\n- 593\n-598 virtual void pass2HandleElement(FILE* file, const int elm_type,\n- 599 std::map & renumber,\n- 600 const std::vector< GlobalVector > & nodes,\n- 601 const int physical_entity)\n- 602 {\n- 603 // some data about gmsh elements\n- 604 const int nDofs[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 3, 6, -1, 10, -1, -1, -1,\n-1};\n- 605 const int nVertices[16] = {-1, 2, 3, 4, 4, 8, 6, 5, 2, 3, -1, 4, -1, -1, -\n-1, 1};\n- 606 const int elementDim[16] = {-1, 1, 2, 2, 3, 3, 3, 3, 1, 2, -1, 3, -1, -1,\n--1, 0};\n- 607\n- 608 // test whether we support the element type\n- 609 if ( not (elm_type > 0 && elm_type <= 15 // index in suitable range?\n- 610 && (elementDim[elm_type] == dim || elementDim[elm_type] == (dim-1) ) ) ) /\n-/ real element or boundary element?\n- 611 {\n- 612 skipline(file); // skip rest of line if element is unknown\n- 613 return;\n- 614 }\n- 615\n- 616 // The format string for parsing is n times '%d' in a row\n- 617 std::string formatString = \"%d\";\n- 618 for (int i=1; i elementDofs(10);\n- 624\n- 625 readfile(file,nDofs[elm_type], formatString.c_str(),\n- 626 &(elementDofs[0]),&(elementDofs[1]),&(elementDofs[2]),\n- 627 &(elementDofs[3]),&(elementDofs[4]),&(elementDofs[5]),\n- 628 &(elementDofs[6]),&(elementDofs[7]),&(elementDofs[8]),\n- 629 &(elementDofs[9]));\n- 630\n- 631 // correct differences between gmsh and Dune in the local vertex numbering\n- 632 switch (elm_type)\n- 633 {\n- 634 case 3 : // 4-node quadrilateral\n- 635 std::swap(elementDofs[2],elementDofs[3]);\n- 636 break;\n- 637 case 5 : // 8-node hexahedron\n- 638 std::swap(elementDofs[2],elementDofs[3]);\n- 639 std::swap(elementDofs[6],elementDofs[7]);\n- 640 break;\n- 641 case 7 : // 5-node pyramid\n- 642 std::swap(elementDofs[2],elementDofs[3]);\n- 643 break;\n- 644 }\n- 645\n- 646 // renumber corners to account for the explicitly given vertex\n- 647 // numbering in the file\n- 648 std::vector vertices(nVertices[elm_type]);\n- 649\n- 650 for (int i=0; i, 3> v;\n- 711 for (int i=0; i* newBoundarySegment\n- 717 = (BoundarySegment*) new GmshReaderQuadraticBoundarySegment<\n-2, dimWorld >(v[0], v[1], v[2]);\n- 718 factory.insertBoundarySegment(vertices,\n- 719 std::shared_ptr >(newBoundarySegment));\n- 720 break;\n- 721 }\n- 722 case 9 : { // 6-node triangle\n- 723 boundarysegment_insert(nodes, elementDofs, vertices);\n- 724 break;\n- 725 }\n- 726 default: {\n- 727 DUNE_THROW(Dune::IOError, \"GmshReader does not support using element-type\n-\" << elm_type << \" for boundary segments\");\n- 728 break;\n- 729 }\n- 730\n- 731 }\n- 732\n- 733 }\n- 734 }\n- 735\n- 736 // count elements and boundary elements\n- 737 if (elementDim[elm_type] == dim) {\n- 738 element_index_to_physical_entity[element_count] = physical_entity;\n- 739 element_count++;\n- 740 } else {\n- 741 boundary_id_to_physical_entity[boundary_element_count] = physical_entity;\n- 742 boundary_element_count++;\n- 743 }\n- 744\n- 745 }\n- 746\n- 747 };\n- 748\n-749 namespace Gmsh {\n-755 enum class ReaderOptions\n- 756 {\n- 757 verbose = 1,\n- 758 insertBoundarySegments = 2,\n- 759 readElementData = 4,\n- 760 readBoundaryData = 8\n- 761 };\n- 762\n-764 constexpr ReaderOptions operator_|(ReaderOptions a, ReaderOptions b)\n- 765 {\n- 766 return static_cast(\n- 767 static_cast(a) | static_cast(b)\n- 768 );\n- 769 }\n- 770\n-772 constexpr bool operator_&(ReaderOptions a, ReaderOptions b)\n- 773 {\n- 774 return static_cast(a) & static_cast(b);\n- 775 }\n- 776\n- 777 } // end namespace Gmsh\n- 778\n- 803 template\n-804 class GmshReader\n- 805 {\n- 807\n- 826 static void doRead(Dune::GridFactory &factory,\n- 827 const std::string &fileName,\n- 828 std::vector& boundarySegmentToPhysicalEntity,\n- 829 std::vector& elementToPhysicalEntity,\n- 830 bool verbose, bool insertBoundarySegments)\n- 831 {\n- 832 // register boundary segment to boundary segment factory for possible load\n-balancing\n- 833 // this needs to be done on all cores since the type might not be known\n-otherwise\n- 834 GmshReaderQuadraticBoundarySegment< Grid::dimension, Grid::dimensionworld\n->::registerFactory();\n- 835\n- 836#ifndef NDEBUG\n- 837 // check that this method is called on all cores\n- 838 factory.comm().barrier();\n- 839#endif\n- 840\n- 841 // create parse object and read grid on process 0\n- 842 if (factory.comm().rank() == 0)\n- 843 {\n- 844 GmshReaderParser parser(factory,verbose,insertBoundarySegments);\n- 845 parser.read(fileName);\n- 846\n- 847 boundarySegmentToPhysicalEntity = std::move(parser.boundaryIdMap());\n- 848 elementToPhysicalEntity = std::move(parser.elementIndexMap());\n- 849 }\n- 850 else\n- 851 {\n- 852 boundarySegmentToPhysicalEntity = {};\n- 853 elementToPhysicalEntity = {};\n- 854 }\n- 855 }\n- 856\n- 858\n- 877 template\n- 878 static T &discarded(T &&value) { return value; }\n- 879\n- 880 struct DataArg {\n- 881 std::vector *data_ = nullptr;\n- 882 DataArg(std::vector &data) : data_(&data) {}\n- 883 DataArg(const decltype(std::ignore)&) {}\n- 884 DataArg() = default;\n- 885 };\n- 886\n- 887 struct DataFlagArg : DataArg {\n- 888 bool flag_ = false;\n- 889 using DataArg::DataArg;\n- 890 DataFlagArg(bool flag) : flag_(flag) {}\n- 891 };\n- 892\n- 893 public:\n-894 typedef GridType Grid;\n- 895\n-902 static std::unique_ptr read (const std::string& fileName, bool\n-verbose = true, bool insertBoundarySegments=true)\n- 903 {\n- 904 // make a grid factory\n- 905 Dune::GridFactory factory;\n- 906\n- 907 read(factory, fileName, verbose, insertBoundarySegments);\n- 908\n- 909 return factory.createGrid();\n- 910 }\n- 911\n-931 static std::unique_ptr read (const std::string& fileName,\n- 932 std::vector& boundarySegmentToPhysicalEntity,\n- 933 std::vector& elementToPhysicalEntity,\n- 934 bool verbose = true, bool insertBoundarySegments=true)\n- 935 {\n- 936 // make a grid factory\n- 937 Dune::GridFactory factory;\n- 938\n- 939 doRead(\n- 940 factory, fileName, boundarySegmentToPhysicalEntity,\n- 941 elementToPhysicalEntity, verbose, insertBoundarySegments\n- 942 );\n- 943\n- 944 return factory.createGrid();\n- 945 }\n- 946\n-948 static void read (Dune::GridFactory& factory, const std::string&\n-fileName,\n- 949 bool verbose = true, bool insertBoundarySegments=true)\n- 950 {\n- 951 doRead(\n- 952 factory, fileName, discarded(std::vector{}),\n- 953 discarded(std::vector{}), verbose, insertBoundarySegments\n- 954 );\n- 955 }\n- 956\n- 958\n-981 static void read (Dune::GridFactory &factory,\n- 982 const std::string &fileName,\n- 983 DataFlagArg boundarySegmentData,\n- 984 DataArg elementData,\n- 985 bool verbose=true)\n- 986 {\n- 987 doRead(\n- 988 factory, fileName,\n- 989 boundarySegmentData.data_\n- 990 ? *boundarySegmentData.data_ : discarded(std::vector{}),\n- 991 elementData.data_\n- 992 ? *elementData.data_ : discarded(std::vector{}),\n- 993 verbose,\n- 994 boundarySegmentData.flag_ || boundarySegmentData.data_\n- 995 );\n- 996 }\n- 997\n-1018 static void read (Dune::GridFactory& factory,\n- 1019 const std::string& fileName,\n- 1020 std::vector& boundarySegmentToPhysicalEntity,\n- 1021 std::vector& elementToPhysicalEntity,\n- 1022 bool verbose, bool insertBoundarySegments)\n- 1023 {\n- 1024 doRead(\n- 1025 factory, fileName, boundarySegmentToPhysicalEntity,\n- 1026 elementToPhysicalEntity, verbose, insertBoundarySegments\n- 1027 );\n- 1028 }\n- 1029\n- 1031 //\\{\n- 1032\n- 1033 [[deprecated(\"Will be removed after 2.8. Either use other constructors or\n-use static methods without constructing an object\")]]\n-1034 GmshReader() = default;\n- 1035\n-1036 using Opts = Gmsh::ReaderOptions;\n- 1037\n-1038 static constexpr Opts defaultOpts =\n- 1039 Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData |\n-Opts::readBoundaryData;\n- 1040\n- 1042\n-1065 GmshReader(const std::string& fileName,\n- 1066 Gmsh::ReaderOptions options = defaultOpts)\n- 1067 {\n- 1068 gridFactory_ = std::make_unique>();\n- 1069 readGridFile(fileName, *gridFactory_, options);\n- 1070 }\n- 1071\n-1079 GmshReader(const std::string& fileName, GridFactory& factory,\n- 1080 Gmsh::ReaderOptions options = defaultOpts)\n- 1081 {\n- 1082 readGridFile(fileName, factory, options);\n- 1083 }\n- 1084\n-1086 const std::vector& elementData () const\n- 1087 {\n- 1088 checkElementData();\n- 1089 return elementIndexToGmshPhysicalEntity_;\n- 1090 }\n- 1091\n-1093 const std::vector& boundaryData () const\n- 1094 {\n- 1095 checkBoundaryData();\n- 1096 return boundarySegmentIndexToGmshPhysicalEntity_;\n- 1097 }\n- 1098\n-1103 bool hasElementData () const\n- 1104 { return hasElementData_ && !extractedElementData_; }\n- 1105\n-1110 bool hasBoundaryData () const\n- 1111 { return hasBoundaryData_ && !extractedBoundaryData_; }\n- 1112\n-1114 std::vector extractElementData ()\n- 1115 {\n- 1116 checkElementData();\n- 1117 extractedElementData_ = true;\n- 1118 return std::move(elementIndexToGmshPhysicalEntity_);\n- 1119 }\n- 1120\n-1122 std::vector extractBoundaryData ()\n- 1123 {\n- 1124 checkBoundaryData();\n- 1125 extractedBoundaryData_ = true;\n- 1126 return std::move(boundarySegmentIndexToGmshPhysicalEntity_);\n- 1127 }\n- 1128\n-1130 std::unique_ptr createGrid ()\n- 1131 {\n- 1132 if (!gridFactory_)\n- 1133 DUNE_THROW(Dune::InvalidStateException,\n- 1134 \"This GmshReader has been constructed with a Dune::GridFactory. \"\n- 1135 << \"This grid factory has been filled with all information to create a\n-grid. \"\n- 1136 << \"Please use this factory to create the grid by calling\n-factory.createGrid(). \"\n- 1137 << \"Alternatively use the constructor without passing the factory in\n-combination with this member function.\"\n- 1138 );\n- 1139\n- 1140 return gridFactory_->createGrid();\n- 1141 }\n- 1142\n- 1143 //\\}\n- 1144\n- 1145 private:\n- 1146 void checkElementData () const\n- 1147 {\n- 1148 if (!hasElementData_)\n- 1149 DUNE_THROW(Dune::InvalidStateException,\n- 1150 \"This GmshReader has been constructed without the option\n-'readElementData'. \"\n- 1151 << \"Please enable reading element data by passing the option 'Gmsh::\n-ReaderOpts::readElementData' \"\n- 1152 << \"to the constructor of this class.\"\n- 1153 );\n- 1154\n- 1155 if (extractedElementData_)\n- 1156 DUNE_THROW(Dune::InvalidStateException,\n- 1157 \"The element data has already been extracted from this GmshReader \"\n- 1158 << \"via a function call to reader.extractElementData(). Use the extraced\n-data or \"\n- 1159 << \"read the grid data from file again by constructing a new reader.\"\n- 1160 );\n- 1161 }\n- 1162\n- 1163 void checkBoundaryData () const\n- 1164 {\n- 1165 if (!hasBoundaryData_)\n- 1166 DUNE_THROW(Dune::InvalidStateException,\n- 1167 \"This GmshReader has been constructed without the option\n-'readBoundaryData'. \"\n- 1168 << \"Please enable reading boundary data by passing the option 'Gmsh::\n-ReaderOpts::readBoundaryData' \"\n- 1169 << \"to the constructor of this class.\"\n- 1170 );\n- 1171\n- 1172 if (extractedBoundaryData_)\n- 1173 DUNE_THROW(Dune::InvalidStateException,\n- 1174 \"The boundary data has already been extracted from this GmshReader \"\n- 1175 << \"via a function call to reader.extractBoundaryData(). Use the extraced\n-data or \"\n- 1176 << \"read the grid data from file again by constructing a new reader.\"\n- 1177 );\n- 1178 }\n- 1179\n- 1180 void readGridFile (const std::string& fileName, GridFactory&\n-factory, Gmsh::ReaderOptions options)\n- 1181 {\n- 1182 const bool verbose = options & Opts::verbose;\n- 1183 const bool insertBoundarySegments = options & Opts::\n-insertBoundarySegments;\n- 1184 const bool readBoundaryData = options & Opts::readBoundaryData;\n- 1185 const bool readElementData = options & Opts::readElementData;\n- 1186\n- 1187 doRead(\n- 1188 factory, fileName, boundarySegmentIndexToGmshPhysicalEntity_,\n- 1189 elementIndexToGmshPhysicalEntity_, verbose,\n- 1190 readBoundaryData || insertBoundarySegments\n- 1191 );\n- 1192\n- 1193 // clear unwanted data\n- 1194 if (!readBoundaryData)\n- 1195 boundarySegmentIndexToGmshPhysicalEntity_ = std::vector{};\n- 1196 if (!readElementData)\n- 1197 elementIndexToGmshPhysicalEntity_ = std::vector{};\n- 1198\n- 1199 hasElementData_ = readElementData;\n- 1200 hasBoundaryData_ = readBoundaryData;\n- 1201 }\n- 1202\n- 1203 std::unique_ptr> gridFactory_;\n- 1204\n- 1205 std::vector elementIndexToGmshPhysicalEntity_;\n- 1206 std::vector boundarySegmentIndexToGmshPhysicalEntity_;\n- 1207\n- 1208 bool hasElementData_;\n- 1209 bool hasBoundaryData_;\n- 1210\n- 1211 // for better error messages, we keep track of these separately\n- 1212 bool extractedElementData_ = false;\n- 1213 bool extractedBoundaryData_ = false;\n- 1214 };\n- 1215\n- 1218} // namespace Dune\n- 1219\n- 1220#endif\n-boundarysegment.hh\n-Base class for grid boundary segments of arbitrary geometry.\n-Dune::Gmsh::ReaderOptions\n-ReaderOptions\n-Option for the Gmsh mesh file reader.\n-Definition: gmshreader.hh:756\n-Dune::Gmsh::ReaderOptions::verbose\n-@ verbose\n-Dune::Gmsh::ReaderOptions::readBoundaryData\n-@ readBoundaryData\n-Dune::Gmsh::ReaderOptions::readElementData\n-@ readElementData\n-Dune::Gmsh::ReaderOptions::insertBoundarySegments\n-@ insertBoundarySegments\n-std::swap\n-void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n-> &b)\n-Definition: utility/persistentcontainer.hh:83\n+ 219 // return size\n+ 220 static int size( MPICommunicatorType MPICOMM )\n+ 221 {\n+ 222 int size = 1;\n+ 223#if HAVE_MPI\n+ 224 MPI_Comm_size( MPICOMM, &size );\n+ 225#endif\n+ 226 return size;\n+ 227 }\n+ 228\n+ 229 Grid *grid_;\n+ 230 GridFactory< UGGrid< dim > > factory_;\n+ 231 DuneGridFormatParser dgf_;\n+ 232 };\n+ 233#endif // #if HAVE_DUNE_UGGRID\n+ 234\n+ 235} // namespace Dune\n+ 236\n+ 237#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFUG_HH\n+gridparameter.hh\n+uggrid.hh\n+The UGGrid class.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::dimWorld\n-static const int dimWorld\n-Definition: misc.hh:46\n-Dune::Alberta::GlobalVector\n-ALBERTA REAL_D GlobalVector\n-Definition: misc.hh:50\n-Dune::Gmsh::operator&\n-constexpr bool operator&(ReaderOptions a, ReaderOptions b)\n-query operator for reader options (is b set in a)\n-Definition: gmshreader.hh:772\n-Dune::Gmsh::operator|\n-constexpr ReaderOptions operator|(ReaderOptions a, ReaderOptions b)\n-composition operator for reader options\n-Definition: gmshreader.hh:764\n-Dune::VTK::renumber\n-int renumber(const Dune::GeometryType &t, int i)\n-renumber VTK <-> Dune\n-Definition: common.hh:186\n-Dune::VTK::line\n-@ line\n-Definition: common.hh:134\n-Dune::VTK::pyramid\n-@ pyramid\n-Definition: common.hh:141\n-Dune::VTK::quadrilateral\n-@ quadrilateral\n-Definition: common.hh:137\n-Dune::VTK::tetrahedron\n-@ tetrahedron\n-Definition: common.hh:138\n-Dune::VTK::prism\n-@ prism\n-Definition: common.hh:140\n-Dune::VTK::hexahedron\n-@ hexahedron\n-Definition: common.hh:139\n-Dune::VTK::triangle\n-@ triangle\n-Definition: common.hh:135\n-Dune::BoundarySegment\n-Base class for classes implementing geometries of boundary segments.\n-Definition: boundarysegment.hh:94\n-Dune::GridFactoryInterface::comm\n-Communication comm() const\n-Return the Communication used by the grid factory.\n-Definition: common/gridfactory.hh:297\n-Dune::GridFactory\n-Provide a generic factory class for unstructured grids.\n-Definition: common/gridfactory.hh:314\n-Dune::GridFactory::createGrid\n-virtual std::unique_ptr< GridType > createGrid()\n-Finalize grid creation and hand over the grid.\n-Definition: common/gridfactory.hh:372\n-Dune::GmshReaderOptions\n-Options for read operation.\n-Definition: gmshreader.hh:39\n-Dune::GmshReaderOptions::GeometryOrder\n-GeometryOrder\n-Definition: gmshreader.hh:40\n-Dune::GmshReaderOptions::firstOrder\n-@ firstOrder\n-edges are straight lines.\n-Definition: gmshreader.hh:42\n-Dune::GmshReaderOptions::secondOrder\n-@ secondOrder\n-quadratic boundary approximation.\n-Definition: gmshreader.hh:44\n-Dune::GmshReaderParser\n-dimension independent parts for GmshReaderParser\n-Definition: gmshreader.hh:302\n-Dune::GmshReaderParser::pass1HandleElement\n-void pass1HandleElement(FILE *file, const int elm_type, std::map< int, unsigned\n-int > &renumber, const std::vector< GlobalVector > &nodes)\n-Process one element during the first pass through the list of all elements.\n-Definition: gmshreader.hh:510\n-Dune::GmshReaderParser::dimWorld\n-static const int dimWorld\n-Definition: gmshreader.hh:320\n-Dune::GmshReaderParser::factory\n-Dune::GridFactory< GridType > & factory\n-Definition: gmshreader.hh:305\n-Dune::GmshReaderParser::boundaryIdMap\n-std::vector< int > & boundaryIdMap()\n-Definition: gmshreader.hh:357\n-Dune::GmshReaderParser::elementIndexMap\n-std::vector< int > & elementIndexMap()\n-Definition: gmshreader.hh:362\n-Dune::GmshReaderParser::number_of_real_vertices\n-unsigned int number_of_real_vertices\n-Definition: gmshreader.hh:308\n-Dune::GmshReaderParser::boundarysegment_insert\n-void boundarysegment_insert(const std::vector< FieldVector< double, 3 > >\n-&nodes, const E &elementDofs, const V &vertices)\n-Definition: gmshreader.hh:573\n-Dune::GmshReaderParser::GmshReaderParser\n-GmshReaderParser(Dune::GridFactory< GridType > &_factory, bool v, bool i)\n-Definition: gmshreader.hh:354\n-Dune::GmshReaderParser::element_count\n-int element_count\n-Definition: gmshreader.hh:310\n-Dune::GmshReaderParser::read\n-void read(const std::string &f)\n-Definition: gmshreader.hh:367\n-Dune::GmshReaderParser::skipline\n-void skipline(FILE *file)\n-Definition: gmshreader.hh:344\n-Dune::GmshReaderParser::readfile\n-void readfile(FILE *file, int cnt, const char *format, void *t1, void *t2=0,\n-void *t3=0, void *t4=0, void *t5=0, void *t6=0, void *t7=0, void *t8=0, void\n-*t9=0, void *t10=0)\n-Definition: gmshreader.hh:330\n-Dune::GmshReaderParser::element_index_to_physical_entity\n-std::vector< int > element_index_to_physical_entity\n-Definition: gmshreader.hh:316\n-Dune::GmshReaderParser::pass2HandleElement\n-virtual void pass2HandleElement(FILE *file, const int elm_type, std::map< int,\n-unsigned int > &renumber, const std::vector< GlobalVector > &nodes, const int\n-physical_entity)\n-Process one element during the second pass through the list of all elements.\n-Definition: gmshreader.hh:598\n-Dune::GmshReaderParser::dim\n-static const int dim\n-Definition: gmshreader.hh:319\n-Dune::GmshReaderParser::GlobalVector\n-FieldVector< double, dimWorld > GlobalVector\n-Definition: gmshreader.hh:324\n-Dune::GmshReaderParser::fileName\n-std::string fileName\n-Definition: gmshreader.hh:313\n-Dune::GmshReaderParser::boundary_element_count\n-int boundary_element_count\n-Definition: gmshreader.hh:309\n-Dune::GmshReaderParser::boundarysegment_insert\n-void boundarysegment_insert(const V &, const E &, const V2 &)\n-Definition: gmshreader.hh:562\n-Dune::GmshReaderParser::verbose\n-bool verbose\n-Definition: gmshreader.hh:306\n-Dune::GmshReaderParser::boundary_id_to_physical_entity\n-std::vector< int > boundary_id_to_physical_entity\n-Definition: gmshreader.hh:315\n-Dune::GmshReaderParser::buf\n-char buf[512]\n-Definition: gmshreader.hh:312\n-Dune::GmshReaderParser::insert_boundary_segments\n-bool insert_boundary_segments\n-Definition: gmshreader.hh:307\n-Dune::GmshReader\n-Read Gmsh mesh file.\n-Definition: gmshreader.hh:805\n-Dune::GmshReader::read\n-static std::unique_ptr< Grid > read(const std::string &fileName, std::vector<\n-int > &boundarySegmentToPhysicalEntity, std::vector< int >\n-&elementToPhysicalEntity, bool verbose=true, bool insertBoundarySegments=true)\n-Read Gmsh file, possibly with data.\n-Definition: gmshreader.hh:931\n-Dune::GmshReader::elementData\n-const std::vector< int > & elementData() const\n-Access element data (maps element index to Gmsh physical entity)\n-Definition: gmshreader.hh:1086\n-Dune::GmshReader::read\n-static void read(Dune::GridFactory< Grid > &factory, const std::string\n-&fileName, DataFlagArg boundarySegmentData, DataArg elementData, bool\n-verbose=true)\n-read Gmsh file, possibly with data\n-Definition: gmshreader.hh:981\n-Dune::GmshReader::read\n-static std::unique_ptr< Grid > read(const std::string &fileName, bool\n-verbose=true, bool insertBoundarySegments=true)\n-Definition: gmshreader.hh:902\n-Dune::GmshReader::read\n-static void read(Dune::GridFactory< Grid > &factory, const std::string\n-&fileName, bool verbose=true, bool insertBoundarySegments=true)\n-Definition: gmshreader.hh:948\n-Dune::GmshReader::Grid\n-GridType Grid\n-Definition: gmshreader.hh:894\n-Dune::GmshReader::createGrid\n-std::unique_ptr< Grid > createGrid()\n-Create the grid.\n-Definition: gmshreader.hh:1130\n-Dune::GmshReader::extractBoundaryData\n-std::vector< int > extractBoundaryData()\n-Erase boundary data from reader and return the data.\n-Definition: gmshreader.hh:1122\n-Dune::GmshReader::read\n-static void read(Dune::GridFactory< Grid > &factory, const std::string\n-&fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector<\n-int > &elementToPhysicalEntity, bool verbose, bool insertBoundarySegments)\n-Read Gmsh file, possibly with data.\n-Definition: gmshreader.hh:1018\n-Dune::GmshReader::hasElementData\n-bool hasElementData() const\n-If element data is available.\n-Definition: gmshreader.hh:1103\n-Dune::GmshReader::hasBoundaryData\n-bool hasBoundaryData() const\n-If boundary data is available.\n-Definition: gmshreader.hh:1110\n-Dune::GmshReader::defaultOpts\n-static constexpr Opts defaultOpts\n-Definition: gmshreader.hh:1038\n-Dune::GmshReader::GmshReader\n-GmshReader(const std::string &fileName, GridFactory< Grid > &factory, Gmsh::\n-ReaderOptions options=defaultOpts)\n-Construct a Gmsh reader object from a file name and a grid factory.\n-Definition: gmshreader.hh:1079\n-Dune::GmshReader::GmshReader\n-GmshReader(const std::string &fileName, Gmsh::ReaderOptions\n-options=defaultOpts)\n-Construct a Gmsh reader object (alternatively use one of the static member\n-functions)\n-Definition: gmshreader.hh:1065\n-Dune::GmshReader::extractElementData\n-std::vector< int > extractElementData()\n-Erase element data from reader and return the data.\n-Definition: gmshreader.hh:1114\n-Dune::GmshReader::boundaryData\n-const std::vector< int > & boundaryData() const\n-Access boundary data (maps boundary segment index to Gmsh physical entity)\n-Definition: gmshreader.hh:1093\n-Dune::GmshReader::GmshReader\n-GmshReader()=default\n-Dynamic Gmsh reader interface.\n-gridfactory.hh\n-Provide a generic factory class for unstructured grids.\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n+Dune::DGFGridFactory\n+Definition: dgfgridfactory.hh:38\n+Dune::DGFGridFactory::MPICommunicatorType\n+MPIHelper::MPICommunicator MPICommunicatorType\n+Definition: dgfgridfactory.hh:41\n+Dune::DGFGridFactory::Grid\n+G Grid\n+Definition: dgfgridfactory.hh:39\n+Dune::DGFGridFactory::dimension\n+static const int dimension\n+Definition: dgfgridfactory.hh:40\n+Dune::Intersection\n+Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n+element or with the d...\n+Definition: common/intersection.hh:164\n+Dune::Intersection::indexInInside\n+int indexInInside() const\n+Local index of codim 1 entity in the inside() entity where intersection is\n+contained in.\n+Definition: common/intersection.hh:346\n+Dune::Intersection::boundarySegmentIndex\n+size_t boundarySegmentIndex() const\n+index of the boundary segment within the macro grid\n+Definition: common/intersection.hh:236\n+Dune::Intersection::inside\n+Entity inside() const\n+return Entity on the inside of this intersection. That is the Entity where we\n+started this.\n+Definition: common/intersection.hh:250\n+Dune::Intersection::Entity\n+GridImp::template Codim< 0 >::Entity Entity\n+Type of entity that this Intersection belongs to.\n+Definition: common/intersection.hh:192\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::dgf::GridParameterBlock\n+Common Grid parameters.\n+Definition: gridparameter.hh:35\n+Dune::DGFException\n+exception class for IO errors in the DGF parser\n+Definition: dgfexception.hh:16\n+Dune::DGFGridInfo\n+Some simple static information for a given GridType.\n+Definition: io/file/dgfparser/dgfparser.hh:56\n+Dune::dgf::UGGridParameterBlock\n+Definition: dgfug.hh:39\n+Dune::dgf::UGGridParameterBlock::heapSize\n+size_t heapSize() const\n+returns heap size used on construction of the grid\n+Definition: dgfug.hh:48\n+Dune::dgf::UGGridParameterBlock::noCopy_\n+bool noCopy_\n+Definition: dgfug.hh:52\n+Dune::dgf::UGGridParameterBlock::UGGridParameterBlock\n+UGGridParameterBlock(std::istream &input)\n+constructor taking istream\n+Definition: dgfug.cc:20\n+Dune::dgf::UGGridParameterBlock::heapSize_\n+size_t heapSize_\n+Definition: dgfug.hh:53\n+Dune::dgf::UGGridParameterBlock::noClosure_\n+bool noClosure_\n+Definition: dgfug.hh:51\n+Dune::dgf::UGGridParameterBlock::noCopy\n+bool noCopy() const\n+returns true if no copies are made for UGGrid elements\n+Definition: dgfug.hh:46\n+Dune::dgf::UGGridParameterBlock::noClosure\n+bool noClosure() const\n+returns true if no closure should be used for UGGrid\n+Definition: dgfug.hh:44\n+Dune::DGFGridInfo<_UGGrid<_dim_>_>::refineWeight\n+static double refineWeight()\n+Definition: dgfug.hh:69\n+Dune::DGFGridInfo<_UGGrid<_dim_>_>::refineStepsForHalf\n+static int refineStepsForHalf()\n+Definition: dgfug.hh:64\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::boundaryParameter\n+const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection<\n+GG, II > &intersection) const\n+return invalid value\n+Definition: dgfug.hh:182\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::parameter\n+std::vector< double > & parameter(const typename Grid::template Codim<\n+dimension >::Entity &vertex)\n+return parameter for vertex\n+Definition: dgfug.hh:164\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::DGFGridFactory\n+DGFGridFactory(const std::string &filename, MPICommunicatorType\n+comm=MPIHelper::getCommunicator())\n+constructor taking filename\n+Definition: dgfug.hh:101\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::MPICommunicatorType\n+MPIHelper::MPICommunicator MPICommunicatorType\n+MPI communicator type.\n+Definition: dgfug.hh:88\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::numParameters\n+int numParameters(const Entity &) const\n+return number of parameters\n+Definition: dgfug.hh:147\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::boundaryId\n+int boundaryId(const Dune::Intersection< GG, II > &intersection) const\n+will return boundary segment index\n+Definition: dgfug.hh:128\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::Grid\n+UGGrid< dim > Grid\n+grid type\n+Definition: dgfug.hh:84\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::wasInserted\n+bool wasInserted(const Dune::Intersection< GG, II > &intersection) const\n+please doc me\n+Definition: dgfug.hh:121\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::DGFGridFactory\n+DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::\n+getCommunicator())\n+constructor taking istream\n+Definition: dgfug.hh:91\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::numParameters\n+int numParameters() const\n+return number of parameters\n+Definition: dgfug.hh:135\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::haveBoundaryParameters\n+bool haveBoundaryParameters() const\n+UGGrid does not support boundary parameters.\n+Definition: dgfug.hh:175\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::parameter\n+std::vector< double > & parameter(const typename Grid::template Codim< 0 >::\n+Entity &element)\n+return parameter for codim 0 entity\n+Definition: dgfug.hh:153\n+Dune::DGFGridFactory<_UGGrid<_dim_>_>::grid\n+Grid * grid()\n+return grid\n+Definition: dgfug.hh:114\n+Dune::DGFBoundaryParameter::defaultValue\n+static const type & defaultValue()\n+default constructor\n+Definition: parser.hh:28\n+Dune::DGFBoundaryParameter::type\n+std::string type\n+type of additional boundary parameters\n+Definition: parser.hh:25\n+Dune::UGGrid\n+Front-end for the grid manager of the finite element toolbox UG3.\n+Definition: uggrid.hh:207\n+dgfparser.hh\n+intersection.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00959.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00959.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gnuplot.hh File Reference\n+dune-grid: dgfwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -58,58 +58,59 @@\n \n \n \n \n \n
    \n \n-
    gnuplot.hh File Reference
    \n+
    dgfwriter.hh File Reference
    \n
    \n
    \n \n-

    Provides gnuplot output for 1D Grids. \n+

    write a GridView to a DGF file \n More...

    \n-
    #include <vector>
    \n-#include <string>
    \n-#include <iostream>
    \n+
    #include <cassert>
    \n+#include <cstddef>
    \n+#include <algorithm>
    \n #include <fstream>
    \n-#include <dune/common/fvector.hh>
    \n+#include <string>
    \n+#include <type_traits>
    \n+#include <utility>
    \n+#include <vector>
    \n+#include <dune/common/rangeutilities.hh>
    \n+#include <dune/common/typeutilities.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/geometry/type.hh>
    \n #include <dune/grid/common/grid.hh>
    \n-#include "gnuplot/gnuplot.cc"
    \n+#include <dune/grid/common/rangegenerators.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n 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...
    class  Dune::DGFWriter< GV >
     write a GridView to a DGF file More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

    Provides gnuplot output for 1D Grids.

    \n-
    Author
    Christian Engwer
    \n+

    write a GridView to a DGF file

    \n+
    Author
    Martin Nolte
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,39 +6,41 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n+ * dgfparser\n Classes | Namespaces\n-gnuplot.hh File Reference\n-Provides gnuplot output for 1D Grids. More...\n-#include \n-#include \n-#include \n+dgfwriter.hh File Reference\n+write a GridView to a DGF file More...\n+#include \n+#include \n+#include \n #include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n-#include \"gnuplot/gnuplot.cc\"\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::GnuplotWriter<_GridView_>\n-\u00a0 Writer for 1D grids in gnuplot format. More...\n-\u00a0\n-class \u00a0Dune::LeafGnuplotWriter<_G_>\n-\u00a0 GnuplotWriter on the leaf grid. More...\n-\u00a0\n-class \u00a0Dune::LevelGnuplotWriter<_G_>\n-\u00a0 GnuplotWriter on a given level grid. More...\n+class \u00a0Dune::DGFWriter<_GV_>\n+\u00a0 write a GridView to a DGF file More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n ***** Detailed Description *****\n-Provides gnuplot output for 1D Grids.\n+write a GridView to a DGF file\n Author\n- Christian Engwer\n+ Martin Nolte\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00959_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gnuplot.hh Source File\n+dune-grid: dgfwriter.hh Source File\n \n \n \n \n \n \n \n@@ -58,124 +58,428 @@\n \n
    \n \n \n
    \n
    \n-
    gnuplot.hh
    \n+
    dgfwriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_IO_GNUPLOT_HH
    \n-
    6#define DUNE_IO_GNUPLOT_HH
    \n+
    5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
    \n+
    6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
    \n
    7
    \n-
    13#include <vector>
    \n-
    14#include <string>
    \n-
    15#include <iostream>
    \n-
    16#include <fstream>
    \n-
    17
    \n-
    18#include <dune/common/fvector.hh>
    \n-
    19
    \n-\n-
    21
    \n-
    22namespace Dune {
    \n-
    23
    \n-
    29 template<class GridView>
    \n-\n+
    13#include <cassert>
    \n+
    14#include <cstddef>
    \n+
    15
    \n+
    16#include <algorithm>
    \n+
    17#include <fstream>
    \n+
    18#include <string>
    \n+
    19#include <type_traits>
    \n+
    20#include <utility>
    \n+
    21#include <vector>
    \n+
    22
    \n+
    23#include <dune/common/rangeutilities.hh>
    \n+
    24#include <dune/common/typeutilities.hh>
    \n+
    25
    \n+
    26#include <dune/geometry/referenceelements.hh>
    \n+
    27#include <dune/geometry/type.hh>
    \n+
    28
    \n+\n+\n
    31
    \n-
    32 typedef typename GridView::Grid::ctype ctype;
    \n-
    33
    \n-
    34 constexpr static int dimworld = GridView::dimensionworld;
    \n-
    35
    \n-
    36 public:
    \n-
    37 GnuplotWriter (const GridView & gv) : _is(gv.indexSet()), _gv(gv)
    \n-
    38 {
    \n-
    39 static_assert(dimworld==1 || dimworld==2, "GnuPlot export only works for worlddim==1 and worlddim==2");
    \n-
    40 // allocate _data buffer
    \n-
    41 _data.resize(_is.size(0)*2);
    \n-
    42 }
    \n-
    43
    \n-
    48 template <class DataContainer>
    \n-
    49 void addCellData(const DataContainer& data, const std::string & name)
    \n-
    50 {
    \n-
    51 if (dimworld!=1)
    \n-
    52 DUNE_THROW(IOError, "Gnuplot cell data writing is only supported for grids in a 1d world!");
    \n-
    53 addData(cellData, data, name);
    \n-
    54 }
    \n-
    55
    \n-
    60 template <class DataContainer>
    \n-
    61 void addVertexData(const DataContainer& data, const std::string & name)
    \n-
    62 {
    \n-
    63 addData(vertexData, data, name);
    \n-
    64 }
    \n-
    65
    \n-
    69 void write(const std::string& filename) const;
    \n-
    70
    \n-
    71 private:
    \n-
    72 enum DataType { vertexData, cellData };
    \n-
    73 const typename GridView::IndexSet & _is;
    \n-
    74 const GridView _gv;
    \n-
    75 std::vector< std::vector< float > > _data;
    \n-
    76 std::vector< std::string > _names;
    \n-
    77
    \n-
    78 template <class DataContainer>
    \n-
    79 void addData(DataType t, const DataContainer& data, const std::string & name);
    \n-
    80
    \n-
    81 void writeRow(std::ostream & file,
    \n-
    82 const FieldVector<ctype, dimworld>& position,
    \n-
    83 const std::vector<float> & data) const;
    \n-
    84 };
    \n-
    85
    \n-
    89 template<class G>
    \n-
    90 class LeafGnuplotWriter : public GnuplotWriter<typename G::LeafGridView>
    \n-
    91 {
    \n-
    92 public:
    \n-
    94 LeafGnuplotWriter (const G& grid)
    \n-
    95 : GnuplotWriter<typename G::LeafGridView>(grid.leafGridView())
    \n-
    96 {}
    \n-
    97 };
    \n+
    32namespace Dune
    \n+
    33{
    \n+
    34
    \n+
    44 template< class GV >
    \n+\n+
    46 {
    \n+
    47 typedef DGFWriter< GV > This;
    \n+
    48
    \n+
    49 public:
    \n+
    51 typedef GV GridView;
    \n+
    53 typedef typename GridView::Grid Grid;
    \n+
    54
    \n+
    56 static const int dimGrid = GridView::dimension;
    \n+
    57
    \n+
    58 private:
    \n+
    59 typedef typename GridView::IndexSet IndexSet;
    \n+
    60 typedef typename GridView::template Codim< 0 >::Entity Element;
    \n+
    61 typedef typename GridView::Intersection Intersection;
    \n+
    62
    \n+
    63 typedef typename Element::EntitySeed ElementSeed;
    \n+
    64
    \n+
    65 typedef typename IndexSet::IndexType Index;
    \n+
    66
    \n+
    67 public:
    \n+
    72 DGFWriter ( const GridView &gridView )
    \n+
    73 : gridView_( gridView )
    \n+
    74 {}
    \n+
    75
    \n+
    85 template< class BoundaryData >
    \n+
    86 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
    \n+
    87
    \n+
    96 template< class BoundaryData >
    \n+
    97 void write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams = std::stringstream() ) const;
    \n
    98
    \n-
    102 template<class G>
    \n-
    103 class LevelGnuplotWriter : public GnuplotWriter<typename G::LevelGridView>
    \n-
    104 {
    \n-
    105 public:
    \n-
    107 LevelGnuplotWriter (const G& grid, int level)
    \n-
    108 : GnuplotWriter<typename G::LevelGridView>(grid.levelGridView(level))
    \n-
    109 {}
    \n-
    110 };
    \n+
    107 void write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams = std::stringstream() ) const
    \n+
    108 {
    \n+
    109 write( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
    \n+
    110 }
    \n
    111
    \n-
    112}
    \n-
    113
    \n-
    114#include "gnuplot/gnuplot.cc"
    \n-
    115
    \n-
    116#endif // DUNE_IO_GNUPLOT_HH
    \n-
    Implementation of gnuplot output for 1D and 2D grids.
    \n+
    119 void write ( std::ostream &gridout, const std::stringstream &addParams = std::stringstream() ) const
    \n+
    120 {
    \n+
    121 write( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i ); }, addParams );
    \n+
    122 }
    \n+
    123
    \n+
    130 template< class... Args >
    \n+
    131 auto write ( const std::string &fileName, Args &&... args ) const
    \n+
    132 -> std::void_t< decltype( this->write( std::declval< std::ostream & >(), std::declval< Args >()... ) ) >
    \n+
    133 {
    \n+
    134 std::ofstream gridout( fileName );
    \n+
    135 if( gridout )
    \n+
    136 write( gridout, std::forward< Args >( args )... );
    \n+
    137 else
    \n+
    138 std::cerr << "Couldn't open file `"<< fileName << "'!"<< std::endl;
    \n+
    139 }
    \n+
    140
    \n+
    141 protected:
    \n+
    142 auto elementsSeeds ( const std::vector< Index > &newElemOrder ) const
    \n+
    143 -> std::vector< ElementSeed >;
    \n+
    144
    \n+
    145 void writeHeader ( std::ostream &gridout ) const;
    \n+
    146 void writeFooter ( std::ostream &gridout ) const;
    \n+
    147
    \n+
    148 auto writeVertices ( std::ostream &gridout ) const
    \n+
    149 -> std::vector< Index >;
    \n+
    150
    \n+
    151 void writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const;
    \n+
    152
    \n+
    153 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
    \n+
    154 void writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
    \n+
    155
    \n+
    156 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const;
    \n+
    157 void writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;
    \n+
    158
    \n+
    159 template< class... Args >
    \n+
    160 void writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const;
    \n+
    161
    \n+
    162 private:
    \n+
    163 template< class I >
    \n+
    164 static auto boundaryId ( const I &i, PriorityTag< 1 > )
    \n+
    165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl().boundaryId() ) >, int >::value, int >
    \n+
    166 {
    \n+
    167 return i.impl().boundaryId();
    \n+
    168 }
    \n+
    169
    \n+
    170 template< class I >
    \n+
    171 static int boundaryId ( const I &i, PriorityTag< 0 > )
    \n+
    172 {
    \n+
    173 return 1;
    \n+
    174 }
    \n+
    175
    \n+
    176 protected:
    \n+
    177 static int boundaryId ( const Intersection &i ) { return boundaryId( i, PriorityTag< 42 >() ); }
    \n+
    178
    \n+
    179 private:
    \n+
    180 static int boundaryId ( const Intersection &, int bndId ) { return bndId; }
    \n+
    181 static int boundaryId ( const Intersection &i, const std::string & ) { return boundaryId( i ); }
    \n+
    182 static int boundaryId ( const Intersection &i, const std::pair< int, std::string > &data ) { return boundrayId( i, data.first ); }
    \n+
    183
    \n+
    184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout << std::endl; }
    \n+
    185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int, std::string > &data ) { appendBoundaryData( gridout, data.second ); }
    \n+
    186 static void appendBoundaryData ( std::ostream &gridout, const std::string &s ) { gridout << " : " << s << std::endl; }
    \n+
    187
    \n+
    188 protected:
    \n+
    189 template< class BoundaryData >
    \n+
    190 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const;
    \n+
    191
    \n+
    192 void writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
    \n+
    193 {
    \n+
    194 writeBoundaries( gridout, dgfIndices, [] ( const Intersection &i ) -> int { return boundaryId( i ); } );
    \n+
    195 }
    \n+
    196
    \n+
    197 protected:
    \n+\n+
    199 };
    \n+
    200
    \n+
    201
    \n+
    202 template< class GV >
    \n+
    203 inline auto DGFWriter< GV >::elementsSeeds ( const std::vector< Index > &newElemOrder ) const
    \n+
    204 -> std::vector< ElementSeed >
    \n+
    205 {
    \n+
    206 const IndexSet &indexSet = gridView_.indexSet();
    \n+
    207
    \n+
    208 const std::size_t orderSize = newElemOrder.size() ;
    \n+
    209 std::vector< ElementSeed > elementSeeds( orderSize );
    \n+
    210
    \n+
    211 for( const Element &element : elements( gridView_ ) )
    \n+
    212 {
    \n+
    213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize );
    \n+
    214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed();
    \n+
    215 }
    \n+
    216
    \n+
    217 return elementSeeds;
    \n+
    218 }
    \n+
    219
    \n+
    220
    \n+
    221 template< class GV >
    \n+
    222 inline void DGFWriter< GV >::writeHeader ( std::ostream &gridout ) const
    \n+
    223 {
    \n+
    224 // set the stream to full double precision
    \n+
    225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield );
    \n+
    226 gridout.precision( 16 );
    \n+
    227
    \n+
    228 const IndexSet &indexSet = gridView_.indexSet();
    \n+
    229
    \n+
    230 // write DGF header
    \n+
    231 gridout << "DGF" << std::endl;
    \n+
    232 gridout << "%" << " Elements = " << indexSet.size( 0 ) << " | Vertices = " << indexSet.size( dimGrid ) << std::endl;
    \n+
    233 }
    \n+
    234
    \n+
    235
    \n+
    236 template< class GV >
    \n+
    237 inline void DGFWriter< GV >::writeFooter ( std::ostream &gridout ) const
    \n+
    238 {
    \n+
    239 gridout << std::endl << "#" << std::endl;
    \n+
    240 }
    \n+
    241
    \n+
    242
    \n+
    243 template< class GV >
    \n+
    244 inline auto DGFWriter< GV >::writeVertices ( std::ostream &gridout ) const
    \n+
    245 -> std::vector< Index >
    \n+
    246 {
    \n+
    247 const IndexSet &indexSet = gridView_.indexSet();
    \n+
    248
    \n+
    249 const Index vxSize = indexSet.size( dimGrid );
    \n+
    250 std::vector< Index > dgfIndices( vxSize, vxSize );
    \n+
    251
    \n+
    252 // write all vertices into the "vertex" block
    \n+
    253 gridout << std::endl << "VERTEX" << std::endl;
    \n+
    254 Index vertexCount = 0;
    \n+
    255 for( const Element &element : elements( gridView_ ) )
    \n+
    256 {
    \n+
    257 for( auto i : range( element.subEntities( dimGrid ) ) )
    \n+
    258 {
    \n+
    259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid );
    \n+
    260 assert( vxIndex < vxSize );
    \n+
    261 if( dgfIndices[ vxIndex ] == vxSize )
    \n+
    262 {
    \n+
    263 dgfIndices[ vxIndex ] = vertexCount++;
    \n+
    264 gridout << element.geometry().corner( i ) << std::endl;
    \n+
    265 }
    \n+
    266 }
    \n+
    267 }
    \n+
    268 gridout << "#" << std::endl;
    \n+
    269
    \n+
    270 if( vertexCount != vxSize )
    \n+
    271 DUNE_THROW( GridError, "IndexSet reports wrong number of vertices." );
    \n+
    272 return dgfIndices;
    \n+
    273 }
    \n+
    274
    \n+
    275
    \n+
    276 template< class GV >
    \n+
    277 inline void DGFWriter< GV >::writeElement ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType ) const
    \n+
    278 {
    \n+
    279 // if element's type is not the same as the type to write the return
    \n+
    280 if( element.type() != elementType )
    \n+
    281 return;
    \n+
    282
    \n+
    283 // write vertex numbers of the element
    \n+
    284 const IndexSet &indexSet = gridView_.indexSet();
    \n+
    285 for( auto i : range( element.subEntities( Element::dimension ) ) )
    \n+
    286 gridout << (i > 0 ? " " : "") << dgfIndices[ indexSet.subIndex( element, i, dimGrid ) ];
    \n+
    287 gridout << std::endl;
    \n+
    288 }
    \n+
    289
    \n+
    290
    \n+
    291 template< class GV >
    \n+
    292 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
    \n+
    293 {
    \n+
    294 // write all simplices to the "simplex" block
    \n+
    295 gridout << std::endl << "SIMPLEX" << std::endl;
    \n+
    296
    \n+
    297 // write all simplex elements
    \n+
    298 for( const Element &element : elements( gridView_ ) )
    \n+
    299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex( dimGrid ) );
    \n+
    300
    \n+
    301 // write end marker for block
    \n+
    302 gridout << "#" << std::endl;
    \n+
    303 }
    \n+
    304
    \n+
    305
    \n+
    306 template< class GV >
    \n+
    307 inline void DGFWriter< GV >::writeSimplices ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
    \n+
    308 {
    \n+
    309 // write all simplices to the "simplex" block
    \n+
    310 gridout << std::endl << "SIMPLEX" << std::endl;
    \n+
    311
    \n+
    312 // write all simplex elements
    \n+
    313 for( const ElementSeed &seed : elementSeeds )
    \n+
    314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::simplex( dimGrid ) );
    \n+
    315
    \n+
    316 // write end marker for block
    \n+
    317 gridout << "#" << std::endl;
    \n+
    318 }
    \n+
    319
    \n+
    320
    \n+
    321 template< class GV >
    \n+
    322 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices ) const
    \n+
    323 {
    \n+
    324 // write all cubes to the "cube" block
    \n+
    325 gridout << std::endl << "CUBE" << std::endl;
    \n+
    326
    \n+
    327 // write all cube elements
    \n+
    328 for( const Element &element : elements( gridView_ ) )
    \n+
    329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid ) );
    \n+
    330
    \n+
    331 // write end marker for block
    \n+
    332 gridout << "#" << std::endl;
    \n+
    333 }
    \n+
    334
    \n+
    335
    \n+
    336 template< class GV >
    \n+
    337 inline void DGFWriter< GV >::writeCubes ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const
    \n+
    338 {
    \n+
    339 const IndexSet &indexSet = gridView_.indexSet();
    \n+
    340
    \n+
    341 // write all cubes to the "cube" block
    \n+
    342 gridout << std::endl << "CUBE" << std::endl;
    \n+
    343
    \n+
    344 // write all cube elements
    \n+
    345 for( const ElementSeed &seed : elementSeeds )
    \n+
    346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ), GeometryTypes::cube( dimGrid ) );
    \n+
    347
    \n+
    348 // write end marker for block
    \n+
    349 gridout << "#" << std::endl;
    \n+
    350 }
    \n+
    351
    \n+
    352
    \n+
    353 template< class GV >
    \n+
    354 template< class... Args >
    \n+
    355 inline void DGFWriter< GV >::writeElements ( std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args ) const
    \n+
    356 {
    \n+
    357 const IndexSet &indexSet = gridView_.indexSet();
    \n+
    358
    \n+
    359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) > 0) )
    \n+
    360 writeSimplices( gridout, dgfIndices, args... );
    \n+
    361
    \n+
    362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 )
    \n+
    363 writeCubes( gridout, dgfIndices, args... );
    \n+
    364 }
    \n+
    365
    \n+
    366
    \n+
    367 template< class GV >
    \n+
    368 template< class BoundaryData >
    \n+
    369 inline void DGFWriter< GV >::writeBoundaries ( std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const
    \n+
    370 {
    \n+
    371 using std::max;
    \n+
    372
    \n+
    373 const IndexSet &indexSet = gridView_.indexSet();
    \n+
    374
    \n+
    375 // write all boundaries to the "boundarysegments" block
    \n+
    376 gridout << std::endl << "BOUNDARYSEGMENTS" << std::endl;
    \n+
    377
    \n+
    378 for( const Element &element : elements( gridView_ ) )
    \n+
    379 {
    \n+
    380 if( !element.hasBoundaryIntersections() )
    \n+
    381 continue;
    \n+
    382
    \n+
    383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid >::general( element.type() );
    \n+
    384 for( const Intersection &intersection : intersections( gridView_, element ) )
    \n+
    385 {
    \n+
    386 if( !intersection.boundary() )
    \n+
    387 continue;
    \n+
    388
    \n+
    389 const auto data = boundaryData( intersection );
    \n+
    390 const int bndId = max( boundaryId( intersection, data ), 1 );
    \n+
    391
    \n+
    392 const int faceNumber = intersection.indexInInside();
    \n+
    393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid );
    \n+
    394 gridout << bndId << " ";
    \n+
    395 for( auto i : range( faceSize ) )
    \n+
    396 {
    \n+
    397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid );
    \n+
    398 gridout << " " << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ];
    \n+
    399 }
    \n+
    400 appendBoundaryData( gridout, data );
    \n+
    401 }
    \n+
    402 }
    \n+
    403 gridout << "#" << std::endl;
    \n+
    404 }
    \n+
    405
    \n+
    406
    \n+
    407 template< class GV >
    \n+
    408 template< class BoundaryData >
    \n+
    409 inline void DGFWriter< GV >::write ( std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
    \n+
    410 {
    \n+
    411 writeHeader( gridout );
    \n+
    412 auto dgfIndices = writeVertices( gridout );
    \n+
    413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) );
    \n+
    414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
    \n+
    415 gridout << addParams.str();
    \n+
    416 writeFooter( gridout );
    \n+
    417 }
    \n+
    418
    \n+
    419
    \n+
    420 template< class GV >
    \n+
    421 template< class BoundaryData >
    \n+
    422 inline void DGFWriter< GV >::write ( std::ostream &gridout, BoundaryData &&boundaryData, const std::stringstream &addParams ) const
    \n+
    423 {
    \n+
    424 writeHeader( gridout );
    \n+
    425 auto dgfIndices = writeVertices( gridout );
    \n+
    426 writeElements( gridout, dgfIndices );
    \n+
    427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >( boundaryData ) );
    \n+
    428 gridout << addParams.str();
    \n+
    429 writeFooter( gridout );
    \n+
    430 }
    \n+
    431
    \n+
    432} // namespace Dune
    \n+
    433
    \n+
    434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH
    \n+\n+
    Traits::Grid Grid
    type of the grid
    Definition: common/gridview.hh:83
    \n
    Traits::IndexSet IndexSet
    type of the index set
    Definition: common/gridview.hh:86
    \n-
    Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
    leaf grid view for the given grid
    Definition: common/grid.hh:819
    \n-
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n-
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/gridview.hh:151
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n+
    Traits::Intersection Intersection
    type of the intersection
    Definition: common/gridview.hh:89
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    Writer for 1D grids in gnuplot format.
    Definition: gnuplot.hh:30
    \n-
    void addVertexData(const DataContainer &data, const std::string &name)
    Add vertex data.
    Definition: gnuplot.hh:61
    \n-
    void addCellData(const DataContainer &data, const std::string &name)
    Add cell data.
    Definition: gnuplot.hh:49
    \n-
    void write(const std::string &filename) const
    Write Gnuplot file to disk.
    Definition: gnuplot.cc:19
    \n-
    GnuplotWriter(const GridView &gv)
    Definition: gnuplot.hh:37
    \n-
    GnuplotWriter on the leaf grid.
    Definition: gnuplot.hh:91
    \n-
    LeafGnuplotWriter(const G &grid)
    Construct a Gnuplot writer for the leaf level of a given grid.
    Definition: gnuplot.hh:94
    \n-
    GnuplotWriter on a given level grid.
    Definition: gnuplot.hh:104
    \n-
    LevelGnuplotWriter(const G &grid, int level)
    Construct a Gnuplot writer for a certain level of a given grid.
    Definition: gnuplot.hh:107
    \n+
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n+
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n+
    IndexTypeImp IndexType
    The type used for the indices.
    Definition: indexidset.hh:92
    \n+
    write a GridView to a DGF file
    Definition: dgfwriter.hh:46
    \n+
    static const int dimGrid
    dimension of the grid
    Definition: dgfwriter.hh:56
    \n+
    DGFWriter(const GridView &gridView)
    constructor
    Definition: dgfwriter.hh:72
    \n+
    void write(std::ostream &gridout, const std::stringstream &addParams=std::stringstream()) const
    write the GridView into a std::ostream
    Definition: dgfwriter.hh:119
    \n+
    auto write(const std::string &fileName, Args &&... args) const -> std::void_t< decltype(this->write(std::declval< std::ostream & >(), std::declval< Args >()...)) >
    write the GridView to a file
    Definition: dgfwriter.hh:131
    \n+
    void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices, BoundaryData &&boundaryData) const
    Definition: dgfwriter.hh:369
    \n+
    static int boundaryId(const Intersection &i)
    Definition: dgfwriter.hh:177
    \n+
    void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams=std::stringstream()) const
    write the GridView into a std::ostream
    Definition: dgfwriter.hh:107
    \n+
    void write(std::ostream &gridout, const std::vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams=std::stringstream()) const
    write the GridView into a std::ostream
    Definition: dgfwriter.hh:409
    \n+
    GridView gridView_
    Definition: dgfwriter.hh:198
    \n+
    void writeElement(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Element &element, const GeometryType &elementType) const
    Definition: dgfwriter.hh:277
    \n+
    GV GridView
    type of grid view
    Definition: dgfwriter.hh:51
    \n+
    void writeFooter(std::ostream &gridout) const
    Definition: dgfwriter.hh:237
    \n+
    GridView::Grid Grid
    type of underlying hierarchical grid
    Definition: dgfwriter.hh:53
    \n+
    auto writeVertices(std::ostream &gridout) const -> std::vector< Index >
    Definition: dgfwriter.hh:244
    \n+
    void writeElements(std::ostream &gridout, const std::vector< Index > &dgfIndices, const Args &... args) const
    Definition: dgfwriter.hh:355
    \n+
    void writeBoundaries(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
    Definition: dgfwriter.hh:192
    \n+
    void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
    Definition: dgfwriter.hh:322
    \n+
    void writeSimplices(std::ostream &gridout, const std::vector< Index > &dgfIndices) const
    Definition: dgfwriter.hh:292
    \n+
    void writeHeader(std::ostream &gridout) const
    Definition: dgfwriter.hh:222
    \n+
    auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std::vector< ElementSeed >
    Definition: dgfwriter.hh:203
    \n
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,163 +6,564 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-gnuplot.hh\n+ * dgfparser\n+dgfwriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_IO_GNUPLOT_HH\n- 6#define DUNE_IO_GNUPLOT_HH\n+ 5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH\n+ 6#define DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH\n 7\n- 13#include \n- 14#include \n- 15#include \n- 16#include \n- 17\n- 18#include \n- 19\n- 20#include \n- 21\n- 22namespace Dune {\n- 23\n- 29 template\n-30 class GnuplotWriter {\n+ 13#include \n+ 14#include \n+ 15\n+ 16#include \n+ 17#include \n+ 18#include \n+ 19#include \n+ 20#include \n+ 21#include \n+ 22\n+ 23#include \n+ 24#include \n+ 25\n+ 26#include \n+ 27#include \n+ 28\n+ 29#include \n+ 30#include \n 31\n- 32 typedef typename GridView::Grid::ctype ctype;\n- 33\n- 34 constexpr static int dimworld = GridView::dimensionworld;\n- 35\n- 36 public:\n-37 GnuplotWriter (const GridView & gv) : _is(gv.indexSet()), _gv(gv)\n- 38 {\n- 39 static_assert(dimworld==1 || dimworld==2, \"GnuPlot export only works for\n-worlddim==1 and worlddim==2\");\n- 40 // allocate _data buffer\n- 41 _data.resize(_is.size(0)*2);\n- 42 }\n- 43\n- 48 template \n-49 void addCellData(const DataContainer& data, const std::string & name)\n- 50 {\n- 51 if (dimworld!=1)\n- 52 DUNE_THROW(IOError, \"Gnuplot cell data writing is only supported for grids\n-in a 1d world!\");\n- 53 addData(cellData, data, name);\n- 54 }\n- 55\n- 60 template \n-61 void addVertexData(const DataContainer& data, const std::string & name)\n- 62 {\n- 63 addData(vertexData, data, name);\n- 64 }\n- 65\n- 69 void write(const std::string& filename) const;\n- 70\n- 71 private:\n- 72 enum DataType { vertexData, cellData };\n- 73 const typename GridView::IndexSet & _is;\n- 74 const GridView _gv;\n- 75 std::vector< std::vector< float > > _data;\n- 76 std::vector< std::string > _names;\n- 77\n- 78 template \n- 79 void addData(DataType t, const DataContainer& data, const std::string &\n-name);\n- 80\n- 81 void writeRow(std::ostream & file,\n- 82 const FieldVector& position,\n- 83 const std::vector & data) const;\n- 84 };\n- 85\n- 89 template\n-90 class LeafGnuplotWriter : public GnuplotWriter\n- 91 {\n- 92 public:\n-94 LeafGnuplotWriter (const G& grid)\n- 95 : GnuplotWriter(grid.leafGridView())\n- 96 {}\n- 97 };\n+ 32namespace Dune\n+ 33{\n+ 34\n+ 44 template< class GV >\n+45 class DGFWriter\n+ 46 {\n+ 47 typedef DGFWriter<_GV_> This;\n+ 48\n+ 49 public:\n+51 typedef GV GridView;\n+53 typedef typename GridView::Grid Grid;\n+ 54\n+56 static const int dimGrid = GridView::dimension;\n+ 57\n+ 58 private:\n+ 59 typedef typename GridView::IndexSet IndexSet;\n+ 60 typedef typename GridView::template Codim< 0 >::Entity Element;\n+ 61 typedef typename GridView::Intersection Intersection;\n+ 62\n+ 63 typedef typename Element::EntitySeed ElementSeed;\n+ 64\n+ 65 typedef typename IndexSet::IndexType Index;\n+ 66\n+ 67 public:\n+72 DGFWriter ( const GridView &gridView )\n+ 73 : gridView_( gridView )\n+ 74 {}\n+ 75\n+ 85 template< class BoundaryData >\n+ 86 void write ( std::ostream &gridout, const std::vector< Index >\n+&newElemOrder, BoundaryData &&boundaryData, const std::stringstream &addParams\n+= std::stringstream() ) const;\n+ 87\n+ 96 template< class BoundaryData >\n+ 97 void write ( std::ostream &gridout, BoundaryData &&boundaryData, const\n+std::stringstream &addParams = std::stringstream() ) const;\n 98\n- 102 template\n-103 class LevelGnuplotWriter : public GnuplotWriter\n- 104 {\n- 105 public:\n-107 LevelGnuplotWriter (const G& grid, int level)\n- 108 : GnuplotWriter(grid.levelGridView(level))\n- 109 {}\n- 110 };\n+107 void write ( std::ostream &gridout, const std::vector< Index >\n+&newElemOrder, const std::stringstream &addParams = std::stringstream() ) const\n+ 108 {\n+ 109 write( gridout, newElemOrder, [] ( const Intersection &i ) -> int { return\n+boundaryId( i ); }, addParams );\n+ 110 }\n 111\n- 112}\n- 113\n- 114#include \"gnuplot/gnuplot.cc\"\n- 115\n- 116#endif // DUNE_IO_GNUPLOT_HH\n-gnuplot.cc\n-Implementation of gnuplot output for 1D and 2D grids.\n+119 void write ( std::ostream &gridout, const std::stringstream &addParams =\n+std::stringstream() ) const\n+ 120 {\n+ 121 write( gridout, [] ( const Intersection &i ) -> int { return boundaryId( i\n+); }, addParams );\n+ 122 }\n+ 123\n+ 130 template< class... Args >\n+131 auto write ( const std::string &fileName, Args &&... args ) const\n+ 132 -> std::void_t< decltype( this->write( std::declval< std::ostream & >(),\n+std::declval< Args >()... ) ) >\n+ 133 {\n+ 134 std::ofstream gridout( fileName );\n+ 135 if( gridout )\n+ 136 write( gridout, std::forward< Args >( args )... );\n+ 137 else\n+ 138 std::cerr << \"Couldn't open file `\"<< fileName << \"'!\"<< std::endl;\n+ 139 }\n+ 140\n+ 141 protected:\n+ 142 auto elementsSeeds ( const std::vector< Index > &newElemOrder ) const\n+ 143 -> std::vector< ElementSeed >;\n+ 144\n+ 145 void writeHeader ( std::ostream &gridout ) const;\n+ 146 void writeFooter ( std::ostream &gridout ) const;\n+ 147\n+ 148 auto writeVertices ( std::ostream &gridout ) const\n+ 149 -> std::vector< Index >;\n+ 150\n+ 151 void writeElement ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, const Element &element, const GeometryType &elementType ) const;\n+ 152\n+ 153 void writeSimplices ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices ) const;\n+ 154 void writeSimplices ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;\n+ 155\n+ 156 void writeCubes ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices ) const;\n+ 157 void writeCubes ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, const std::vector< ElementSeed > &elementSeeds ) const;\n+ 158\n+ 159 template< class... Args >\n+ 160 void writeElements ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, const Args &... args ) const;\n+ 161\n+ 162 private:\n+ 163 template< class I >\n+ 164 static auto boundaryId ( const I &i, PriorityTag< 1 > )\n+ 165 -> std::enable_if_t< std::is_convertible< std::decay_t< decltype( i.impl\n+().boundaryId() ) >, int >::value, int >\n+ 166 {\n+ 167 return i.impl().boundaryId();\n+ 168 }\n+ 169\n+ 170 template< class I >\n+ 171 static int boundaryId ( const I &i, PriorityTag< 0 > )\n+ 172 {\n+ 173 return 1;\n+ 174 }\n+ 175\n+ 176 protected:\n+177 static int boundaryId ( const Intersection &i ) { return boundaryId( i,\n+PriorityTag< 42 >() ); }\n+ 178\n+ 179 private:\n+ 180 static int boundaryId ( const Intersection &, int bndId ) { return bndId;\n+}\n+ 181 static int boundaryId ( const Intersection &i, const std::string & )\n+{ return boundaryId( i ); }\n+ 182 static int boundaryId ( const Intersection &i, const std::pair< int, std::\n+string > &data ) { return boundrayId( i, data.first ); }\n+ 183\n+ 184 static void appendBoundaryData ( std::ostream &gridout, int ) { gridout <<\n+std::endl; }\n+ 185 static void appendBoundaryData ( std::ostream &gridout, std::pair< int,\n+std::string > &data ) { appendBoundaryData( gridout, data.second ); }\n+ 186 static void appendBoundaryData ( std::ostream &gridout, const std::string\n+&s ) { gridout << \" : \" << s << std::endl; }\n+ 187\n+ 188 protected:\n+ 189 template< class BoundaryData >\n+ 190 void writeBoundaries ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, BoundaryData &&boundaryData ) const;\n+ 191\n+192 void writeBoundaries ( std::ostream &gridout, const std::vector< Index >\n+&dgfIndices ) const\n+ 193 {\n+ 194 writeBoundaries( gridout, dgfIndices, [] ( const Intersection &i ) -> int\n+{ return boundaryId( i ); } );\n+ 195 }\n+ 196\n+ 197 protected:\n+198 GridView gridView_;\n+ 199 };\n+ 200\n+ 201\n+ 202 template< class GV >\n+203 inline auto DGFWriter<_GV_>::elementsSeeds ( const std::vector< Index >\n+&newElemOrder ) const\n+ 204 -> std::vector< ElementSeed >\n+ 205 {\n+ 206 const IndexSet &indexSet = gridView_.indexSet();\n+ 207\n+ 208 const std::size_t orderSize = newElemOrder.size() ;\n+ 209 std::vector< ElementSeed > elementSeeds( orderSize );\n+ 210\n+ 211 for( const Element &element : elements( gridView_ ) )\n+ 212 {\n+ 213 assert( newElemOrder[ indexSet.index( element ) ] < orderSize );\n+ 214 elementSeeds[ newElemOrder[ indexSet.index( element ) ] ] = element.seed\n+();\n+ 215 }\n+ 216\n+ 217 return elementSeeds;\n+ 218 }\n+ 219\n+ 220\n+ 221 template< class GV >\n+222 inline void DGFWriter<_GV_>::writeHeader ( std::ostream &gridout ) const\n+ 223 {\n+ 224 // set the stream to full double precision\n+ 225 gridout.setf( std::ios_base::scientific, std::ios_base::floatfield );\n+ 226 gridout.precision( 16 );\n+ 227\n+ 228 const IndexSet &indexSet = gridView_.indexSet();\n+ 229\n+ 230 // write DGF header\n+ 231 gridout << \"DGF\" << std::endl;\n+ 232 gridout << \"%\" << \" Elements = \" << indexSet.size( 0 ) << \" | Vertices = \"\n+<< indexSet.size( dimGrid ) << std::endl;\n+ 233 }\n+ 234\n+ 235\n+ 236 template< class GV >\n+237 inline void DGFWriter<_GV_>::writeFooter ( std::ostream &gridout ) const\n+ 238 {\n+ 239 gridout << std::endl << \"#\" << std::endl;\n+ 240 }\n+ 241\n+ 242\n+ 243 template< class GV >\n+244 inline auto DGFWriter<_GV_>::writeVertices ( std::ostream &gridout ) const\n+ 245 -> std::vector< Index >\n+ 246 {\n+ 247 const IndexSet &indexSet = gridView_.indexSet();\n+ 248\n+ 249 const Index vxSize = indexSet.size( dimGrid );\n+ 250 std::vector< Index > dgfIndices( vxSize, vxSize );\n+ 251\n+ 252 // write all vertices into the \"vertex\" block\n+ 253 gridout << std::endl << \"VERTEX\" << std::endl;\n+ 254 Index vertexCount = 0;\n+ 255 for( const Element &element : elements( gridView_ ) )\n+ 256 {\n+ 257 for( auto i : range( element.subEntities( dimGrid ) ) )\n+ 258 {\n+ 259 const Index vxIndex = indexSet.subIndex( element, i, dimGrid );\n+ 260 assert( vxIndex < vxSize );\n+ 261 if( dgfIndices[ vxIndex ] == vxSize )\n+ 262 {\n+ 263 dgfIndices[ vxIndex ] = vertexCount++;\n+ 264 gridout << element.geometry().corner( i ) << std::endl;\n+ 265 }\n+ 266 }\n+ 267 }\n+ 268 gridout << \"#\" << std::endl;\n+ 269\n+ 270 if( vertexCount != vxSize )\n+ 271 DUNE_THROW( GridError, \"IndexSet reports wrong number of vertices.\" );\n+ 272 return dgfIndices;\n+ 273 }\n+ 274\n+ 275\n+ 276 template< class GV >\n+277 inline void DGFWriter<_GV_>::writeElement ( std::ostream &gridout, const\n+std::vector< Index > &dgfIndices, const Element &element, const GeometryType\n+&elementType ) const\n+ 278 {\n+ 279 // if element's type is not the same as the type to write the return\n+ 280 if( element.type() != elementType )\n+ 281 return;\n+ 282\n+ 283 // write vertex numbers of the element\n+ 284 const IndexSet &indexSet = gridView_.indexSet();\n+ 285 for( auto i : range( element.subEntities( Element::dimension ) ) )\n+ 286 gridout << (i > 0 ? \" \" : \"\") << dgfIndices[ indexSet.subIndex( element,\n+i, dimGrid ) ];\n+ 287 gridout << std::endl;\n+ 288 }\n+ 289\n+ 290\n+ 291 template< class GV >\n+292 inline void DGFWriter<_GV_>::writeSimplices ( std::ostream &gridout, const\n+std::vector< Index > &dgfIndices ) const\n+ 293 {\n+ 294 // write all simplices to the \"simplex\" block\n+ 295 gridout << std::endl << \"SIMPLEX\" << std::endl;\n+ 296\n+ 297 // write all simplex elements\n+ 298 for( const Element &element : elements( gridView_ ) )\n+ 299 writeElement( gridout, dgfIndices, element, GeometryTypes::simplex\n+( dimGrid ) );\n+ 300\n+ 301 // write end marker for block\n+ 302 gridout << \"#\" << std::endl;\n+ 303 }\n+ 304\n+ 305\n+ 306 template< class GV >\n+307 inline void DGFWriter<_GV_>::writeSimplices ( std::ostream &gridout, const\n+std::vector< Index > &dgfIndices, const std::vector< ElementSeed >\n+&elementSeeds ) const\n+ 308 {\n+ 309 // write all simplices to the \"simplex\" block\n+ 310 gridout << std::endl << \"SIMPLEX\" << std::endl;\n+ 311\n+ 312 // write all simplex elements\n+ 313 for( const ElementSeed &seed : elementSeeds )\n+ 314 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ),\n+GeometryTypes::simplex( dimGrid ) );\n+ 315\n+ 316 // write end marker for block\n+ 317 gridout << \"#\" << std::endl;\n+ 318 }\n+ 319\n+ 320\n+ 321 template< class GV >\n+322 inline void DGFWriter<_GV_>::writeCubes ( std::ostream &gridout, const\n+std::vector< Index > &dgfIndices ) const\n+ 323 {\n+ 324 // write all cubes to the \"cube\" block\n+ 325 gridout << std::endl << \"CUBE\" << std::endl;\n+ 326\n+ 327 // write all cube elements\n+ 328 for( const Element &element : elements( gridView_ ) )\n+ 329 writeElement( gridout, dgfIndices, element, GeometryTypes::cube( dimGrid )\n+);\n+ 330\n+ 331 // write end marker for block\n+ 332 gridout << \"#\" << std::endl;\n+ 333 }\n+ 334\n+ 335\n+ 336 template< class GV >\n+337 inline void DGFWriter<_GV_>::writeCubes ( std::ostream &gridout, const\n+std::vector< Index > &dgfIndices, const std::vector< ElementSeed >\n+&elementSeeds ) const\n+ 338 {\n+ 339 const IndexSet &indexSet = gridView_.indexSet();\n+ 340\n+ 341 // write all cubes to the \"cube\" block\n+ 342 gridout << std::endl << \"CUBE\" << std::endl;\n+ 343\n+ 344 // write all cube elements\n+ 345 for( const ElementSeed &seed : elementSeeds )\n+ 346 writeElement( gridout, dgfIndices, gridView_.grid().entity( seed ),\n+GeometryTypes::cube( dimGrid ) );\n+ 347\n+ 348 // write end marker for block\n+ 349 gridout << \"#\" << std::endl;\n+ 350 }\n+ 351\n+ 352\n+ 353 template< class GV >\n+ 354 template< class... Args >\n+355 inline void DGFWriter<_GV_>::writeElements ( std::ostream &gridout, const\n+std::vector< Index > &dgfIndices, const Args &... args ) const\n+ 356 {\n+ 357 const IndexSet &indexSet = gridView_.indexSet();\n+ 358\n+ 359 if( (dimGrid > 1) && (indexSet.size( GeometryTypes::simplex( dimGrid ) ) >\n+0) )\n+ 360 writeSimplices( gridout, dgfIndices, args... );\n+ 361\n+ 362 if( indexSet.size( GeometryTypes::cube( dimGrid ) ) > 0 )\n+ 363 writeCubes( gridout, dgfIndices, args... );\n+ 364 }\n+ 365\n+ 366\n+ 367 template< class GV >\n+ 368 template< class BoundaryData >\n+369 inline void DGFWriter<_GV_>::writeBoundaries ( std::ostream &gridout, const\n+std::vector< Index > &dgfIndices, BoundaryData &&boundaryData ) const\n+ 370 {\n+ 371 using std::max;\n+ 372\n+ 373 const IndexSet &indexSet = gridView_.indexSet();\n+ 374\n+ 375 // write all boundaries to the \"boundarysegments\" block\n+ 376 gridout << std::endl << \"BOUNDARYSEGMENTS\" << std::endl;\n+ 377\n+ 378 for( const Element &element : elements( gridView_ ) )\n+ 379 {\n+ 380 if( !element.hasBoundaryIntersections() )\n+ 381 continue;\n+ 382\n+ 383 const auto &refElement = ReferenceElements< typename Grid::ctype, dimGrid\n+>::general( element.type() );\n+ 384 for( const Intersection &intersection : intersections( gridView_, element\n+) )\n+ 385 {\n+ 386 if( !intersection.boundary() )\n+ 387 continue;\n+ 388\n+ 389 const auto data = boundaryData( intersection );\n+ 390 const int bndId = max( boundaryId( intersection, data ), 1 );\n+ 391\n+ 392 const int faceNumber = intersection.indexInInside();\n+ 393 const unsigned int faceSize = refElement.size( faceNumber, 1, dimGrid );\n+ 394 gridout << bndId << \" \";\n+ 395 for( auto i : range( faceSize ) )\n+ 396 {\n+ 397 const int j = refElement.subEntity( faceNumber, 1, i, dimGrid );\n+ 398 gridout << \" \" << dgfIndices[ indexSet.subIndex( element, j, dimGrid ) ];\n+ 399 }\n+ 400 appendBoundaryData( gridout, data );\n+ 401 }\n+ 402 }\n+ 403 gridout << \"#\" << std::endl;\n+ 404 }\n+ 405\n+ 406\n+ 407 template< class GV >\n+ 408 template< class BoundaryData >\n+409 inline void DGFWriter<_GV_>::write ( std::ostream &gridout, const std::\n+vector< Index > &newElemOrder, BoundaryData &&boundaryData, const std::\n+stringstream &addParams ) const\n+ 410 {\n+ 411 writeHeader( gridout );\n+ 412 auto dgfIndices = writeVertices( gridout );\n+ 413 writeElements( gridout, dgfIndices, elementSeeds( newElemOrder ) );\n+ 414 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >\n+( boundaryData ) );\n+ 415 gridout << addParams.str();\n+ 416 writeFooter( gridout );\n+ 417 }\n+ 418\n+ 419\n+ 420 template< class GV >\n+ 421 template< class BoundaryData >\n+422 inline void DGFWriter<_GV_>::write ( std::ostream &gridout, BoundaryData\n+&&boundaryData, const std::stringstream &addParams ) const\n+ 423 {\n+ 424 writeHeader( gridout );\n+ 425 auto dgfIndices = writeVertices( gridout );\n+ 426 writeElements( gridout, dgfIndices );\n+ 427 writeBoundaries( gridout, dgfIndices, std::forward< BoundaryData >\n+( boundaryData ) );\n+ 428 gridout << addParams.str();\n+ 429 writeFooter( gridout );\n+ 430 }\n+ 431\n+ 432} // namespace Dune\n+ 433\n+ 434#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_DGFWRITER_HH\n+rangegenerators.hh\n+Dune::GridView::Grid\n+Traits::Grid Grid\n+type of the grid\n+Definition: common/gridview.hh:83\n Dune::GridView::IndexSet\n Traits::IndexSet IndexSet\n type of the index set\n Definition: common/gridview.hh:86\n-Dune::leafGridView\n-Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid<\n-dim, dimworld, ct, GridFamily > &grid)\n-leaf grid view for the given grid\n-Definition: common/grid.hh:819\n-Dune::levelGridView\n-Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid<\n-dim, dimworld, ct, GridFamily > &grid, int level)\n-level grid view for the given grid and level.\n-Definition: common/grid.hh:802\n-Dune::GridView::dimensionworld\n-static constexpr int dimensionworld\n-The dimension of the world the grid lives in.\n-Definition: common/gridview.hh:151\n+Dune::GridView::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/gridview.hh:148\n+Dune::GridView::Intersection\n+Traits::Intersection Intersection\n+type of the intersection\n+Definition: common/gridview.hh:89\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::GnuplotWriter\n-Writer for 1D grids in gnuplot format.\n-Definition: gnuplot.hh:30\n-Dune::GnuplotWriter::addVertexData\n-void addVertexData(const DataContainer &data, const std::string &name)\n-Add vertex data.\n-Definition: gnuplot.hh:61\n-Dune::GnuplotWriter::addCellData\n-void addCellData(const DataContainer &data, const std::string &name)\n-Add cell data.\n-Definition: gnuplot.hh:49\n-Dune::GnuplotWriter::write\n-void write(const std::string &filename) const\n-Write Gnuplot file to disk.\n-Definition: gnuplot.cc:19\n-Dune::GnuplotWriter::GnuplotWriter\n-GnuplotWriter(const GridView &gv)\n-Definition: gnuplot.hh:37\n-Dune::LeafGnuplotWriter\n-GnuplotWriter on the leaf grid.\n-Definition: gnuplot.hh:91\n-Dune::LeafGnuplotWriter::LeafGnuplotWriter\n-LeafGnuplotWriter(const G &grid)\n-Construct a Gnuplot writer for the leaf level of a given grid.\n-Definition: gnuplot.hh:94\n-Dune::LevelGnuplotWriter\n-GnuplotWriter on a given level grid.\n-Definition: gnuplot.hh:104\n-Dune::LevelGnuplotWriter::LevelGnuplotWriter\n-LevelGnuplotWriter(const G &grid, int level)\n-Construct a Gnuplot writer for a certain level of a given grid.\n-Definition: gnuplot.hh:107\n+Dune::Alberta::max\n+int max(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:337\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::Intersection\n+Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n+element or with the d...\n+Definition: common/intersection.hh:164\n+Dune::GridError\n+Base class for exceptions in Dune grid modules.\n+Definition: exceptions.hh:20\n+Dune::IndexSet::IndexType\n+IndexTypeImp IndexType\n+The type used for the indices.\n+Definition: indexidset.hh:92\n+Dune::DGFWriter\n+write a GridView to a DGF file\n+Definition: dgfwriter.hh:46\n+Dune::DGFWriter::dimGrid\n+static const int dimGrid\n+dimension of the grid\n+Definition: dgfwriter.hh:56\n+Dune::DGFWriter::DGFWriter\n+DGFWriter(const GridView &gridView)\n+constructor\n+Definition: dgfwriter.hh:72\n+Dune::DGFWriter::write\n+void write(std::ostream &gridout, const std::stringstream &addParams=std::\n+stringstream()) const\n+write the GridView into a std::ostream\n+Definition: dgfwriter.hh:119\n+Dune::DGFWriter::write\n+auto write(const std::string &fileName, Args &&... args) const -> std::void_t<\n+decltype(this->write(std::declval< std::ostream & >(), std::declval< Args >\n+()...)) >\n+write the GridView to a file\n+Definition: dgfwriter.hh:131\n+Dune::DGFWriter::writeBoundaries\n+void writeBoundaries(std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, BoundaryData &&boundaryData) const\n+Definition: dgfwriter.hh:369\n+Dune::DGFWriter::boundaryId\n+static int boundaryId(const Intersection &i)\n+Definition: dgfwriter.hh:177\n+Dune::DGFWriter::write\n+void write(std::ostream &gridout, const std::vector< Index > &newElemOrder,\n+const std::stringstream &addParams=std::stringstream()) const\n+write the GridView into a std::ostream\n+Definition: dgfwriter.hh:107\n+Dune::DGFWriter::write\n+void write(std::ostream &gridout, const std::vector< Index > &newElemOrder,\n+BoundaryData &&boundaryData, const std::stringstream &addParams=std::\n+stringstream()) const\n+write the GridView into a std::ostream\n+Definition: dgfwriter.hh:409\n+Dune::DGFWriter::gridView_\n+GridView gridView_\n+Definition: dgfwriter.hh:198\n+Dune::DGFWriter::writeElement\n+void writeElement(std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, const Element &element, const GeometryType &elementType) const\n+Definition: dgfwriter.hh:277\n+Dune::DGFWriter::GridView\n+GV GridView\n+type of grid view\n+Definition: dgfwriter.hh:51\n+Dune::DGFWriter::writeFooter\n+void writeFooter(std::ostream &gridout) const\n+Definition: dgfwriter.hh:237\n+Dune::DGFWriter::Grid\n+GridView::Grid Grid\n+type of underlying hierarchical grid\n+Definition: dgfwriter.hh:53\n+Dune::DGFWriter::writeVertices\n+auto writeVertices(std::ostream &gridout) const -> std::vector< Index >\n+Definition: dgfwriter.hh:244\n+Dune::DGFWriter::writeElements\n+void writeElements(std::ostream &gridout, const std::vector< Index >\n+&dgfIndices, const Args &... args) const\n+Definition: dgfwriter.hh:355\n+Dune::DGFWriter::writeBoundaries\n+void writeBoundaries(std::ostream &gridout, const std::vector< Index >\n+&dgfIndices) const\n+Definition: dgfwriter.hh:192\n+Dune::DGFWriter::writeCubes\n+void writeCubes(std::ostream &gridout, const std::vector< Index > &dgfIndices)\n+const\n+Definition: dgfwriter.hh:322\n+Dune::DGFWriter::writeSimplices\n+void writeSimplices(std::ostream &gridout, const std::vector< Index >\n+&dgfIndices) const\n+Definition: dgfwriter.hh:292\n+Dune::DGFWriter::writeHeader\n+void writeHeader(std::ostream &gridout) const\n+Definition: dgfwriter.hh:222\n+Dune::DGFWriter::elementsSeeds\n+auto elementsSeeds(const std::vector< Index > &newElemOrder) const -> std::\n+vector< ElementSeed >\n+Definition: dgfwriter.hh:203\n grid.hh\n Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00962.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00962.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: printgrid.hh File Reference\n+dune-grid: entitykey_inline.hh File Reference\n \n \n \n \n \n \n \n@@ -58,44 +58,34 @@\n \n \n \n \n \n
    \n \n-
    printgrid.hh File Reference
    \n+Namespaces
    \n+
    entitykey_inline.hh File Reference
    \n \n
    \n-
    #include <fstream>
    \n-#include <string>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/parallel/mpihelper.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n+
    #include <algorithm>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n-\n-\n

    \n-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. More...
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,30 +6,21 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-Namespaces | Functions\n-printgrid.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n+ * dgfparser\n+Namespaces\n+entitykey_inline.hh File Reference\n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n- Functions\n-template\n-void\u00a0Dune::printGrid (const GridType &grid, const Dune::MPIHelper &helper,\n- std::string output_file=\"printgrid\", int size=2000, bool\n- execute_plot=true, bool png=true, bool local_corner_indices=true, bool\n- local_intersection_indices=true, bool outer_normals=true)\n-\u00a0 Print a grid as a gnuplot for testing and development. More...\n-\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00962_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: printgrid.hh Source File\n+dune-grid: entitykey_inline.hh Source File\n \n \n \n \n \n \n \n@@ -58,225 +58,210 @@\n \n
    \n \n \n \n
    \n-
    printgrid.hh
    \n+
    entitykey_inline.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_PRINTGRID_HH
    \n-
    6#define DUNE_PRINTGRID_HH
    \n+
    5#ifndef DUNE_ENTITYKEY_INLINE_HH
    \n+
    6#define DUNE_ENTITYKEY_INLINE_HH
    \n
    7
    \n-
    8#include <fstream>
    \n-
    9#include <string>
    \n-
    10
    \n-
    11#include <dune/common/exceptions.hh>
    \n-
    12#include <dune/common/parallel/mpihelper.hh>
    \n-\n+
    8#include <algorithm>
    \n+
    9#include <dune/geometry/referenceelements.hh>
    \n+\n+
    11
    \n+
    12namespace Dune
    \n+
    13{
    \n
    14
    \n-
    15namespace Dune {
    \n-
    16
    \n-
    17 namespace {
    \n-
    18
    \n-
    19 template<int dim>
    \n-
    20 struct ElementDataLayout
    \n-
    21 {
    \n-
    22 bool contains (Dune::GeometryType gt)
    \n-
    23 {
    \n-
    24 return gt.dim()==dim;
    \n-
    25 }
    \n-
    26 };
    \n-
    27
    \n-
    28 template<int dim>
    \n-
    29 struct NodeDataLayout
    \n-
    30 {
    \n-
    31 bool contains (Dune::GeometryType gt)
    \n-
    32 {
    \n-
    33 return gt.dim()==0;
    \n-
    34 }
    \n-
    35 };
    \n-
    36
    \n-
    37 // Move a point closer to basegeo's center by factor scale (used for drawing relative to the element)
    \n-
    38 template <typename B, typename C>
    \n-
    39 C centrify (const B& basegeo, const C& coords, const double scale) {
    \n-
    40 C ret = coords;
    \n-
    41 ret -= basegeo.center();
    \n-
    42 ret *= scale;
    \n-
    43 ret += basegeo.center();
    \n-
    44 return ret;
    \n-
    45 }
    \n-
    46
    \n-
    47 // Add a line to the plotfile from p1 to p2
    \n-
    48 template <typename Coord>
    \n-
    49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2, std::string options) {
    \n-
    50 plotfile << "set object poly from ";
    \n-
    51 plotfile << p1[0] << "," << p1[1] << " to ";
    \n-
    52 plotfile << p2[0] << "," << p2[1] << " to ";
    \n-
    53 plotfile << p1[0] << "," << p1[1];
    \n-
    54 plotfile << " " << options << std::endl;
    \n-
    55 }
    \n-
    56
    \n-
    57 }
    \n-
    58
    \n-
    72 template <typename GridType>
    \n-
    73 void printGrid (const GridType& grid, const Dune::MPIHelper& helper, std::string output_file = "printgrid",
    \n-
    74 int size = 2000, bool execute_plot = true, bool png = true, bool local_corner_indices = true,
    \n-
    75 bool local_intersection_indices = true, bool outer_normals = true)
    \n-
    76 {
    \n-
    77
    \n-
    78 // Create output file
    \n-
    79 output_file = output_file + "_" + std::to_string(helper.rank());
    \n-
    80 std::string plot_file_name = output_file + ".gnuplot";
    \n-
    81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc);
    \n-
    82 if (!plotfile.is_open()) {
    \n-
    83 DUNE_THROW(Dune::IOError, "Could not create plot file " << output_file << "!");
    \n-
    84 return;
    \n-
    85 }
    \n-
    86
    \n-
    87 // Basic plot settings
    \n-
    88 plotfile << "set size ratio -1" << std::endl;
    \n-
    89 if (png) {
    \n-
    90 plotfile << "set terminal png size " << size << "," << size << std::endl;
    \n-
    91 plotfile << "set output '" << output_file << ".png'" << std::endl;
    \n-
    92 } else {
    \n-
    93 plotfile << "set terminal svg size " << size << "," << size << " enhanced background rgb 'white'" << std::endl;
    \n-
    94 plotfile << "set output '" << output_file << ".svg'" << std::endl;
    \n-
    95 }
    \n-
    96
    \n-
    97 // Get GridView
    \n-
    98 typedef typename GridType::LeafGridView GV;
    \n-
    99 const GV gv = grid.leafGridView();
    \n-
    100
    \n-
    101 // Create mappers used to retrieve indices
    \n-\n-
    103 const Mapper elementmapper(gv, mcmgElementLayout());
    \n-
    104 const Mapper nodemapper(gv, mcmgVertexLayout());
    \n-
    105
    \n-
    106 // Create iterators
    \n-
    107 typedef typename GV::template Codim<0 >::Iterator LeafIterator;
    \n-
    108 typedef typename GV::IntersectionIterator IntersectionIterator;
    \n-
    109
    \n-
    110 LeafIterator it = gv.template begin<0>();
    \n+
    15 // DGFEntityKey
    \n+
    16 // ------------
    \n+
    17
    \n+
    18 template< class A >
    \n+
    19 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey )
    \n+
    20 : key_( key.size() ),
    \n+
    21 origKey_( key.size() ),
    \n+
    22 origKeySet_( setOrigKey )
    \n+
    23 {
    \n+
    24 for (size_t i=0; i<key_.size(); i++)
    \n+
    25 {
    \n+
    26 key_[i]=key[i];
    \n+
    27 origKey_[i]=key_[i];
    \n+
    28 }
    \n+
    29 std :: sort( key_.begin(), key_.end() );
    \n+
    30 }
    \n+
    31
    \n+\n+
    33 template< class A >
    \n+
    34 inline DGFEntityKey< A > :: DGFEntityKey ( const std :: vector< A > &key,
    \n+
    35 int N, int offset, bool setOrigKey )
    \n+
    36 : key_( N ),
    \n+
    37 origKey_( N ),
    \n+
    38 origKeySet_( setOrigKey )
    \n+
    39 {
    \n+
    40 for (size_t i=0; i<key_.size(); i++)
    \n+
    41 {
    \n+
    42 key_[i]=key[(i+offset)%key.size()];
    \n+
    43 origKey_[i]=key[(i+offset)%key.size()];
    \n+
    44 }
    \n+
    45 std :: sort( key_.begin(), key_.end() );
    \n+
    46 }
    \n+
    47
    \n+
    48
    \n+
    49 template< class A >
    \n+\n+
    51 : key_( k.key_.size() ),
    \n+
    52 origKey_( k.key_.size() ),
    \n+
    53 origKeySet_( k. origKeySet_ )
    \n+
    54 {
    \n+
    55 for (size_t i=0; i<key_.size(); i++)
    \n+
    56 {
    \n+
    57 key_[i]=k.key_[i];
    \n+
    58 origKey_[i]=k.origKey_[i];
    \n+
    59 }
    \n+
    60 }
    \n+
    61
    \n+
    62
    \n+
    63 template< class A >
    \n+\n+
    65 {
    \n+
    66 assert(key_.size()==k.key_.size());
    \n+
    67 for (size_t i=0; i<key_.size(); i++) {
    \n+
    68 key_[i]=k.key_[i];
    \n+
    69 origKey_[i]=k.origKey_[i];
    \n+
    70 }
    \n+
    71 origKeySet_ = k.origKeySet_;
    \n+
    72 return *this;
    \n+
    73 }
    \n+
    74
    \n+
    75
    \n+
    76 template< class A >
    \n+
    77 inline void DGFEntityKey< A >
    \n+
    78 :: orientation ( int base, std::vector< std :: vector< double > > &vtx )
    \n+
    79 {
    \n+
    80 if (key_.size()==3) {
    \n+
    81 assert( (size_t) origKey_[0] < vtx.size() );
    \n+
    82 std::vector<double>& p0 = vtx[origKey_[0]];
    \n+
    83 assert( (size_t) origKey_[1] < vtx.size() );
    \n+
    84 std::vector<double>& p1 = vtx[origKey_[1]];
    \n+
    85 assert( (size_t) origKey_[2] < vtx.size() );
    \n+
    86 std::vector<double>& p2 = vtx[origKey_[2]];
    \n+
    87 assert( (size_t) base < vtx.size() );
    \n+
    88 std::vector<double>& q = vtx[base];
    \n+
    89 double n[3];
    \n+
    90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]);
    \n+
    91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]);
    \n+
    92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]);
    \n+
    93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]);
    \n+
    94 bool reorient = (test>0);
    \n+
    95 if (reorient) {
    \n+
    96 A key1=origKey_[1];
    \n+
    97 origKey_[1]=origKey_[2];
    \n+
    98 origKey_[2]=key1;
    \n+
    99 }
    \n+
    100 }
    \n+
    101 }
    \n+
    102
    \n+
    103
    \n+
    104 template< class A >
    \n+
    105 inline void DGFEntityKey< A > :: print ( std :: ostream &out ) const
    \n+
    106 {
    \n+
    107 for( size_t i = 0; i < key_.size(); ++i )
    \n+
    108 out << key_[ i ] << " ";
    \n+
    109 out << std :: endl;
    \n+
    110 }
    \n
    111
    \n-
    112 // Will contain min/max coordinates. Needed for scaling of the plot
    \n-
    113 Dune::FieldVector<typename GridType::ctype,2> max_coord (it->geometry().center()), min_coord (max_coord);
    \n-
    114
    \n-
    115 // Iterate over elements
    \n-
    116 for (; it != gv.template end<0>(); ++it) {
    \n-
    117
    \n-
    118 const auto& entity = *it;
    \n-
    119 auto geo = entity.geometry();
    \n-
    120
    \n-
    121 // Plot element index
    \n-
    122 int element_id = elementmapper.index(entity);
    \n-
    123 plotfile << "set label at " << geo.center()[0] << "," << geo.center()[1] << " '"
    \n-
    124 << element_id << "' center" << std::endl;
    \n-
    125
    \n-
    126 for (int i = 0; i < geo.corners(); ++i) {
    \n-
    127 // Plot corner indices
    \n-
    128 const int globalNodeNumber1 = nodemapper.subIndex(entity, i, 2);
    \n-
    129 auto labelpos = centrify (geo, geo.corner(i), 0.7);
    \n-
    130 plotfile << "set label at " << labelpos[0] << "," << labelpos[1] << " '" << globalNodeNumber1;
    \n-
    131 if (local_corner_indices)
    \n-
    132 plotfile << "(" << i << ")";
    \n-
    133 plotfile << "' center" << std::endl;
    \n-
    134
    \n-
    135 // Adapt min / max coordinates
    \n-
    136 for (int dim = 0; dim < 2; ++dim) {
    \n-
    137 if (geo.corner(i)[dim] < min_coord[dim])
    \n-
    138 min_coord[dim] = geo.corner(i)[dim];
    \n-
    139 else if (geo.corner(i)[dim] > max_coord[dim])
    \n-
    140 max_coord[dim] = geo.corner(i)[dim];
    \n-
    141 }
    \n-
    142 }
    \n+
    112
    \n+
    113 // ElementFaceUtil
    \n+
    114 // ---------------
    \n+
    115
    \n+
    116 template< int dim >
    \n+\n+
    118 ElementFaceUtil::generateCubeFace
    \n+
    119 ( const std::vector< unsigned int > &element, int f )
    \n+
    120 {
    \n+
    121 auto refCube = ReferenceElements< double, dim >::cube();
    \n+
    122 const unsigned int size = refCube.size( f, 1, dim );
    \n+
    123 std::vector< unsigned int > k( size );
    \n+
    124 for( unsigned int i = 0; i < size; ++ i )
    \n+
    125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ];
    \n+\n+
    127 }
    \n+
    128
    \n+
    129
    \n+
    130 template< int dim >
    \n+\n+
    132 ElementFaceUtil :: generateSimplexFace
    \n+
    133 ( const std :: vector< unsigned int > &element, int f )
    \n+
    134 {
    \n+
    135 auto refSimplex = ReferenceElements< double, dim >::simplex();
    \n+
    136 const unsigned int size = refSimplex.size( f, 1, dim );
    \n+
    137 std :: vector< unsigned int > k( size );
    \n+
    138 for( unsigned int i = 0; i < size; ++i )
    \n+
    139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ];
    \n+\n+
    141 }
    \n+
    142
    \n
    143
    \n-
    144 // Iterate over intersections
    \n-
    145 for (IntersectionIterator is = gv.ibegin(entity); is != gv.iend(entity); ++is) {
    \n-
    146
    \n-
    147 const auto& intersection = *is;
    \n-
    148 auto igeo = intersection.geometry();
    \n-
    149
    \n-
    150 // Draw intersection line
    \n-
    151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), "fs empty border 1");
    \n-
    152
    \n-
    153 // Plot local intersection index
    \n-
    154 if (local_intersection_indices) {
    \n-
    155 auto label_pos = centrify (geo, igeo.center(), 0.8);
    \n-
    156 plotfile << "set label at " << label_pos[0] << "," << label_pos[1]
    \n-
    157 << " '" << intersection.indexInInside() << "' center" << std::endl;
    \n-
    158 }
    \n-
    159
    \n-
    160 // Plot outer normal
    \n-
    161 if (outer_normals) {
    \n-
    162 auto intersection_pos = igeo.center();
    \n-
    163 auto normal = intersection.centerUnitOuterNormal();
    \n-
    164 normal *= 0.15 * igeo.volume();
    \n-
    165 auto normal_end = intersection_pos + normal;
    \n-
    166 plotfile << "set arrow from " << intersection_pos[0] << "," << intersection_pos[1]
    \n-
    167 << " to " << normal_end[0] << "," << normal_end[1] << " lt rgb \\"gray\\"" << std::endl;
    \n-
    168 }
    \n-
    169
    \n-
    170 // Get corners for inner intersection representation
    \n-
    171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5);
    \n-
    172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5);
    \n-
    173
    \n-
    174 // Thick line in case of boundary()
    \n-
    175 if (intersection.boundary())
    \n-
    176 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 3 lw 4");
    \n-
    177
    \n-
    178 // Thin line with color according to neighbor()
    \n-
    179 if (intersection.neighbor())
    \n-
    180 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 2");
    \n-
    181 else
    \n-
    182 draw_line (plotfile, inner_corner1, inner_corner2, "fs empty border 1");
    \n-
    183 }
    \n-
    184
    \n-
    185 }
    \n-
    186
    \n-
    187 // Finish plot, pass extend of the grid
    \n-
    188 Dune::FieldVector<typename GridType::ctype,2> extend (max_coord - min_coord);
    \n-
    189
    \n-
    190 extend *= 0.2;
    \n-
    191 min_coord -= extend;
    \n-
    192 max_coord += extend;
    \n-
    193 plotfile << "plot [" << min_coord[0] << ":" << max_coord[0] << "] [" << min_coord[1]
    \n-
    194 << ":" << max_coord[1] << "] NaN notitle" << std::endl;
    \n-
    195 plotfile.close();
    \n-
    196
    \n-
    197 if (execute_plot) {
    \n-
    198 std::string cmd = "gnuplot -p '" + plot_file_name + "'";
    \n-
    199 if (std::system (cmd.c_str()) != 0)
    \n-
    200 DUNE_THROW(Dune::Exception,"Error running GNUPlot: " << cmd);
    \n-
    201 }
    \n-
    202 }
    \n-
    203
    \n-
    204}
    \n-
    205
    \n-
    206#endif // #ifndef DUNE_PRINTGRID_HH
    \n-
    Mapper for multiple codim and multiple geometry types.
    \n-
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n-
    MCMGLayout mcmgVertexLayout()
    layout for vertices (dim-0 entities)
    Definition: mcmgmapper.hh:107
    \n+\n+
    145 ElementFaceUtil::generateFace ( int dim, const std::vector< unsigned int > &element, int f )
    \n+
    146 {
    \n+
    147 if( element.size() == size_t(dim+1) )
    \n+
    148 {
    \n+
    149 // Simplex element
    \n+
    150 switch( dim )
    \n+
    151 {
    \n+
    152 case 3 :
    \n+
    153 return generateSimplexFace< 3 >( element, f );
    \n+
    154 case 2 :
    \n+
    155 return generateSimplexFace< 2 >( element, f );
    \n+
    156 case 1 :
    \n+
    157 return generateSimplexFace< 1 >( element, f );
    \n+
    158 default :
    \n+
    159 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
    \n+
    160 }
    \n+
    161 }
    \n+
    162 else
    \n+
    163 {
    \n+
    164 // Cube element
    \n+
    165 switch( dim )
    \n+
    166 {
    \n+
    167 case 3 :
    \n+
    168 return generateCubeFace< 3 >( element, f );
    \n+
    169 case 2 :
    \n+
    170 return generateCubeFace< 2 >( element, f );
    \n+
    171 case 1 :
    \n+
    172 return generateCubeFace< 1 >( element, f );
    \n+
    173 default :
    \n+
    174 DUNE_THROW( NotImplemented, "ElementUtil::generateFace not implemented for dim = " << dim << "." );
    \n+
    175 }
    \n+
    176 }
    \n+
    177 }
    \n+
    178
    \n+
    179} // end namespace Dune
    \n+
    180
    \n+
    181#endif // DUNE_ENTITYKEY_INLINE_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    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
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
    Definition: common/intersectioniterator.hh:83
    \n-
    Mapper interface.
    Definition: mapper.hh:110
    \n-
    Index index(const EntityType &e) const
    Map entity to array index.
    Definition: mapper.hh:122
    \n-
    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
    \n-
    Implementation class for a multiple codim and multiple geometry type mapper.
    Definition: mcmgmapper.hh:129
    \n+
    Definition: entitykey.hh:21
    \n+
    DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)
    Definition: entitykey_inline.hh:64
    \n+
    void orientation(int base, std ::vector< std ::vector< double > > &vtx)
    Definition: entitykey_inline.hh:78
    \n+
    void print(std ::ostream &out=std ::cerr) const
    Definition: entitykey_inline.hh:105
    \n+
    DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)
    Definition: entitykey_inline.hh:19
    \n+
    static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
    Definition: entitykey_inline.hh:145
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,264 +6,222 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-printgrid.hh\n+ * dgfparser\n+entitykey_inline.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_PRINTGRID_HH\n- 6#define DUNE_PRINTGRID_HH\n+ 5#ifndef DUNE_ENTITYKEY_INLINE_HH\n+ 6#define DUNE_ENTITYKEY_INLINE_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11#include \n- 12#include \n- 13#include \n+ 8#include \n+ 9#include \n+ 10#include \n+ 11\n+ 12namespace Dune\n+ 13{\n 14\n- 15namespace Dune {\n- 16\n- 17 namespace {\n- 18\n- 19 template\n- 20 struct ElementDataLayout\n- 21 {\n- 22 bool contains (Dune::GeometryType gt)\n+ 15 // DGFEntityKey\n+ 16 // ------------\n+ 17\n+ 18 template< class A >\n+19 inline DGFEntityKey<_A_>_::_DGFEntityKey ( const std :: vector< A > &key,\n+bool setOrigKey )\n+ 20 : key_( key.size() ),\n+ 21 origKey_( key.size() ),\n+22 origKeySet_( setOrigKey )\n 23 {\n- 24 return gt.dim()==dim;\n- 25 }\n- 26 };\n- 27\n- 28 template\n- 29 struct NodeDataLayout\n- 30 {\n- 31 bool contains (Dune::GeometryType gt)\n- 32 {\n- 33 return gt.dim()==0;\n- 34 }\n- 35 };\n- 36\n- 37 // Move a point closer to basegeo's center by factor scale (used for\n-drawing relative to the element)\n- 38 template \n- 39 C centrify (const B& basegeo, const C& coords, const double scale) {\n- 40 C ret = coords;\n- 41 ret -= basegeo.center();\n- 42 ret *= scale;\n- 43 ret += basegeo.center();\n- 44 return ret;\n- 45 }\n- 46\n- 47 // Add a line to the plotfile from p1 to p2\n- 48 template \n- 49 void draw_line (std::ofstream &plotfile, const Coord &p1, const Coord &p2,\n-std::string options) {\n- 50 plotfile << \"set object poly from \";\n- 51 plotfile << p1[0] << \",\" << p1[1] << \" to \";\n- 52 plotfile << p2[0] << \",\" << p2[1] << \" to \";\n- 53 plotfile << p1[0] << \",\" << p1[1];\n- 54 plotfile << \" \" << options << std::endl;\n- 55 }\n- 56\n- 57 }\n- 58\n- 72 template \n-73 void printGrid (const GridType& grid, const Dune::MPIHelper& helper, std::\n-string output_file = \"printgrid\",\n- 74 int size = 2000, bool execute_plot = true, bool png = true, bool\n-local_corner_indices = true,\n- 75 bool local_intersection_indices = true, bool outer_normals = true)\n- 76 {\n- 77\n- 78 // Create output file\n- 79 output_file = output_file + \"_\" + std::to_string(helper.rank());\n- 80 std::string plot_file_name = output_file + \".gnuplot\";\n- 81 std::ofstream plotfile (plot_file_name, std::ios::out | std::ios::trunc);\n- 82 if (!plotfile.is_open()) {\n- 83 DUNE_THROW(Dune::IOError, \"Could not create plot file \" << output_file <<\n-\"!\");\n- 84 return;\n- 85 }\n- 86\n- 87 // Basic plot settings\n- 88 plotfile << \"set size ratio -1\" << std::endl;\n- 89 if (png) {\n- 90 plotfile << \"set terminal png size \" << size << \",\" << size << std::endl;\n- 91 plotfile << \"set output '\" << output_file << \".png'\" << std::endl;\n- 92 } else {\n- 93 plotfile << \"set terminal svg size \" << size << \",\" << size << \" enhanced\n-background rgb 'white'\" << std::endl;\n- 94 plotfile << \"set output '\" << output_file << \".svg'\" << std::endl;\n- 95 }\n- 96\n- 97 // Get GridView\n- 98 typedef typename GridType::LeafGridView GV;\n- 99 const GV gv = grid.leafGridView();\n- 100\n- 101 // Create mappers used to retrieve indices\n- 102 typedef typename Dune::MultipleCodimMultipleGeomTypeMapper Mapper;\n- 103 const Mapper elementmapper(gv, mcmgElementLayout());\n- 104 const Mapper nodemapper(gv, mcmgVertexLayout());\n- 105\n- 106 // Create iterators\n- 107 typedef typename GV::template Codim<0 >::Iterator LeafIterator;\n- 108 typedef typename GV::IntersectionIterator IntersectionIterator;\n- 109\n- 110 LeafIterator it = gv.template begin<0>();\n+ 24 for (size_t i=0; i\n+ 34 inline DGFEntityKey<_A_>_::_DGFEntityKey ( const std :: vector< A > &key,\n+ 35 int N, int offset, bool setOrigKey )\n+ 36 : key_( N ),\n+ 37 origKey_( N ),\n+ 38 origKeySet_( setOrigKey )\n+ 39 {\n+ 40 for (size_t i=0; i\n+50 inline DGFEntityKey<_A_>_::_DGFEntityKey ( const DGFEntityKey<_A_> &k )\n+ 51 : key_( k.key_.size() ),\n+ 52 origKey_( k.key_.size() ),\n+ 53 origKeySet_( k. origKeySet_ )\n+ 54 {\n+ 55 for (size_t i=0; i\n+64 inline DGFEntityKey<_A_> &DGFEntityKey<_A_>_::_operator=( const\n+DGFEntityKey<_A_> &k )\n+ 65 {\n+ 66 assert(key_.size()==k.key_.size());\n+ 67 for (size_t i=0; i\n+ 77 inline void DGFEntityKey<_A_>\n+78::_orientation ( int base, std::vector< std :: vector< double > > &vtx )\n+ 79 {\n+ 80 if (key_.size()==3) {\n+ 81 assert( (size_t) origKey_[0] < vtx.size() );\n+ 82 std::vector& p0 = vtx[origKey_[0]];\n+ 83 assert( (size_t) origKey_[1] < vtx.size() );\n+ 84 std::vector& p1 = vtx[origKey_[1]];\n+ 85 assert( (size_t) origKey_[2] < vtx.size() );\n+ 86 std::vector& p2 = vtx[origKey_[2]];\n+ 87 assert( (size_t) base < vtx.size() );\n+ 88 std::vector& q = vtx[base];\n+ 89 double n[3];\n+ 90 n[0] = (p1[1]-p0[1])*(p2[2]-p0[2])-(p2[1]-p0[1])*(p1[2]-p0[2]);\n+ 91 n[1] = (p1[2]-p0[2])*(p2[0]-p0[0])-(p2[2]-p0[2])*(p1[0]-p0[0]);\n+ 92 n[2] = (p1[0]-p0[0])*(p2[1]-p0[1])-(p2[0]-p0[0])*(p1[1]-p0[1]);\n+ 93 double test = n[0]*(q[0]-p0[0])+n[1]*(q[1]-p0[1])+n[2]*(q[2]-p0[2]);\n+ 94 bool reorient = (test>0);\n+ 95 if (reorient) {\n+ 96 A key1=origKey_[1];\n+ 97 origKey_[1]=origKey_[2];\n+ 98 origKey_[2]=key1;\n+ 99 }\n+ 100 }\n+ 101 }\n+ 102\n+ 103\n+ 104 template< class A >\n+105 inline void DGFEntityKey<_A_>_::_print ( std :: ostream &out ) const\n+ 106 {\n+ 107 for( size_t i = 0; i < key_.size(); ++i )\n+ 108 out << key_[ i ] << \" \";\n+ 109 out << std :: endl;\n+ 110 }\n 111\n- 112 // Will contain min/max coordinates. Needed for scaling of the plot\n- 113 Dune::FieldVector max_coord (it->geometry\n-().center()), min_coord (max_coord);\n- 114\n- 115 // Iterate over elements\n- 116 for (; it != gv.template end<0>(); ++it) {\n- 117\n- 118 const auto& entity = *it;\n- 119 auto geo = entity.geometry();\n- 120\n- 121 // Plot element index\n- 122 int element_id = elementmapper.index(entity);\n- 123 plotfile << \"set label at \" << geo.center()[0] << \",\" << geo.center()[1]\n-<< \" '\"\n- 124 << element_id << \"' center\" << std::endl;\n- 125\n- 126 for (int i = 0; i < geo.corners(); ++i) {\n- 127 // Plot corner indices\n- 128 const int globalNodeNumber1 = nodemapper.subIndex(entity, i, 2);\n- 129 auto labelpos = centrify (geo, geo.corner(i), 0.7);\n- 130 plotfile << \"set label at \" << labelpos[0] << \",\" << labelpos[1] << \" '\"\n-<< globalNodeNumber1;\n- 131 if (local_corner_indices)\n- 132 plotfile << \"(\" << i << \")\";\n- 133 plotfile << \"' center\" << std::endl;\n- 134\n- 135 // Adapt min / max coordinates\n- 136 for (int dim = 0; dim < 2; ++dim) {\n- 137 if (geo.corner(i)[dim] < min_coord[dim])\n- 138 min_coord[dim] = geo.corner(i)[dim];\n- 139 else if (geo.corner(i)[dim] > max_coord[dim])\n- 140 max_coord[dim] = geo.corner(i)[dim];\n+ 112\n+ 113 // ElementFaceUtil\n+ 114 // ---------------\n+ 115\n+ 116 template< int dim >\n+ 117 inline DGFEntityKey<_unsigned_int_>\n+ 118 ElementFaceUtil::generateCubeFace\n+ 119 ( const std::vector< unsigned int > &element, int f )\n+ 120 {\n+ 121 auto refCube = ReferenceElements< double, dim >::cube();\n+ 122 const unsigned int size = refCube.size( f, 1, dim );\n+ 123 std::vector< unsigned int > k( size );\n+ 124 for( unsigned int i = 0; i < size; ++ i )\n+ 125 k[ i ] = element[ refCube.subEntity( f, 1, i, dim ) ];\n+ 126 return DGFEntityKey<_unsigned_int_>( k );\n+ 127 }\n+ 128\n+ 129\n+ 130 template< int dim >\n+ 131 inline DGFEntityKey<_unsigned_int_>\n+132 ElementFaceUtil :: generateSimplexFace\n+ 133 ( const std :: vector< unsigned int > &element, int f )\n+ 134 {\n+ 135 auto refSimplex = ReferenceElements< double, dim >::simplex();\n+ 136 const unsigned int size = refSimplex.size( f, 1, dim );\n+ 137 std :: vector< unsigned int > k( size );\n+ 138 for( unsigned int i = 0; i < size; ++i )\n+ 139 k[ i ] = element[ refSimplex.subEntity( f, 1, i, dim ) ];\n+ 140 return DGFEntityKey<_unsigned_int_>( k );\n 141 }\n- 142 }\n+ 142\n 143\n- 144 // Iterate over intersections\n- 145 for (IntersectionIterator is = gv.ibegin(entity); is != gv.iend(entity);\n-++is) {\n- 146\n- 147 const auto& intersection = *is;\n- 148 auto igeo = intersection.geometry();\n- 149\n- 150 // Draw intersection line\n- 151 draw_line (plotfile, igeo.corner(0), igeo.corner(1), \"fs empty border 1\");\n- 152\n- 153 // Plot local intersection index\n- 154 if (local_intersection_indices) {\n- 155 auto label_pos = centrify (geo, igeo.center(), 0.8);\n- 156 plotfile << \"set label at \" << label_pos[0] << \",\" << label_pos[1]\n- 157 << \" '\" << intersection.indexInInside() << \"' center\" << std::endl;\n- 158 }\n- 159\n- 160 // Plot outer normal\n- 161 if (outer_normals) {\n- 162 auto intersection_pos = igeo.center();\n- 163 auto normal = intersection.centerUnitOuterNormal();\n- 164 normal *= 0.15 * igeo.volume();\n- 165 auto normal_end = intersection_pos + normal;\n- 166 plotfile << \"set arrow from \" << intersection_pos[0] << \",\" <<\n-intersection_pos[1]\n- 167 << \" to \" << normal_end[0] << \",\" << normal_end[1] << \" lt rgb \\\"gray\\\"\"\n-<< std::endl;\n- 168 }\n- 169\n- 170 // Get corners for inner intersection representation\n- 171 auto inner_corner1 = centrify (geo, igeo.corner(0), 0.5);\n- 172 auto inner_corner2 = centrify (geo, igeo.corner(1), 0.5);\n- 173\n- 174 // Thick line in case of boundary()\n- 175 if (intersection.boundary())\n- 176 draw_line (plotfile, inner_corner1, inner_corner2, \"fs empty border 3 lw\n-4\");\n- 177\n- 178 // Thin line with color according to neighbor()\n- 179 if (intersection.neighbor())\n- 180 draw_line (plotfile, inner_corner1, inner_corner2, \"fs empty border 2\");\n- 181 else\n- 182 draw_line (plotfile, inner_corner1, inner_corner2, \"fs empty border 1\");\n- 183 }\n- 184\n- 185 }\n- 186\n- 187 // Finish plot, pass extend of the grid\n- 188 Dune::FieldVector extend (max_coord -\n-min_coord);\n- 189\n- 190 extend *= 0.2;\n- 191 min_coord -= extend;\n- 192 max_coord += extend;\n- 193 plotfile << \"plot [\" << min_coord[0] << \":\" << max_coord[0] << \"] [\" <<\n-min_coord[1]\n- 194 << \":\" << max_coord[1] << \"] NaN notitle\" << std::endl;\n- 195 plotfile.close();\n- 196\n- 197 if (execute_plot) {\n- 198 std::string cmd = \"gnuplot -p '\" + plot_file_name + \"'\";\n- 199 if (std::system (cmd.c_str()) != 0)\n- 200 DUNE_THROW(Dune::Exception,\"Error running GNUPlot: \" << cmd);\n- 201 }\n- 202 }\n- 203\n- 204}\n- 205\n- 206#endif // #ifndef DUNE_PRINTGRID_HH\n-mcmgmapper.hh\n-Mapper for multiple codim and multiple geometry types.\n-Dune::mcmgElementLayout\n-MCMGLayout mcmgElementLayout()\n-layout for elements (codim-0 entities)\n-Definition: mcmgmapper.hh:97\n-Dune::mcmgVertexLayout\n-MCMGLayout mcmgVertexLayout()\n-layout for vertices (dim-0 entities)\n-Definition: mcmgmapper.hh:107\n+ 144 inline DGFEntityKey<_unsigned_int_>\n+145 ElementFaceUtil::generateFace ( int dim, const std::vector< unsigned int >\n+&element, int f )\n+ 146 {\n+ 147 if( element.size() == size_t(dim+1) )\n+ 148 {\n+ 149 // Simplex element\n+ 150 switch( dim )\n+ 151 {\n+ 152 case 3 :\n+ 153 return generateSimplexFace< 3 >( element, f );\n+ 154 case 2 :\n+ 155 return generateSimplexFace< 2 >( element, f );\n+ 156 case 1 :\n+ 157 return generateSimplexFace< 1 >( element, f );\n+ 158 default :\n+ 159 DUNE_THROW( NotImplemented, \"ElementUtil::generateFace not implemented for\n+dim = \" << dim << \".\" );\n+ 160 }\n+ 161 }\n+ 162 else\n+ 163 {\n+ 164 // Cube element\n+ 165 switch( dim )\n+ 166 {\n+ 167 case 3 :\n+ 168 return generateCubeFace< 3 >( element, f );\n+ 169 case 2 :\n+ 170 return generateCubeFace< 2 >( element, f );\n+ 171 case 1 :\n+ 172 return generateCubeFace< 1 >( element, f );\n+ 173 default :\n+ 174 DUNE_THROW( NotImplemented, \"ElementUtil::generateFace not implemented for\n+dim = \" << dim << \".\" );\n+ 175 }\n+ 176 }\n+ 177 }\n+ 178\n+ 179} // end namespace Dune\n+ 180\n+ 181#endif // DUNE_ENTITYKEY_INLINE_HH\n+entitykey.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::printGrid\n-void printGrid(const GridType &grid, const Dune::MPIHelper &helper, std::string\n-output_file=\"printgrid\", int size=2000, bool execute_plot=true, bool png=true,\n-bool local_corner_indices=true, bool local_intersection_indices=true, bool\n-outer_normals=true)\n-Print a grid as a gnuplot for testing and development.\n-Definition: printgrid.hh:73\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::IntersectionIterator\n-Mesh entities of codimension 0 (\"elements\") allow to visit all intersections\n-with \"neighboring\" eleme...\n-Definition: common/intersectioniterator.hh:83\n-Dune::Mapper\n-Mapper interface.\n-Definition: mapper.hh:110\n-Dune::Mapper::index\n-Index index(const EntityType &e) const\n-Map entity to array index.\n-Definition: mapper.hh:122\n-Dune::Mapper::subIndex\n-Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i,\n-unsigned int codim) const\n-Map subentity i of codim cc of a codim 0 entity to array index.\n-Definition: mapper.hh:136\n-Dune::MultipleCodimMultipleGeomTypeMapper\n-Implementation class for a multiple codim and multiple geometry type mapper.\n-Definition: mcmgmapper.hh:129\n+Dune::DGFEntityKey\n+Definition: entitykey.hh:21\n+Dune::DGFEntityKey::operator=\n+DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)\n+Definition: entitykey_inline.hh:64\n+Dune::DGFEntityKey::orientation\n+void orientation(int base, std ::vector< std ::vector< double > > &vtx)\n+Definition: entitykey_inline.hh:78\n+Dune::DGFEntityKey::print\n+void print(std ::ostream &out=std ::cerr) const\n+Definition: entitykey_inline.hh:105\n+Dune::DGFEntityKey::DGFEntityKey\n+DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)\n+Definition: entitykey_inline.hh:19\n+Dune::ElementFaceUtil::generateFace\n+static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector<\n+unsigned int > &element, int f)\n+Definition: entitykey_inline.hh:145\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00965.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00965.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtk.hh File Reference\n+dune-grid: parser.hh File Reference\n \n \n \n \n \n \n \n@@ -58,33 +58,47 @@\n \n \n \n \n \n
    \n-
    vtk.hh File Reference
    \n+ \n+
    parser.hh File Reference
    \n
    \n
    \n-\n-

    Convenience header which includes all available VTK writers. \n-More...

    \n-
    #include "vtk/boundarywriter.hh"
    \n-#include "vtk/subsamplingvtkwriter.hh"
    \n-#include "vtk/vtksequencewriter.hh"
    \n-#include "vtk/vtkwriter.hh"
    \n-#include "vtk/volumewriter.hh"
    \n+
    #include <iostream>
    \n+#include <string>
    \n+#include <vector>
    \n+#include <map>
    \n+#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n
    \n

    Go to the source code of this file.

    \n-

    Detailed Description

    \n-

    Convenience header which includes all available VTK writers.

    \n-
    \n+\n+\n+\n+\n+\n+\n+\n+\n+

    \n+Classes

    struct  Dune::DGFBoundaryParameter
     Contains types for additional features. More...
     
    class  Dune::DuneGridFormatParser
     The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class. More...
     
    \n+\n+\n+\n+\n+

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,20 +6,31 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-vtk.hh File Reference\n-Convenience header which includes all available VTK writers. More...\n-#include \"vtk/boundarywriter.hh\"\n-#include \"vtk/subsamplingvtkwriter.hh\"\n-#include \"vtk/vtksequencewriter.hh\"\n-#include \"vtk/vtkwriter.hh\"\n-#include \"vtk/volumewriter.hh\"\n+ * dgfparser\n+Classes | Namespaces\n+parser.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n-***** Detailed Description *****\n-Convenience header which includes all available VTK writers.\n+ Classes\n+struct \u00a0Dune::DGFBoundaryParameter\n+\u00a0 Contains types for additional features. More...\n+\u00a0\n+ class \u00a0Dune::DuneGridFormatParser\n+\u00a0 The DuneGridFormatParser class: reads a DGF file and stores build\n+ information in vector structures used by the MacroGrid class. More...\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00965_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vtk.hh Source File\n+dune-grid: parser.hh Source File\n \n \n \n \n \n \n \n@@ -58,41 +58,223 @@\n \n \n \n \n \n
    \n-
    vtk.hh
    \n+
    parser.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_HH
    \n-
    8
    \n-
    13#include "vtk/boundarywriter.hh"
    \n-\n-\n-
    16#include "vtk/vtkwriter.hh"
    \n-
    17#include "vtk/volumewriter.hh"
    \n-
    18
    \n-
    19#endif // DUNE_GRID_IO_FILE_VTK_HH
    \n-\n-
    Provides subsampled file i/o for the visualization toolkit.
    \n-\n-
    Provides file i/o for the visualization toolkit.
    \n-\n+
    5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH
    \n+
    6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH
    \n+
    7
    \n+
    8#include <iostream>
    \n+
    9#include <string>
    \n+
    10#include <vector>
    \n+
    11#include <map>
    \n+
    12
    \n+\n+
    14
    \n+
    15namespace Dune
    \n+
    16{
    \n+
    17
    \n+
    18 class DGFPrintInfo;
    \n+
    19
    \n+\n+
    23 {
    \n+
    25 typedef std::string type;
    \n+
    26
    \n+
    28 static const type &defaultValue ()
    \n+
    29 {
    \n+
    30 static type value;
    \n+
    31 return value;
    \n+
    32 }
    \n+
    33
    \n+
    35 static type convert ( const std::string & parameter )
    \n+
    36 {
    \n+
    37 return parameter;
    \n+
    38 }
    \n+
    39
    \n+
    41 static const char delimiter = ':';
    \n+
    42 };
    \n+
    43
    \n+\n+
    47 {
    \n+
    48 public:
    \n+
    49 typedef enum {Simplex,Cube,General} element_t;
    \n+
    50
    \n+\n+
    52
    \n+
    54 DuneGridFormatParser ( int rank, int size );
    \n+
    55
    \n+
    66 static bool isDuneGridFormat ( std::istream &input );
    \n+
    67
    \n+
    77 static bool isDuneGridFormat ( const std::string &filename );
    \n+
    78
    \n+
    91 bool readDuneGrid( std::istream &input, int dimG, int dimW );
    \n+
    92
    \n+
    94 void writeTetgenPoly ( const std::string &, std::string &, std::string & );
    \n+
    95
    \n+
    96 void writeTetgenPoly ( std::ostream & out, const bool writeSegments = true );
    \n+
    97
    \n+
    98 protected:
    \n+
    99 void generateBoundaries ( std::istream &, bool );
    \n+
    100
    \n+
    101 // call to tetgen/triangle
    \n+
    102 void generateSimplexGrid ( std::istream & );
    \n+
    103 void readTetgenTriangle ( const std::string & );
    \n+
    104
    \n+
    105 // helper methods
    \n+
    106 void removeCopies ();
    \n+
    107
    \n+
    108 void setOrientation ( int use1, int use2,
    \n+
    109 orientation_t orientation=counterclockwise );
    \n+
    110
    \n+
    111 void setRefinement ( int use1, int use2, int is1=-1, int is2=-1 );
    \n+
    112
    \n+
    113 double testTriang ( int snr );
    \n+
    114
    \n+
    115 std::vector< double > & getElParam ( int i, std::vector< double > & coord );
    \n+
    116
    \n+
    117 std::vector< double > & getVtxParam ( int i, std::vector< double > & coord );
    \n+
    118
    \n+
    119 static std::string temporaryFileName ();
    \n+
    120
    \n+
    121 // dimension of world and problem: set through the readDuneGrid() method
    \n+\n+
    123
    \n+
    124 // vector of vertex coordinates
    \n+
    125 std::vector < std::vector < double > > vtx;
    \n+
    126
    \n+\n+
    128
    \n+\n+
    130
    \n+
    131 double minVertexDistance; // min. L^1 distance of distinct points
    \n+
    132
    \n+
    133 // vector of elements
    \n+
    134 std :: vector< std :: vector< unsigned int > > elements;
    \n+
    135
    \n+\n+
    137
    \n+
    138 // vector of boundary segments + identifier
    \n+
    139 std::vector < std::vector < int > > bound;
    \n+
    140
    \n+\n+
    142
    \n+
    143 // map to generate and find boundary segments
    \n+\n+
    145 typedef std::pair < int, BoundaryParameter > BndParam;
    \n+
    146 typedef std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t;
    \n+\n+
    148
    \n+
    149 // true if parameters on a boundary found
    \n+\n+
    151
    \n+
    152 // set by generator depending on element type wanted
    \n+\n+
    154
    \n+
    155 // set by the readDuneGrid method depending
    \n+
    156 // on what type the elements were generated
    \n+\n+
    158
    \n+
    159 // true if grid is generated using the intervall Block
    \n+\n+
    161
    \n+
    162 // parameters on elements
    \n+\n+
    164
    \n+
    165 std::vector< std::vector< double > > vtxParams,elParams;
    \n+
    166
    \n+
    167 // write information about generation process
    \n+\n+
    169
    \n+
    170 std::vector < double > emptyParam_;
    \n+
    171
    \n+
    172
    \n+
    173 private:
    \n+
    174 int rank_;
    \n+
    175 int size_;
    \n+
    176
    \n+
    177 template< class GridType >
    \n+
    178 friend struct DGFGridFactory;
    \n+
    179
    \n+
    180 template< class GridType >
    \n+
    181 friend struct DGFBaseFactory;
    \n+
    182
    \n+
    183 };
    \n+
    184
    \n+
    185} // end namespace Dune
    \n+
    186
    \n+
    187#endif
    \n+\n+
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    Definition: dgfgridfactory.hh:38
    \n+
    Definition: io/file/dgfparser/dgfparser.cc:26
    \n+
    Contains types for additional features.
    Definition: parser.hh:23
    \n+
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n+
    static const char delimiter
    delimiter
    Definition: parser.hh:41
    \n+
    static type convert(const std::string &parameter)
    copy from string
    Definition: parser.hh:35
    \n+
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n+
    The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures us...
    Definition: parser.hh:47
    \n+
    int nofvtxparams
    Definition: parser.hh:163
    \n+
    int nofbound
    Definition: parser.hh:141
    \n+
    std::pair< int, BoundaryParameter > BndParam
    Definition: parser.hh:145
    \n+
    void readTetgenTriangle(const std::string &)
    Definition: io/file/dgfparser/dgfparser.cc:795
    \n+
    static bool isDuneGridFormat(std::istream &input)
    check whether a stream is in DUNE grid format
    Definition: io/file/dgfparser/dgfparser.cc:271
    \n+
    void setOrientation(int use1, int use2, orientation_t orientation=counterclockwise)
    Definition: io/file/dgfparser/dgfparser.cc:910
    \n+
    std::vector< std::vector< double > > vtxParams
    Definition: parser.hh:165
    \n+
    void setRefinement(int use1, int use2, int is1=-1, int is2=-1)
    Definition: io/file/dgfparser/dgfparser.cc:989
    \n+
    friend struct DGFBaseFactory
    Definition: parser.hh:181
    \n+
    static std::string temporaryFileName()
    Definition: io/file/dgfparser/dgfparser.cc:1096
    \n+
    DuneGridFormatParser(int rank, int size)
    constructor
    Definition: io/file/dgfparser/dgfparser.cc:97
    \n+
    void removeCopies()
    Definition: io/file/dgfparser/dgfparser.cc:464
    \n+
    int dimw
    Definition: parser.hh:122
    \n+
    int dimgrid
    Definition: parser.hh:122
    \n+
    element_t element
    Definition: parser.hh:153
    \n+
    DGFBoundaryParameter::type BoundaryParameter
    Definition: parser.hh:144
    \n+
    int nofelements
    Definition: parser.hh:136
    \n+
    orientation_t
    Definition: parser.hh:51
    \n+
    @ clockwise
    Definition: parser.hh:51
    \n+
    @ counterclockwise
    Definition: parser.hh:51
    \n+
    double testTriang(int snr)
    Definition: io/file/dgfparser/dgfparser.cc:1050
    \n+
    double minVertexDistance
    Definition: parser.hh:131
    \n+
    bool simplexgrid
    Definition: parser.hh:157
    \n+
    std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t
    Definition: parser.hh:146
    \n+
    std::vector< std::vector< int > > bound
    Definition: parser.hh:139
    \n+
    void generateSimplexGrid(std::istream &)
    Definition: io/file/dgfparser/dgfparser.cc:624
    \n+
    std::vector< double > emptyParam_
    Definition: parser.hh:170
    \n+
    int nofelparams
    Definition: parser.hh:163
    \n+
    std::vector< std::vector< double > > elParams
    Definition: parser.hh:165
    \n+
    facemap_t facemap
    Definition: parser.hh:147
    \n+
    element_t
    Definition: parser.hh:49
    \n+
    @ General
    Definition: parser.hh:49
    \n+
    @ Cube
    Definition: parser.hh:49
    \n+
    @ Simplex
    Definition: parser.hh:49
    \n+
    bool cube2simplex
    Definition: parser.hh:160
    \n+
    int nofvtx
    Definition: parser.hh:127
    \n+
    void writeTetgenPoly(const std::string &, std::string &, std::string &)
    method to write in Tetgen/Triangle Poly Format
    Definition: io/file/dgfparser/dgfparser.cc:123
    \n+
    std::vector< std::vector< double > > vtx
    Definition: parser.hh:125
    \n+
    int vtxoffset
    Definition: parser.hh:129
    \n+
    bool readDuneGrid(std::istream &input, int dimG, int dimW)
    parse dune grid format from stream
    Definition: io/file/dgfparser/dgfparser.cc:298
    \n+
    std ::vector< std ::vector< unsigned int > > elements
    Definition: parser.hh:134
    \n+
    bool haveBndParameters
    Definition: parser.hh:150
    \n+
    DGFPrintInfo * info
    Definition: parser.hh:168
    \n+
    void generateBoundaries(std::istream &, bool)
    Definition: io/file/dgfparser/dgfparser.cc:502
    \n+
    std::vector< double > & getVtxParam(int i, std::vector< double > &coord)
    Definition: io/file/dgfparser/dgfparser.cc:1086
    \n+
    std::vector< double > & getElParam(int i, std::vector< double > &coord)
    Definition: io/file/dgfparser/dgfparser.cc:1070
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,35 +6,337 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-vtk.hh\n+ * dgfparser\n+parser.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_HH\n- 8\n- 13#include \"vtk/boundarywriter.hh\"\n- 14#include \"vtk/subsamplingvtkwriter.hh\"\n- 15#include \"vtk/vtksequencewriter.hh\"\n- 16#include \"vtk/vtkwriter.hh\"\n- 17#include \"vtk/volumewriter.hh\"\n- 18\n- 19#endif // DUNE_GRID_IO_FILE_VTK_HH\n-vtksequencewriter.hh\n-subsamplingvtkwriter.hh\n-Provides subsampled file i/o for the visualization toolkit.\n-boundarywriter.hh\n-vtkwriter.hh\n-Provides file i/o for the visualization toolkit.\n-volumewriter.hh\n+ 5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH\n+ 6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH\n+ 7\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12\n+ 13#include \n+ 14\n+ 15namespace Dune\n+ 16{\n+ 17\n+ 18 class DGFPrintInfo;\n+ 19\n+22 struct DGFBoundaryParameter\n+ 23 {\n+25 typedef std::string type;\n+ 26\n+28 static const type &defaultValue ()\n+ 29 {\n+ 30 static type value;\n+ 31 return value;\n+ 32 }\n+ 33\n+35 static type convert ( const std::string & parameter )\n+ 36 {\n+ 37 return parameter;\n+ 38 }\n+ 39\n+41 static const char delimiter = ':';\n+ 42 };\n+ 43\n+46 class DuneGridFormatParser\n+ 47 {\n+ 48 public:\n+49 typedef enum {Simplex,Cube,General} element_t;\n+ 50\n+51 typedef enum {counterclockwise=1,clockwise=-1} orientation_t;\n+ 52\n+ 54 DuneGridFormatParser ( int rank, int size );\n+ 55\n+ 66 static bool isDuneGridFormat ( std::istream &input );\n+ 67\n+ 77 static bool isDuneGridFormat ( const std::string &filename );\n+ 78\n+ 91 bool readDuneGrid( std::istream &input, int dimG, int dimW );\n+ 92\n+ 94 void writeTetgenPoly ( const std::string &, std::string &, std::string & );\n+ 95\n+ 96 void writeTetgenPoly ( std::ostream & out, const bool writeSegments = true\n+);\n+ 97\n+ 98 protected:\n+ 99 void generateBoundaries ( std::istream &, bool );\n+ 100\n+ 101 // call to tetgen/triangle\n+ 102 void generateSimplexGrid ( std::istream & );\n+ 103 void readTetgenTriangle ( const std::string & );\n+ 104\n+ 105 // helper methods\n+ 106 void removeCopies ();\n+ 107\n+ 108 void setOrientation ( int use1, int use2,\n+ 109 orientation_t orientation=counterclockwise );\n+ 110\n+ 111 void setRefinement ( int use1, int use2, int is1=-1, int is2=-1 );\n+ 112\n+ 113 double testTriang ( int snr );\n+ 114\n+ 115 std::vector< double > & getElParam ( int i, std::vector< double > & coord\n+);\n+ 116\n+ 117 std::vector< double > & getVtxParam ( int i, std::vector< double > & coord\n+);\n+ 118\n+ 119 static std::string temporaryFileName ();\n+ 120\n+ 121 // dimension of world and problem: set through the readDuneGrid() method\n+122 int dimw, dimgrid;\n+ 123\n+ 124 // vector of vertex coordinates\n+125 std::vector < std::vector < double > > vtx;\n+ 126\n+127 int nofvtx;\n+ 128\n+129 int vtxoffset;\n+ 130\n+131 double minVertexDistance; // min. L^1 distance of distinct points\n+ 132\n+ 133 // vector of elements\n+134 std :: vector< std :: vector< unsigned int > > elements;\n+ 135\n+136 int nofelements;\n+ 137\n+ 138 // vector of boundary segments + identifier\n+139 std::vector < std::vector < int > > bound;\n+ 140\n+141 int nofbound;\n+ 142\n+ 143 // map to generate and find boundary segments\n+144 typedef DGFBoundaryParameter::type BoundaryParameter;\n+145 typedef std::pair < int, BoundaryParameter > BndParam;\n+146 typedef std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t;\n+147 facemap_t facemap;\n+ 148\n+ 149 // true if parameters on a boundary found\n+150 bool haveBndParameters;\n+ 151\n+ 152 // set by generator depending on element type wanted\n+153 element_t element;\n+ 154\n+ 155 // set by the readDuneGrid method depending\n+ 156 // on what type the elements were generated\n+157 bool simplexgrid;\n+ 158\n+ 159 // true if grid is generated using the intervall Block\n+160 bool cube2simplex;\n+ 161\n+ 162 // parameters on elements\n+163 int nofvtxparams,nofelparams;\n+ 164\n+165 std::vector< std::vector< double > > vtxParams,elParams;\n+ 166\n+ 167 // write information about generation process\n+168 DGFPrintInfo * info;\n+ 169\n+170 std::vector < double > emptyParam_;\n+ 171\n+ 172\n+ 173 private:\n+ 174 int rank_;\n+ 175 int size_;\n+ 176\n+ 177 template< class GridType >\n+178 friend struct DGFGridFactory;\n+ 179\n+ 180 template< class GridType >\n+181 friend struct DGFBaseFactory;\n+ 182\n+ 183 };\n+ 184\n+ 185} // end namespace Dune\n+ 186\n+ 187#endif\n+entitykey.hh\n+Dune\n+Include standard header files.\n+Definition: agrid.hh:60\n+Dune::DGFGridFactory\n+Definition: dgfgridfactory.hh:38\n+Dune::DGFPrintInfo\n+Definition: io/file/dgfparser/dgfparser.cc:26\n+Dune::DGFBoundaryParameter\n+Contains types for additional features.\n+Definition: parser.hh:23\n+Dune::DGFBoundaryParameter::defaultValue\n+static const type & defaultValue()\n+default constructor\n+Definition: parser.hh:28\n+Dune::DGFBoundaryParameter::delimiter\n+static const char delimiter\n+delimiter\n+Definition: parser.hh:41\n+Dune::DGFBoundaryParameter::convert\n+static type convert(const std::string ¶meter)\n+copy from string\n+Definition: parser.hh:35\n+Dune::DGFBoundaryParameter::type\n+std::string type\n+type of additional boundary parameters\n+Definition: parser.hh:25\n+Dune::DuneGridFormatParser\n+The DuneGridFormatParser class: reads a DGF file and stores build information\n+in vector structures us...\n+Definition: parser.hh:47\n+Dune::DuneGridFormatParser::nofvtxparams\n+int nofvtxparams\n+Definition: parser.hh:163\n+Dune::DuneGridFormatParser::nofbound\n+int nofbound\n+Definition: parser.hh:141\n+Dune::DuneGridFormatParser::BndParam\n+std::pair< int, BoundaryParameter > BndParam\n+Definition: parser.hh:145\n+Dune::DuneGridFormatParser::readTetgenTriangle\n+void readTetgenTriangle(const std::string &)\n+Definition: io/file/dgfparser/dgfparser.cc:795\n+Dune::DuneGridFormatParser::isDuneGridFormat\n+static bool isDuneGridFormat(std::istream &input)\n+check whether a stream is in DUNE grid format\n+Definition: io/file/dgfparser/dgfparser.cc:271\n+Dune::DuneGridFormatParser::setOrientation\n+void setOrientation(int use1, int use2, orientation_t\n+orientation=counterclockwise)\n+Definition: io/file/dgfparser/dgfparser.cc:910\n+Dune::DuneGridFormatParser::vtxParams\n+std::vector< std::vector< double > > vtxParams\n+Definition: parser.hh:165\n+Dune::DuneGridFormatParser::setRefinement\n+void setRefinement(int use1, int use2, int is1=-1, int is2=-1)\n+Definition: io/file/dgfparser/dgfparser.cc:989\n+Dune::DuneGridFormatParser::DGFBaseFactory\n+friend struct DGFBaseFactory\n+Definition: parser.hh:181\n+Dune::DuneGridFormatParser::temporaryFileName\n+static std::string temporaryFileName()\n+Definition: io/file/dgfparser/dgfparser.cc:1096\n+Dune::DuneGridFormatParser::DuneGridFormatParser\n+DuneGridFormatParser(int rank, int size)\n+constructor\n+Definition: io/file/dgfparser/dgfparser.cc:97\n+Dune::DuneGridFormatParser::removeCopies\n+void removeCopies()\n+Definition: io/file/dgfparser/dgfparser.cc:464\n+Dune::DuneGridFormatParser::dimw\n+int dimw\n+Definition: parser.hh:122\n+Dune::DuneGridFormatParser::dimgrid\n+int dimgrid\n+Definition: parser.hh:122\n+Dune::DuneGridFormatParser::element\n+element_t element\n+Definition: parser.hh:153\n+Dune::DuneGridFormatParser::BoundaryParameter\n+DGFBoundaryParameter::type BoundaryParameter\n+Definition: parser.hh:144\n+Dune::DuneGridFormatParser::nofelements\n+int nofelements\n+Definition: parser.hh:136\n+Dune::DuneGridFormatParser::orientation_t\n+orientation_t\n+Definition: parser.hh:51\n+Dune::DuneGridFormatParser::clockwise\n+@ clockwise\n+Definition: parser.hh:51\n+Dune::DuneGridFormatParser::counterclockwise\n+@ counterclockwise\n+Definition: parser.hh:51\n+Dune::DuneGridFormatParser::testTriang\n+double testTriang(int snr)\n+Definition: io/file/dgfparser/dgfparser.cc:1050\n+Dune::DuneGridFormatParser::minVertexDistance\n+double minVertexDistance\n+Definition: parser.hh:131\n+Dune::DuneGridFormatParser::simplexgrid\n+bool simplexgrid\n+Definition: parser.hh:157\n+Dune::DuneGridFormatParser::facemap_t\n+std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t\n+Definition: parser.hh:146\n+Dune::DuneGridFormatParser::bound\n+std::vector< std::vector< int > > bound\n+Definition: parser.hh:139\n+Dune::DuneGridFormatParser::generateSimplexGrid\n+void generateSimplexGrid(std::istream &)\n+Definition: io/file/dgfparser/dgfparser.cc:624\n+Dune::DuneGridFormatParser::emptyParam_\n+std::vector< double > emptyParam_\n+Definition: parser.hh:170\n+Dune::DuneGridFormatParser::nofelparams\n+int nofelparams\n+Definition: parser.hh:163\n+Dune::DuneGridFormatParser::elParams\n+std::vector< std::vector< double > > elParams\n+Definition: parser.hh:165\n+Dune::DuneGridFormatParser::facemap\n+facemap_t facemap\n+Definition: parser.hh:147\n+Dune::DuneGridFormatParser::element_t\n+element_t\n+Definition: parser.hh:49\n+Dune::DuneGridFormatParser::General\n+@ General\n+Definition: parser.hh:49\n+Dune::DuneGridFormatParser::Cube\n+@ Cube\n+Definition: parser.hh:49\n+Dune::DuneGridFormatParser::Simplex\n+@ Simplex\n+Definition: parser.hh:49\n+Dune::DuneGridFormatParser::cube2simplex\n+bool cube2simplex\n+Definition: parser.hh:160\n+Dune::DuneGridFormatParser::nofvtx\n+int nofvtx\n+Definition: parser.hh:127\n+Dune::DuneGridFormatParser::writeTetgenPoly\n+void writeTetgenPoly(const std::string &, std::string &, std::string &)\n+method to write in Tetgen/Triangle Poly Format\n+Definition: io/file/dgfparser/dgfparser.cc:123\n+Dune::DuneGridFormatParser::vtx\n+std::vector< std::vector< double > > vtx\n+Definition: parser.hh:125\n+Dune::DuneGridFormatParser::vtxoffset\n+int vtxoffset\n+Definition: parser.hh:129\n+Dune::DuneGridFormatParser::readDuneGrid\n+bool readDuneGrid(std::istream &input, int dimG, int dimW)\n+parse dune grid format from stream\n+Definition: io/file/dgfparser/dgfparser.cc:298\n+Dune::DuneGridFormatParser::elements\n+std ::vector< std ::vector< unsigned int > > elements\n+Definition: parser.hh:134\n+Dune::DuneGridFormatParser::haveBndParameters\n+bool haveBndParameters\n+Definition: parser.hh:150\n+Dune::DuneGridFormatParser::info\n+DGFPrintInfo * info\n+Definition: parser.hh:168\n+Dune::DuneGridFormatParser::generateBoundaries\n+void generateBoundaries(std::istream &, bool)\n+Definition: io/file/dgfparser/dgfparser.cc:502\n+Dune::DuneGridFormatParser::getVtxParam\n+std::vector< double > & getVtxParam(int i, std::vector< double > &coord)\n+Definition: io/file/dgfparser/dgfparser.cc:1086\n+Dune::DuneGridFormatParser::getElParam\n+std::vector< double > & getElParam(int i, std::vector< double > &coord)\n+Definition: io/file/dgfparser/dgfparser.cc:1070\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00968.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00968.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: starcdreader.hh File Reference\n+dune-grid: dgfyasp.hh File Reference\n \n \n \n \n \n \n \n@@ -58,44 +58,54 @@\n \n \n \n \n \n
    \n \n-
    starcdreader.hh File Reference
    \n+
    dgfyasp.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/exceptions.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/gridfactory.hh>
    \n-#include <iostream>
    \n-#include <fstream>
    \n-#include <memory>
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::StarCDReader< GridType >
     File reader for the Star-CD format. More...
    class  Dune::dgf::YaspGridParameterBlock
     Grid parameters for YaspGrid. More...
     
    struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >
     Grid factory for YaspGrid with equidistant coordinates. More...
     
    struct  Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >
     Grid factory for YaspGrid with equidistant coordinates. More...
     
    class  Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >
     Placeholder for grid factory for YaspGrid with tensor product coordinates. More...
     
    struct  Dune::DGFGridInfo< YaspGrid< dim, Coordinates > >
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::dgf
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,27 +6,42 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n+ * dgfparser\n Classes | Namespaces\n-starcdreader.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+dgfyasp.hh File Reference\n+#include \n+#include \n+#include \"dgfparser.hh\"\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::StarCDReader<_GridType_>\n-\u00a0 File reader for the Star-CD format. More...\n+ class \u00a0Dune::dgf::YaspGridParameterBlock\n+\u00a0 Grid parameters for YaspGrid. More...\n+\u00a0\n+struct \u00a0Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,\n+ dim_>_>_>\n+\u00a0 Grid factory for YaspGrid with equidistant coordinates. More...\n+\u00a0\n+struct \u00a0Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<\n+ ctype,_dim_>_>_>\n+\u00a0 Grid factory for YaspGrid with equidistant coordinates. More...\n+\u00a0\n+ class \u00a0Dune::DGFGridFactory<_Dune::YaspGrid<_dim,_Dune::\n+ TensorProductCoordinates<_ctype,_dim_>_>_>\n+\u00a0 Placeholder for grid factory for YaspGrid with tensor product\n+ coordinates. More...\n+\u00a0\n+struct \u00a0Dune::DGFGridInfo<_YaspGrid<_dim,_Coordinates_>_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::dgf\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00968_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: starcdreader.hh Source File\n+dune-grid: dgfyasp.hh Source File\n \n \n \n \n \n \n \n@@ -58,180 +58,564 @@\n \n
    \n \n \n \n
    \n-
    starcdreader.hh
    \n+
    dgfyasp.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_STARCD_READER_HH
    \n-
    6#define DUNE_STARCD_READER_HH
    \n+
    5#ifndef DUNE_DGFPARSERYASP_HH
    \n+
    6#define DUNE_DGFPARSERYASP_HH
    \n
    7
    \n-
    8#include <dune/common/exceptions.hh>
    \n-
    9
    \n-
    10#include <dune/geometry/type.hh>
    \n-\n-
    12#include <iostream>
    \n-
    13#include <fstream>
    \n-
    14#include <memory>
    \n-
    15
    \n-
    16namespace Dune {
    \n+\n+\n+
    10#include "dgfparser.hh"
    \n+
    11
    \n+
    12namespace Dune
    \n+
    13{
    \n+
    14
    \n+
    15 // External Forward Declarations
    \n+
    16 // -----------------------------
    \n
    17
    \n-
    51 template <class GridType>
    \n-\n-
    53
    \n-
    54 public:
    \n-
    55
    \n-
    65 static std::unique_ptr<GridType> read(const std::string& fileName, bool verbose = true)
    \n-
    66 {
    \n-
    67 // extract the grid dimension
    \n-
    68 const int dim = GridType::dimension;
    \n-
    69
    \n-
    70 // currently only dim = 3 is implemented
    \n-
    71 if (dim != 3)
    \n-
    72 DUNE_THROW(Dune::NotImplemented,
    \n-
    73 "Reading Star-CD format is not implemented for dimension " << dim);
    \n-
    74
    \n-
    75 // set up the grid factory
    \n-\n-
    77
    \n-
    78 // set the name of the vertex file
    \n-
    79 std::string vertexFileName = fileName + ".vrt";
    \n+
    18 template< class GridImp, class IntersectionImp >
    \n+
    19 class Intersection;
    \n+
    20
    \n+
    21
    \n+
    22 namespace dgf
    \n+
    23 {
    \n+
    24
    \n+\n+
    39 : public GridParameterBlock
    \n+
    40 {
    \n+
    41 protected:
    \n+
    42 int _overlap; // overlap for YaspGrid
    \n+
    43
    \n+
    44 public:
    \n+
    46 YaspGridParameterBlock( std::istream &in )
    \n+
    47 : GridParameterBlock( in ),
    \n+
    48 _overlap( 0 ) // default value
    \n+
    49 {
    \n+
    50 // check overlap
    \n+
    51 if( findtoken( "overlap" ) )
    \n+
    52 {
    \n+
    53 int x;
    \n+
    54 if( getnextentry(x) ) _overlap = x;
    \n+
    55 else
    \n+
    56 {
    \n+
    57 dwarn << "GridParameterBlock: found keyword `overlap' but no value, defaulting to `" << _overlap <<"' !\\n";
    \n+
    58 }
    \n+
    59
    \n+
    60 if (_overlap < 0)
    \n+
    61 {
    \n+
    62 DUNE_THROW(DGFException,"Negative overlap specified!");
    \n+
    63 }
    \n+
    64 }
    \n+
    65 else
    \n+
    66 {
    \n+
    67 dwarn << "YaspGridParameterBlock: Parameter 'overlap' not specified, "
    \n+
    68 << "defaulting to '" << _overlap << "'." << std::endl;
    \n+
    69 }
    \n+
    70
    \n+
    71 }
    \n+
    72
    \n+
    74 int overlap () const
    \n+
    75 {
    \n+
    76 return _overlap;
    \n+
    77 }
    \n+
    78
    \n+
    79 };
    \n
    80
    \n-
    81 // set the vertex input stream
    \n-
    82 std::ifstream vertexFile(vertexFileName.c_str());
    \n-
    83 if (!vertexFile)
    \n-
    84 DUNE_THROW(Dune::IOError, "Could not open " << vertexFileName);
    \n-
    85
    \n-
    86 // read the vertices
    \n-
    87 int dummyIdx;
    \n-
    88 int numberOfVertices = 0;
    \n-
    89 while (vertexFile >> dummyIdx) {
    \n-
    90 numberOfVertices++;
    \n-
    91
    \n-
    92 Dune::FieldVector<double,dim> position;
    \n-
    93
    \n-
    94 for (int k = 0; k < dim; k++)
    \n-
    95 vertexFile >> position[k];
    \n+
    81 }
    \n+
    82
    \n+
    86 template <typename ctype, int dim>
    \n+
    87 struct DGFGridFactory< YaspGrid<dim, EquidistantCoordinates<ctype, dim> > >
    \n+
    88 {
    \n+\n+
    90 const static int dimension = Grid::dimension;
    \n+
    91 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n+
    92
    \n+
    93 private:
    \n+
    94 typedef FieldVector< ctype, dimension > Point;
    \n+\n
    96
    \n-
    97 factory.insertVertex(position);
    \n-
    98 }
    \n-
    99 if (verbose)
    \n-
    100 std::cout << numberOfVertices << " vertices read." << std::endl;
    \n-
    101
    \n-
    102 // set the name of the element file
    \n-
    103 std::string elementFileName = fileName + ".cel";
    \n-
    104
    \n-
    105 // set the element input stream
    \n-
    106 std::ifstream elementFile(elementFileName.c_str());
    \n-
    107 if (!elementFile)
    \n-
    108 DUNE_THROW(Dune::IOError, "Could not open " << elementFileName);
    \n-
    109
    \n-
    110 // read the elements
    \n-
    111 int numberOfElements = 0;
    \n-
    112 int numberOfSimplices = 0;
    \n-
    113 int numberOfPyramids = 0;
    \n-
    114 int numberOfPrisms = 0;
    \n-
    115 int numberOfCubes = 0;;
    \n-
    116 int maxNumberOfVertices = (int)pow(2, dim);
    \n-
    117 int isVolume = 1;
    \n-
    118 while (elementFile >> dummyIdx) {
    \n-
    119 std::vector<unsigned int> vertices(maxNumberOfVertices);
    \n-
    120 for (int k = 0; k < maxNumberOfVertices; k++)
    \n-
    121 elementFile >> vertices[k];
    \n+
    97 public:
    \n+
    98 explicit DGFGridFactory ( std::istream &input,
    \n+
    99 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n+
    100 {
    \n+
    101 generate( input, comm );
    \n+
    102 }
    \n+
    103
    \n+
    104 explicit DGFGridFactory ( const std::string &filename,
    \n+
    105 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n+
    106 {
    \n+
    107 std::ifstream input( filename.c_str() );
    \n+
    108 if( !input )
    \n+
    109 DUNE_THROW( DGFException, "Error: Macrofile '" << filename << "' not found" );
    \n+
    110 generate( input, comm );
    \n+
    111 }
    \n+
    112
    \n+\n+
    114 {
    \n+
    115 delete boundaryDomainBlock_;
    \n+
    116 }
    \n+
    117
    \n+
    118 Grid *grid() const
    \n+
    119 {
    \n+
    120 return grid_;
    \n+
    121 }
    \n
    122
    \n-
    123 int boundaryId;
    \n-
    124 elementFile >> boundaryId;
    \n-
    125
    \n-
    126 int volumeOrSurface[2];
    \n-
    127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1];
    \n+
    123 template <class Intersection>
    \n+
    124 bool wasInserted(const Intersection &intersection) const
    \n+
    125 {
    \n+
    126 return false;
    \n+
    127 }
    \n
    128
    \n-
    129 if (volumeOrSurface[0] == isVolume) {
    \n-
    130 numberOfElements++;
    \n-
    131
    \n-
    132 if (vertices[2] == vertices[3]) { // simplex or prism
    \n-
    133 if (vertices[4] == vertices[5]) { // simplex
    \n-
    134 numberOfSimplices++;
    \n-
    135 std::vector<unsigned int> simplexVertices(4);
    \n-
    136 for (int k = 0; k < 3; k++)
    \n-
    137 simplexVertices[k] = vertices[k] - 1;
    \n-
    138 simplexVertices[3] = vertices[4] - 1;
    \n-
    139 factory.insertElement(Dune::GeometryTypes::tetrahedron, simplexVertices);
    \n-
    140 }
    \n-
    141 else { // prism
    \n-
    142 numberOfPrisms++;
    \n-
    143 std::vector<unsigned int> prismVertices(6);
    \n-
    144 for (int k = 0; k < 3; k++)
    \n-
    145 prismVertices[k] = vertices[k] - 1;
    \n-
    146 for (int k = 3; k < 6; k++)
    \n-
    147 prismVertices[k] = vertices[k+1] - 1;
    \n-
    148 factory.insertElement(Dune::GeometryTypes::prism, prismVertices);
    \n-
    149 }
    \n-
    150 }
    \n-
    151 else { // cube or pyramid
    \n-
    152 if (vertices[4] == vertices[5]) { // pyramid
    \n-
    153 numberOfPyramids++;
    \n-
    154 std::vector<unsigned int> pyramidVertices(5);
    \n-
    155 for (int k = 0; k < 5; k++)
    \n-
    156 pyramidVertices[k] = vertices[k] - 1;
    \n-
    157 factory.insertElement(Dune::GeometryTypes::pyramid, pyramidVertices);
    \n-
    158 }
    \n-
    159 else { // cube
    \n-
    160 numberOfCubes++;
    \n-
    161 std::vector<unsigned int> cubeVertices(8);
    \n-
    162 for (int k = 0; k < 8; k++)
    \n-
    163 cubeVertices[k] = vertices[k] - 1;
    \n-
    164 std::swap(cubeVertices[2], cubeVertices[3]);
    \n-
    165 std::swap(cubeVertices[6], cubeVertices[7]);
    \n-
    166 factory.insertElement(Dune::GeometryTypes::hexahedron, cubeVertices);
    \n-
    167 }
    \n-
    168 }
    \n-
    169 }
    \n-
    170 }
    \n-
    171 if (verbose)
    \n-
    172 std::cout << numberOfElements << " elements read: "
    \n-
    173 << numberOfSimplices << " simplices, " << numberOfPyramids << " pyramids, "
    \n-
    174 << numberOfPrisms << " prisms, " << numberOfCubes << " cubes." << std::endl;
    \n+
    129 template <class Intersection>
    \n+
    130 int boundaryId(const Intersection &intersection) const
    \n+
    131 {
    \n+
    132 if( boundaryDomainBlock_->isactive() )
    \n+
    133 {
    \n+
    134 std::vector< Point > corners;
    \n+
    135 getCorners( intersection.geometry(), corners );
    \n+
    136 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n+
    137 if( data )
    \n+
    138 return data->id();
    \n+
    139 else
    \n+
    140 return intersection.indexInInside();
    \n+
    141 }
    \n+
    142 else
    \n+
    143 return intersection.indexInInside();
    \n+
    144 }
    \n+
    145
    \n+
    146 template< int codim >
    \n+
    147 int numParameters () const
    \n+
    148 {
    \n+
    149 return 0;
    \n+
    150 }
    \n+
    151
    \n+
    152 // return true if boundary parameters found
    \n+\n+
    154 {
    \n+
    155 return boundaryDomainBlock_->hasParameter();
    \n+
    156 }
    \n+
    157
    \n+
    158 template< class GG, class II >
    \n+
    159 const typename DGFBoundaryParameter::type &
    \n+
    160 boundaryParameter ( const Intersection< GG, II > & intersection ) const
    \n+
    161 {
    \n+\n+
    163 {
    \n+
    164 std::vector< Point > corners;
    \n+
    165 getCorners( intersection.geometry(), corners );
    \n+
    166 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n+
    167 if( data )
    \n+
    168 return data->parameter();
    \n+
    169 else
    \n+\n+
    171 }
    \n+
    172 else
    \n+\n+
    174 }
    \n
    175
    \n-
    176 // finish off the construction of the grid object
    \n-
    177 if (verbose)
    \n-
    178 std::cout << "Starting createGrid() ... " << std::flush;
    \n-
    179
    \n-
    180 return factory.createGrid();
    \n+
    176 template< class Entity >
    \n+
    177 std::vector<double> &parameter ( const Entity & )
    \n+
    178 {
    \n+
    179 return emptyParam;
    \n+
    180 }
    \n
    181
    \n-
    182 }
    \n-
    183
    \n-
    184 };
    \n-
    185
    \n-
    186}
    \n-
    187
    \n-
    188#endif
    \n-
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n+
    182 private:
    \n+
    183 void generate( std::istream &gridin, MPICommunicatorType comm );
    \n+
    184
    \n+
    185 template< class Geometry >
    \n+
    186 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
    \n+
    187 {
    \n+
    188 corners.resize( geometry.corners() );
    \n+
    189 for( int i = 0; i < geometry.corners(); ++i )
    \n+
    190 {
    \n+
    191 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
    \n+
    192 for( int j = 0; j < dimension; ++j )
    \n+
    193 corners[ i ][ j ] = corner[ j ];
    \n+
    194 }
    \n+
    195 }
    \n+
    196
    \n+
    197 Grid *grid_;
    \n+
    198 dgf::BoundaryDomBlock *boundaryDomainBlock_;
    \n+
    199 std::vector<double> emptyParam;
    \n+
    200 };
    \n+
    201
    \n+
    202 // generate YaspGrid from the provided DGF
    \n+
    203 template< typename ctype, int dim >
    \n+
    204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates<ctype, dim> > >
    \n+
    205 ::generate ( std::istream &gridin, MPICommunicatorType comm )
    \n+
    206 {
    \n+
    207 using std::abs;
    \n+
    208 dgf::IntervalBlock intervalBlock( gridin );
    \n+
    209
    \n+
    210 if( !intervalBlock.isactive() )
    \n+
    211 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
    \n+
    212
    \n+
    213 if( intervalBlock.numIntervals() != 1 )
    \n+
    214 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
    \n+
    215
    \n+
    216 if( intervalBlock.dimw() != dim )
    \n+
    217 {
    \n+
    218 DUNE_THROW( DGFException,
    \n+
    219 "Cannot read an interval of dimension " << intervalBlock.dimw()
    \n+
    220 << " into a YaspGrid< " << dim << " >." );
    \n+
    221 }
    \n+
    222
    \n+
    223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
    \n+
    224
    \n+
    225 FieldVector<ctype, dim> lang;
    \n+
    226 std::array<int,dim> anz;
    \n+
    227 for( int i = 0; i < dim; ++i )
    \n+
    228 {
    \n+
    229 // check that start point is 0.0
    \n+
    230 if( abs( interval.p[ 0 ][ i ] ) > 1e-10 )
    \n+
    231 {
    \n+
    232 DUNE_THROW( DGFException,
    \n+
    233 "YaspGrid cannot handle grids with non-zero left lower corner." );
    \n+
    234 }
    \n+
    235
    \n+
    236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ];
    \n+
    237 anz[ i ] = interval.n[ i ];
    \n+
    238 }
    \n+
    239
    \n+\n+
    241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
    \n+
    242 std::bitset< dim > per;
    \n+
    243 const int numTrafos = trafoBlock.numTransformations();
    \n+
    244 for( int k = 0; k < numTrafos; ++k )
    \n+
    245 {
    \n+
    246 const Transformation &trafo = trafoBlock.transformation( k );
    \n+
    247
    \n+
    248 bool identity = true;
    \n+
    249 for( int i = 0; i < dim; ++i )
    \n+
    250 for( int j = 0; j < dim; ++j )
    \n+
    251 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
    \n+
    252 if( !identity )
    \n+
    253 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
    \n+
    254
    \n+
    255 int numDirs = 0;
    \n+
    256 int dir = -1;
    \n+
    257 for( int i = 0; i < dim; ++i )
    \n+
    258 {
    \n+
    259 if( abs( trafo.shift[ i ] ) < 1e-10 )
    \n+
    260 continue;
    \n+
    261 dir = i;
    \n+
    262 ++numDirs;
    \n+
    263 }
    \n+
    264 if( (numDirs != 1) || (abs( abs( trafo.shift[ dir ] ) - lang[ dir ] ) >= 1e-10) )
    \n+
    265 {
    \n+
    266 std::cerr << "Tranformation '" << trafo
    \n+
    267 << "' does not map boundaries on boundaries." << std::endl;
    \n+
    268 }
    \n+
    269 else
    \n+
    270 per[ dir ] = true;
    \n+
    271 }
    \n+
    272
    \n+
    273 // get grid parameters
    \n+
    274 dgf::YaspGridParameterBlock grdParam( gridin );
    \n+
    275
    \n+
    276 grid_ = new YaspGrid< dim , EquidistantCoordinates<ctype, dim> >( lang, anz, per, grdParam.overlap(), comm );
    \n+
    277
    \n+
    278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
    \n+
    279 }
    \n+
    280
    \n+
    284 template <typename ctype, int dim>
    \n+\n+
    286 {
    \n+\n+
    288 const static int dimension = Grid::dimension;
    \n+
    289 typedef MPIHelper::MPICommunicator MPICommunicatorType;
    \n+
    290
    \n+
    291 private:
    \n+
    292 typedef FieldVector< ctype, dimension > Point;
    \n+\n+
    294
    \n+
    295 public:
    \n+
    296 explicit DGFGridFactory ( std::istream &input,
    \n+
    297 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n+
    298 {
    \n+
    299 generate( input, comm );
    \n+
    300 }
    \n+
    301
    \n+
    302 explicit DGFGridFactory ( const std::string &filename,
    \n+
    303 MPICommunicatorType comm = MPIHelper::getCommunicator() )
    \n+
    304 {
    \n+
    305 std::ifstream input( filename.c_str() );
    \n+
    306 generate( input, comm );
    \n+
    307 }
    \n+
    308
    \n+\n+
    310 {
    \n+
    311 delete boundaryDomainBlock_;
    \n+
    312 }
    \n+
    313
    \n+
    314 Grid *grid() const
    \n+
    315 {
    \n+
    316 return grid_;
    \n+
    317 }
    \n+
    318
    \n+
    319 template <class Intersection>
    \n+
    320 bool wasInserted(const Intersection &intersection) const
    \n+
    321 {
    \n+
    322 return false;
    \n+
    323 }
    \n+
    324
    \n+
    325 template <class Intersection>
    \n+
    326 int boundaryId(const Intersection &intersection) const
    \n+
    327 {
    \n+
    328 if( boundaryDomainBlock_->isactive() )
    \n+
    329 {
    \n+
    330 std::vector< Point > corners;
    \n+
    331 getCorners( intersection.geometry(), corners );
    \n+
    332 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n+
    333 if( data )
    \n+
    334 return data->id();
    \n+
    335 else
    \n+
    336 return intersection.indexInInside();
    \n+
    337 }
    \n+
    338 else
    \n+
    339 return intersection.indexInInside();
    \n+
    340 }
    \n+
    341
    \n+
    342 template< int codim >
    \n+
    343 int numParameters () const
    \n+
    344 {
    \n+
    345 return 0;
    \n+
    346 }
    \n+
    347
    \n+
    348 // return true if boundary parameters found
    \n+\n+
    350 {
    \n+
    351 return boundaryDomainBlock_->hasParameter();
    \n+
    352 }
    \n+
    353
    \n+
    354 template< class GG, class II >
    \n+
    355 const typename DGFBoundaryParameter::type &
    \n+
    356 boundaryParameter ( const Intersection< GG, II > & intersection ) const
    \n+
    357 {
    \n+\n+
    359 {
    \n+
    360 std::vector< Point > corners;
    \n+
    361 getCorners( intersection.geometry(), corners );
    \n+
    362 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );
    \n+
    363 if( data )
    \n+
    364 return data->parameter();
    \n+
    365 else
    \n+\n+
    367 }
    \n+
    368 else
    \n+\n+
    370 }
    \n+
    371
    \n+
    372 template< class Entity >
    \n+
    373 std::vector<double> &parameter ( [[maybe_unused]] const Entity &entity )
    \n+
    374 {
    \n+
    375 return emptyParam;
    \n+
    376 }
    \n+
    377
    \n+
    378 private:
    \n+
    379 void generate( std::istream &gridin, MPICommunicatorType comm );
    \n+
    380
    \n+
    381 template< class Geometry >
    \n+
    382 static void getCorners ( const Geometry &geometry, std::vector< Point > &corners )
    \n+
    383 {
    \n+
    384 corners.resize( geometry.corners() );
    \n+
    385 for( int i = 0; i < geometry.corners(); ++i )
    \n+
    386 {
    \n+
    387 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );
    \n+
    388 for( int j = 0; j < dimension; ++j )
    \n+
    389 corners[ i ][ j ] = corner[ j ];
    \n+
    390 }
    \n+
    391 }
    \n+
    392
    \n+
    393 Grid *grid_;
    \n+
    394 dgf::BoundaryDomBlock *boundaryDomainBlock_;
    \n+
    395 std::vector<double> emptyParam;
    \n+
    396 };
    \n+
    397
    \n+
    398 // generate YaspGrid from the provided DGF
    \n+
    399 template< typename ctype, int dim >
    \n+
    400 inline void DGFGridFactory< YaspGrid<dim, EquidistantOffsetCoordinates<ctype, dim> > >
    \n+
    401 ::generate ( std::istream &gridin, MPICommunicatorType comm )
    \n+
    402 {
    \n+
    403 using std::abs;
    \n+
    404 dgf::IntervalBlock intervalBlock( gridin );
    \n+
    405
    \n+
    406 if( !intervalBlock.isactive() )
    \n+
    407 DUNE_THROW( DGFException, "YaspGrid can only be created from an interval block." );
    \n+
    408
    \n+
    409 if( intervalBlock.numIntervals() != 1 )
    \n+
    410 DUNE_THROW( DGFException, "YaspGrid can only handle 1 interval block." );
    \n+
    411
    \n+
    412 if( intervalBlock.dimw() != dim )
    \n+
    413 {
    \n+
    414 DUNE_THROW( DGFException,
    \n+
    415 "Cannot read an interval of dimension "
    \n+
    416 << intervalBlock.dimw()
    \n+
    417 << " into a YaspGrid< " << dim << " >." );
    \n+
    418 }
    \n+
    419
    \n+
    420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );
    \n+
    421
    \n+
    422 FieldVector<ctype, dim> lower;
    \n+
    423 FieldVector<ctype, dim> upper;
    \n+
    424 std::array<int,dim> anz;
    \n+
    425 for( int i = 0; i < dim; ++i )
    \n+
    426 {
    \n+
    427 lower[ i ] = interval.p[ 0 ][ i ];
    \n+
    428 upper[ i ] = interval.p[ 1 ][ i ];
    \n+
    429 anz[ i ] = interval.n[ i ];
    \n+
    430 }
    \n+
    431
    \n+\n+
    433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );
    \n+
    434 std::bitset< dim > periodic;
    \n+
    435 const int numTrafos = trafoBlock.numTransformations();
    \n+
    436 for( int k = 0; k < numTrafos; ++k )
    \n+
    437 {
    \n+
    438 const Transformation &trafo = trafoBlock.transformation( k );
    \n+
    439
    \n+
    440 bool identity = true;
    \n+
    441 for( int i = 0; i < dim; ++i )
    \n+
    442 for( int j = 0; j < dim; ++j )
    \n+
    443 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);
    \n+
    444 if( !identity )
    \n+
    445 DUNE_THROW( DGFException, "YaspGrid can only handle shifts as periodic face transformations." );
    \n+
    446
    \n+
    447 int numDirs = 0;
    \n+
    448 int dir = -1;
    \n+
    449 for( int currentDir = 0; currentDir < dim; ++currentDir )
    \n+
    450 {
    \n+
    451 if( abs( trafo.shift[ currentDir ] ) > 1e-10 )
    \n+
    452 {
    \n+
    453 dir = currentDir;
    \n+
    454 ++numDirs;
    \n+
    455 }
    \n+
    456 }
    \n+
    457 if ( (numDirs != 1)
    \n+
    458 || (abs( abs( trafo.shift[ dir ] ) - abs( upper[ dir ] - lower[ dir ] ) ) >= 1e-10) )
    \n+
    459 {
    \n+
    460 std::cerr << "Tranformation '" << trafo
    \n+
    461 << "' does not map boundaries on boundaries." << std::endl;
    \n+
    462 }
    \n+
    463 else
    \n+
    464 {
    \n+
    465 periodic[ dir ] = true;
    \n+
    466 }
    \n+
    467 }
    \n+
    468
    \n+
    469 // get grid parameters
    \n+
    470 dgf::YaspGridParameterBlock grdParam( gridin );
    \n+
    471
    \n+
    472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates<ctype, dim> >
    \n+
    473 ( lower, upper, anz, periodic, grdParam.overlap(), comm );
    \n+
    474
    \n+
    475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );
    \n+
    476 }
    \n+
    477
    \n+
    483 template< class ctype, int dim >
    \n+
    484 class DGFGridFactory< Dune::YaspGrid<dim, Dune::TensorProductCoordinates<ctype, dim> > >
    \n+
    485 {
    \n+\n+
    487 public:
    \n+
    488 template< typename In >
    \n+
    489 DGFGridFactory ( const In & ) {}
    \n+\n+
    491 {
    \n+
    492 throw std::invalid_argument( "Tensor product coordinates for YaspGrid are currently not supported via the DGFGridFactory" );
    \n+
    493 }
    \n+
    494 };
    \n+
    495
    \n+
    496 template <typename Coordinates, int dim>
    \n+
    497 struct DGFGridInfo< YaspGrid<dim , Coordinates> > {
    \n+
    498 static int refineStepsForHalf() {return 1;}
    \n+
    499 static double refineWeight() {return std::pow(0.5,dim);}
    \n+
    500 };
    \n+
    501
    \n+
    502}
    \n+
    503#endif // #ifndef DUNE_DGFPARSERYASP_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    @ pyramid
    Definition: common.hh:141
    \n-
    @ tetrahedron
    Definition: common.hh:138
    \n-
    @ prism
    Definition: common.hh:140
    \n-
    @ hexahedron
    Definition: common.hh:139
    \n-
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:314
    \n-
    virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
    Insert an element into the coarse grid.
    Definition: common/gridfactory.hh:346
    \n-
    virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
    Insert a vertex into the coarse grid.
    Definition: common/gridfactory.hh:335
    \n-
    virtual std::unique_ptr< GridType > createGrid()
    Finalize grid creation and hand over the grid.
    Definition: common/gridfactory.hh:372
    \n-
    File reader for the Star-CD format.
    Definition: starcdreader.hh:52
    \n-
    static std::unique_ptr< GridType > read(const std::string &fileName, bool verbose=true)
    Read grid from a Star-CD file.
    Definition: starcdreader.hh:65
    \n-
    Provide a generic factory class for unstructured grids.
    \n+
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n+
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n+
    Definition: dgfgridfactory.hh:38
    \n+
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfgridfactory.hh:41
    \n+
    G Grid
    Definition: dgfgridfactory.hh:39
    \n+
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n+
    bool haveBoundaryParameters() const
    Definition: dgfgridfactory.hh:151
    \n+
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n+
    Geometry geometry() const
    geometrical information about the intersection in global coordinates.
    Definition: common/intersection.hh:323
    \n+
    int indexInInside() const
    Local index of codim 1 entity in the inside() entity where intersection is contained in.
    Definition: common/intersection.hh:346
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    Wrapper class for geometries.
    Definition: common/geometry.hh:71
    \n+
    FieldVector< ctype, cdim > GlobalCoordinate
    type of the global coordinates
    Definition: common/geometry.hh:106
    \n+
    GlobalCoordinate corner(int i) const
    Obtain a corner of the geometry.
    Definition: common/geometry.hh:219
    \n+
    int corners() const
    Return the number of corners of the reference element.
    Definition: common/geometry.hh:205
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n+
    bool findtoken(std ::string token)
    Definition: basic.cc:123
    \n+
    bool getnextentry(ENTRY &entry)
    Definition: basic.hh:63
    \n+
    Definition: boundarydom.hh:23
    \n+
    int id() const
    Definition: boundarydom.hh:42
    \n+
    const BoundaryParameter & parameter() const
    Definition: boundarydom.hh:54
    \n+
    Definition: boundarydom.hh:195
    \n+
    Common Grid parameters.
    Definition: gridparameter.hh:35
    \n+
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n+
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n+
    Grid parameters for YaspGrid.
    Definition: dgfyasp.hh:40
    \n+
    int _overlap
    Definition: dgfyasp.hh:42
    \n+
    YaspGridParameterBlock(std::istream &in)
    constructor taking istream
    Definition: dgfyasp.hh:46
    \n+
    int overlap() const
    get dimension of world found in block
    Definition: dgfyasp.hh:74
    \n+
    DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:98
    \n+
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:104
    \n+
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfyasp.hh:124
    \n+\n+
    std::vector< double > & parameter(const Entity &)
    Definition: dgfyasp.hh:177
    \n+
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfyasp.hh:91
    \n+
    const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
    Definition: dgfyasp.hh:160
    \n+\n+\n+\n+
    YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid
    Definition: dgfyasp.hh:89
    \n+
    int boundaryId(const Intersection &intersection) const
    Definition: dgfyasp.hh:130
    \n+
    const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II > &intersection) const
    Definition: dgfyasp.hh:356
    \n+
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:302
    \n+\n+
    int boundaryId(const Intersection &intersection) const
    Definition: dgfyasp.hh:326
    \n+
    YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid
    Definition: dgfyasp.hh:287
    \n+
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfyasp.hh:320
    \n+
    std::vector< double > & parameter(const Entity &entity)
    Definition: dgfyasp.hh:373
    \n+\n+
    MPIHelper::MPICommunicator MPICommunicatorType
    Definition: dgfyasp.hh:289
    \n+
    DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfyasp.hh:296
    \n+\n+\n+\n+\n+
    static double refineWeight()
    Definition: dgfyasp.hh:499
    \n+
    static int refineStepsForHalf()
    Definition: dgfyasp.hh:498
    \n+
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n+
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n+
    [ provides Dune::Grid ]
    Definition: yaspgrid.hh:163
    \n+
    Container for equidistant coordinates in a YaspGrid.
    Definition: coordinates.hh:29
    \n+
    Container for equidistant coordinates in a YaspGrid with non-trivial origin.
    Definition: coordinates.hh:131
    \n+\n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,207 +6,743 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * io\n * file\n-starcdreader.hh\n+ * dgfparser\n+dgfyasp.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_STARCD_READER_HH\n- 6#define DUNE_STARCD_READER_HH\n+ 5#ifndef DUNE_DGFPARSERYASP_HH\n+ 6#define DUNE_DGFPARSERYASP_HH\n 7\n- 8#include \n- 9\n- 10#include \n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15\n- 16namespace Dune {\n+ 8#include \n+ 9#include \n+ 10#include \"dgfparser.hh\"\n+ 11\n+ 12namespace Dune\n+ 13{\n+ 14\n+ 15 // External Forward Declarations\n+ 16 // -----------------------------\n 17\n- 51 template \n-52 class StarCDReader {\n- 53\n- 54 public:\n- 55\n-65 static std::unique_ptr read(const std::string& fileName, bool\n-verbose = true)\n+ 18 template< class GridImp, class IntersectionImp >\n+ 19 class Intersection;\n+ 20\n+ 21\n+ 22 namespace dgf\n+ 23 {\n+ 24\n+38 class YaspGridParameterBlock\n+ 39 : public GridParameterBlock\n+ 40 {\n+ 41 protected:\n+42 int _overlap; // overlap for YaspGrid\n+ 43\n+ 44 public:\n+46 YaspGridParameterBlock( std::istream &in )\n+ 47 : GridParameterBlock( in ),\n+ 48 _overlap( 0 ) // default value\n+ 49 {\n+ 50 // check overlap\n+ 51 if( findtoken( \"overlap\" ) )\n+ 52 {\n+ 53 int x;\n+ 54 if( getnextentry(x) ) _overlap = x;\n+ 55 else\n+ 56 {\n+ 57 dwarn << \"GridParameterBlock: found keyword `overlap' but no value,\n+defaulting to `\" << _overlap <<\"' !\\n\";\n+ 58 }\n+ 59\n+ 60 if (_overlap < 0)\n+ 61 {\n+ 62 DUNE_THROW(DGFException,\"Negative overlap specified!\");\n+ 63 }\n+ 64 }\n+ 65 else\n 66 {\n- 67 // extract the grid dimension\n- 68 const int dim = GridType::dimension;\n- 69\n- 70 // currently only dim = 3 is implemented\n- 71 if (dim != 3)\n- 72 DUNE_THROW(Dune::NotImplemented,\n- 73 \"Reading Star-CD format is not implemented for dimension \" << dim);\n- 74\n- 75 // set up the grid factory\n- 76 GridFactory factory;\n- 77\n- 78 // set the name of the vertex file\n- 79 std::string vertexFileName = fileName + \".vrt\";\n+ 67 dwarn << \"YaspGridParameterBlock: Parameter 'overlap' not specified, \"\n+ 68 << \"defaulting to '\" << _overlap << \"'.\" << std::endl;\n+ 69 }\n+ 70\n+ 71 }\n+ 72\n+74 int overlap () const\n+ 75 {\n+ 76 return _overlap;\n+ 77 }\n+ 78\n+ 79 };\n 80\n- 81 // set the vertex input stream\n- 82 std::ifstream vertexFile(vertexFileName.c_str());\n- 83 if (!vertexFile)\n- 84 DUNE_THROW(Dune::IOError, \"Could not open \" << vertexFileName);\n- 85\n- 86 // read the vertices\n- 87 int dummyIdx;\n- 88 int numberOfVertices = 0;\n- 89 while (vertexFile >> dummyIdx) {\n- 90 numberOfVertices++;\n- 91\n- 92 Dune::FieldVector position;\n- 93\n- 94 for (int k = 0; k < dim; k++)\n- 95 vertexFile >> position[k];\n+ 81 }\n+ 82\n+ 86 template \n+87 struct DGFGridFactory< YaspGrid > >\n+ 88 {\n+89 typedef YaspGrid > Grid;\n+90 const static int dimension = Grid::dimension;\n+91 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n+ 92\n+ 93 private:\n+ 94 typedef FieldVector< ctype, dimension > Point;\n+ 95 typedef dgf::BoundaryDomBlock BoundaryDomainBlock;\n 96\n- 97 factory.insertVertex(position);\n- 98 }\n- 99 if (verbose)\n- 100 std::cout << numberOfVertices << \" vertices read.\" << std::endl;\n- 101\n- 102 // set the name of the element file\n- 103 std::string elementFileName = fileName + \".cel\";\n- 104\n- 105 // set the element input stream\n- 106 std::ifstream elementFile(elementFileName.c_str());\n- 107 if (!elementFile)\n- 108 DUNE_THROW(Dune::IOError, \"Could not open \" << elementFileName);\n- 109\n- 110 // read the elements\n- 111 int numberOfElements = 0;\n- 112 int numberOfSimplices = 0;\n- 113 int numberOfPyramids = 0;\n- 114 int numberOfPrisms = 0;\n- 115 int numberOfCubes = 0;;\n- 116 int maxNumberOfVertices = (int)pow(2, dim);\n- 117 int isVolume = 1;\n- 118 while (elementFile >> dummyIdx) {\n- 119 std::vector vertices(maxNumberOfVertices);\n- 120 for (int k = 0; k < maxNumberOfVertices; k++)\n- 121 elementFile >> vertices[k];\n+ 97 public:\n+98 explicit DGFGridFactory ( std::istream &input,\n+ 99 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n+ 100 {\n+ 101 generate( input, comm );\n+ 102 }\n+ 103\n+104 explicit DGFGridFactory ( const std::string &filename,\n+ 105 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n+ 106 {\n+ 107 std::ifstream input( filename.c_str() );\n+ 108 if( !input )\n+ 109 DUNE_THROW( DGFException, \"Error: Macrofile '\" << filename << \"' not\n+found\" );\n+ 110 generate( input, comm );\n+ 111 }\n+ 112\n+113 ~DGFGridFactory ()\n+ 114 {\n+ 115 delete boundaryDomainBlock_;\n+ 116 }\n+ 117\n+118 Grid *grid() const\n+ 119 {\n+ 120 return grid_;\n+ 121 }\n 122\n- 123 int boundaryId;\n- 124 elementFile >> boundaryId;\n- 125\n- 126 int volumeOrSurface[2];\n- 127 elementFile >> volumeOrSurface[0] >> volumeOrSurface[1];\n+ 123 template \n+124 bool wasInserted(const Intersection &intersection) const\n+ 125 {\n+ 126 return false;\n+ 127 }\n 128\n- 129 if (volumeOrSurface[0] == isVolume) {\n- 130 numberOfElements++;\n- 131\n- 132 if (vertices[2] == vertices[3]) { // simplex or prism\n- 133 if (vertices[4] == vertices[5]) { // simplex\n- 134 numberOfSimplices++;\n- 135 std::vector simplexVertices(4);\n- 136 for (int k = 0; k < 3; k++)\n- 137 simplexVertices[k] = vertices[k] - 1;\n- 138 simplexVertices[3] = vertices[4] - 1;\n- 139 factory.insertElement(Dune::GeometryTypes::tetrahedron, simplexVertices);\n- 140 }\n- 141 else { // prism\n- 142 numberOfPrisms++;\n- 143 std::vector prismVertices(6);\n- 144 for (int k = 0; k < 3; k++)\n- 145 prismVertices[k] = vertices[k] - 1;\n- 146 for (int k = 3; k < 6; k++)\n- 147 prismVertices[k] = vertices[k+1] - 1;\n- 148 factory.insertElement(Dune::GeometryTypes::prism, prismVertices);\n- 149 }\n+ 129 template \n+130 int boundaryId(const Intersection &intersection) const\n+ 131 {\n+ 132 if( boundaryDomainBlock_->isactive() )\n+ 133 {\n+ 134 std::vector< Point > corners;\n+ 135 getCorners( intersection.geometry(), corners );\n+ 136 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n+ 137 if( data )\n+ 138 return data->id();\n+ 139 else\n+ 140 return intersection.indexInInside();\n+ 141 }\n+ 142 else\n+ 143 return intersection.indexInInside();\n+ 144 }\n+ 145\n+ 146 template< int codim >\n+147 int numParameters () const\n+ 148 {\n+ 149 return 0;\n 150 }\n- 151 else { // cube or pyramid\n- 152 if (vertices[4] == vertices[5]) { // pyramid\n- 153 numberOfPyramids++;\n- 154 std::vector pyramidVertices(5);\n- 155 for (int k = 0; k < 5; k++)\n- 156 pyramidVertices[k] = vertices[k] - 1;\n- 157 factory.insertElement(Dune::GeometryTypes::pyramid, pyramidVertices);\n- 158 }\n- 159 else { // cube\n- 160 numberOfCubes++;\n- 161 std::vector cubeVertices(8);\n- 162 for (int k = 0; k < 8; k++)\n- 163 cubeVertices[k] = vertices[k] - 1;\n- 164 std::swap(cubeVertices[2], cubeVertices[3]);\n- 165 std::swap(cubeVertices[6], cubeVertices[7]);\n- 166 factory.insertElement(Dune::GeometryTypes::hexahedron, cubeVertices);\n- 167 }\n- 168 }\n- 169 }\n- 170 }\n- 171 if (verbose)\n- 172 std::cout << numberOfElements << \" elements read: \"\n- 173 << numberOfSimplices << \" simplices, \" << numberOfPyramids << \" pyramids,\n-\"\n- 174 << numberOfPrisms << \" prisms, \" << numberOfCubes << \" cubes.\" << std::\n-endl;\n+ 151\n+ 152 // return true if boundary parameters found\n+153 bool haveBoundaryParameters () const\n+ 154 {\n+ 155 return boundaryDomainBlock_->hasParameter();\n+ 156 }\n+ 157\n+ 158 template< class GG, class II >\n+ 159 const typename DGFBoundaryParameter::type &\n+160 boundaryParameter ( const Intersection<_GG,_II_> & intersection ) const\n+ 161 {\n+ 162 if( haveBoundaryParameters() )\n+ 163 {\n+ 164 std::vector< Point > corners;\n+ 165 getCorners( intersection.geometry(), corners );\n+ 166 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n+ 167 if( data )\n+ 168 return data->parameter();\n+ 169 else\n+ 170 return DGFBoundaryParameter::defaultValue();\n+ 171 }\n+ 172 else\n+ 173 return DGFBoundaryParameter::defaultValue();\n+ 174 }\n 175\n- 176 // finish off the construction of the grid object\n- 177 if (verbose)\n- 178 std::cout << \"Starting createGrid() ... \" << std::flush;\n- 179\n- 180 return factory.createGrid();\n+ 176 template< class Entity >\n+177 std::vector ¶meter ( const Entity & )\n+ 178 {\n+ 179 return emptyParam;\n+ 180 }\n 181\n- 182 }\n- 183\n- 184 };\n- 185\n- 186}\n- 187\n- 188#endif\n-std::swap\n-void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n-> &b)\n-Definition: utility/persistentcontainer.hh:83\n+ 182 private:\n+ 183 void generate( std::istream &gridin, MPICommunicatorType comm );\n+ 184\n+ 185 template< class Geometry >\n+ 186 static void getCorners ( const Geometry &geometry, std::vector< Point >\n+&corners )\n+ 187 {\n+ 188 corners.resize( geometry.corners() );\n+ 189 for( int i = 0; i < geometry.corners(); ++i )\n+ 190 {\n+ 191 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );\n+ 192 for( int j = 0; j < dimension; ++j )\n+ 193 corners[ i ][ j ] = corner[ j ];\n+ 194 }\n+ 195 }\n+ 196\n+ 197 Grid *grid_;\n+ 198 dgf::BoundaryDomBlock *boundaryDomainBlock_;\n+ 199 std::vector emptyParam;\n+ 200 };\n+ 201\n+ 202 // generate YaspGrid from the provided DGF\n+ 203 template< typename ctype, int dim >\n+ 204 inline void DGFGridFactory< YaspGrid< dim , EquidistantCoordinates > >\n+ 205 ::generate ( std::istream &gridin, MPICommunicatorType comm )\n+ 206 {\n+ 207 using std::abs;\n+ 208 dgf::IntervalBlock intervalBlock( gridin );\n+ 209\n+ 210 if( !intervalBlock.isactive() )\n+ 211 DUNE_THROW( DGFException, \"YaspGrid can only be created from an interval\n+block.\" );\n+ 212\n+ 213 if( intervalBlock.numIntervals() != 1 )\n+ 214 DUNE_THROW( DGFException, \"YaspGrid can only handle 1 interval block.\" );\n+ 215\n+ 216 if( intervalBlock.dimw() != dim )\n+ 217 {\n+ 218 DUNE_THROW( DGFException,\n+ 219 \"Cannot read an interval of dimension \" << intervalBlock.dimw()\n+ 220 << \" into a YaspGrid< \" << dim << \" >.\" );\n+ 221 }\n+ 222\n+ 223 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );\n+ 224\n+ 225 FieldVector lang;\n+ 226 std::array anz;\n+ 227 for( int i = 0; i < dim; ++i )\n+ 228 {\n+ 229 // check that start point is 0.0\n+ 230 if( abs( interval.p[ 0 ][ i ] ) > 1e-10 )\n+ 231 {\n+ 232 DUNE_THROW( DGFException,\n+ 233 \"YaspGrid cannot handle grids with non-zero left lower corner.\" );\n+ 234 }\n+ 235\n+ 236 lang[ i ] = interval.p[ 1 ][ i ] - interval.p[ 0 ][ i ];\n+ 237 anz[ i ] = interval.n[ i ];\n+ 238 }\n+ 239\n+ 240 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation\n+Transformation;\n+ 241 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );\n+ 242 std::bitset< dim > per;\n+ 243 const int numTrafos = trafoBlock.numTransformations();\n+ 244 for( int k = 0; k < numTrafos; ++k )\n+ 245 {\n+ 246 const Transformation &trafo = trafoBlock.transformation( k );\n+ 247\n+ 248 bool identity = true;\n+ 249 for( int i = 0; i < dim; ++i )\n+ 250 for( int j = 0; j < dim; ++j )\n+ 251 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);\n+ 252 if( !identity )\n+ 253 DUNE_THROW( DGFException, \"YaspGrid can only handle shifts as periodic\n+face transformations.\" );\n+ 254\n+ 255 int numDirs = 0;\n+ 256 int dir = -1;\n+ 257 for( int i = 0; i < dim; ++i )\n+ 258 {\n+ 259 if( abs( trafo.shift[ i ] ) < 1e-10 )\n+ 260 continue;\n+ 261 dir = i;\n+ 262 ++numDirs;\n+ 263 }\n+ 264 if( (numDirs != 1) || (abs( abs( trafo.shift[ dir ] ) - lang[ dir ] ) >=\n+1e-10) )\n+ 265 {\n+ 266 std::cerr << \"Tranformation '\" << trafo\n+ 267 << \"' does not map boundaries on boundaries.\" << std::endl;\n+ 268 }\n+ 269 else\n+ 270 per[ dir ] = true;\n+ 271 }\n+ 272\n+ 273 // get grid parameters\n+ 274 dgf::YaspGridParameterBlock grdParam( gridin );\n+ 275\n+ 276 grid_ = new YaspGrid< dim , EquidistantCoordinates >( lang,\n+anz, per, grdParam.overlap(), comm );\n+ 277\n+ 278 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );\n+ 279 }\n+ 280\n+ 284 template \n+285 struct DGFGridFactory< YaspGrid > >\n+ 286 {\n+287 typedef YaspGrid > Grid;\n+288 const static int dimension = Grid::dimension;\n+289 typedef MPIHelper::MPICommunicator MPICommunicatorType;\n+ 290\n+ 291 private:\n+ 292 typedef FieldVector< ctype, dimension > Point;\n+ 293 typedef dgf::BoundaryDomBlock BoundaryDomainBlock;\n+ 294\n+ 295 public:\n+296 explicit DGFGridFactory ( std::istream &input,\n+ 297 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n+ 298 {\n+ 299 generate( input, comm );\n+ 300 }\n+ 301\n+302 explicit DGFGridFactory ( const std::string &filename,\n+ 303 MPICommunicatorType comm = MPIHelper::getCommunicator() )\n+ 304 {\n+ 305 std::ifstream input( filename.c_str() );\n+ 306 generate( input, comm );\n+ 307 }\n+ 308\n+309 ~DGFGridFactory ()\n+ 310 {\n+ 311 delete boundaryDomainBlock_;\n+ 312 }\n+ 313\n+314 Grid *grid() const\n+ 315 {\n+ 316 return grid_;\n+ 317 }\n+ 318\n+ 319 template \n+320 bool wasInserted(const Intersection &intersection) const\n+ 321 {\n+ 322 return false;\n+ 323 }\n+ 324\n+ 325 template \n+326 int boundaryId(const Intersection &intersection) const\n+ 327 {\n+ 328 if( boundaryDomainBlock_->isactive() )\n+ 329 {\n+ 330 std::vector< Point > corners;\n+ 331 getCorners( intersection.geometry(), corners );\n+ 332 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n+ 333 if( data )\n+ 334 return data->id();\n+ 335 else\n+ 336 return intersection.indexInInside();\n+ 337 }\n+ 338 else\n+ 339 return intersection.indexInInside();\n+ 340 }\n+ 341\n+ 342 template< int codim >\n+343 int numParameters () const\n+ 344 {\n+ 345 return 0;\n+ 346 }\n+ 347\n+ 348 // return true if boundary parameters found\n+349 bool haveBoundaryParameters () const\n+ 350 {\n+ 351 return boundaryDomainBlock_->hasParameter();\n+ 352 }\n+ 353\n+ 354 template< class GG, class II >\n+ 355 const typename DGFBoundaryParameter::type &\n+356 boundaryParameter ( const Intersection<_GG,_II_> & intersection ) const\n+ 357 {\n+ 358 if( haveBoundaryParameters() )\n+ 359 {\n+ 360 std::vector< Point > corners;\n+ 361 getCorners( intersection.geometry(), corners );\n+ 362 const dgf::DomainData *data = boundaryDomainBlock_->contains( corners );\n+ 363 if( data )\n+ 364 return data->parameter();\n+ 365 else\n+ 366 return DGFBoundaryParameter::defaultValue();\n+ 367 }\n+ 368 else\n+ 369 return DGFBoundaryParameter::defaultValue();\n+ 370 }\n+ 371\n+ 372 template< class Entity >\n+373 std::vector ¶meter ( [[maybe_unused]] const Entity &entity )\n+ 374 {\n+ 375 return emptyParam;\n+ 376 }\n+ 377\n+ 378 private:\n+ 379 void generate( std::istream &gridin, MPICommunicatorType comm );\n+ 380\n+ 381 template< class Geometry >\n+ 382 static void getCorners ( const Geometry &geometry, std::vector< Point >\n+&corners )\n+ 383 {\n+ 384 corners.resize( geometry.corners() );\n+ 385 for( int i = 0; i < geometry.corners(); ++i )\n+ 386 {\n+ 387 const typename Geometry::GlobalCoordinate corner = geometry.corner( i );\n+ 388 for( int j = 0; j < dimension; ++j )\n+ 389 corners[ i ][ j ] = corner[ j ];\n+ 390 }\n+ 391 }\n+ 392\n+ 393 Grid *grid_;\n+ 394 dgf::BoundaryDomBlock *boundaryDomainBlock_;\n+ 395 std::vector emptyParam;\n+ 396 };\n+ 397\n+ 398 // generate YaspGrid from the provided DGF\n+ 399 template< typename ctype, int dim >\n+ 400 inline void DGFGridFactory< YaspGrid > >\n+ 401 ::generate ( std::istream &gridin, MPICommunicatorType comm )\n+ 402 {\n+ 403 using std::abs;\n+ 404 dgf::IntervalBlock intervalBlock( gridin );\n+ 405\n+ 406 if( !intervalBlock.isactive() )\n+ 407 DUNE_THROW( DGFException, \"YaspGrid can only be created from an interval\n+block.\" );\n+ 408\n+ 409 if( intervalBlock.numIntervals() != 1 )\n+ 410 DUNE_THROW( DGFException, \"YaspGrid can only handle 1 interval block.\" );\n+ 411\n+ 412 if( intervalBlock.dimw() != dim )\n+ 413 {\n+ 414 DUNE_THROW( DGFException,\n+ 415 \"Cannot read an interval of dimension \"\n+ 416 << intervalBlock.dimw()\n+ 417 << \" into a YaspGrid< \" << dim << \" >.\" );\n+ 418 }\n+ 419\n+ 420 const dgf::IntervalBlock::Interval &interval = intervalBlock.get( 0 );\n+ 421\n+ 422 FieldVector lower;\n+ 423 FieldVector upper;\n+ 424 std::array anz;\n+ 425 for( int i = 0; i < dim; ++i )\n+ 426 {\n+ 427 lower[ i ] = interval.p[ 0 ][ i ];\n+ 428 upper[ i ] = interval.p[ 1 ][ i ];\n+ 429 anz[ i ] = interval.n[ i ];\n+ 430 }\n+ 431\n+ 432 typedef dgf::PeriodicFaceTransformationBlock::AffineTransformation\n+Transformation;\n+ 433 dgf::PeriodicFaceTransformationBlock trafoBlock( gridin, dim );\n+ 434 std::bitset< dim > periodic;\n+ 435 const int numTrafos = trafoBlock.numTransformations();\n+ 436 for( int k = 0; k < numTrafos; ++k )\n+ 437 {\n+ 438 const Transformation &trafo = trafoBlock.transformation( k );\n+ 439\n+ 440 bool identity = true;\n+ 441 for( int i = 0; i < dim; ++i )\n+ 442 for( int j = 0; j < dim; ++j )\n+ 443 identity &= (abs( (i == j ? 1.0 : 0.0) - trafo.matrix( i, j ) ) < 1e-10);\n+ 444 if( !identity )\n+ 445 DUNE_THROW( DGFException, \"YaspGrid can only handle shifts as periodic\n+face transformations.\" );\n+ 446\n+ 447 int numDirs = 0;\n+ 448 int dir = -1;\n+ 449 for( int currentDir = 0; currentDir < dim; ++currentDir )\n+ 450 {\n+ 451 if( abs( trafo.shift[ currentDir ] ) > 1e-10 )\n+ 452 {\n+ 453 dir = currentDir;\n+ 454 ++numDirs;\n+ 455 }\n+ 456 }\n+ 457 if ( (numDirs != 1)\n+ 458 || (abs( abs( trafo.shift[ dir ] ) - abs( upper[ dir ] - lower[ dir ] ) )\n+>= 1e-10) )\n+ 459 {\n+ 460 std::cerr << \"Tranformation '\" << trafo\n+ 461 << \"' does not map boundaries on boundaries.\" << std::endl;\n+ 462 }\n+ 463 else\n+ 464 {\n+ 465 periodic[ dir ] = true;\n+ 466 }\n+ 467 }\n+ 468\n+ 469 // get grid parameters\n+ 470 dgf::YaspGridParameterBlock grdParam( gridin );\n+ 471\n+ 472 grid_ = new YaspGrid< dim, EquidistantOffsetCoordinates >\n+ 473 ( lower, upper, anz, periodic, grdParam.overlap(), comm );\n+ 474\n+ 475 boundaryDomainBlock_ = new dgf::BoundaryDomBlock( gridin, dimension );\n+ 476 }\n+ 477\n+ 483 template< class ctype, int dim >\n+484 class DGFGridFactory< Dune::YaspGrid > >\n+ 485 {\n+ 486 using Grid = Dune::YaspGrid >;\n+ 487 public:\n+ 488 template< typename In >\n+489 DGFGridFactory ( const In & ) {}\n+490 Grid *grid()\n+ 491 {\n+ 492 throw std::invalid_argument( \"Tensor product coordinates for YaspGrid are\n+currently not supported via the DGFGridFactory\" );\n+ 493 }\n+ 494 };\n+ 495\n+ 496 template \n+497 struct DGFGridInfo< YaspGrid > {\n+498 static int refineStepsForHalf() {return 1;}\n+499 static double refineWeight() {return std::pow(0.5,dim);}\n+ 500 };\n+ 501\n+ 502}\n+ 503#endif // #ifndef DUNE_DGFPARSERYASP_HH\n+yaspgrid.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::pyramid\n-@ pyramid\n-Definition: common.hh:141\n-Dune::VTK::tetrahedron\n-@ tetrahedron\n-Definition: common.hh:138\n-Dune::VTK::prism\n-@ prism\n-Definition: common.hh:140\n-Dune::VTK::hexahedron\n-@ hexahedron\n-Definition: common.hh:139\n-Dune::GridFactory\n-Provide a generic factory class for unstructured grids.\n-Definition: common/gridfactory.hh:314\n-Dune::GridFactory::insertElement\n-virtual void insertElement(const GeometryType &type, const std::vector<\n-unsigned int > &vertices)\n-Insert an element into the coarse grid.\n-Definition: common/gridfactory.hh:346\n-Dune::GridFactory::insertVertex\n-virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)\n-Insert a vertex into the coarse grid.\n-Definition: common/gridfactory.hh:335\n-Dune::GridFactory::createGrid\n-virtual std::unique_ptr< GridType > createGrid()\n-Finalize grid creation and hand over the grid.\n-Definition: common/gridfactory.hh:372\n-Dune::StarCDReader\n-File reader for the Star-CD format.\n-Definition: starcdreader.hh:52\n-Dune::StarCDReader::read\n-static std::unique_ptr< GridType > read(const std::string &fileName, bool\n-verbose=true)\n-Read grid from a Star-CD file.\n-Definition: starcdreader.hh:65\n-gridfactory.hh\n-Provide a generic factory class for unstructured grids.\n+Dune::Alberta::abs\n+void abs(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:328\n+Dune::Alberta::AffineTransformation\n+ALBERTA AFF_TRAFO AffineTransformation\n+Definition: misc.hh:52\n+Dune::DGFGridFactory\n+Definition: dgfgridfactory.hh:38\n+Dune::DGFGridFactory::MPICommunicatorType\n+MPIHelper::MPICommunicator MPICommunicatorType\n+Definition: dgfgridfactory.hh:41\n+Dune::DGFGridFactory::Grid\n+G Grid\n+Definition: dgfgridfactory.hh:39\n+Dune::DGFGridFactory::dimension\n+static const int dimension\n+Definition: dgfgridfactory.hh:40\n+Dune::DGFGridFactory::haveBoundaryParameters\n+bool haveBoundaryParameters() const\n+Definition: dgfgridfactory.hh:151\n+Dune::Intersection\n+Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n+element or with the d...\n+Definition: common/intersection.hh:164\n+Dune::Intersection::geometry\n+Geometry geometry() const\n+geometrical information about the intersection in global coordinates.\n+Definition: common/intersection.hh:323\n+Dune::Intersection::indexInInside\n+int indexInInside() const\n+Local index of codim 1 entity in the inside() entity where intersection is\n+contained in.\n+Definition: common/intersection.hh:346\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::Geometry\n+Wrapper class for geometries.\n+Definition: common/geometry.hh:71\n+Dune::Geometry::GlobalCoordinate\n+FieldVector< ctype, cdim > GlobalCoordinate\n+type of the global coordinates\n+Definition: common/geometry.hh:106\n+Dune::Geometry::corner\n+GlobalCoordinate corner(int i) const\n+Obtain a corner of the geometry.\n+Definition: common/geometry.hh:219\n+Dune::Geometry::corners\n+int corners() const\n+Return the number of corners of the reference element.\n+Definition: common/geometry.hh:205\n+Dune::Grid::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/grid.hh:387\n+Dune::dgf::BasicBlock::findtoken\n+bool findtoken(std ::string token)\n+Definition: basic.cc:123\n+Dune::dgf::BasicBlock::getnextentry\n+bool getnextentry(ENTRY &entry)\n+Definition: basic.hh:63\n+Dune::dgf::DomainData\n+Definition: boundarydom.hh:23\n+Dune::dgf::DomainData::id\n+int id() const\n+Definition: boundarydom.hh:42\n+Dune::dgf::DomainData::parameter\n+const BoundaryParameter & parameter() const\n+Definition: boundarydom.hh:54\n+Dune::dgf::BoundaryDomBlock\n+Definition: boundarydom.hh:195\n+Dune::dgf::GridParameterBlock\n+Common Grid parameters.\n+Definition: gridparameter.hh:35\n+Dune::DGFException\n+exception class for IO errors in the DGF parser\n+Definition: dgfexception.hh:16\n+Dune::DGFGridInfo\n+Some simple static information for a given GridType.\n+Definition: io/file/dgfparser/dgfparser.hh:56\n+Dune::dgf::YaspGridParameterBlock\n+Grid parameters for YaspGrid.\n+Definition: dgfyasp.hh:40\n+Dune::dgf::YaspGridParameterBlock::_overlap\n+int _overlap\n+Definition: dgfyasp.hh:42\n+Dune::dgf::YaspGridParameterBlock::YaspGridParameterBlock\n+YaspGridParameterBlock(std::istream &in)\n+constructor taking istream\n+Definition: dgfyasp.hh:46\n+Dune::dgf::YaspGridParameterBlock::overlap\n+int overlap() const\n+get dimension of world found in block\n+Definition: dgfyasp.hh:74\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+DGFGridFactory\n+DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::\n+getCommunicator())\n+Definition: dgfyasp.hh:98\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+DGFGridFactory\n+DGFGridFactory(const std::string &filename, MPICommunicatorType\n+comm=MPIHelper::getCommunicator())\n+Definition: dgfyasp.hh:104\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+wasInserted\n+bool wasInserted(const Intersection &intersection) const\n+Definition: dgfyasp.hh:124\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+numParameters\n+int numParameters() const\n+Definition: dgfyasp.hh:147\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+parameter\n+std::vector< double > & parameter(const Entity &)\n+Definition: dgfyasp.hh:177\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+MPICommunicatorType\n+MPIHelper::MPICommunicator MPICommunicatorType\n+Definition: dgfyasp.hh:91\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+boundaryParameter\n+const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II\n+> &intersection) const\n+Definition: dgfyasp.hh:160\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+~DGFGridFactory\n+~DGFGridFactory()\n+Definition: dgfyasp.hh:113\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+haveBoundaryParameters\n+bool haveBoundaryParameters() const\n+Definition: dgfyasp.hh:153\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+grid\n+Grid * grid() const\n+Definition: dgfyasp.hh:118\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+Grid\n+YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid\n+Definition: dgfyasp.hh:89\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantCoordinates<_ctype,_dim_>_>_>::\n+boundaryId\n+int boundaryId(const Intersection &intersection) const\n+Definition: dgfyasp.hh:130\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::boundaryParameter\n+const DGFBoundaryParameter::type & boundaryParameter(const Intersection< GG, II\n+> &intersection) const\n+Definition: dgfyasp.hh:356\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::DGFGridFactory\n+DGFGridFactory(const std::string &filename, MPICommunicatorType\n+comm=MPIHelper::getCommunicator())\n+Definition: dgfyasp.hh:302\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::grid\n+Grid * grid() const\n+Definition: dgfyasp.hh:314\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::boundaryId\n+int boundaryId(const Intersection &intersection) const\n+Definition: dgfyasp.hh:326\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::Grid\n+YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid\n+Definition: dgfyasp.hh:287\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::wasInserted\n+bool wasInserted(const Intersection &intersection) const\n+Definition: dgfyasp.hh:320\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::parameter\n+std::vector< double > & parameter(const Entity &entity)\n+Definition: dgfyasp.hh:373\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::haveBoundaryParameters\n+bool haveBoundaryParameters() const\n+Definition: dgfyasp.hh:349\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::MPICommunicatorType\n+MPIHelper::MPICommunicator MPICommunicatorType\n+Definition: dgfyasp.hh:289\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::DGFGridFactory\n+DGFGridFactory(std::istream &input, MPICommunicatorType comm=MPIHelper::\n+getCommunicator())\n+Definition: dgfyasp.hh:296\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::~DGFGridFactory\n+~DGFGridFactory()\n+Definition: dgfyasp.hh:309\n+Dune::DGFGridFactory<_YaspGrid<_dim,_EquidistantOffsetCoordinates<_ctype,_dim_>\n+>_>::numParameters\n+int numParameters() const\n+Definition: dgfyasp.hh:343\n+Dune::DGFGridFactory<_Dune::YaspGrid<_dim,_Dune::TensorProductCoordinates<\n+ctype,_dim_>_>_>::grid\n+Grid * grid()\n+Definition: dgfyasp.hh:490\n+Dune::DGFGridFactory<_Dune::YaspGrid<_dim,_Dune::TensorProductCoordinates<\n+ctype,_dim_>_>_>::DGFGridFactory\n+DGFGridFactory(const In &)\n+Definition: dgfyasp.hh:489\n+Dune::DGFGridInfo<_YaspGrid<_dim,_Coordinates_>_>::refineWeight\n+static double refineWeight()\n+Definition: dgfyasp.hh:499\n+Dune::DGFGridInfo<_YaspGrid<_dim,_Coordinates_>_>::refineStepsForHalf\n+static int refineStepsForHalf()\n+Definition: dgfyasp.hh:498\n+Dune::DGFBoundaryParameter::defaultValue\n+static const type & defaultValue()\n+default constructor\n+Definition: parser.hh:28\n+Dune::DGFBoundaryParameter::type\n+std::string type\n+type of additional boundary parameters\n+Definition: parser.hh:25\n+Dune::YaspGrid\n+[ provides Dune::Grid ]\n+Definition: yaspgrid.hh:163\n+Dune::EquidistantCoordinates\n+Container for equidistant coordinates in a YaspGrid.\n+Definition: coordinates.hh:29\n+Dune::EquidistantOffsetCoordinates\n+Container for equidistant coordinates in a YaspGrid with non-trivial origin.\n+Definition: coordinates.hh:131\n+dgfparser.hh\n+intersection.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00974.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00974.html", "unified_diff": "@@ -78,15 +78,15 @@\n

    The UGGrid class. \n More...

    \n
    #include <memory>
    \n #include <dune/common/classname.hh>
    \n #include <dune/common/parallel/communication.hh>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/common/parallel/mpihelper.hh>
    \n-#include <dune/grid/common/boundarysegment.hh>
    \n+#include <dune/grid/common/boundarysegment.hh>
    \n #include <dune/grid/common/capabilities.hh>
    \n #include <dune/grid/common/grid.hh>
    \n #include "uggrid/ugincludes.hh"
    \n #include "uggrid/ugwrapper.hh"
    \n #include "uggrid/ug_undefs.hh"
    \n #include "uggrid/uggridgeometry.hh"
    \n #include "uggrid/uggridlocalgeometry.hh"
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00974_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00974_source.html", "unified_diff": "@@ -80,15 +80,15 @@\n
    13#include <memory>
    \n
    14
    \n
    15#include <dune/common/classname.hh>
    \n
    16#include <dune/common/parallel/communication.hh>
    \n
    17#include <dune/common/exceptions.hh>
    \n
    18#include <dune/common/parallel/mpihelper.hh>
    \n
    19
    \n-\n+\n \n \n
    23
    \n
    24#if HAVE_DUNE_UGGRID || DOXYGEN
    \n
    25
    \n
    26#ifdef ModelP
    \n
    27#include <dune/common/parallel/mpicommunication.hh>
    \n@@ -598,15 +598,15 @@\n
    811
    \n
    812 }
    \n
    813
    \n
    814} // namespace Dune
    \n
    815
    \n
    816#endif // HAVE_DUNE_UGGRID || DOXYGEN
    \n
    817#endif // DUNE_UGGRID_HH
    \n-
    Base class for grid boundary segments of arbitrary geometry.
    \n+
    Base class for grid boundary segments of arbitrary geometry.
    \n
    The specialization of the generic GridFactory for UGGrid.
    \n
    CommunicationDirection
    Define a type for communication direction parameter.
    Definition: gridenums.hh:170
    \n
    InterfaceType
    Parameter to be used for the communication functions.
    Definition: gridenums.hh:86
    \n
    @ ForwardCommunication
    communicate as given in InterfaceType
    Definition: gridenums.hh:171
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Communication< No_Comm > UGCommunication
    Definition: uggrid.hh:137
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00977.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00977.html", "unified_diff": "@@ -75,15 +75,15 @@\n \n

    The specialization of the generic GridFactory for UGGrid. \n More...

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

    Go to the source code of this file.

    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00977_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00977_source.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    8
    \n
    14#include <array>
    \n
    15#include <memory>
    \n
    16#include <vector>
    \n
    17
    \n
    18#include <dune/common/fvector.hh>
    \n
    19
    \n-\n+\n \n
    22#include <dune/grid/uggrid.hh>
    \n
    23
    \n
    24namespace Dune {
    \n
    25
    \n
    26
    \n
    162 template <int dimworld>
    \n@@ -179,15 +179,15 @@\n
    302 std::vector<FieldVector<double, dimworld> > vertexPositions_;
    \n
    303
    \n
    304 };
    \n
    305
    \n
    306}
    \n
    307
    \n
    308#endif
    \n-
    Base class for grid boundary segments of arbitrary geometry.
    \n+
    Base class for grid boundary segments of arbitrary geometry.
    \n
    The UGGrid class.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Base class for classes implementing geometries of boundary segments.
    Definition: boundarysegment.hh:94
    \n
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:73
    \n
    virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
    obtain an element's insertion index
    Definition: common/gridfactory.hh:220
    \n
    static const int dimension
    dimension of the grid
    Definition: common/gridfactory.hh:77
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00980.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00980.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainerwrapper.hh File Reference\n+dune-grid: parmetisgridpartitioner.hh File Reference\n \n \n \n \n \n \n \n@@ -62,36 +62,32 @@\n \n
    \n \n
    \n \n
    \n- \n-
    persistentcontainerwrapper.hh File Reference
    \n+
    parmetisgridpartitioner.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid/utility/hostgridaccess.hh>
    \n-#include <dune/grid/utility/persistentcontainer.hh>
    \n+\n+

    Compute a repartitioning of a Dune grid using ParMetis. \n+More...

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

    Go to the source code of this file.

    \n-

    \n Classes

    \n-\n-\n-\n-

    \n-Classes

    class  Dune::PersistentContainerWrapper< G, T >
     
    \n-\n-\n-\n-\n-

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    Compute a repartitioning of a Dune grid using ParMetis.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,22 +5,23 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-Classes | Namespaces\n-persistentcontainerwrapper.hh File Reference\n-#include \n-#include \n+parmetisgridpartitioner.hh File Reference\n+Compute a repartitioning of a Dune grid using ParMetis. More...\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::PersistentContainerWrapper<_G,_T_>\n-\u00a0\n- Namespaces\n-namespace \u00a0Dune\n-\u00a0 Include standard header files.\n-\u00a0\n+***** Detailed Description *****\n+Compute a repartitioning of a Dune grid using ParMetis.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00980_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainerwrapper.hh Source File\n+dune-grid: parmetisgridpartitioner.hh Source File\n \n \n \n \n \n \n \n@@ -62,138 +62,219 @@\n \n
    \n \n
    \n \n
    \n-
    persistentcontainerwrapper.hh
    \n+
    parmetisgridpartitioner.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
    \n-
    6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH
    \n-
    7
    \n-\n-\n-
    10
    \n-
    11namespace Dune
    \n-
    12{
    \n-
    13
    \n-
    14 // PersistentContainerWrapper
    \n-
    15 // --------------------------
    \n-
    16
    \n-
    17 template< class G, class T >
    \n-\n-
    19 {
    \n-\n+
    3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
    \n+
    4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
    \n+
    5
    \n+
    10#include <algorithm>
    \n+
    11#include <vector>
    \n+
    12
    \n+
    13#include <dune/common/parallel/mpihelper.hh>
    \n+
    14#include <dune/common/exceptions.hh>
    \n+
    15
    \n+
    16#include <dune/geometry/referenceelements.hh>
    \n+
    17
    \n+\n+\n+\n
    21
    \n-\n+
    22#if HAVE_PARMETIS
    \n
    23
    \n-
    24 typedef typename HostGridAccess::HostGrid HostGrid;
    \n-\n-
    26
    \n-
    27 public:
    \n-
    28 typedef G Grid;
    \n+
    24#include <parmetis.h>
    \n+
    25
    \n+
    26// only enable for ParMETIS because the implementation uses functions that
    \n+
    27// are not emulated by scotch
    \n+
    28#ifdef PARMETIS_MAJOR_VERSION
    \n
    29
    \n-\n-\n+
    30namespace Dune
    \n+
    31{
    \n
    32
    \n-\n-\n-
    35
    \n-
    36 PersistentContainerWrapper ( const Grid &grid, int codim, const Value &value = Value() )
    \n-
    37 : hostContainer_( HostGridAccess::hostGrid( grid ), codim, value )
    \n-
    38 {}
    \n+
    37 template<class GridView>
    \n+
    38 struct ParMetisGridPartitioner {
    \n
    39
    \n-
    40 template< class Entity >
    \n-
    41 const Value &operator[] ( const Entity &entity ) const
    \n-
    42 {
    \n-
    43 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
    \n-
    44 }
    \n-
    45
    \n-
    46 template< class Entity >
    \n-
    47 Value &operator[] ( const Entity &entity )
    \n-
    48 {
    \n-
    49 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
    \n-
    50 }
    \n+
    40 // define index type as provided by ParMETIS
    \n+
    41#if PARMETIS_MAJOR_VERSION > 3
    \n+
    42 typedef idx_t idx_type;
    \n+
    43 typedef ::real_t real_type;
    \n+
    44#else
    \n+
    45 typedef int idx_type;
    \n+
    46 typedef float real_type;
    \n+
    47#endif // PARMETIS_MAJOR_VERSION > 3
    \n+
    48
    \n+
    49 constexpr static int dimension = GridView::dimension;
    \n+
    50
    \n
    51
    \n-
    52 template< class Entity >
    \n-
    53 const Value &operator() ( const Entity &entity, int subEntity ) const
    \n-
    54 {
    \n-
    55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
    \n-
    56 }
    \n-
    57
    \n-
    58 template< class Entity >
    \n-
    59 Value &operator() ( const Entity &entity, int subEntity )
    \n-
    60 {
    \n-
    61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
    \n-
    62 }
    \n-
    63
    \n-
    64 Size size () const { return hostContainer_.size(); }
    \n-
    65
    \n-
    66 void resize ( const Value &value = Value() ) { hostContainer_.resize( value ); }
    \n-\n-
    68
    \n-
    69 void fill ( const Value &value = Value() ) { hostContainer_.fill( value ); }
    \n-
    70
    \n-
    71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }
    \n-
    72
    \n-
    73 ConstIterator begin () const { return hostContainer_.begin(); }
    \n-\n-
    75
    \n-
    76 ConstIterator end () const { return hostContainer_.end(); }
    \n-
    77 Iterator end () { return hostContainer_.end(); }
    \n-
    78
    \n-
    79 int codimension () const { return hostContainer_.codimension(); }
    \n-
    80
    \n-
    81 protected:
    \n-\n-
    83 };
    \n-
    84
    \n-
    85} // namespace Dune
    \n-
    86
    \n-
    87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
    \n-\n+
    62 static std::vector<unsigned> partition(const GridView& gv, const Dune::MPIHelper& mpihelper) {
    \n+
    63 const unsigned numElements = gv.size(0);
    \n+
    64
    \n+
    65 std::vector<unsigned> part(numElements);
    \n+
    66
    \n+
    67 // Setup parameters for ParMETIS
    \n+
    68 idx_type wgtflag = 0; // we don't use weights
    \n+
    69 idx_type numflag = 0; // we are using C-style arrays
    \n+
    70 idx_type ncon = 1; // number of balance constraints
    \n+
    71 idx_type ncommonnodes = 2; // number of nodes elements must have in common to be considered adjacent to each other
    \n+
    72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
    \n+
    73 idx_type edgecut; // will store number of edges cut by partition
    \n+
    74 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
    \n+
    75 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
    \n+
    76 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
    \n+
    77
    \n+
    78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are on process i
    \n+
    79 std::vector<idx_type> elmdist(nparts+1);
    \n+
    80 elmdist[0] = 0;
    \n+
    81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements are on process zero
    \n+
    82
    \n+
    83 // Create and fill arrays "eptr", where eptr[i] is the number of vertices that belong to the i-th element, and
    \n+
    84 // "eind" contains the vertex-numbers of the i-the element in eind[eptr[i]] to eind[eptr[i+1]-1]
    \n+
    85 std::vector<idx_type> eptr, eind;
    \n+
    86 int numVertices = 0;
    \n+
    87 eptr.push_back(numVertices);
    \n+
    88
    \n+
    89 for (const auto& element : elements(gv, Partitions::interior)) {
    \n+
    90 const size_t curNumVertices = referenceElement<double, dimension>(element.type()).size(dimension);
    \n+
    91
    \n+
    92 numVertices += curNumVertices;
    \n+
    93 eptr.push_back(numVertices);
    \n+
    94
    \n+
    95 for (size_t k = 0; k < curNumVertices; ++k)
    \n+
    96 eind.push_back(gv.indexSet().subIndex(element, k, dimension));
    \n+
    97 }
    \n+
    98
    \n+
    99 // Partition mesh using ParMETIS
    \n+
    100 if (0 == mpihelper.rank()) {
    \n+
    101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator();
    \n+
    102
    \n+
    103#if PARMETIS_MAJOR_VERSION >= 4
    \n+
    104 const int OK =
    \n+
    105#endif
    \n+
    106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL, &wgtflag, &numflag,
    \n+
    107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(),
    \n+
    108 options, &edgecut, reinterpret_cast<idx_type*>(part.data()), &comm);
    \n+
    109
    \n+
    110#if PARMETIS_MAJOR_VERSION >= 4
    \n+
    111 if (OK != METIS_OK)
    \n+
    112 DUNE_THROW(Dune::Exception, "ParMETIS returned an error code.");
    \n+
    113#endif
    \n+
    114 }
    \n+
    115
    \n+
    116 return part;
    \n+
    117 }
    \n+
    118
    \n+
    130 static std::vector<unsigned> repartition(const GridView& gv, const Dune::MPIHelper& mpihelper, real_type itr = 1000) {
    \n+
    131
    \n+
    132 // Create global index map
    \n+
    133 GlobalIndexSet<GridView> globalIndex(gv,0);
    \n+
    134
    \n+
    135 int numElements = std::distance(gv.template begin<0, Interior_Partition>(),
    \n+
    136 gv.template end<0, Interior_Partition>());
    \n+
    137
    \n+
    138 std::vector<unsigned> interiorPart(numElements);
    \n+
    139
    \n+
    140 // Setup parameters for ParMETIS
    \n+
    141 idx_type wgtflag = 0; // we don't use weights
    \n+
    142 idx_type numflag = 0; // we are using C-style arrays
    \n+
    143 idx_type ncon = 1; // number of balance constraints
    \n+
    144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
    \n+
    145 idx_type edgecut; // will store number of edges cut by partition
    \n+
    146 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
    \n+
    147 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
    \n+
    148 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
    \n+
    149
    \n+
    150 MPI_Comm comm = Dune::MPIHelper::getCommunicator();
    \n+
    151
    \n+
    152 // Make the number of interior elements of each processor available to all processors
    \n+
    153 std::vector<int> offset(gv.comm().size());
    \n+
    154 std::fill(offset.begin(), offset.end(), 0);
    \n+
    155
    \n+
    156 gv.comm().template allgather<int>(&numElements, 1, offset.data());
    \n+
    157
    \n+
    158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that are on process i
    \n+
    159 std::vector<idx_type> vtxdist(gv.comm().size()+1);
    \n+
    160 vtxdist[0] = 0;
    \n+
    161
    \n+
    162 for (unsigned int i=1; i<vtxdist.size(); ++i)
    \n+
    163 vtxdist[i] = vtxdist[i-1] + offset[i-1];
    \n+
    164
    \n+
    165 // Set up element adjacency lists
    \n+
    166 std::vector<idx_type> xadj, adjncy;
    \n+
    167 xadj.push_back(0);
    \n+
    168
    \n+
    169 for (const auto& element : elements(gv, Partitions::interior)) {
    \n+
    170 size_t numNeighbors = 0;
    \n+
    171
    \n+
    172 for (const auto& in : intersections(gv, element)) {
    \n+
    173 if (in.neighbor()) {
    \n+
    174 adjncy.push_back(globalIndex.index(in.outside()));
    \n+
    175
    \n+
    176 ++numNeighbors;
    \n+
    177 }
    \n+
    178 }
    \n+
    179
    \n+
    180 xadj.push_back(xadj.back() + numNeighbors);
    \n+
    181 }
    \n+
    182
    \n+
    183#if PARMETIS_MAJOR_VERSION >= 4
    \n+
    184 const int OK =
    \n+
    185#endif
    \n+
    186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(), NULL, NULL, NULL,
    \n+
    187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(),
    \n+
    188 &itr, options, &edgecut, reinterpret_cast<idx_type*>(interiorPart.data()), &comm);
    \n+
    189
    \n+
    190#if PARMETIS_MAJOR_VERSION >= 4
    \n+
    191 if (OK != METIS_OK)
    \n+
    192 DUNE_THROW(Dune::Exception, "ParMETIS returned error code " << OK);
    \n+
    193#endif
    \n+
    194
    \n+
    195 // At this point, interiorPart contains a target rank for each interior element, and they are sorted
    \n+
    196 // by the order in which the grid view traverses them. Now we need to do two things:
    \n+
    197 // a) Add additional dummy entries for the ghost elements
    \n+
    198 // b) Use the element index for the actual ordering. Since there may be different types of elements,
    \n+
    199 // we cannot use the index set directly, but have to go through a Mapper.
    \n+
    200
    \n+
    201 typedef MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
    \n+
    202 ElementMapper elementMapper(gv, mcmgElementLayout());
    \n+
    203
    \n+
    204 std::vector<unsigned int> part(gv.size(0));
    \n+
    205 std::fill(part.begin(), part.end(), 0);
    \n+
    206 unsigned int c = 0;
    \n+
    207 for (const auto& element : elements(gv, Partitions::interior))
    \n+
    208 part[elementMapper.index(element)] = interiorPart[c++];
    \n+
    209
    \n+
    210 return part;
    \n+
    211 }
    \n+
    212 };
    \n+
    213
    \n+
    214} // namespace Dune
    \n+
    215
    \n+
    216#else // PARMETIS_MAJOR_VERSION
    \n+
    217#warning "You seem to be using the ParMETIS emulation layer of scotch, which does not work with this file."
    \n+
    218#endif
    \n+
    219
    \n+
    220#else // HAVE_PARMETIS
    \n+
    221#warning "PARMETIS was not found, please check your configuration"
    \n+
    222#endif
    \n+
    223
    \n+
    224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
    \n+
    Mapper for multiple codim and multiple geometry types.
    \n+\n+
    Provides a globally unique index for all entities of a distributed Dune grid.
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n+
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n-\n-
    void swap(This &other)
    Definition: persistentcontainermap.hh:97
    \n-
    void fill(const Value &value)
    Definition: persistentcontainermap.hh:95
    \n-
    int codimension() const
    Definition: persistentcontainermap.hh:111
    \n-
    void resize(const Value &value=Value())
    Definition: persistentcontainermap.hh:87
    \n-
    ConstIterator begin() const
    Definition: persistentcontainermap.hh:175
    \n-
    ConstIterator end() const
    Definition: persistentcontainermap.hh:190
    \n-
    Size size() const
    Definition: persistentcontainermap.hh:85
    \n-
    void shrinkToFit()
    Definition: persistentcontainermap.hh:93
    \n-
    Definition: persistentcontainerwrapper.hh:19
    \n-
    void fill(const Value &value=Value())
    Definition: persistentcontainerwrapper.hh:69
    \n-
    PersistentContainer< HostGrid, T >::ConstIterator ConstIterator
    Definition: persistentcontainerwrapper.hh:34
    \n-
    Size size() const
    Definition: persistentcontainerwrapper.hh:64
    \n-
    ConstIterator begin() const
    Definition: persistentcontainerwrapper.hh:73
    \n-
    const Value & operator()(const Entity &entity, int subEntity) const
    Definition: persistentcontainerwrapper.hh:53
    \n-
    G Grid
    Definition: persistentcontainerwrapper.hh:28
    \n-
    const Value & operator[](const Entity &entity) const
    Definition: persistentcontainerwrapper.hh:41
    \n-
    void resize(const Value &value=Value())
    Definition: persistentcontainerwrapper.hh:66
    \n-
    PersistentContainer< HostGrid, T >::Size Size
    Definition: persistentcontainerwrapper.hh:31
    \n-
    int codimension() const
    Definition: persistentcontainerwrapper.hh:79
    \n-
    PersistentContainer< HostGrid, T >::Value Value
    Definition: persistentcontainerwrapper.hh:30
    \n-
    void swap(This &other)
    Definition: persistentcontainerwrapper.hh:71
    \n-
    ConstIterator end() const
    Definition: persistentcontainerwrapper.hh:76
    \n-
    PersistentContainerWrapper(const Grid &grid, int codim, const Value &value=Value())
    Definition: persistentcontainerwrapper.hh:36
    \n-
    PersistentContainer< HostGrid, T >::Iterator Iterator
    Definition: persistentcontainerwrapper.hh:33
    \n-
    void shrinkToFit()
    Definition: persistentcontainerwrapper.hh:67
    \n-
    Iterator begin()
    Definition: persistentcontainerwrapper.hh:74
    \n-
    PersistentContainer< HostGrid, T > hostContainer_
    Definition: persistentcontainerwrapper.hh:82
    \n-
    Iterator end()
    Definition: persistentcontainerwrapper.hh:77
    \n-\n+
    constexpr Interior interior
    PartitionSet for the interior partition.
    Definition: partitionset.hh:272
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,199 +5,254 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-persistentcontainerwrapper.hh\n+parmetisgridpartitioner.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n- 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH\n- 6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH\n- 7\n- 8#include \n- 9#include \n- 10\n- 11namespace Dune\n- 12{\n- 13\n- 14 // PersistentContainerWrapper\n- 15 // --------------------------\n- 16\n- 17 template< class G, class T >\n-18 class PersistentContainerWrapper\n- 19 {\n- 20 typedef PersistentContainerWrapper<_G,_T_> This;\n+ 3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH\n+ 4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH\n+ 5\n+ 10#include \n+ 11#include \n+ 12\n+ 13#include \n+ 14#include \n+ 15\n+ 16#include \n+ 17\n+ 18#include \n+ 19#include \n+ 20#include \n 21\n- 22 typedef Dune::HostGridAccess<_G_> HostGridAccess;\n+ 22#if HAVE_PARMETIS\n 23\n- 24 typedef typename HostGridAccess::HostGrid HostGrid;\n- 25 typedef PersistentContainer<_HostGrid,_T_> PersistentContainerHostGrid;\n- 26\n- 27 public:\n-28 typedef G Grid;\n+ 24#include \n+ 25\n+ 26// only enable for ParMETIS because the implementation uses functions that\n+ 27// are not emulated by scotch\n+ 28#ifdef PARMETIS_MAJOR_VERSION\n 29\n-30 typedef typename PersistentContainer<_HostGrid,_T_>::Value Value;\n-31 typedef typename PersistentContainer<_HostGrid,_T_>::Size Size;\n+ 30namespace Dune\n+ 31{\n 32\n-33 typedef typename PersistentContainer<_HostGrid,_T_>::Iterator Iterator;\n-34 typedef typename PersistentContainer<_HostGrid,_T_>::ConstIterator\n-ConstIterator;\n- 35\n-36 PersistentContainerWrapper ( const Grid &grid, int codim, const Value &value\n-= Value() )\n- 37 : hostContainer_( HostGridAccess::hostGrid( grid ), codim, value )\n- 38 {}\n+ 37 template\n+ 38 struct ParMetisGridPartitioner {\n 39\n- 40 template< class Entity >\n-41 const Value &operator[]( const Entity &entity ) const\n- 42 {\n- 43 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];\n- 44 }\n- 45\n- 46 template< class Entity >\n-47 Value &operator[]( const Entity &entity )\n- 48 {\n- 49 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];\n- 50 }\n+ 40 // define index type as provided by ParMETIS\n+ 41#if PARMETIS_MAJOR_VERSION > 3\n+ 42 typedef idx_t idx_type;\n+ 43 typedef ::real_t real_type;\n+ 44#else\n+ 45 typedef int idx_type;\n+ 46 typedef float real_type;\n+ 47#endif // PARMETIS_MAJOR_VERSION > 3\n+ 48\n+ 49 constexpr static int dimension = GridView::dimension;\n+ 50\n 51\n- 52 template< class Entity >\n-53 const Value &operator()( const Entity &entity, int subEntity ) const\n- 54 {\n- 55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );\n- 56 }\n- 57\n- 58 template< class Entity >\n-59 Value &operator()( const Entity &entity, int subEntity )\n- 60 {\n- 61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );\n- 62 }\n- 63\n-64 Size size () const { return hostContainer_.size(); }\n- 65\n-66 void resize ( const Value &value = Value() ) { hostContainer_.resize( value\n-); }\n-67 void shrinkToFit () { return hostContainer_.shrinkToFit(); }\n- 68\n-69 void fill ( const Value &value = Value() ) { hostContainer_.fill( value ); }\n- 70\n-71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }\n- 72\n-73 ConstIterator begin () const { return hostContainer_.begin(); }\n-74 Iterator begin () { return hostContainer_.begin(); }\n- 75\n-76 ConstIterator end () const { return hostContainer_.end(); }\n-77 Iterator end () { return hostContainer_.end(); }\n- 78\n-79 int codimension () const { return hostContainer_.codimension(); }\n- 80\n- 81 protected:\n-82 PersistentContainer<_HostGrid,_T_> hostContainer_;\n- 83 };\n- 84\n- 85} // namespace Dune\n- 86\n- 87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH\n-hostgridaccess.hh\n+ 62 static std::vector partition(const GridView& gv, const Dune::\n+MPIHelper& mpihelper) {\n+ 63 const unsigned numElements = gv.size(0);\n+ 64\n+ 65 std::vector part(numElements);\n+ 66\n+ 67 // Setup parameters for ParMETIS\n+ 68 idx_type wgtflag = 0; // we don't use weights\n+ 69 idx_type numflag = 0; // we are using C-style arrays\n+ 70 idx_type ncon = 1; // number of balance constraints\n+ 71 idx_type ncommonnodes = 2; // number of nodes elements must have in common\n+to be considered adjacent to each other\n+ 72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed,\n+output and coupling\n+ 73 idx_type edgecut; // will store number of edges cut by partition\n+ 74 idx_type nparts = mpihelper.size(); // number of parts equals number of\n+processes\n+ 75 std::vector tpwgts(ncon*nparts, 1./nparts); // load per\n+subdomain and weight (same load on every process)\n+ 76 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight\n+tolerance for every weight there is)\n+ 77\n+ 78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are\n+on process i\n+ 79 std::vector elmdist(nparts+1);\n+ 80 elmdist[0] = 0;\n+ 81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements\n+are on process zero\n+ 82\n+ 83 // Create and fill arrays \"eptr\", where eptr[i] is the number of vertices\n+that belong to the i-th element, and\n+ 84 // \"eind\" contains the vertex-numbers of the i-the element in eind[eptr[i]]\n+to eind[eptr[i+1]-1]\n+ 85 std::vector eptr, eind;\n+ 86 int numVertices = 0;\n+ 87 eptr.push_back(numVertices);\n+ 88\n+ 89 for (const auto& element : elements(gv, Partitions::interior)) {\n+ 90 const size_t curNumVertices = referenceElement\n+(element.type()).size(dimension);\n+ 91\n+ 92 numVertices += curNumVertices;\n+ 93 eptr.push_back(numVertices);\n+ 94\n+ 95 for (size_t k = 0; k < curNumVertices; ++k)\n+ 96 eind.push_back(gv.indexSet().subIndex(element, k, dimension));\n+ 97 }\n+ 98\n+ 99 // Partition mesh using ParMETIS\n+ 100 if (0 == mpihelper.rank()) {\n+ 101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator();\n+ 102\n+ 103#if PARMETIS_MAJOR_VERSION >= 4\n+ 104 const int OK =\n+ 105#endif\n+ 106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL,\n+&wgtflag, &numflag,\n+ 107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(),\n+ 108 options, &edgecut, reinterpret_cast(part.data()), &comm);\n+ 109\n+ 110#if PARMETIS_MAJOR_VERSION >= 4\n+ 111 if (OK != METIS_OK)\n+ 112 DUNE_THROW(Dune::Exception, \"ParMETIS returned an error code.\");\n+ 113#endif\n+ 114 }\n+ 115\n+ 116 return part;\n+ 117 }\n+ 118\n+ 130 static std::vector repartition(const GridView& gv, const Dune::\n+MPIHelper& mpihelper, real_type itr = 1000) {\n+ 131\n+ 132 // Create global index map\n+ 133 GlobalIndexSet globalIndex(gv,0);\n+ 134\n+ 135 int numElements = std::distance(gv.template begin<0, Interior_Partition>\n+(),\n+ 136 gv.template end<0, Interior_Partition>());\n+ 137\n+ 138 std::vector interiorPart(numElements);\n+ 139\n+ 140 // Setup parameters for ParMETIS\n+ 141 idx_type wgtflag = 0; // we don't use weights\n+ 142 idx_type numflag = 0; // we are using C-style arrays\n+ 143 idx_type ncon = 1; // number of balance constraints\n+ 144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed,\n+output and coupling\n+ 145 idx_type edgecut; // will store number of edges cut by partition\n+ 146 idx_type nparts = mpihelper.size(); // number of parts equals number of\n+processes\n+ 147 std::vector tpwgts(ncon*nparts, 1./nparts); // load per\n+subdomain and weight (same load on every process)\n+ 148 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight\n+tolerance for every weight there is)\n+ 149\n+ 150 MPI_Comm comm = Dune::MPIHelper::getCommunicator();\n+ 151\n+ 152 // Make the number of interior elements of each processor available to all\n+processors\n+ 153 std::vector offset(gv.comm().size());\n+ 154 std::fill(offset.begin(), offset.end(), 0);\n+ 155\n+ 156 gv.comm().template allgather(&numElements, 1, offset.data());\n+ 157\n+ 158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that\n+are on process i\n+ 159 std::vector vtxdist(gv.comm().size()+1);\n+ 160 vtxdist[0] = 0;\n+ 161\n+ 162 for (unsigned int i=1; i xadj, adjncy;\n+ 167 xadj.push_back(0);\n+ 168\n+ 169 for (const auto& element : elements(gv, Partitions::interior)) {\n+ 170 size_t numNeighbors = 0;\n+ 171\n+ 172 for (const auto& in : intersections(gv, element)) {\n+ 173 if (in.neighbor()) {\n+ 174 adjncy.push_back(globalIndex.index(in.outside()));\n+ 175\n+ 176 ++numNeighbors;\n+ 177 }\n+ 178 }\n+ 179\n+ 180 xadj.push_back(xadj.back() + numNeighbors);\n+ 181 }\n+ 182\n+ 183#if PARMETIS_MAJOR_VERSION >= 4\n+ 184 const int OK =\n+ 185#endif\n+ 186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(),\n+NULL, NULL, NULL,\n+ 187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(),\n+ 188 &itr, options, &edgecut, reinterpret_cast(interiorPart.data()),\n+&comm);\n+ 189\n+ 190#if PARMETIS_MAJOR_VERSION >= 4\n+ 191 if (OK != METIS_OK)\n+ 192 DUNE_THROW(Dune::Exception, \"ParMETIS returned error code \" << OK);\n+ 193#endif\n+ 194\n+ 195 // At this point, interiorPart contains a target rank for each interior\n+element, and they are sorted\n+ 196 // by the order in which the grid view traverses them. Now we need to do\n+two things:\n+ 197 // a) Add additional dummy entries for the ghost elements\n+ 198 // b) Use the element index for the actual ordering. Since there may be\n+different types of elements,\n+ 199 // we cannot use the index set directly, but have to go through a Mapper.\n+ 200\n+ 201 typedef MultipleCodimMultipleGeomTypeMapper ElementMapper;\n+ 202 ElementMapper elementMapper(gv, mcmgElementLayout());\n+ 203\n+ 204 std::vector part(gv.size(0));\n+ 205 std::fill(part.begin(), part.end(), 0);\n+ 206 unsigned int c = 0;\n+ 207 for (const auto& element : elements(gv, Partitions::interior))\n+ 208 part[elementMapper.index(element)] = interiorPart[c++];\n+ 209\n+ 210 return part;\n+ 211 }\n+ 212 };\n+ 213\n+ 214} // namespace Dune\n+ 215\n+ 216#else // PARMETIS_MAJOR_VERSION\n+ 217#warning \"You seem to be using the ParMETIS emulation layer of scotch,\n+which does not work with this file.\"\n+ 218#endif\n+ 219\n+ 220#else // HAVE_PARMETIS\n+ 221#warning \"PARMETIS was not found, please check your configuration\"\n+ 222#endif\n+ 223\n+ 224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH\n+mcmgmapper.hh\n+Mapper for multiple codim and multiple geometry types.\n+rangegenerators.hh\n+globalindexset.hh\n+Provides a globally unique index for all entities of a distributed Dune grid.\n+Dune::GridView::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/gridview.hh:148\n+Dune::mcmgElementLayout\n+MCMGLayout mcmgElementLayout()\n+layout for elements (codim-0 entities)\n+Definition: mcmgmapper.hh:97\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::HostGridAccess\n-provides access to host grid objects from GeometryGrid\n-Definition: identitygrid.hh:37\n-Dune::PersistentContainer<_HostGrid,_T_>\n-Dune::PersistentContainerMap::swap\n-void swap(This &other)\n-Definition: persistentcontainermap.hh:97\n-Dune::PersistentContainerMap::fill\n-void fill(const Value &value)\n-Definition: persistentcontainermap.hh:95\n-Dune::PersistentContainerMap::codimension\n-int codimension() const\n-Definition: persistentcontainermap.hh:111\n-Dune::PersistentContainerMap::resize\n-void resize(const Value &value=Value())\n-Definition: persistentcontainermap.hh:87\n-Dune::PersistentContainerMap::begin\n-ConstIterator begin() const\n-Definition: persistentcontainermap.hh:175\n-Dune::PersistentContainerMap::end\n-ConstIterator end() const\n-Definition: persistentcontainermap.hh:190\n-Dune::PersistentContainerMap::size\n-Size size() const\n-Definition: persistentcontainermap.hh:85\n-Dune::PersistentContainerMap::shrinkToFit\n-void shrinkToFit()\n-Definition: persistentcontainermap.hh:93\n-Dune::PersistentContainerWrapper\n-Definition: persistentcontainerwrapper.hh:19\n-Dune::PersistentContainerWrapper::fill\n-void fill(const Value &value=Value())\n-Definition: persistentcontainerwrapper.hh:69\n-Dune::PersistentContainerWrapper::ConstIterator\n-PersistentContainer< HostGrid, T >::ConstIterator ConstIterator\n-Definition: persistentcontainerwrapper.hh:34\n-Dune::PersistentContainerWrapper::size\n-Size size() const\n-Definition: persistentcontainerwrapper.hh:64\n-Dune::PersistentContainerWrapper::begin\n-ConstIterator begin() const\n-Definition: persistentcontainerwrapper.hh:73\n-Dune::PersistentContainerWrapper::operator()\n-const Value & operator()(const Entity &entity, int subEntity) const\n-Definition: persistentcontainerwrapper.hh:53\n-Dune::PersistentContainerWrapper::Grid\n-G Grid\n-Definition: persistentcontainerwrapper.hh:28\n-Dune::PersistentContainerWrapper::operator[]\n-const Value & operator[](const Entity &entity) const\n-Definition: persistentcontainerwrapper.hh:41\n-Dune::PersistentContainerWrapper::resize\n-void resize(const Value &value=Value())\n-Definition: persistentcontainerwrapper.hh:66\n-Dune::PersistentContainerWrapper::Size\n-PersistentContainer< HostGrid, T >::Size Size\n-Definition: persistentcontainerwrapper.hh:31\n-Dune::PersistentContainerWrapper::codimension\n-int codimension() const\n-Definition: persistentcontainerwrapper.hh:79\n-Dune::PersistentContainerWrapper::Value\n-PersistentContainer< HostGrid, T >::Value Value\n-Definition: persistentcontainerwrapper.hh:30\n-Dune::PersistentContainerWrapper::swap\n-void swap(This &other)\n-Definition: persistentcontainerwrapper.hh:71\n-Dune::PersistentContainerWrapper::end\n-ConstIterator end() const\n-Definition: persistentcontainerwrapper.hh:76\n-Dune::PersistentContainerWrapper::PersistentContainerWrapper\n-PersistentContainerWrapper(const Grid &grid, int codim, const Value\n-&value=Value())\n-Definition: persistentcontainerwrapper.hh:36\n-Dune::PersistentContainerWrapper::Iterator\n-PersistentContainer< HostGrid, T >::Iterator Iterator\n-Definition: persistentcontainerwrapper.hh:33\n-Dune::PersistentContainerWrapper::shrinkToFit\n-void shrinkToFit()\n-Definition: persistentcontainerwrapper.hh:67\n-Dune::PersistentContainerWrapper::begin\n-Iterator begin()\n-Definition: persistentcontainerwrapper.hh:74\n-Dune::PersistentContainerWrapper::hostContainer_\n-PersistentContainer< HostGrid, T > hostContainer_\n-Definition: persistentcontainerwrapper.hh:82\n-Dune::PersistentContainerWrapper::end\n-Iterator end()\n-Definition: persistentcontainerwrapper.hh:77\n-persistentcontainer.hh\n+Dune::Partitions::interior\n+constexpr Interior interior\n+PartitionSet for the interior partition.\n+Definition: partitionset.hh:272\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00983.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00983.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vertexorderfactory.hh File Reference\n+dune-grid: gridtype.hh File Reference\n \n \n \n \n \n \n \n@@ -62,44 +62,25 @@\n \n
    \n \n
    \n \n
    \n- \n-
    vertexorderfactory.hh File Reference
    \n+
    gridtype.hh File Reference
    \n
    \n
    \n-
    #include <algorithm>
    \n-#include <cstddef>
    \n-#include <functional>
    \n-#include <vector>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/geometry/generalvertexorder.hh>
    \n-
    \n+\n+

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

    \n+\n

    Go to the source code of this file.

    \n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::VertexOrderByIdFactory< IdSet, Index >
     Factory for GeneralVertexOrder objects using an IdSet. More...
     
    struct  Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim >
     type of vertex order object may depend on the dimension of the element More...
     
    \n-\n-\n-\n-\n-

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

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

    \n+
    Author
    Andreas Dedner
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,31 +5,19 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-Classes | Namespaces\n-vertexorderfactory.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+gridtype.hh File Reference\n+This file can be included directly following config.h to test if a grid type\n+was correctly selected. More...\n Go_to_the_source_code_of_this_file.\n- Classes\n- class \u00a0Dune::VertexOrderByIdFactory<_IdSet,_Index_>\n-\u00a0 Factory for GeneralVertexOrder objects using an IdSet. More...\n-\u00a0\n-struct \u00a0Dune::VertexOrderByIdFactory<_IdSet,_Index_>::VertexOrder<_dim_>\n-\u00a0 type of vertex order object may depend on the dimension of the element\n- More...\n-\u00a0\n- Namespaces\n-namespace \u00a0Dune\n-\u00a0 Include standard header files.\n-\u00a0\n+***** Detailed Description *****\n+This file can be included directly following config.h to test if a grid type\n+was correctly selected.\n+ Author\n+ Andreas Dedner\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00983_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: vertexorderfactory.hh Source File\n+dune-grid: gridtype.hh Source File\n \n \n \n \n \n \n \n@@ -62,77 +62,42 @@\n \n
    \n \n
    \n \n
    \n-
    vertexorderfactory.hh
    \n+
    gridtype.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
    \n-
    7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
    \n-
    8
    \n-
    9#include <algorithm>
    \n-
    10#include <cstddef>
    \n-
    11#include <functional>
    \n-
    12#include <vector>
    \n-
    13
    \n-
    14#include <dune/geometry/referenceelements.hh>
    \n-
    15#include <dune/geometry/generalvertexorder.hh>
    \n-
    16
    \n-
    17namespace Dune {
    \n+
    5#ifndef DUNE_GRIDTYPE_HH
    \n+
    6#define DUNE_GRIDTYPE_HH
    \n+
    7
    \n+
    17#ifndef HEADERCHECK
    \n
    18
    \n-
    20
    \n-
    31 template<class IdSet, class Index = std::size_t>
    \n-\n-
    33 const IdSet& idset;
    \n-
    34
    \n-
    35 public:
    \n-
    37 template<std::size_t dim>
    \n-
    38 struct VertexOrder {
    \n-
    40 typedef GeneralVertexOrder<dim, Index> type;
    \n-
    41 };
    \n-
    42
    \n-
    44
    \n-
    53 VertexOrderByIdFactory(const IdSet &idset_) : idset(idset_) { }
    \n-
    54
    \n-
    56
    \n-
    62 template<typename Element>
    \n-\n-
    64 make(const Element &e) const {
    \n-
    65
    \n-
    66 std::size_t size = referenceElement(e.geometry()).size(Element::mydimension);
    \n-
    67
    \n-
    68 std::vector<typename IdSet::IdType> ids(size);
    \n-
    69 for(std::size_t i = 0; i < size; ++i)
    \n-
    70 ids[i] = idset.subId(e, i, Element::mydimension);
    \n-
    71 return GeneralVertexOrder<Element::mydimension, Index>
    \n-
    72 (e.type(), ids.begin(), ids.end());
    \n-
    73 }
    \n-
    74 };
    \n-
    75
    \n-
    76} // namespace Dune
    \n-
    77
    \n-
    78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
    \n-
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
    Definition: common/geometry.hh:558
    \n-
    ALBERTA EL Element
    Definition: misc.hh:54
    \n-
    Id Set Interface.
    Definition: indexidset.hh:452
    \n-
    IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
    Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
    Definition: indexidset.hh:486
    \n-
    Factory for GeneralVertexOrder objects using an IdSet.
    Definition: vertexorderfactory.hh:32
    \n-
    VertexOrderByIdFactory(const IdSet &idset_)
    construct a factory object
    Definition: vertexorderfactory.hh:53
    \n-
    VertexOrder< Element::mydimension >::type make(const Element &e) const
    construct a vertex ordering object
    Definition: vertexorderfactory.hh:64
    \n-
    type of vertex order object may depend on the dimension of the element
    Definition: vertexorderfactory.hh:38
    \n-
    GeneralVertexOrder< dim, Index > type
    type of vertex order object
    Definition: vertexorderfactory.hh:40
    \n+
    19// NOGRID is used to specify that no default was set during configure
    \n+
    20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected
    \n+
    21// and an error is produced
    \n+
    22#if defined NOGRID
    \n+
    23 #if ! HAVE_GRIDTYPE
    \n+
    24 #error "No grid type selected, use GRIDTYPE=..."
    \n+
    25 #endif
    \n+
    26#else
    \n+
    27 #if ! HAVE_GRIDTYPE
    \n+
    28 #error "No grid type selected, typo in GRIDTYPE=...?"
    \n+
    29 #endif
    \n+
    30#endif
    \n+
    31
    \n+
    32#endif // HEADERCHECK
    \n+
    33
    \n+
    34#endif // DUNE_GRIDTYPE_HH
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,100 +5,38 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-vertexorderfactory.hh\n+gridtype.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH\n- 7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH\n- 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13\n- 14#include \n- 15#include \n- 16\n- 17namespace Dune {\n+ 5#ifndef DUNE_GRIDTYPE_HH\n+ 6#define DUNE_GRIDTYPE_HH\n+ 7\n+ 17#ifndef HEADERCHECK\n 18\n- 20\n- 31 template\n-32 class VertexOrderByIdFactory {\n- 33 const IdSet& idset;\n- 34\n- 35 public:\n- 37 template\n-38 struct VertexOrder {\n-40 typedef GeneralVertexOrder type;\n- 41 };\n- 42\n- 44\n-53 VertexOrderByIdFactory(const IdSet &idset_) : idset(idset_) { }\n- 54\n- 56\n- 62 template\n- 63 typename VertexOrder::type\n-64 make(const Element &e) const {\n- 65\n- 66 std::size_t size = referenceElement(e.geometry()).size(Element::\n-mydimension);\n- 67\n- 68 std::vector ids(size);\n- 69 for(std::size_t i = 0; i < size; ++i)\n- 70 ids[i] = idset.subId(e, i, Element::mydimension);\n- 71 return GeneralVertexOrder\n- 72 (e.type(), ids.begin(), ids.end());\n- 73 }\n- 74 };\n- 75\n- 76} // namespace Dune\n- 77\n- 78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH\n-Dune\n-Include standard header files.\n-Definition: agrid.hh:60\n-Dune::referenceElement\n-auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo)\n--> decltype(referenceElement(geo, geo.impl()))\n-Definition: common/geometry.hh:558\n-Dune::Alberta::Element\n-ALBERTA EL Element\n-Definition: misc.hh:54\n-Dune::IdSet\n-Id Set Interface.\n-Definition: indexidset.hh:452\n-Dune::IdSet::subId\n-IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim)\n-const\n-Get id of subentity i of co-dimension codim of a co-dimension 0 entity.\n-Definition: indexidset.hh:486\n-Dune::VertexOrderByIdFactory\n-Factory for GeneralVertexOrder objects using an IdSet.\n-Definition: vertexorderfactory.hh:32\n-Dune::VertexOrderByIdFactory::VertexOrderByIdFactory\n-VertexOrderByIdFactory(const IdSet &idset_)\n-construct a factory object\n-Definition: vertexorderfactory.hh:53\n-Dune::VertexOrderByIdFactory::make\n-VertexOrder< Element::mydimension >::type make(const Element &e) const\n-construct a vertex ordering object\n-Definition: vertexorderfactory.hh:64\n-Dune::VertexOrderByIdFactory::VertexOrder\n-type of vertex order object may depend on the dimension of the element\n-Definition: vertexorderfactory.hh:38\n-Dune::VertexOrderByIdFactory::VertexOrder::type\n-GeneralVertexOrder< dim, Index > type\n-type of vertex order object\n-Definition: vertexorderfactory.hh:40\n+ 19// NOGRID is used to specify that no default was set during configure\n+ 20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected\n+ 21// and an error is produced\n+ 22#if defined NOGRID\n+ 23 #if ! HAVE_GRIDTYPE\n+ 24 #error \"No grid type selected, use GRIDTYPE=...\"\n+ 25 #endif\n+ 26#else\n+ 27 #if ! HAVE_GRIDTYPE\n+ 28 #error \"No grid type selected, typo in GRIDTYPE=...?\"\n+ 29 #endif\n+ 30#endif\n+ 31\n+ 32#endif // HEADERCHECK\n+ 33\n+ 34#endif // DUNE_GRIDTYPE_HH\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00986.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00986.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridinfo-gmsh-main.hh File Reference\n+dune-grid: persistentcontainerwrapper.hh File Reference\n \n \n \n \n \n \n \n@@ -62,55 +62,36 @@\n \n
    \n \n
    \n \n
    \n-
    gridinfo-gmsh-main.hh File Reference
    \n+ \n+
    persistentcontainerwrapper.hh File Reference
    \n
    \n
    \n-\n-

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

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

    Go to the source code of this file.

    \n-

    Detailed Description

    \n-

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

    \n-
    Author
    J\u00f6 Fahlke jorri.nosp@m.t@jo.nosp@m.rrit..nosp@m.de
    \n-
    Date
    2011
    \n-

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

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

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

    \n-
    \n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::PersistentContainerWrapper< G, T >
     
    \n+\n+\n+\n+\n+

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-utf-8\n+us-ascii\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,51 +5,22 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-gridinfo-gmsh-main.hh File Reference\n-Generic main() function for printing information about a mesh read from a .msh-\n-file. More...\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+Classes | Namespaces\n+persistentcontainerwrapper.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n-***** Detailed Description *****\n-Generic main() function for printing information about a mesh read from a .msh-\n-file.\n- Author\n- J\u00f6 Fahlke jorri.nosp@m.t@jo.nosp@m.rrit..nosp@m.de\n- Date\n- 2011\n-This header contains a generic main() function. To use it for your grid, write\n-a .cc file like this:\n-#ifdef HAVE_CONFIG_H\n-#include \"config.h\"\n-#endif\n-#include \n-#include \n-const std::string programName = \"dune-gridinfo-gmsh-mygrid-3d\";\n-typedef Dune::MyGrid<3> Grid;\n-#include \n-gridinfo-gmsh-main.hh\n-Generic main() function for printing information about a mesh read from a .msh-\n-file.\n-Write an automake target for your program as usual. No special libraries are\n-needed for you program, beyond what is needed for the grid in question.\n+ Classes\n+class \u00a0Dune::PersistentContainerWrapper<_G,_T_>\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00986_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridinfo-gmsh-main.hh Source File\n+dune-grid: persistentcontainerwrapper.hh Source File\n \n \n \n \n \n \n \n@@ -62,223 +62,138 @@\n \n
    \n \n
    \n \n
    \n-
    gridinfo-gmsh-main.hh
    \n+
    persistentcontainerwrapper.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
    \n-
    7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
    \n-
    8
    \n-
    9#include <cstddef>
    \n-
    10#include <cstdlib>
    \n-
    11#include <exception>
    \n-
    12#include <iostream>
    \n-
    13#include <memory>
    \n-
    14#include <ostream>
    \n-
    15#include <sstream>
    \n-
    16#include <stdexcept>
    \n-
    17#include <string>
    \n-
    18#include <vector>
    \n-
    19
    \n-
    20#include <dune/common/classname.hh>
    \n-
    21#include <dune/common/exceptions.hh>
    \n-
    22#include <dune/common/parallel/mpihelper.hh>
    \n+
    5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
    \n+
    6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH
    \n+
    7
    \n+\n+\n+
    10
    \n+
    11namespace Dune
    \n+
    12{
    \n+
    13
    \n+
    14 // PersistentContainerWrapper
    \n+
    15 // --------------------------
    \n+
    16
    \n+
    17 template< class G, class T >
    \n+\n+
    19 {
    \n+\n+
    21
    \n+\n
    23
    \n-\n-\n+
    24 typedef typename HostGridAccess::HostGrid HostGrid;
    \n+\n
    26
    \n-
    54#ifdef HEADERCHECK
    \n-
    55// define so headercheck will run
    \n-
    56const std::string programName = "headercheck";
    \n-
    57#endif // HEADERCHECK
    \n-
    58
    \n-
    59#ifndef DOXYGEN
    \n-
    60namespace {
    \n-
    61 // anonymous namespace so we don't freakishly conflict with another usage()
    \n-
    62 // function that may be linked in from another compilation unit.
    \n-
    63 void usage(std::ostream &stream) {
    \n-
    64 stream << "USAGE:\\n"
    \n-
    65 << " " << programName << " [-R REFINES] GRIDFILE\\n"
    \n-
    66 << "\\n"
    \n-
    67 << "PARAMETERS:\\n"
    \n-
    68 << " -R REFINES How many global refines to do after reading\\n"
    \n-
    69 << " (default: 0)\\n"
    \n-
    70 << " GRIDFILE Name of the .msh file to read the grid from.\\n"
    \n-
    71 << std::flush;
    \n-
    72 }
    \n-
    73
    \n-
    74 bool prefix_match(const std::string &prefix, const std::string &str)
    \n-
    75 {
    \n-
    76 return str.compare(0,prefix.size(), prefix) == 0;
    \n-
    77 }
    \n+
    27 public:
    \n+
    28 typedef G Grid;
    \n+
    29
    \n+\n+\n+
    32
    \n+\n+\n+
    35
    \n+
    36 PersistentContainerWrapper ( const Grid &grid, int codim, const Value &value = Value() )
    \n+
    37 : hostContainer_( HostGridAccess::hostGrid( grid ), codim, value )
    \n+
    38 {}
    \n+
    39
    \n+
    40 template< class Entity >
    \n+
    41 const Value &operator[] ( const Entity &entity ) const
    \n+
    42 {
    \n+
    43 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
    \n+
    44 }
    \n+
    45
    \n+
    46 template< class Entity >
    \n+
    47 Value &operator[] ( const Entity &entity )
    \n+
    48 {
    \n+
    49 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
    \n+
    50 }
    \n+
    51
    \n+
    52 template< class Entity >
    \n+
    53 const Value &operator() ( const Entity &entity, int subEntity ) const
    \n+
    54 {
    \n+
    55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
    \n+
    56 }
    \n+
    57
    \n+
    58 template< class Entity >
    \n+
    59 Value &operator() ( const Entity &entity, int subEntity )
    \n+
    60 {
    \n+
    61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
    \n+
    62 }
    \n+
    63
    \n+
    64 Size size () const { return hostContainer_.size(); }
    \n+
    65
    \n+
    66 void resize ( const Value &value = Value() ) { hostContainer_.resize( value ); }
    \n+\n+
    68
    \n+
    69 void fill ( const Value &value = Value() ) { hostContainer_.fill( value ); }
    \n+
    70
    \n+
    71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }
    \n+
    72
    \n+
    73 ConstIterator begin () const { return hostContainer_.begin(); }
    \n+\n+
    75
    \n+
    76 ConstIterator end () const { return hostContainer_.end(); }
    \n+
    77 Iterator end () { return hostContainer_.end(); }
    \n
    78
    \n-
    79 void error_argument_required(const std::string &opt) {
    \n-
    80 std::cerr << "Error: option " << opt << " requires argument\\n";
    \n-
    81 usage(std::cerr);
    \n-
    82 std::exit(1);
    \n-
    83 }
    \n+
    79 int codimension () const { return hostContainer_.codimension(); }
    \n+
    80
    \n+
    81 protected:
    \n+\n+
    83 };
    \n
    84
    \n-
    85 void error_unknown_option(const std::string &opt) {
    \n-
    86 std::cerr << "Error: unknown option: " << opt << "\\n";
    \n-
    87 usage(std::cerr);
    \n-
    88 std::exit(1);
    \n-
    89 }
    \n-
    90
    \n-
    91 void error_parsing_optarg(const std::string &opt, const std::string &error) {
    \n-
    92 std::cerr << "Error: option " << opt << ": " << error << "\\n";
    \n-
    93 usage(std::cerr);
    \n-
    94 std::exit(1);
    \n-
    95 }
    \n-
    96
    \n-
    97 template<class T>
    \n-
    98 void parse(const std::string &arg, T &val) {
    \n-
    99 std::istringstream s(arg);
    \n-
    100 s >> val;
    \n-
    101 bool good = !s.fail();
    \n-
    102 if(good) {
    \n-
    103 char dummy;
    \n-
    104 s >> dummy;
    \n-
    105 good = s.fail() && s.eof();
    \n-
    106 }
    \n-
    107 if(!good) {
    \n-
    108 std::ostringstream s;
    \n-
    109 s << "Can't parse \\"" << arg << "\\" as a " << Dune::className(val);
    \n-
    110 throw std::runtime_error(s.str());
    \n-
    111 }
    \n-
    112 }
    \n-
    113
    \n-
    114 std::size_t refines = 0;
    \n-
    115 std::string gridFileName = "";
    \n-
    116
    \n-
    117 void parseOptions(int argc, char **argv) {
    \n-
    118 std::vector<std::string> params;
    \n-
    119 for(++argv; *argv; ++argv) {
    \n-
    120 std::string arg = *argv;
    \n-
    121 if(prefix_match("-", arg)) {
    \n-
    122 std::string opt = arg;
    \n-
    123 if(opt == "--") {
    \n-
    124 for(++argv; *argv; ++argv)
    \n-
    125 params.push_back(*argv);
    \n-
    126 break;
    \n-
    127 }
    \n-
    128 else if(prefix_match("-h", opt) || prefix_match("-?", opt) ||
    \n-
    129 opt == "--help")
    \n-
    130 {
    \n-
    131 usage(std::cout);
    \n-
    132 std::exit(0);
    \n-
    133 }
    \n-
    134 else if(opt == "-R" || opt == "--global-refines") {
    \n-
    135 ++argv;
    \n-
    136 if(!*argv) error_argument_required(opt);
    \n-
    137 try { parse(*argv, refines); }
    \n-
    138 catch(const std::runtime_error &e)
    \n-
    139 { error_parsing_optarg(opt, e.what()); }
    \n-
    140 }
    \n-
    141 else if(prefix_match("-R", opt)) {
    \n-
    142 try { parse(*argv+std::strlen("-R"), refines); }
    \n-
    143 catch(const std::runtime_error &e)
    \n-
    144 { error_parsing_optarg(opt, e.what()); }
    \n-
    145 }
    \n-
    146 else if(prefix_match("--global-refines=", opt)) {
    \n-
    147 try { parse(*argv+std::strlen("--global-refines="), refines); }
    \n-
    148 catch(const std::runtime_error &e)
    \n-
    149 { error_parsing_optarg(opt, e.what()); }
    \n-
    150 }
    \n-
    151 else
    \n-
    152 error_unknown_option(opt);
    \n-
    153 }
    \n-
    154 else
    \n-
    155 params.push_back(arg);
    \n-
    156 }
    \n-
    157 // check command line arguments
    \n-
    158 if(params.size() < 1) {
    \n-
    159 std::cerr << "Need name of a .msh file to read.\\n"
    \n-
    160 << std::endl;
    \n-
    161 usage(std::cerr);
    \n-
    162 std::exit(1);
    \n-
    163 }
    \n-
    164 if(params.size() > 1) {
    \n-
    165 std::cerr << "Too many arguments.\\n"
    \n-
    166 << std::endl;
    \n-
    167 usage(std::cerr);
    \n-
    168 std::exit(1);
    \n-
    169 }
    \n-
    170 gridFileName = params[0];
    \n-
    171 }
    \n-
    172}
    \n-
    173
    \n-
    174#ifndef HEADERCHECK
    \n-
    175int main(int argc, char **argv) {
    \n-
    176 try {
    \n-
    177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv);
    \n-
    178
    \n-
    179 // check that we are not run through mpirun
    \n-
    180 if(mpiHelper.size() > 1) {
    \n-
    181 if(mpiHelper.rank() == 0)
    \n-
    182 std::cerr << programName << ": Sorry, this program works only in "
    \n-
    183 << "serial." << std::endl;
    \n-
    184 return 1;
    \n-
    185 }
    \n-
    186
    \n-
    187 parseOptions(argc, argv);
    \n-
    188
    \n-
    189 // read grid
    \n-
    190 typedef Dune::GmshReader<Grid> Reader;
    \n-
    191 std::shared_ptr<Grid> gridp(Reader::read(gridFileName));
    \n-
    192 gridp->globalRefine(refines);
    \n-
    193
    \n-
    194 // collect information
    \n-\n-
    196 Dune::fillGridViewInfoSerial(gridp->leafGridView(), gridViewInfo);
    \n-
    197
    \n-
    198 // print it
    \n-
    199 std::cout << gridViewInfo << std::flush;
    \n-
    200 }
    \n-
    201 catch(const std::exception &e) {
    \n-
    202 std::cerr << "Caught exception of type " << Dune::className(e)
    \n-
    203 << std::endl
    \n-
    204 << "e.what(): " << e.what() << std::endl;
    \n-
    205 throw;
    \n-
    206 }
    \n-
    207 catch(const Dune::Exception &e) {
    \n-
    208 std::cerr << "Caught exception of type " << Dune::className(e)
    \n-
    209 << std::endl
    \n-
    210 << "Exception message: " << e << std::endl;
    \n-
    211 throw;
    \n-
    212 }
    \n-
    213 catch(const std::string &s) {
    \n-
    214 std::cerr << "Caught exception of type " << Dune::className(s)
    \n-
    215 << std::endl
    \n-
    216 << "Exception message: " << s << std::endl;
    \n-
    217 throw;
    \n-
    218 }
    \n-
    219 catch(...) {
    \n-
    220 std::cerr << "Caught exception of unknown type" << std::endl;
    \n-
    221 throw;
    \n-
    222 }
    \n-
    223}
    \n-
    224#endif // !HEADERCHECK
    \n-
    225#endif // !DOXYGEN
    \n-
    226
    \n-
    227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
    \n-
    int main(int argc, char **argv)
    Definition: recipe-integration.cc:70
    \n-\n-
    void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > &gridViewInfo)
    fill a GridViewInfo structure from a serial grid
    Definition: utility/gridinfo.hh:214
    \n-
    Read Gmsh mesh file.
    Definition: gmshreader.hh:805
    \n-
    structure to hold information about a certain GridView.
    Definition: utility/gridinfo.hh:100
    \n-\n+
    85} // namespace Dune
    \n+
    86
    \n+
    87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
    \n+\n+
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n+\n+
    void swap(This &other)
    Definition: persistentcontainermap.hh:97
    \n+
    void fill(const Value &value)
    Definition: persistentcontainermap.hh:95
    \n+
    int codimension() const
    Definition: persistentcontainermap.hh:111
    \n+
    void resize(const Value &value=Value())
    Definition: persistentcontainermap.hh:87
    \n+
    ConstIterator begin() const
    Definition: persistentcontainermap.hh:175
    \n+
    ConstIterator end() const
    Definition: persistentcontainermap.hh:190
    \n+
    Size size() const
    Definition: persistentcontainermap.hh:85
    \n+
    void shrinkToFit()
    Definition: persistentcontainermap.hh:93
    \n+
    Definition: persistentcontainerwrapper.hh:19
    \n+
    void fill(const Value &value=Value())
    Definition: persistentcontainerwrapper.hh:69
    \n+
    PersistentContainer< HostGrid, T >::ConstIterator ConstIterator
    Definition: persistentcontainerwrapper.hh:34
    \n+
    Size size() const
    Definition: persistentcontainerwrapper.hh:64
    \n+
    ConstIterator begin() const
    Definition: persistentcontainerwrapper.hh:73
    \n+
    const Value & operator()(const Entity &entity, int subEntity) const
    Definition: persistentcontainerwrapper.hh:53
    \n+
    G Grid
    Definition: persistentcontainerwrapper.hh:28
    \n+
    const Value & operator[](const Entity &entity) const
    Definition: persistentcontainerwrapper.hh:41
    \n+
    void resize(const Value &value=Value())
    Definition: persistentcontainerwrapper.hh:66
    \n+
    PersistentContainer< HostGrid, T >::Size Size
    Definition: persistentcontainerwrapper.hh:31
    \n+
    int codimension() const
    Definition: persistentcontainerwrapper.hh:79
    \n+
    PersistentContainer< HostGrid, T >::Value Value
    Definition: persistentcontainerwrapper.hh:30
    \n+
    void swap(This &other)
    Definition: persistentcontainerwrapper.hh:71
    \n+
    ConstIterator end() const
    Definition: persistentcontainerwrapper.hh:76
    \n+
    PersistentContainerWrapper(const Grid &grid, int codim, const Value &value=Value())
    Definition: persistentcontainerwrapper.hh:36
    \n+
    PersistentContainer< HostGrid, T >::Iterator Iterator
    Definition: persistentcontainerwrapper.hh:33
    \n+
    void shrinkToFit()
    Definition: persistentcontainerwrapper.hh:67
    \n+
    Iterator begin()
    Definition: persistentcontainerwrapper.hh:74
    \n+
    PersistentContainer< HostGrid, T > hostContainer_
    Definition: persistentcontainerwrapper.hh:82
    \n+
    Iterator end()
    Definition: persistentcontainerwrapper.hh:77
    \n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,230 +5,199 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-gridinfo-gmsh-main.hh\n+persistentcontainerwrapper.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH\n- 7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH\n- 8\n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13#include \n- 14#include \n- 15#include \n- 16#include \n- 17#include \n- 18#include \n- 19\n- 20#include \n- 21#include \n- 22#include \n+ 5#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH\n+ 6#define DUNE_PERSISTENTCONTAINERWRAPPER_HH\n+ 7\n+ 8#include \n+ 9#include \n+ 10\n+ 11namespace Dune\n+ 12{\n+ 13\n+ 14 // PersistentContainerWrapper\n+ 15 // --------------------------\n+ 16\n+ 17 template< class G, class T >\n+18 class PersistentContainerWrapper\n+ 19 {\n+ 20 typedef PersistentContainerWrapper<_G,_T_> This;\n+ 21\n+ 22 typedef Dune::HostGridAccess<_G_> HostGridAccess;\n 23\n- 24#include \n- 25#include \n+ 24 typedef typename HostGridAccess::HostGrid HostGrid;\n+ 25 typedef PersistentContainer<_HostGrid,_T_> PersistentContainerHostGrid;\n 26\n- 54#ifdef HEADERCHECK\n- 55// define so headercheck will run\n- 56const std::string programName = \"headercheck\";\n- 57#endif // HEADERCHECK\n- 58\n- 59#ifndef DOXYGEN\n- 60namespace {\n- 61 // anonymous namespace so we don't freakishly conflict with another usage()\n- 62 // function that may be linked in from another compilation unit.\n- 63 void usage(std::ostream &stream) {\n- 64 stream << \"USAGE:\\n\"\n- 65 << \" \" << programName << \" [-R REFINES] GRIDFILE\\n\"\n- 66 << \"\\n\"\n- 67 << \"PARAMETERS:\\n\"\n- 68 << \" -R REFINES How many global refines to do after reading\\n\"\n- 69 << \" (default: 0)\\n\"\n- 70 << \" GRIDFILE Name of the .msh file to read the grid from.\\n\"\n- 71 << std::flush;\n- 72 }\n- 73\n- 74 bool prefix_match(const std::string &prefix, const std::string &str)\n- 75 {\n- 76 return str.compare(0,prefix.size(), prefix) == 0;\n- 77 }\n+ 27 public:\n+28 typedef G Grid;\n+ 29\n+30 typedef typename PersistentContainer<_HostGrid,_T_>::Value Value;\n+31 typedef typename PersistentContainer<_HostGrid,_T_>::Size Size;\n+ 32\n+33 typedef typename PersistentContainer<_HostGrid,_T_>::Iterator Iterator;\n+34 typedef typename PersistentContainer<_HostGrid,_T_>::ConstIterator\n+ConstIterator;\n+ 35\n+36 PersistentContainerWrapper ( const Grid &grid, int codim, const Value &value\n+= Value() )\n+ 37 : hostContainer_( HostGridAccess::hostGrid( grid ), codim, value )\n+ 38 {}\n+ 39\n+ 40 template< class Entity >\n+41 const Value &operator[]( const Entity &entity ) const\n+ 42 {\n+ 43 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];\n+ 44 }\n+ 45\n+ 46 template< class Entity >\n+47 Value &operator[]( const Entity &entity )\n+ 48 {\n+ 49 return hostContainer_[ HostGridAccess::hostEntity( entity ) ];\n+ 50 }\n+ 51\n+ 52 template< class Entity >\n+53 const Value &operator()( const Entity &entity, int subEntity ) const\n+ 54 {\n+ 55 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );\n+ 56 }\n+ 57\n+ 58 template< class Entity >\n+59 Value &operator()( const Entity &entity, int subEntity )\n+ 60 {\n+ 61 return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );\n+ 62 }\n+ 63\n+64 Size size () const { return hostContainer_.size(); }\n+ 65\n+66 void resize ( const Value &value = Value() ) { hostContainer_.resize( value\n+); }\n+67 void shrinkToFit () { return hostContainer_.shrinkToFit(); }\n+ 68\n+69 void fill ( const Value &value = Value() ) { hostContainer_.fill( value ); }\n+ 70\n+71 void swap ( This &other ) { hostContainer_.swap( other.hostContainer_ ); }\n+ 72\n+73 ConstIterator begin () const { return hostContainer_.begin(); }\n+74 Iterator begin () { return hostContainer_.begin(); }\n+ 75\n+76 ConstIterator end () const { return hostContainer_.end(); }\n+77 Iterator end () { return hostContainer_.end(); }\n 78\n- 79 void error_argument_required(const std::string &opt) {\n- 80 std::cerr << \"Error: option \" << opt << \" requires argument\\n\";\n- 81 usage(std::cerr);\n- 82 std::exit(1);\n- 83 }\n+79 int codimension () const { return hostContainer_.codimension(); }\n+ 80\n+ 81 protected:\n+82 PersistentContainer<_HostGrid,_T_> hostContainer_;\n+ 83 };\n 84\n- 85 void error_unknown_option(const std::string &opt) {\n- 86 std::cerr << \"Error: unknown option: \" << opt << \"\\n\";\n- 87 usage(std::cerr);\n- 88 std::exit(1);\n- 89 }\n- 90\n- 91 void error_parsing_optarg(const std::string &opt, const std::string &error)\n-{\n- 92 std::cerr << \"Error: option \" << opt << \": \" << error << \"\\n\";\n- 93 usage(std::cerr);\n- 94 std::exit(1);\n- 95 }\n- 96\n- 97 template\n- 98 void parse(const std::string &arg, T &val) {\n- 99 std::istringstream s(arg);\n- 100 s >> val;\n- 101 bool good = !s.fail();\n- 102 if(good) {\n- 103 char dummy;\n- 104 s >> dummy;\n- 105 good = s.fail() && s.eof();\n- 106 }\n- 107 if(!good) {\n- 108 std::ostringstream s;\n- 109 s << \"Can't parse \\\"\" << arg << \"\\\" as a \" << Dune::className(val);\n- 110 throw std::runtime_error(s.str());\n- 111 }\n- 112 }\n- 113\n- 114 std::size_t refines = 0;\n- 115 std::string gridFileName = \"\";\n- 116\n- 117 void parseOptions(int argc, char **argv) {\n- 118 std::vector params;\n- 119 for(++argv; *argv; ++argv) {\n- 120 std::string arg = *argv;\n- 121 if(prefix_match(\"-\", arg)) {\n- 122 std::string opt = arg;\n- 123 if(opt == \"--\") {\n- 124 for(++argv; *argv; ++argv)\n- 125 params.push_back(*argv);\n- 126 break;\n- 127 }\n- 128 else if(prefix_match(\"-h\", opt) || prefix_match(\"-?\", opt) ||\n- 129 opt == \"--help\")\n- 130 {\n- 131 usage(std::cout);\n- 132 std::exit(0);\n- 133 }\n- 134 else if(opt == \"-R\" || opt == \"--global-refines\") {\n- 135 ++argv;\n- 136 if(!*argv) error_argument_required(opt);\n- 137 try { parse(*argv, refines); }\n- 138 catch(const std::runtime_error &e)\n- 139 { error_parsing_optarg(opt, e.what()); }\n- 140 }\n- 141 else if(prefix_match(\"-R\", opt)) {\n- 142 try { parse(*argv+std::strlen(\"-R\"), refines); }\n- 143 catch(const std::runtime_error &e)\n- 144 { error_parsing_optarg(opt, e.what()); }\n- 145 }\n- 146 else if(prefix_match(\"--global-refines=\", opt)) {\n- 147 try { parse(*argv+std::strlen(\"--global-refines=\"), refines); }\n- 148 catch(const std::runtime_error &e)\n- 149 { error_parsing_optarg(opt, e.what()); }\n- 150 }\n- 151 else\n- 152 error_unknown_option(opt);\n- 153 }\n- 154 else\n- 155 params.push_back(arg);\n- 156 }\n- 157 // check command line arguments\n- 158 if(params.size() < 1) {\n- 159 std::cerr << \"Need name of a .msh file to read.\\n\"\n- 160 << std::endl;\n- 161 usage(std::cerr);\n- 162 std::exit(1);\n- 163 }\n- 164 if(params.size() > 1) {\n- 165 std::cerr << \"Too many arguments.\\n\"\n- 166 << std::endl;\n- 167 usage(std::cerr);\n- 168 std::exit(1);\n- 169 }\n- 170 gridFileName = params[0];\n- 171 }\n- 172}\n- 173\n- 174#ifndef HEADERCHECK\n- 175int main(int argc, char **argv) {\n- 176 try {\n- 177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv);\n- 178\n- 179 // check that we are not run through mpirun\n- 180 if(mpiHelper.size() > 1) {\n- 181 if(mpiHelper.rank() == 0)\n- 182 std::cerr << programName << \": Sorry, this program works only in \"\n- 183 << \"serial.\" << std::endl;\n- 184 return 1;\n- 185 }\n- 186\n- 187 parseOptions(argc, argv);\n- 188\n- 189 // read grid\n- 190 typedef Dune::GmshReader Reader;\n- 191 std::shared_ptr gridp(Reader::read(gridFileName));\n- 192 gridp->globalRefine(refines);\n- 193\n- 194 // collect information\n- 195 Dune::GridViewInfo gridViewInfo;\n- 196 Dune::fillGridViewInfoSerial(gridp->leafGridView(), gridViewInfo);\n- 197\n- 198 // print it\n- 199 std::cout << gridViewInfo << std::flush;\n- 200 }\n- 201 catch(const std::exception &e) {\n- 202 std::cerr << \"Caught exception of type \" << Dune::className(e)\n- 203 << std::endl\n- 204 << \"e.what(): \" << e.what() << std::endl;\n- 205 throw;\n- 206 }\n- 207 catch(const Dune::Exception &e) {\n- 208 std::cerr << \"Caught exception of type \" << Dune::className(e)\n- 209 << std::endl\n- 210 << \"Exception message: \" << e << std::endl;\n- 211 throw;\n- 212 }\n- 213 catch(const std::string &s) {\n- 214 std::cerr << \"Caught exception of type \" << Dune::className(s)\n- 215 << std::endl\n- 216 << \"Exception message: \" << s << std::endl;\n- 217 throw;\n- 218 }\n- 219 catch(...) {\n- 220 std::cerr << \"Caught exception of unknown type\" << std::endl;\n- 221 throw;\n- 222 }\n- 223}\n- 224#endif // !HEADERCHECK\n- 225#endif // !DOXYGEN\n- 226\n- 227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH\n-main\n-int main(int argc, char **argv)\n-Definition: recipe-integration.cc:70\n-gmshreader.hh\n-Dune::fillGridViewInfoSerial\n-void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype >\n-&gridViewInfo)\n-fill a GridViewInfo structure from a serial grid\n-Definition: utility/gridinfo.hh:214\n-Dune::GmshReader\n-Read Gmsh mesh file.\n-Definition: gmshreader.hh:805\n-Dune::GridViewInfo\n-structure to hold information about a certain GridView.\n-Definition: utility/gridinfo.hh:100\n-gridinfo.hh\n+ 85} // namespace Dune\n+ 86\n+ 87#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH\n+hostgridaccess.hh\n+Dune\n+Include standard header files.\n+Definition: agrid.hh:60\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::HostGridAccess\n+provides access to host grid objects from GeometryGrid\n+Definition: identitygrid.hh:37\n+Dune::PersistentContainer<_HostGrid,_T_>\n+Dune::PersistentContainerMap::swap\n+void swap(This &other)\n+Definition: persistentcontainermap.hh:97\n+Dune::PersistentContainerMap::fill\n+void fill(const Value &value)\n+Definition: persistentcontainermap.hh:95\n+Dune::PersistentContainerMap::codimension\n+int codimension() const\n+Definition: persistentcontainermap.hh:111\n+Dune::PersistentContainerMap::resize\n+void resize(const Value &value=Value())\n+Definition: persistentcontainermap.hh:87\n+Dune::PersistentContainerMap::begin\n+ConstIterator begin() const\n+Definition: persistentcontainermap.hh:175\n+Dune::PersistentContainerMap::end\n+ConstIterator end() const\n+Definition: persistentcontainermap.hh:190\n+Dune::PersistentContainerMap::size\n+Size size() const\n+Definition: persistentcontainermap.hh:85\n+Dune::PersistentContainerMap::shrinkToFit\n+void shrinkToFit()\n+Definition: persistentcontainermap.hh:93\n+Dune::PersistentContainerWrapper\n+Definition: persistentcontainerwrapper.hh:19\n+Dune::PersistentContainerWrapper::fill\n+void fill(const Value &value=Value())\n+Definition: persistentcontainerwrapper.hh:69\n+Dune::PersistentContainerWrapper::ConstIterator\n+PersistentContainer< HostGrid, T >::ConstIterator ConstIterator\n+Definition: persistentcontainerwrapper.hh:34\n+Dune::PersistentContainerWrapper::size\n+Size size() const\n+Definition: persistentcontainerwrapper.hh:64\n+Dune::PersistentContainerWrapper::begin\n+ConstIterator begin() const\n+Definition: persistentcontainerwrapper.hh:73\n+Dune::PersistentContainerWrapper::operator()\n+const Value & operator()(const Entity &entity, int subEntity) const\n+Definition: persistentcontainerwrapper.hh:53\n+Dune::PersistentContainerWrapper::Grid\n+G Grid\n+Definition: persistentcontainerwrapper.hh:28\n+Dune::PersistentContainerWrapper::operator[]\n+const Value & operator[](const Entity &entity) const\n+Definition: persistentcontainerwrapper.hh:41\n+Dune::PersistentContainerWrapper::resize\n+void resize(const Value &value=Value())\n+Definition: persistentcontainerwrapper.hh:66\n+Dune::PersistentContainerWrapper::Size\n+PersistentContainer< HostGrid, T >::Size Size\n+Definition: persistentcontainerwrapper.hh:31\n+Dune::PersistentContainerWrapper::codimension\n+int codimension() const\n+Definition: persistentcontainerwrapper.hh:79\n+Dune::PersistentContainerWrapper::Value\n+PersistentContainer< HostGrid, T >::Value Value\n+Definition: persistentcontainerwrapper.hh:30\n+Dune::PersistentContainerWrapper::swap\n+void swap(This &other)\n+Definition: persistentcontainerwrapper.hh:71\n+Dune::PersistentContainerWrapper::end\n+ConstIterator end() const\n+Definition: persistentcontainerwrapper.hh:76\n+Dune::PersistentContainerWrapper::PersistentContainerWrapper\n+PersistentContainerWrapper(const Grid &grid, int codim, const Value\n+&value=Value())\n+Definition: persistentcontainerwrapper.hh:36\n+Dune::PersistentContainerWrapper::Iterator\n+PersistentContainer< HostGrid, T >::Iterator Iterator\n+Definition: persistentcontainerwrapper.hh:33\n+Dune::PersistentContainerWrapper::shrinkToFit\n+void shrinkToFit()\n+Definition: persistentcontainerwrapper.hh:67\n+Dune::PersistentContainerWrapper::begin\n+Iterator begin()\n+Definition: persistentcontainerwrapper.hh:74\n+Dune::PersistentContainerWrapper::hostContainer_\n+PersistentContainer< HostGrid, T > hostContainer_\n+Definition: persistentcontainerwrapper.hh:82\n+Dune::PersistentContainerWrapper::end\n+Iterator end()\n+Definition: persistentcontainerwrapper.hh:77\n+persistentcontainer.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00989.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00989.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: globalindexset.hh File Reference\n+dune-grid: persistentcontainervector.hh File Reference\n \n \n \n \n \n \n \n@@ -65,66 +65,34 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    globalindexset.hh File Reference
    \n+
    persistentcontainervector.hh File Reference
    \n
    \n
    \n-\n-

    Provides a globally unique index for all entities of a distributed Dune grid. \n-More...

    \n-
    #include <vector>
    \n-#include <iostream>
    \n-#include <fstream>
    \n-#include <memory>
    \n-#include <map>
    \n-#include <utility>
    \n-#include <algorithm>
    \n-#include <dune/grid/common/gridenums.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n-#include <dune/common/parallel/mpihelper.hh>
    \n+
    #include <algorithm>
    \n+#include <cassert>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::GlobalIndexSet< GridView >
     Calculate globally unique index over all processes in a Dune grid. More...
     
    struct  Dune::GlobalIndexSet< GridView >::SubPartitionTypeProvider< Entity, Codim >
     Helper class to provide access to subentity PartitionTypes with a run-time codimension. More...
     
    struct  Dune::GlobalIndexSet< GridView >::SubPartitionTypeProvider< Entity, 0 >
    class  Dune::PersistentContainerVector< G, IndexSet, Vector >
     vector-based implementation of the PersistentContainer More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-

    Detailed Description

    \n-

    Provides a globally unique index for all entities of a distributed Dune grid.

    \n-

    Such functionality is relevant for a number of applications:

      \n-
    • Map a degree of freedom associated with an entity to its location in a global matrix or global vector
    • \n-
    • Such indices for elements are needed as input to external mesh partitioners
    • \n-
    • Using matrix and vector routines from the PETSc or trilinos parallel linear algebra packages for distributed memory parallel computers.
    • \n-
    \n-

    Method: (1) The UniqueEntityPartition class assigns an owner process to each entity

        (2) Compute the number of entities that are owned by each process\n-\n-    (3) we communicate the index of entities that are owned by the process to processes\n-        that also contain these entities but do not own them, so that on a non-owner process\n-        we have information on the index of the entity that it got from the owner-process;\n-
    Author
    Benedikt Oswald, Patrick Leidenberger, Oliver Sander
    \n-
    Attention
    globally unique indices are ONLY provided for entities of the InteriorBorder_Partition type, NOT for the Ghost_Partition type !!!
    \n-
    Bug:
    This code will most likely not work on grids with more than one element type. Please ask on the mailing list if you need this feature.
    \n-
    Note
    The interface in this file is experimental, and may change without prior notice.
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,71 +6,22 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-globalindexset.hh File Reference\n-Provides a globally unique index for all entities of a distributed Dune grid.\n-More...\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+persistentcontainervector.hh File Reference\n #include \n-#include \n-#include \n-#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::GlobalIndexSet<_GridView_>\n-\u00a0 Calculate globally unique index over all processes in a Dune grid.\n- More...\n-\u00a0\n-struct \u00a0Dune::GlobalIndexSet<_GridView_>::SubPartitionTypeProvider<_Entity,\n- Codim_>\n-\u00a0 Helper class to provide access to subentity PartitionTypes with a run-\n- time codimension. More...\n-\u00a0\n-struct \u00a0Dune::GlobalIndexSet<_GridView_>::SubPartitionTypeProvider<_Entity,_0\n- >\n+class \u00a0Dune::PersistentContainerVector<_G,_IndexSet,_Vector_>\n+\u00a0 vector-based implementation of the PersistentContainer More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Provides a globally unique index for all entities of a distributed Dune grid.\n-Such functionality is relevant for a number of applications:\n- * Map a degree of freedom associated with an entity to its location in a\n- global matrix or global vector\n- * Such indices for elements are needed as input to external mesh\n- partitioners\n- * Using matrix and vector routines from the PETSc or trilinos parallel\n- linear algebra packages for distributed memory parallel computers.\n-Method: (1) The UniqueEntityPartition class assigns an owner process to each\n-entity\n- (2) Compute the number of entities that are owned by each process\n-\n- (3) we communicate the index of entities that are owned by the process to\n-processes\n- that also contain these entities but do not own them, so that on a non-\n-owner process\n- we have information on the index of the entity that it got from the\n-owner-process;\n- Author\n- Benedikt Oswald, Patrick Leidenberger, Oliver Sander\n- Attention\n- globally unique indices are ONLY provided for entities of the\n- InteriorBorder_Partition type, NOT for the Ghost_Partition type !!!\n- Bug:\n- This code will most likely not work on grids with more than one element\n- type. Please ask on the mailing list if you need this feature.\n- Note\n- The interface in this file is experimental, and may change without prior\n- notice.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00989_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: globalindexset.hh Source File\n+dune-grid: persistentcontainervector.hh Source File\n \n \n \n \n \n \n \n@@ -62,462 +62,159 @@\n \n
    \n \n
    \n \n
    \n-
    globalindexset.hh
    \n+
    persistentcontainervector.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    35#ifndef DUNE_GRID_UTILITY_GLOBALINDEXSET_HH
    \n-
    36#define DUNE_GRID_UTILITY_GLOBALINDEXSET_HH
    \n-
    37
    \n-
    39#include <vector>
    \n-
    40#include <iostream>
    \n-
    41#include <fstream>
    \n-
    42#include <memory>
    \n-
    43#include <map>
    \n-
    44#include <utility>
    \n-
    45#include <algorithm>
    \n-
    46
    \n-\n-\n-
    50
    \n-
    52#if HAVE_MPI
    \n-
    53 #include <dune/common/parallel/mpihelper.hh>
    \n-
    54#endif
    \n-
    55
    \n-
    56namespace Dune
    \n-
    57{
    \n-
    58
    \n-
    61 template<class GridView>
    \n-\n-
    63 {
    \n-
    64 public:
    \n-
    66 typedef int Index;
    \n-
    67
    \n-
    73 template <class Entity, int Codim>
    \n-\n-
    75 {
    \n-
    78 static PartitionType get(const Entity& entity, int codim, int i)
    \n-
    79 {
    \n-
    80 if (codim==Codim)
    \n-
    81 return entity.template subEntity<Codim>(i).partitionType();
    \n-
    82 else
    \n-
    83 return SubPartitionTypeProvider<Entity,Codim-1>::get(entity, codim, i);
    \n-
    84 }
    \n-
    85 };
    \n-
    86
    \n-
    87 template <class Entity>
    \n-\n-
    89 {
    \n-
    90 static PartitionType get(const Entity& entity, int codim, int i)
    \n-
    91 {
    \n-
    92 return entity.template subEntity<0>(i).partitionType();
    \n-
    93 }
    \n-
    94 };
    \n-
    95
    \n-
    96 private:
    \n-
    98 typedef typename GridView::Grid Grid;
    \n-
    99
    \n-
    100 typedef typename GridView::Grid::GlobalIdSet GlobalIdSet;
    \n-
    101 typedef typename GridView::Grid::GlobalIdSet::IdType IdType;
    \n-
    102 typedef typename GridView::Traits::template Codim<0>::Iterator Iterator;
    \n-
    103
    \n-
    104 typedef typename Grid::Communication Communication;
    \n-
    105
    \n-
    106 typedef std::map<IdType,Index> MapId2Index;
    \n-
    107 typedef std::map<Index,Index> IndexMap;
    \n-
    108
    \n-
    109 /*********************************************************************************************/
    \n-
    110 /* calculate unique partitioning for all entities of a given codim in a given GridView, */
    \n-
    111 /* assuming they all have the same geometry, i.e. codim, type */
    \n-
    112 /*********************************************************************************************/
    \n-
    113 class UniqueEntityPartition
    \n-
    114 {
    \n-
    115 private:
    \n-
    116 /* A DataHandle class to calculate the minimum of a std::vector which is accompanied by an index set */
    \n-
    117 template<class IS, class V> // mapper type and vector type
    \n-
    118 class MinimumExchange
    \n-
    119 : public Dune::CommDataHandleIF<MinimumExchange<IS,V>,typename V::value_type>
    \n-
    120 {
    \n-
    121 public:
    \n-
    123 typedef typename V::value_type DataType;
    \n-
    124
    \n-
    126 bool contains (int dim, unsigned int codim) const
    \n-
    127 {
    \n-
    128 return codim==indexSetCodim_;
    \n-
    129 }
    \n-
    130
    \n-
    132 bool fixedSize (int dim, int codim) const
    \n-
    133 {
    \n-
    134 return true ;
    \n-
    135 }
    \n-
    136
    \n-
    140 template<class EntityType>
    \n-
    141 size_t size (EntityType& e) const
    \n-
    142 {
    \n-
    143 return 1 ;
    \n-
    144 }
    \n-
    145
    \n-
    147 template<class MessageBuffer, class EntityType>
    \n-
    148 void gather (MessageBuffer& buff, const EntityType& e) const
    \n-
    149 {
    \n-
    150 buff.write(v_[indexset_.index(e)]);
    \n-
    151 }
    \n-
    152
    \n-
    157 template<class MessageBuffer, class EntityType>
    \n-
    158 void scatter (MessageBuffer& buff, const EntityType& e, size_t n)
    \n-
    159 {
    \n-
    160 DataType x;
    \n-
    161 buff.read(x);
    \n-
    162 if (x>=0) // other is -1 means, he does not want it
    \n-
    163 v_[indexset_.index(e)] = std::min(x,v_[indexset_.index(e)]);
    \n-
    164 }
    \n-
    165
    \n-
    167 MinimumExchange (const IS& indexset, V& v, unsigned int indexSetCodim)
    \n-
    168 : indexset_(indexset),
    \n-
    169 v_(v),
    \n-
    170 indexSetCodim_(indexSetCodim)
    \n-
    171 {}
    \n-
    172
    \n-
    173 private:
    \n-
    174 const IS& indexset_;
    \n-
    175 V& v_;
    \n-
    176 unsigned int indexSetCodim_;
    \n-
    177 };
    \n-
    178
    \n-
    179 public:
    \n-
    182 UniqueEntityPartition (const GridView& gridview, unsigned int codim)
    \n-
    183 : assignment_(gridview.size(codim))
    \n-
    184 {
    \n-
    186 typedef typename GridView::IndexSet IndexSet;
    \n-
    187
    \n-
    188 // assign own rank to entities that I might have
    \n-
    189 for (auto it = gridview.template begin<0>(); it!=gridview.template end<0>(); ++it)
    \n-
    190 for (unsigned int i=0; i<it->subEntities(codim); i++)
    \n-
    191 {
    \n-
    192 // Evil hack: I need to call subEntity, which needs the entity codimension as a static parameter.
    \n-
    193 // However, we only have it as a run-time parameter.
    \n-
    194 PartitionType subPartitionType = SubPartitionTypeProvider<typename GridView::template Codim<0>::Entity, GridView::dimension>::get(*it,codim,i);
    \n-
    195
    \n-
    196 assignment_[gridview.indexSet().subIndex(*it,i,codim)]
    \n-
    197 = ( subPartitionType==Dune::InteriorEntity or subPartitionType==Dune::BorderEntity )
    \n-
    198 ? gridview.comm().rank() // set to own rank
    \n-
    199 : - 1; // it is a ghost entity, I will not possibly own it.
    \n-
    200 }
    \n-
    201
    \n-
    203 MinimumExchange<IndexSet,std::vector<Index> > dh(gridview.indexSet(),assignment_,codim);
    \n-
    204
    \n-\n-
    206 }
    \n-
    207
    \n-
    209 int owner(size_t i)
    \n-
    210 {
    \n-
    211 return assignment_[i];
    \n-
    212 }
    \n-
    213
    \n-
    215 size_t numOwners(int rank) const
    \n-
    216 {
    \n-
    217 return std::count(assignment_.begin(), assignment_.end(), rank);
    \n-
    218 }
    \n-
    219
    \n-
    220 private:
    \n-
    221 std::vector<int> assignment_;
    \n-
    222 };
    \n-
    223
    \n-
    224 private:
    \n-
    225 /* A DataHandle class to communicate the global index from the
    \n-
    226 * owning to the non-owning entity; the class is based on the MinimumExchange
    \n-
    227 * class in the parallelsolver.hh header file.
    \n-
    228 */
    \n-
    229 class IndexExchange
    \n-
    230 : public Dune::CommDataHandleIF<IndexExchange,Index>
    \n-
    231 {
    \n-
    232 public:
    \n-
    234 bool contains (int dim, unsigned int codim) const
    \n-
    235 {
    \n-
    236 return codim==indexSetCodim_;
    \n-
    237 }
    \n-
    238
    \n-
    240 bool fixedSize (int dim, int codim) const
    \n-
    241 {
    \n-
    242 return true;
    \n-
    243 }
    \n-
    244
    \n-
    249 template<class EntityType>
    \n-
    250 size_t size (EntityType& e) const
    \n-
    251 {
    \n-
    252 return 1;
    \n-
    253 }
    \n-
    254
    \n-
    256 template<class MessageBuffer, class EntityType>
    \n-
    257 void gather (MessageBuffer& buff, const EntityType& e) const
    \n-
    258 {
    \n-
    259 IdType id=globalidset_.id(e);
    \n-
    260
    \n-
    261 if (indexSetCodim_==0)
    \n-
    262 buff.write(mapid2entity_[id]);
    \n-
    263 else
    \n-
    264 buff.write((*mapid2entity_.find(id)).second);
    \n-
    265 }
    \n-
    266
    \n-
    271 template<class MessageBuffer, class EntityType>
    \n-
    272 void scatter (MessageBuffer& buff, const EntityType& entity, size_t n)
    \n-
    273 {
    \n-
    274 Index x;
    \n-
    275 buff.read(x);
    \n-
    276
    \n-
    284 if(x >= 0) {
    \n-
    285 const IdType id = globalidset_.id(entity);
    \n-
    286
    \n-
    287 if (indexSetCodim_==0)
    \n-
    288 mapid2entity_[id] = x;
    \n-
    289 else
    \n-
    290 {
    \n-
    291 mapid2entity_.erase(id);
    \n-
    292 mapid2entity_.insert(std::make_pair(id,x));
    \n-
    293
    \n-
    294 const Index lindex = indexSet_.index(entity);
    \n-
    295 localGlobalMap_[lindex] = x;
    \n-
    296 }
    \n-
    297 }
    \n-
    298 }
    \n-
    299
    \n-
    301 IndexExchange (const GlobalIdSet& globalidset, MapId2Index& mapid2entity,
    \n-
    302 const typename GridView::IndexSet& localIndexSet, IndexMap& localGlobal,
    \n-
    303 unsigned int indexSetCodim)
    \n-
    304 : globalidset_(globalidset),
    \n-
    305 mapid2entity_(mapid2entity),
    \n-
    306 indexSet_(localIndexSet),
    \n-
    307 localGlobalMap_(localGlobal),
    \n-
    308 indexSetCodim_(indexSetCodim)
    \n-
    309 {}
    \n-
    310
    \n-
    311 private:
    \n-
    312 const GlobalIdSet& globalidset_;
    \n-
    313 MapId2Index& mapid2entity_;
    \n-
    314
    \n-
    315 const typename GridView::IndexSet& indexSet_;
    \n-
    316 IndexMap& localGlobalMap_;
    \n-
    317 unsigned int indexSetCodim_;
    \n-
    318 };
    \n-
    319
    \n-
    320 public:
    \n-
    326 GlobalIndexSet(const GridView& gridview, int codim)
    \n-
    327 : gridview_(gridview),
    \n-
    328 codim_(codim)
    \n-
    329 {
    \n-
    330 int rank = gridview.comm().rank();
    \n-
    331 int size = gridview.comm().size();
    \n-
    332
    \n-
    333 const typename GridView::IndexSet& indexSet = gridview.indexSet();
    \n-
    334
    \n-
    335 std::unique_ptr<UniqueEntityPartition> uniqueEntityPartition;
    \n-
    336 if (codim_!=0)
    \n-
    337 uniqueEntityPartition = std::make_unique<UniqueEntityPartition>(gridview,codim_);
    \n-
    338
    \n-
    339 int nLocalEntity = (codim_==0)
    \n-
    340 ? std::distance(gridview.template begin<0, Dune::Interior_Partition>(), gridview.template end<0, Dune::Interior_Partition>())
    \n-
    341 : uniqueEntityPartition->numOwners(rank);
    \n-
    342
    \n-
    343 // Compute the global, non-redundant number of entities, i.e. the number of entities in the set
    \n-
    344 // without double, aka. redundant entities, on the interprocessor boundary via global reduce. */
    \n-
    345 nGlobalEntity_ = gridview.comm().template sum<int>(nLocalEntity);
    \n-
    346
    \n-
    347 /* communicate the number of locally owned entities to all other processes so that the respective offset
    \n-
    348 * can be calculated on the respective processor; we use the Dune mpi communication facility
    \n-
    349 * for this; first, we gather the number of locally owned entities on the root process and, second, we
    \n-
    350 * broadcast the array to all processes where the respective offset can be calculated. */
    \n-
    351
    \n-
    352 std::vector<int> offset(size);
    \n-
    353 std::fill(offset.begin(), offset.end(), 0);
    \n-
    354
    \n-
    356 gridview_.comm().template allgather<int>(&nLocalEntity, 1, offset.data());
    \n-
    357
    \n-
    358 int myoffset = 0;
    \n-
    359 for (int i=1; i<rank+1; i++)
    \n-
    360 myoffset += offset[i-1];
    \n-
    361
    \n-
    362 /* compute globally unique index over all processes; the idea of the algorithm is as follows: if
    \n-
    363 * an entity is owned by the process, it is assigned an index that is the addition of the offset
    \n-
    364 * specific for this process and a consecutively incremented counter; if the entity is not owned
    \n-
    365 * by the process, it is assigned -1, which signals that this specific entity will get its global
    \n-
    366 * unique index through communication afterwards;
    \n-
    367 *
    \n-
    368 * thus, the calculation of the globally unique index is divided into 2 stages:
    \n-
    369 *
    \n-
    370 * (1) we calculate the global index independently;
    \n-
    371 *
    \n-
    372 * (2) we achieve parallel adjustment by communicating the index
    \n-
    373 * from the owning entity to the non-owning entity.
    \n-
    374 *
    \n-
    375 */
    \n-
    376
    \n-
    377 // 1st stage of global index calculation: calculate global index for owned entities
    \n-
    378 // initialize map that stores an entity's global index via it's globally unique id as key
    \n-
    379 globalIndex_.clear();
    \n-
    380
    \n-
    381 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();
    \n-
    383 Index globalcontrib = 0;
    \n-
    385 if (codim_==0) // This case is simpler
    \n-
    386 {
    \n-
    387 for (Iterator iter = gridview_.template begin<0>(); iter!=gridview_.template end<0>(); ++iter)
    \n-
    388 {
    \n-
    389 const IdType id = globalIdSet.id(*iter);
    \n-
    392 if (iter->partitionType() == Dune::InteriorEntity)
    \n-
    393 {
    \n-
    394 const Index gindex = myoffset + globalcontrib;
    \n-
    396 globalIndex_[id] = gindex;
    \n-
    397 globalcontrib++;
    \n-
    398 }
    \n-
    399
    \n-
    401 else
    \n-
    402 {
    \n-
    403 globalIndex_[id] = -1;
    \n-
    404 }
    \n-
    405 }
    \n-
    406 }
    \n-
    407 else // if (codim==0) else
    \n-
    408 {
    \n-
    409 std::vector<bool> firstTime(gridview_.size(codim_));
    \n-
    410 std::fill(firstTime.begin(), firstTime.end(), true);
    \n-
    411
    \n-
    412 for(Iterator iter = gridview_.template begin<0>();iter!=gridview_.template end<0>(); ++iter)
    \n-
    413 {
    \n-
    414 for (size_t i=0; i<iter->subEntities(codim_); i++)
    \n-
    415 {
    \n-
    416 IdType id=globalIdSet.subId(*iter,i,codim_);
    \n-
    417
    \n-
    418 Index idx = gridview_.indexSet().subIndex(*iter,i,codim_);
    \n-
    419
    \n-
    420 if (!firstTime[idx] )
    \n-
    421 continue;
    \n-
    422
    \n-
    423 firstTime[idx] = false;
    \n-
    424
    \n-
    425 if (uniqueEntityPartition->owner(idx) == rank)
    \n-
    426 {
    \n-
    427 const Index gindex = myoffset + globalcontrib;
    \n-
    428 globalIndex_.insert(std::make_pair(id,gindex));
    \n-
    430 const Index lindex = idx;
    \n-
    431 localGlobalMap_[lindex] = gindex;
    \n-
    432
    \n-
    433 globalcontrib++;
    \n-
    434 }
    \n-
    435 else
    \n-
    436 {
    \n-
    437 globalIndex_.insert(std::make_pair(id,-1));
    \n-
    438 }
    \n-
    439 }
    \n-
    440
    \n-
    441 }
    \n-
    442 }
    \n-
    443
    \n-
    444 // 2nd stage of global index calculation: communicate global index for non-owned entities
    \n-
    445
    \n-
    446 // Create the data handle and communicate.
    \n-
    447 IndexExchange dataHandle(globalIdSet,globalIndex_,indexSet,localGlobalMap_,codim_);
    \n-\n-
    449 }
    \n-
    450
    \n-
    452 template <class Entity>
    \n-
    453 Index index(const Entity& entity) const
    \n-
    454 {
    \n-
    455 if (codim_==0)
    \n-
    456 {
    \n-
    458 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();
    \n-
    459 const IdType id = globalIdSet.id(entity);
    \n-
    460 const Index gindex = globalIndex_.find(id)->second;
    \n-
    462 return gindex;
    \n-
    463 }
    \n-
    464 else
    \n-
    465 return localGlobalMap_.find(gridview_.indexSet().index(entity))->second;
    \n-
    466 }
    \n-
    467
    \n-
    473 template <class Entity>
    \n-
    474 Index subIndex(const Entity& entity, unsigned int i, unsigned int codim) const
    \n-
    475 {
    \n-
    476 if (codim_==0)
    \n-
    477 {
    \n-
    479 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();
    \n-
    480 const IdType id = globalIdSet.subId(entity,i,codim);
    \n-
    481 const Index gindex = globalIndex_.find(id)->second;
    \n-
    483 return gindex;
    \n-
    484 }
    \n-
    485 else
    \n-
    486 return localGlobalMap_.find(gridview_.indexSet().subIndex(entity,i,codim))->second;
    \n-
    487 }
    \n-
    488
    \n-
    494 unsigned int size(unsigned int codim) const
    \n-
    495 {
    \n-
    496 return (codim_==codim) ? nGlobalEntity_ : 0;
    \n-
    497 }
    \n-
    498
    \n-
    499 protected:
    \n-\n-
    501
    \n-
    503 unsigned int codim_;
    \n-
    504
    \n-\n-
    507
    \n-\n-
    509
    \n-
    512 MapId2Index globalIndex_;
    \n-
    513 };
    \n-
    514
    \n-
    515} // namespace Dune
    \n-
    516
    \n-
    517#endif /* DUNE_GRID_UTILITY_GLOBALINDEXSET_HH */
    \n-\n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n-
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n-
    @ InteriorEntity
    all interior entities
    Definition: gridenums.hh:31
    \n-
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n-
    @ ForwardCommunication
    communicate as given in InterfaceType
    Definition: gridenums.hh:171
    \n-
    @ All_All_Interface
    send all and receive all entities
    Definition: gridenums.hh:91
    \n-
    const IndexSet & indexSet() const
    obtain the index set
    Definition: common/gridview.hh:191
    \n-
    Traits::Grid Grid
    type of the grid
    Definition: common/gridview.hh:83
    \n-
    const Grid & grid() const
    obtain a const reference to the underlying hierarchic grid
    Definition: common/gridview.hh:180
    \n-
    Traits::IndexSet IndexSet
    type of the index set
    Definition: common/gridview.hh:86
    \n-
    int size(int codim) const
    obtain number of entities in a given codimension
    Definition: common/gridview.hh:197
    \n-
    auto communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
    Communicate data on this view.
    Definition: common/gridview.hh:299
    \n-
    const Communication & comm() const
    obtain communication object
    Definition: common/gridview.hh:280
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n+
    5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
    \n+
    6#define DUNE_PERSISTENTCONTAINERVECTOR_HH
    \n+
    7
    \n+
    8#include <algorithm>
    \n+
    9#include <cassert>
    \n+
    10
    \n+
    11namespace Dune
    \n+
    12{
    \n+
    13
    \n+
    14 // PersistentContainerVector
    \n+
    15 // -------------------------
    \n+
    16
    \n+
    49 template< class G, class IndexSet, class Vector >
    \n+\n+
    51 {
    \n+\n+
    53
    \n+
    54 public:
    \n+
    55 typedef G Grid;
    \n+
    56
    \n+
    57 typedef typename Vector::value_type Value;
    \n+
    58 typedef typename Vector::size_type Size;
    \n+
    59 typedef typename Vector::const_iterator ConstIterator;
    \n+
    60 typedef typename Vector::iterator Iterator;
    \n+
    61
    \n+
    62 typedef typename Vector::allocator_type Allocator;
    \n+
    63
    \n+
    64 PersistentContainerVector ( const IndexSet &indexSet, int codim, const Value &value,
    \n+
    65 const Allocator &allocator = Allocator() )
    \n+
    66 : codim_( codim ),
    \n+\n+
    68 data_( indexSet.size( codim ), value, allocator )
    \n+
    69 {}
    \n+
    70
    \n+
    71 template< class Entity >
    \n+
    72 const Value &operator[] ( const Entity &entity ) const
    \n+
    73 {
    \n+
    74 assert( Entity::codimension == codimension() );
    \n+
    75 const Size index = indexSet().index( entity );
    \n+
    76 assert( index < data_.size() );
    \n+
    77 return data_[ index ];
    \n+
    78 }
    \n+
    79
    \n+
    80 template< class Entity >
    \n+
    81 Value &operator[] ( const Entity &entity )
    \n+
    82 {
    \n+
    83 assert( Entity::codimension == codimension() );
    \n+
    84 const Size index = indexSet().index( entity );
    \n+
    85 assert( index < data_.size() );
    \n+
    86 return data_[ index ];
    \n+
    87 }
    \n+
    88
    \n+
    89 template< class Entity >
    \n+
    90 const Value &operator() ( const Entity &entity, int subEntity ) const
    \n+
    91 {
    \n+
    92 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
    \n+
    93 assert( index < data_.size() );
    \n+
    94 return data_[ index ];
    \n+
    95 }
    \n+
    96
    \n+
    97 template< class Entity >
    \n+
    98 Value &operator() ( const Entity &entity, int subEntity )
    \n+
    99 {
    \n+
    100 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
    \n+
    101 assert( index < data_.size() );
    \n+
    102 return data_[ index ];
    \n+
    103 }
    \n+
    104
    \n+
    105 Size size () const { return data_.size(); }
    \n+
    106
    \n+
    107 void resize ( const Value &value = Value() )
    \n+
    108 {
    \n+
    109 const Size indexSetSize = indexSet().size( codimension() );
    \n+
    110 data_.resize( indexSetSize, value );
    \n+
    111 }
    \n+
    112
    \n+
    113 void shrinkToFit () {}
    \n+
    114
    \n+
    115 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
    \n+
    116
    \n+
    117 void swap ( This &other )
    \n+
    118 {
    \n+
    119 std::swap( codim_, other.codim_ );
    \n+
    120 std::swap( indexSet_, other.indexSet_ );
    \n+
    121 std::swap( data_, other.data_ );
    \n+
    122 }
    \n+
    123
    \n+
    124 ConstIterator begin () const { return data_.begin(); }
    \n+
    125 Iterator begin () { return data_.begin(); }
    \n+
    126
    \n+
    127 ConstIterator end () const { return data_.end(); }
    \n+
    128 Iterator end () { return data_.end(); }
    \n+
    129
    \n+
    130 int codimension () const { return codim_; }
    \n+
    131
    \n+
    132 protected:
    \n+
    133 const IndexSet &indexSet () const { return *indexSet_; }
    \n+
    134
    \n+\n+\n+
    137 Vector data_;
    \n+
    138 };
    \n+
    139
    \n+
    140} // namespace Dune
    \n+
    141
    \n+
    142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
    \n+
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n-
    CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
    Definition: datahandleif.hh:78
    \n-
    void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
    unpack data from message buffer to user.
    Definition: datahandleif.hh:207
    \n-
    bool contains(int dim, int codim) const
    returns true if data for given valid codim should be communicated
    Definition: datahandleif.hh:131
    \n-
    void gather(MessageBufferImp &buff, const EntityType &e) const
    pack data from user to message buffer
    Definition: datahandleif.hh:193
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    PartitionType partitionType() const
    Partition type of this entity.
    Definition: common/entity.hh:127
    \n-
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n-
    detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t, typename GridFamily::Traits > Communication
    A type that is a model of Dune::Communication. It provides a portable way for communication on the se...
    Definition: common/grid.hh:525
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    Calculate globally unique index over all processes in a Dune grid.
    Definition: globalindexset.hh:63
    \n-
    Index subIndex(const Entity &entity, unsigned int i, unsigned int codim) const
    Return the global index of a subentity of a given entity.
    Definition: globalindexset.hh:474
    \n-
    MapId2Index globalIndex_
    Stores global index of entities with entity's globally unique id as key.
    Definition: globalindexset.hh:512
    \n-
    int Index
    The number type used for global indices
    Definition: globalindexset.hh:66
    \n-
    int nGlobalEntity_
    Global number of entities, i.e. number of entities without rendundant entities on interprocessor boun...
    Definition: globalindexset.hh:506
    \n-
    Index index(const Entity &entity) const
    Return the global index of a given entity.
    Definition: globalindexset.hh:453
    \n-
    unsigned int codim_
    Codimension of the entities that we hold indices for.
    Definition: globalindexset.hh:503
    \n-
    IndexMap localGlobalMap_
    Definition: globalindexset.hh:508
    \n-
    unsigned int size(unsigned int codim) const
    Return the total number of entities over all processes that we have indices for.
    Definition: globalindexset.hh:494
    \n-
    GlobalIndexSet(const GridView &gridview, int codim)
    Constructor for a given GridView.
    Definition: globalindexset.hh:326
    \n-
    const GridView gridview_
    Definition: globalindexset.hh:500
    \n-
    Helper class to provide access to subentity PartitionTypes with a run-time codimension.
    Definition: globalindexset.hh:75
    \n-
    static PartitionType get(const Entity &entity, int codim, int i)
    Get PartitionType of the i-th subentity of codimension 'codim' of entity 'entity'.
    Definition: globalindexset.hh:78
    \n-
    static PartitionType get(const Entity &entity, int codim, int i)
    Definition: globalindexset.hh:90
    \n+
    static constexpr int codimension
    Know your own codimension.
    Definition: common/entity.hh:106
    \n+
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n+
    auto size(GeometryType type) const
    Return total number of entities of given geometry type in entity set .
    Definition: indexidset.hh:223
    \n+
    IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
    Map a subentity to an index.
    Definition: indexidset.hh:153
    \n+
    IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
    Map entity to index. The result of calling this method with an entity that is not in the index set is...
    Definition: indexidset.hh:113
    \n+
    vector-based implementation of the PersistentContainer
    Definition: persistentcontainervector.hh:51
    \n+
    PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
    Definition: persistentcontainervector.hh:64
    \n+
    Iterator begin()
    Definition: persistentcontainervector.hh:125
    \n+
    Vector::size_type Size
    Definition: persistentcontainervector.hh:58
    \n+
    Vector::value_type Value
    Definition: persistentcontainervector.hh:57
    \n+
    Vector::allocator_type Allocator
    Definition: persistentcontainervector.hh:62
    \n+
    void fill(const Value &value)
    Definition: persistentcontainervector.hh:115
    \n+
    G Grid
    Definition: persistentcontainervector.hh:55
    \n+
    const Value & operator()(const Entity &entity, int subEntity) const
    Definition: persistentcontainervector.hh:90
    \n+
    const IndexSet * indexSet_
    Definition: persistentcontainervector.hh:136
    \n+
    Vector::iterator Iterator
    Definition: persistentcontainervector.hh:60
    \n+
    ConstIterator begin() const
    Definition: persistentcontainervector.hh:124
    \n+
    ConstIterator end() const
    Definition: persistentcontainervector.hh:127
    \n+
    int codim_
    Definition: persistentcontainervector.hh:135
    \n+
    void shrinkToFit()
    Definition: persistentcontainervector.hh:113
    \n+
    Vector::const_iterator ConstIterator
    Definition: persistentcontainervector.hh:59
    \n+
    Vector data_
    Definition: persistentcontainervector.hh:137
    \n+
    Iterator end()
    Definition: persistentcontainervector.hh:128
    \n+
    const IndexSet & indexSet() const
    Definition: persistentcontainervector.hh:133
    \n+
    int codimension() const
    Definition: persistentcontainervector.hh:130
    \n+
    Size size() const
    Definition: persistentcontainervector.hh:105
    \n+
    void swap(This &other)
    Definition: persistentcontainervector.hh:117
    \n+
    const Value & operator[](const Entity &entity) const
    Definition: persistentcontainervector.hh:72
    \n+
    void resize(const Value &value=Value())
    Definition: persistentcontainervector.hh:107
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,605 +5,229 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-globalindexset.hh\n+persistentcontainervector.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 35#ifndef DUNE_GRID_UTILITY_GLOBALINDEXSET_HH\n- 36#define DUNE_GRID_UTILITY_GLOBALINDEXSET_HH\n- 37\n- 39#include \n- 40#include \n- 41#include \n- 42#include \n- 43#include \n- 44#include \n- 45#include \n- 46\n- 48#include \n- 49#include \n- 50\n- 52#if HAVE_MPI\n- 53 #include \n- 54#endif\n- 55\n- 56namespace Dune\n- 57{\n- 58\n- 61 template\n-62 class GlobalIndexSet\n- 63 {\n- 64 public:\n-66 typedef int Index;\n- 67\n- 73 template \n-74 struct SubPartitionTypeProvider\n- 75 {\n-78 static PartitionType get(const Entity& entity, int codim, int i)\n- 79 {\n- 80 if (codim==Codim)\n- 81 return entity.template subEntity(i).partitionType();\n- 82 else\n- 83 return SubPartitionTypeProvider::get(entity, codim, i);\n- 84 }\n- 85 };\n- 86\n- 87 template \n-88 struct SubPartitionTypeProvider\n- 89 {\n-90 static PartitionType get(const Entity& entity, int codim, int i)\n+ 5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH\n+ 6#define DUNE_PERSISTENTCONTAINERVECTOR_HH\n+ 7\n+ 8#include \n+ 9#include \n+ 10\n+ 11namespace Dune\n+ 12{\n+ 13\n+ 14 // PersistentContainerVector\n+ 15 // -------------------------\n+ 16\n+ 49 template< class G, class IndexSet, class Vector >\n+50 class PersistentContainerVector\n+ 51 {\n+ 52 typedef PersistentContainerVector<_G,_IndexSet,_Vector_> This;\n+ 53\n+ 54 public:\n+55 typedef G Grid;\n+ 56\n+57 typedef typename Vector::value_type Value;\n+58 typedef typename Vector::size_type Size;\n+59 typedef typename Vector::const_iterator ConstIterator;\n+60 typedef typename Vector::iterator Iterator;\n+ 61\n+62 typedef typename Vector::allocator_type Allocator;\n+ 63\n+64 PersistentContainerVector ( const IndexSet &indexSet, int codim, const Value\n+&value,\n+ 65 const Allocator &allocator = Allocator() )\n+ 66 : codim_( codim ),\n+ 67 indexSet_( &indexSet ),\n+ 68 data_( indexSet.size( codim ), value, allocator )\n+ 69 {}\n+ 70\n+ 71 template< class Entity >\n+72 const Value &operator[]( const Entity &entity ) const\n+ 73 {\n+ 74 assert( Entity::codimension == codimension() );\n+ 75 const Size index = indexSet().index( entity );\n+ 76 assert( index < data_.size() );\n+ 77 return data_[ index ];\n+ 78 }\n+ 79\n+ 80 template< class Entity >\n+81 Value &operator[]( const Entity &entity )\n+ 82 {\n+ 83 assert( Entity::codimension == codimension() );\n+ 84 const Size index = indexSet().index( entity );\n+ 85 assert( index < data_.size() );\n+ 86 return data_[ index ];\n+ 87 }\n+ 88\n+ 89 template< class Entity >\n+90 const Value &operator()( const Entity &entity, int subEntity ) const\n 91 {\n- 92 return entity.template subEntity<0>(i).partitionType();\n- 93 }\n- 94 };\n- 95\n- 96 private:\n- 98 typedef typename GridView::Grid Grid;\n- 99\n- 100 typedef typename GridView::Grid::GlobalIdSet GlobalIdSet;\n- 101 typedef typename GridView::Grid::GlobalIdSet::IdType IdType;\n- 102 typedef typename GridView::Traits::template Codim<0>::Iterator Iterator;\n- 103\n- 104 typedef typename Grid::Communication Communication;\n- 105\n- 106 typedef std::map MapId2Index;\n- 107 typedef std::map IndexMap;\n- 108\n- 109 /\n-*********************************************************************************************/\n- 110 /* calculate unique partitioning for all entities of a given codim in a\n-given GridView, */\n- 111 /* assuming they all have the same geometry, i.e. codim, type */\n- 112 /\n-*********************************************************************************************/\n- 113 class UniqueEntityPartition\n- 114 {\n- 115 private:\n- 116 /* A DataHandle class to calculate the minimum of a std::vector which is\n-accompanied by an index set */\n- 117 template // mapper type and vector type\n- 118 class MinimumExchange\n- 119 : public Dune::CommDataHandleIF,typename V::\n-value_type>\n- 120 {\n- 121 public:\n- 123 typedef typename V::value_type DataType;\n- 124\n- 126 bool contains (int dim, unsigned int codim) const\n- 127 {\n- 128 return codim==indexSetCodim_;\n- 129 }\n- 130\n- 132 bool fixedSize (int dim, int codim) const\n- 133 {\n- 134 return true ;\n- 135 }\n- 136\n- 140 template\n- 141 size_t size (EntityType& e) const\n- 142 {\n- 143 return 1 ;\n- 144 }\n- 145\n- 147 template\n- 148 void gather (MessageBuffer& buff, const EntityType& e) const\n- 149 {\n- 150 buff.write(v_[indexset_.index(e)]);\n- 151 }\n- 152\n- 157 template\n- 158 void scatter (MessageBuffer& buff, const EntityType& e, size_t n)\n- 159 {\n- 160 DataType x;\n- 161 buff.read(x);\n- 162 if (x>=0) // other is -1 means, he does not want it\n- 163 v_[indexset_.index(e)] = std::min(x,v_[indexset_.index(e)]);\n- 164 }\n- 165\n- 167 MinimumExchange (const IS& indexset, V& v, unsigned int indexSetCodim)\n- 168 : indexset_(indexset),\n- 169 v_(v),\n- 170 indexSetCodim_(indexSetCodim)\n- 171 {}\n- 172\n- 173 private:\n- 174 const IS& indexset_;\n- 175 V& v_;\n- 176 unsigned int indexSetCodim_;\n- 177 };\n- 178\n- 179 public:\n- 182 UniqueEntityPartition (const GridView& gridview, unsigned int codim)\n- 183 : assignment_(gridview.size(codim))\n- 184 {\n- 186 typedef typename GridView::IndexSet IndexSet;\n- 187\n- 188 // assign own rank to entities that I might have\n- 189 for (auto it = gridview.template begin<0>(); it!=gridview.template end<0>\n-(); ++it)\n- 190 for (unsigned int i=0; isubEntities(codim); i++)\n- 191 {\n- 192 // Evil hack: I need to call subEntity, which needs the entity codimension\n-as a static parameter.\n- 193 // However, we only have it as a run-time parameter.\n- 194 PartitionType subPartitionType = SubPartitionTypeProvider::Entity, GridView::dimension>::get(*it,codim,i);\n- 195\n- 196 assignment_[gridview.indexSet().subIndex(*it,i,codim)]\n- 197 = ( subPartitionType==Dune::InteriorEntity or subPartitionType==Dune::\n-BorderEntity )\n- 198 ? gridview.comm().rank() // set to own rank\n- 199 : - 1; // it is a ghost entity, I will not possibly own it.\n- 200 }\n- 201\n- 203 MinimumExchange > dh(gridview.indexSet\n-(),assignment_,codim);\n- 204\n- 205 gridview.communicate(dh,Dune::All_All_Interface,Dune::\n-ForwardCommunication);\n- 206 }\n- 207\n- 209 int owner(size_t i)\n- 210 {\n- 211 return assignment_[i];\n- 212 }\n- 213\n- 215 size_t numOwners(int rank) const\n- 216 {\n- 217 return std::count(assignment_.begin(), assignment_.end(), rank);\n- 218 }\n- 219\n- 220 private:\n- 221 std::vector assignment_;\n- 222 };\n- 223\n- 224 private:\n- 225 /* A DataHandle class to communicate the global index from the\n- 226 * owning to the non-owning entity; the class is based on the\n-MinimumExchange\n- 227 * class in the parallelsolver.hh header file.\n- 228 */\n- 229 class IndexExchange\n- 230 : public Dune::CommDataHandleIF\n- 231 {\n- 232 public:\n- 234 bool contains (int dim, unsigned int codim) const\n- 235 {\n- 236 return codim==indexSetCodim_;\n- 237 }\n- 238\n- 240 bool fixedSize (int dim, int codim) const\n- 241 {\n- 242 return true;\n- 243 }\n- 244\n- 249 template\n- 250 size_t size (EntityType& e) const\n- 251 {\n- 252 return 1;\n- 253 }\n- 254\n- 256 template\n- 257 void gather (MessageBuffer& buff, const EntityType& e) const\n- 258 {\n- 259 IdType id=globalidset_.id(e);\n- 260\n- 261 if (indexSetCodim_==0)\n- 262 buff.write(mapid2entity_[id]);\n- 263 else\n- 264 buff.write((*mapid2entity_.find(id)).second);\n- 265 }\n- 266\n- 271 template\n- 272 void scatter (MessageBuffer& buff, const EntityType& entity, size_t n)\n- 273 {\n- 274 Index x;\n- 275 buff.read(x);\n- 276\n- 284 if(x >= 0) {\n- 285 const IdType id = globalidset_.id(entity);\n- 286\n- 287 if (indexSetCodim_==0)\n- 288 mapid2entity_[id] = x;\n- 289 else\n- 290 {\n- 291 mapid2entity_.erase(id);\n- 292 mapid2entity_.insert(std::make_pair(id,x));\n- 293\n- 294 const Index lindex = indexSet_.index(entity);\n- 295 localGlobalMap_[lindex] = x;\n- 296 }\n- 297 }\n- 298 }\n- 299\n- 301 IndexExchange (const GlobalIdSet& globalidset, MapId2Index& mapid2entity,\n- 302 const typename GridView::IndexSet& localIndexSet, IndexMap& localGlobal,\n- 303 unsigned int indexSetCodim)\n- 304 : globalidset_(globalidset),\n- 305 mapid2entity_(mapid2entity),\n- 306 indexSet_(localIndexSet),\n- 307 localGlobalMap_(localGlobal),\n- 308 indexSetCodim_(indexSetCodim)\n- 309 {}\n- 310\n- 311 private:\n- 312 const GlobalIdSet& globalidset_;\n- 313 MapId2Index& mapid2entity_;\n- 314\n- 315 const typename GridView::IndexSet& indexSet_;\n- 316 IndexMap& localGlobalMap_;\n- 317 unsigned int indexSetCodim_;\n- 318 };\n- 319\n- 320 public:\n-326 GlobalIndexSet(const GridView& gridview, int codim)\n- 327 : gridview_(gridview),\n- 328 codim_(codim)\n- 329 {\n- 330 int rank = gridview.comm().rank();\n- 331 int size = gridview.comm().size();\n- 332\n- 333 const typename GridView::IndexSet& indexSet = gridview.indexSet();\n- 334\n- 335 std::unique_ptr uniqueEntityPartition;\n- 336 if (codim_!=0)\n- 337 uniqueEntityPartition = std::make_unique\n-(gridview,codim_);\n- 338\n- 339 int nLocalEntity = (codim_==0)\n- 340 ? std::distance(gridview.template begin<0, Dune::Interior_Partition>(),\n-gridview.template end<0, Dune::Interior_Partition>())\n- 341 : uniqueEntityPartition->numOwners(rank);\n- 342\n- 343 // Compute the global, non-redundant number of entities, i.e. the number\n-of entities in the set\n- 344 // without double, aka. redundant entities, on the interprocessor boundary\n-via global reduce. */\n- 345 nGlobalEntity_ = gridview.comm().template sum(nLocalEntity);\n- 346\n- 347 /* communicate the number of locally owned entities to all other processes\n-so that the respective offset\n- 348 * can be calculated on the respective processor; we use the Dune mpi\n-communication facility\n- 349 * for this; first, we gather the number of locally owned entities on the\n-root process and, second, we\n- 350 * broadcast the array to all processes where the respective offset can be\n-calculated. */\n- 351\n- 352 std::vector offset(size);\n- 353 std::fill(offset.begin(), offset.end(), 0);\n- 354\n- 356 gridview_.comm().template allgather(&nLocalEntity, 1, offset.data());\n- 357\n- 358 int myoffset = 0;\n- 359 for (int i=1; i();\n-iter!=gridview_.template end<0>(); ++iter)\n- 388 {\n- 389 const IdType id = globalIdSet.id(*iter);\n- 392 if (iter->partitionType() == Dune::InteriorEntity)\n- 393 {\n- 394 const Index gindex = myoffset + globalcontrib;\n- 396 globalIndex_[id] = gindex;\n- 397 globalcontrib++;\n- 398 }\n- 399\n- 401 else\n- 402 {\n- 403 globalIndex_[id] = -1;\n- 404 }\n- 405 }\n- 406 }\n- 407 else // if (codim==0) else\n- 408 {\n- 409 std::vector firstTime(gridview_.size(codim_));\n- 410 std::fill(firstTime.begin(), firstTime.end(), true);\n- 411\n- 412 for(Iterator iter = gridview_.template begin<0>();iter!=gridview_.template\n-end<0>(); ++iter)\n- 413 {\n- 414 for (size_t i=0; isubEntities(codim_); i++)\n- 415 {\n- 416 IdType id=globalIdSet.subId(*iter,i,codim_);\n- 417\n- 418 Index idx = gridview_.indexSet().subIndex(*iter,i,codim_);\n- 419\n- 420 if (!firstTime[idx] )\n- 421 continue;\n- 422\n- 423 firstTime[idx] = false;\n- 424\n- 425 if (uniqueEntityPartition->owner(idx) == rank)\n- 426 {\n- 427 const Index gindex = myoffset + globalcontrib;\n- 428 globalIndex_.insert(std::make_pair(id,gindex));\n- 430 const Index lindex = idx;\n- 431 localGlobalMap_[lindex] = gindex;\n- 432\n- 433 globalcontrib++;\n- 434 }\n- 435 else\n- 436 {\n- 437 globalIndex_.insert(std::make_pair(id,-1));\n- 438 }\n- 439 }\n- 440\n- 441 }\n- 442 }\n- 443\n- 444 // 2nd stage of global index calculation: communicate global index for\n-non-owned entities\n- 445\n- 446 // Create the data handle and communicate.\n- 447 IndexExchange dataHandle\n-(globalIdSet,globalIndex_,indexSet,localGlobalMap_,codim_);\n- 448 gridview_.communicate(dataHandle, Dune::All_All_Interface, Dune::\n-ForwardCommunication);\n- 449 }\n- 450\n- 452 template \n-453 Index index(const Entity& entity) const\n- 454 {\n- 455 if (codim_==0)\n- 456 {\n- 458 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();\n- 459 const IdType id = globalIdSet.id(entity);\n- 460 const Index gindex = globalIndex_.find(id)->second;\n- 462 return gindex;\n- 463 }\n- 464 else\n- 465 return localGlobalMap_.find(gridview_.indexSet().index(entity))->second;\n- 466 }\n- 467\n- 473 template \n-474 Index subIndex(const Entity& entity, unsigned int i, unsigned int codim)\n-const\n- 475 {\n- 476 if (codim_==0)\n- 477 {\n- 479 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();\n- 480 const IdType id = globalIdSet.subId(entity,i,codim);\n- 481 const Index gindex = globalIndex_.find(id)->second;\n- 483 return gindex;\n- 484 }\n- 485 else\n- 486 return localGlobalMap_.find(gridview_.indexSet().subIndex\n-(entity,i,codim))->second;\n- 487 }\n- 488\n-494 unsigned int size(unsigned int codim) const\n- 495 {\n- 496 return (codim_==codim) ? nGlobalEntity_ : 0;\n- 497 }\n- 498\n- 499 protected:\n-500 const GridView gridview_;\n- 501\n-503 unsigned int codim_;\n- 504\n-506 int nGlobalEntity_;\n- 507\n-508 IndexMap localGlobalMap_;\n- 509\n-512 MapId2Index globalIndex_;\n- 513 };\n- 514\n- 515} // namespace Dune\n- 516\n- 517#endif /* DUNE_GRID_UTILITY_GLOBALINDEXSET_HH */\n-gridenums.hh\n-datahandleif.hh\n-Describes the parallel communication interface class for MessageBuffers and\n-DataHandles.\n-Dune::PartitionType\n-PartitionType\n-Attributes used in the generic overlap model.\n-Definition: gridenums.hh:30\n-Dune::InteriorEntity\n-@ InteriorEntity\n-all interior entities\n-Definition: gridenums.hh:31\n-Dune::BorderEntity\n-@ BorderEntity\n-on boundary between interior and overlap\n-Definition: gridenums.hh:32\n-Dune::ForwardCommunication\n-@ ForwardCommunication\n-communicate as given in InterfaceType\n-Definition: gridenums.hh:171\n-Dune::All_All_Interface\n-@ All_All_Interface\n-send all and receive all entities\n-Definition: gridenums.hh:91\n-Dune::GridView::indexSet\n-const IndexSet & indexSet() const\n-obtain the index set\n-Definition: common/gridview.hh:191\n-Dune::GridView::Grid\n-Traits::Grid Grid\n-type of the grid\n-Definition: common/gridview.hh:83\n-Dune::GridView::grid\n-const Grid & grid() const\n-obtain a const reference to the underlying hierarchic grid\n-Definition: common/gridview.hh:180\n-Dune::GridView::IndexSet\n-Traits::IndexSet IndexSet\n-type of the index set\n-Definition: common/gridview.hh:86\n-Dune::GridView::size\n-int size(int codim) const\n-obtain number of entities in a given codimension\n-Definition: common/gridview.hh:197\n-Dune::GridView::communicate\n-auto communicate(CommDataHandleIF< DataHandleImp, DataType > &data,\n-InterfaceType iftype, CommunicationDirection dir) const\n-Communicate data on this view.\n-Definition: common/gridview.hh:299\n-Dune::GridView::comm\n-const Communication & comm() const\n-obtain communication object\n-Definition: common/gridview.hh:280\n-Dune::GridView::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/gridview.hh:148\n+ 92 const Size index = indexSet().subIndex( entity, subEntity, codimension() );\n+ 93 assert( index < data_.size() );\n+ 94 return data_[ index ];\n+ 95 }\n+ 96\n+ 97 template< class Entity >\n+98 Value &operator()( const Entity &entity, int subEntity )\n+ 99 {\n+ 100 const Size index = indexSet().subIndex( entity, subEntity, codimension()\n+);\n+ 101 assert( index < data_.size() );\n+ 102 return data_[ index ];\n+ 103 }\n+ 104\n+105 Size size () const { return data_.size(); }\n+ 106\n+107 void resize ( const Value &value = Value() )\n+ 108 {\n+ 109 const Size indexSetSize = indexSet().size( codimension() );\n+ 110 data_.resize( indexSetSize, value );\n+ 111 }\n+ 112\n+113 void shrinkToFit () {}\n+ 114\n+115 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }\n+ 116\n+117 void swap ( This &other )\n+ 118 {\n+ 119 std::swap( codim_, other.codim_ );\n+ 120 std::swap( indexSet_, other.indexSet_ );\n+ 121 std::swap( data_, other.data_ );\n+ 122 }\n+ 123\n+124 ConstIterator begin () const { return data_.begin(); }\n+125 Iterator begin () { return data_.begin(); }\n+ 126\n+127 ConstIterator end () const { return data_.end(); }\n+128 Iterator end () { return data_.end(); }\n+ 129\n+130 int codimension () const { return codim_; }\n+ 131\n+ 132 protected:\n+133 const IndexSet &indexSet () const { return *indexSet_; }\n+ 134\n+135 int codim_;\n+136 const IndexSet *indexSet_;\n+137 Vector data_;\n+ 138 };\n+ 139\n+ 140} // namespace Dune\n+ 141\n+ 142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH\n+std::swap\n+void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n+> &b)\n+Definition: utility/persistentcontainer.hh:83\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::min\n-int min(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:348\n-Dune::CommDataHandleIF\n-CommDataHandleIF describes the features of a data handle for communication in\n-parallel runs using the...\n-Definition: datahandleif.hh:78\n-Dune::CommDataHandleIF<_MinimumExchange<_IS,_V_>,_V::value_type_>::scatter\n-void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)\n-unpack data from message buffer to user.\n-Definition: datahandleif.hh:207\n-Dune::CommDataHandleIF<_IndexExchange,_Index_>::contains\n-bool contains(int dim, int codim) const\n-returns true if data for given valid codim should be communicated\n-Definition: datahandleif.hh:131\n-Dune::CommDataHandleIF<_MinimumExchange<_IS,_V_>,_V::value_type_>::gather\n-void gather(MessageBufferImp &buff, const EntityType &e) const\n-pack data from user to message buffer\n-Definition: datahandleif.hh:193\n Dune::Entity\n Wrapper class for entities.\n Definition: common/entity.hh:66\n-Dune::Entity::partitionType\n-PartitionType partitionType() const\n-Partition type of this entity.\n-Definition: common/entity.hh:127\n-Dune::Grid\n-Grid abstract base class.\n-Definition: common/grid.hh:375\n-Dune::Grid::Communication\n-detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t,\n-typename GridFamily::Traits > Communication\n-A type that is a model of Dune::Communication. It provides a portable way for\n-communication on the se...\n-Definition: common/grid.hh:525\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::GlobalIndexSet\n-Calculate globally unique index over all processes in a Dune grid.\n-Definition: globalindexset.hh:63\n-Dune::GlobalIndexSet::subIndex\n-Index subIndex(const Entity &entity, unsigned int i, unsigned int codim) const\n-Return the global index of a subentity of a given entity.\n-Definition: globalindexset.hh:474\n-Dune::GlobalIndexSet::globalIndex_\n-MapId2Index globalIndex_\n-Stores global index of entities with entity's globally unique id as key.\n-Definition: globalindexset.hh:512\n-Dune::GlobalIndexSet::Index\n-int Index\n-The number type used for global indices\n-Definition: globalindexset.hh:66\n-Dune::GlobalIndexSet::nGlobalEntity_\n-int nGlobalEntity_\n-Global number of entities, i.e. number of entities without rendundant entities\n-on interprocessor boun...\n-Definition: globalindexset.hh:506\n-Dune::GlobalIndexSet::index\n-Index index(const Entity &entity) const\n-Return the global index of a given entity.\n-Definition: globalindexset.hh:453\n-Dune::GlobalIndexSet::codim_\n-unsigned int codim_\n-Codimension of the entities that we hold indices for.\n-Definition: globalindexset.hh:503\n-Dune::GlobalIndexSet::localGlobalMap_\n-IndexMap localGlobalMap_\n-Definition: globalindexset.hh:508\n-Dune::GlobalIndexSet::size\n-unsigned int size(unsigned int codim) const\n-Return the total number of entities over all processes that we have indices\n-for.\n-Definition: globalindexset.hh:494\n-Dune::GlobalIndexSet::GlobalIndexSet\n-GlobalIndexSet(const GridView &gridview, int codim)\n-Constructor for a given GridView.\n-Definition: globalindexset.hh:326\n-Dune::GlobalIndexSet::gridview_\n-const GridView gridview_\n-Definition: globalindexset.hh:500\n-Dune::GlobalIndexSet::SubPartitionTypeProvider\n-Helper class to provide access to subentity PartitionTypes with a run-time\n-codimension.\n-Definition: globalindexset.hh:75\n-Dune::GlobalIndexSet::SubPartitionTypeProvider::get\n-static PartitionType get(const Entity &entity, int codim, int i)\n-Get PartitionType of the i-th subentity of codimension 'codim' of entity\n-'entity'.\n-Definition: globalindexset.hh:78\n-Dune::GlobalIndexSet::SubPartitionTypeProvider<_Entity,_0_>::get\n-static PartitionType get(const Entity &entity, int codim, int i)\n-Definition: globalindexset.hh:90\n+Dune::Entity::codimension\n+static constexpr int codimension\n+Know your own codimension.\n+Definition: common/entity.hh:106\n+Dune::IndexSet\n+Index Set Interface base class.\n+Definition: indexidset.hh:78\n+Dune::IndexSet::size\n+auto size(GeometryType type) const\n+Return total number of entities of given geometry type in entity set .\n+Definition: indexidset.hh:223\n+Dune::IndexSet::subIndex\n+IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int\n+i, unsigned int codim) const\n+Map a subentity to an index.\n+Definition: indexidset.hh:153\n+Dune::IndexSet::index\n+IndexType index(const typename Traits::template Codim< cc >::Entity &e) const\n+Map entity to index. The result of calling this method with an entity that is\n+not in the index set is...\n+Definition: indexidset.hh:113\n+Dune::PersistentContainerVector\n+vector-based implementation of the PersistentContainer\n+Definition: persistentcontainervector.hh:51\n+Dune::PersistentContainerVector::PersistentContainerVector\n+PersistentContainerVector(const IndexSet &indexSet, int codim, const Value\n+&value, const Allocator &allocator=Allocator())\n+Definition: persistentcontainervector.hh:64\n+Dune::PersistentContainerVector::begin\n+Iterator begin()\n+Definition: persistentcontainervector.hh:125\n+Dune::PersistentContainerVector::Size\n+Vector::size_type Size\n+Definition: persistentcontainervector.hh:58\n+Dune::PersistentContainerVector::Value\n+Vector::value_type Value\n+Definition: persistentcontainervector.hh:57\n+Dune::PersistentContainerVector::Allocator\n+Vector::allocator_type Allocator\n+Definition: persistentcontainervector.hh:62\n+Dune::PersistentContainerVector::fill\n+void fill(const Value &value)\n+Definition: persistentcontainervector.hh:115\n+Dune::PersistentContainerVector::Grid\n+G Grid\n+Definition: persistentcontainervector.hh:55\n+Dune::PersistentContainerVector::operator()\n+const Value & operator()(const Entity &entity, int subEntity) const\n+Definition: persistentcontainervector.hh:90\n+Dune::PersistentContainerVector::indexSet_\n+const IndexSet * indexSet_\n+Definition: persistentcontainervector.hh:136\n+Dune::PersistentContainerVector::Iterator\n+Vector::iterator Iterator\n+Definition: persistentcontainervector.hh:60\n+Dune::PersistentContainerVector::begin\n+ConstIterator begin() const\n+Definition: persistentcontainervector.hh:124\n+Dune::PersistentContainerVector::end\n+ConstIterator end() const\n+Definition: persistentcontainervector.hh:127\n+Dune::PersistentContainerVector::codim_\n+int codim_\n+Definition: persistentcontainervector.hh:135\n+Dune::PersistentContainerVector::shrinkToFit\n+void shrinkToFit()\n+Definition: persistentcontainervector.hh:113\n+Dune::PersistentContainerVector::ConstIterator\n+Vector::const_iterator ConstIterator\n+Definition: persistentcontainervector.hh:59\n+Dune::PersistentContainerVector::data_\n+Vector data_\n+Definition: persistentcontainervector.hh:137\n+Dune::PersistentContainerVector::end\n+Iterator end()\n+Definition: persistentcontainervector.hh:128\n+Dune::PersistentContainerVector::indexSet\n+const IndexSet & indexSet() const\n+Definition: persistentcontainervector.hh:133\n+Dune::PersistentContainerVector::codimension\n+int codimension() const\n+Definition: persistentcontainervector.hh:130\n+Dune::PersistentContainerVector::size\n+Size size() const\n+Definition: persistentcontainervector.hh:105\n+Dune::PersistentContainerVector::swap\n+void swap(This &other)\n+Definition: persistentcontainervector.hh:117\n+Dune::PersistentContainerVector::operator[]\n+const Value & operator[](const Entity &entity) const\n+Definition: persistentcontainervector.hh:72\n+Dune::PersistentContainerVector::resize\n+void resize(const Value &value=Value())\n+Definition: persistentcontainervector.hh:107\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00992.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00992.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainerinterface.hh File Reference\n+dune-grid: multiindex.hh File Reference\n \n \n \n \n \n \n \n@@ -65,32 +65,39 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    persistentcontainerinterface.hh File Reference
    \n+
    multiindex.hh File Reference
    \n
    \n
    \n \n+

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

    \n+
    #include <array>
    \n+
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n

    \n Classes

    class  Dune::PersistentContainerInterface< G, T >
     Persistent storage of data on all entities of a grid. More...
    class  Dune::FactoryUtilities::MultiIndex< dim >
     
    \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::FactoryUtilities
     
    \n-
    \n+

    Detailed Description

    \n+

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

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,20 +6,27 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-persistentcontainerinterface.hh File Reference\n+multiindex.hh File Reference\n+Implements a multiindex with arbitrary dimension and fixed index ranges This is\n+used by various factory classes. More...\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::PersistentContainerInterface<_G,_T_>\n-\u00a0 Persistent storage of data on all entities of a grid. More...\n+class \u00a0Dune::FactoryUtilities::MultiIndex<_dim_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+namespace \u00a0Dune::FactoryUtilities\n+\u00a0\n+***** Detailed Description *****\n+Implements a multiindex with arbitrary dimension and fixed index ranges This is\n+used by various factory classes.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00992_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainerinterface.hh Source File\n+dune-grid: multiindex.hh Source File\n \n \n \n \n \n \n \n@@ -62,122 +62,73 @@\n \n
    \n \n
    \n \n
    \n-
    persistentcontainerinterface.hh
    \n+
    multiindex.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
    \n-
    6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH
    \n-
    7
    \n-
    8#ifndef HEADERCHECK
    \n-
    9#error "This header exists for documentation purposes only and should never be included directly."
    \n-
    10#endif
    \n-
    11
    \n-
    12namespace Dune
    \n-
    13{
    \n-
    14
    \n-
    53 template< class G, class T >
    \n-\n-
    55 {
    \n-\n-
    57
    \n-
    58 struct ImplementationDefined;
    \n-
    59
    \n-
    60 public:
    \n-
    61 typedef G Grid;
    \n-
    62
    \n-
    63 typedef T Value;
    \n-
    64
    \n-
    65 typedef ImplementationDefined Size;
    \n-
    66 typedef ImplementationDefined ConstIterator;
    \n-
    67 typedef ImplementationDefined Iterator;
    \n-
    68
    \n-
    69 // construction
    \n-
    70
    \n-
    79 PersistentContainerInterface ( Grid &grid, int codim, const Value &value = Value() );
    \n-
    80
    \n-\n-
    83
    \n-
    85 const This &operator= ( const This &other );
    \n-
    86
    \n-
    87 // element access
    \n-
    88
    \n-
    93 template< class Entity >
    \n-
    94 const Value &operator[] ( const Entity &entity ) const;
    \n-
    95
    \n-
    100 template< class Entity >
    \n-
    101 Value &operator[] ( const Entity &entity );
    \n-
    102
    \n-
    108 template< class Entity >
    \n-
    109 const Value &operator() ( const Entity &entity, int subEntity ) const;
    \n-
    110
    \n-
    116 template< class Entity >
    \n-
    117 Value &operator() ( const Entity &entity, int subEntity );
    \n-
    118
    \n-
    119 // capacity
    \n-
    120
    \n-
    126 Size size () const;
    \n-
    127
    \n-
    141 void resize ( const Value &value = Value() );
    \n-
    142
    \n-
    156 void shrinkToFit ();
    \n-
    157
    \n-
    158 // modifiers
    \n-
    159
    \n-
    165 void fill ( const Value &value );
    \n-
    166
    \n-
    171 void swap ( This &other );
    \n-
    172
    \n-
    173 // iterators
    \n-
    174
    \n-\n-\n-
    187
    \n-\n-\n-
    200
    \n-
    201 // information
    \n-
    202
    \n-
    204 int codimension () const;
    \n-
    205 };
    \n-
    206
    \n-
    207} // namespace Dune
    \n-
    208
    \n-
    209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
    \n+
    3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH
    \n+
    4#define DUNE_GRID_UTILITY_MULTIINDEX_HH
    \n+
    5
    \n+
    11#include<array>
    \n+
    12
    \n+
    13namespace Dune
    \n+
    14{
    \n+
    15 namespace FactoryUtilities
    \n+
    16 {
    \n+
    17 template<std::size_t dim>
    \n+
    18 class MultiIndex : public std::array<unsigned int,dim>
    \n+
    19 {
    \n+
    20 // The range of each component
    \n+
    21 std::array<unsigned int,dim> limits_;
    \n+
    22
    \n+
    23 public:
    \n+
    25 MultiIndex(const std::array<unsigned int,dim>& limits) : limits_(limits)
    \n+
    26 {
    \n+
    27 std::fill(this->begin(), this->end(), 0);
    \n+
    28 }
    \n+
    29
    \n+\n+
    32 {
    \n+
    33 for (std::size_t i=0; i<dim; i++)
    \n+
    34 {
    \n+
    35 // Augment digit
    \n+
    36 (*this)[i]++;
    \n+
    37
    \n+
    38 // If there is no carry-over we can stop here
    \n+
    39 if ((*this)[i]<limits_[i])
    \n+
    40 break;
    \n+
    41
    \n+
    42 (*this)[i] = 0;
    \n+
    43 }
    \n+
    44 return *this;
    \n+
    45 }
    \n+
    46
    \n+
    48 size_t cycle() const
    \n+
    49 {
    \n+
    50 size_t result = 1;
    \n+
    51 for (std::size_t i=0; i<dim; i++)
    \n+
    52 result *= limits_[i];
    \n+
    53 return result;
    \n+
    54 }
    \n+
    55 };
    \n+
    56 }
    \n+
    57}
    \n+
    58
    \n+
    59#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    Persistent storage of data on all entities of a grid.
    Definition: persistentcontainerinterface.hh:55
    \n-
    ImplementationDefined Size
    Definition: persistentcontainerinterface.hh:65
    \n-
    PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value())
    constuctor
    \n-
    const Value & operator[](const Entity &entity) const
    access the data associated with an entity
    \n-
    T Value
    Definition: persistentcontainerinterface.hh:63
    \n-
    Size size() const
    number of entries in the container
    \n-
    ImplementationDefined Iterator
    Definition: persistentcontainerinterface.hh:67
    \n-
    PersistentContainerInterface(const This &other)
    copy constructor
    \n-
    ImplementationDefined ConstIterator
    Definition: persistentcontainerinterface.hh:66
    \n-
    ConstIterator end() const
    returns an iterator pointing to the last element of the container
    \n-
    ConstIterator begin() const
    returns an iterator pointing to the first element of the container
    \n-
    Iterator begin()
    returns an iterator pointing to the first element of the container
    \n-
    Iterator end()
    returns an iterator pointing to the last element of the container
    \n-
    void shrinkToFit()
    remove unnecessary entries from container
    \n-
    int codimension() const
    return the codimension, the container attaches data to
    \n-
    G Grid
    Definition: persistentcontainerinterface.hh:61
    \n-
    void swap(This &other)
    exchange the content of the container with another one
    \n-
    void resize(const Value &value=Value())
    reserve memory for all entities in the grid
    \n-
    void fill(const Value &value)
    set all accessible entries to a given value
    \n-
    const Value & operator()(const Entity &entity, int subEntity) const
    access the data associated with a subentity
    \n-
    const This & operator=(const This &other)
    assignment operator
    \n+
    Definition: multiindex.hh:19
    \n+
    MultiIndex(const std::array< unsigned int, dim > &limits)
    Constructor with a given range for each digit.
    Definition: multiindex.hh:25
    \n+
    MultiIndex< dim > & operator++()
    Increment the MultiIndex.
    Definition: multiindex.hh:31
    \n+
    size_t cycle() const
    Compute how many times you can call operator++ before getting to (0,...,0) again.
    Definition: multiindex.hh:48
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,166 +5,82 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-persistentcontainerinterface.hh\n+multiindex.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n- 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH\n- 6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH\n- 7\n- 8#ifndef HEADERCHECK\n- 9#error \"This header exists for documentation purposes only and should never\n-be included directly.\"\n- 10#endif\n- 11\n- 12namespace Dune\n- 13{\n- 14\n- 53 template< class G, class T >\n-54 class PersistentContainerInterface\n- 55 {\n- 56 typedef PersistentContainerInterface<_G,_T_> This;\n- 57\n- 58 struct ImplementationDefined;\n- 59\n- 60 public:\n-61 typedef G Grid;\n- 62\n-63 typedef T Value;\n- 64\n-65 typedef ImplementationDefined Size;\n-66 typedef ImplementationDefined ConstIterator;\n-67 typedef ImplementationDefined Iterator;\n- 68\n- 69 // construction\n- 70\n-79 PersistentContainerInterface ( Grid &grid, int codim, const Value &value =\n-Value() );\n- 80\n-82 PersistentContainerInterface ( const This &other );\n- 83\n-85 const This &operator=( const This &other );\n- 86\n- 87 // element access\n- 88\n- 93 template< class Entity >\n-94 const Value &operator[]( const Entity &entity ) const;\n- 95\n- 100 template< class Entity >\n-101 Value &operator[]( const Entity &entity );\n- 102\n- 108 template< class Entity >\n-109 const Value &operator()( const Entity &entity, int subEntity ) const;\n- 110\n- 116 template< class Entity >\n-117 Value &operator()( const Entity &entity, int subEntity );\n- 118\n- 119 // capacity\n- 120\n-126 Size size () const;\n- 127\n-141 void resize ( const Value &value = Value() );\n- 142\n-156 void shrinkToFit ();\n- 157\n- 158 // modifiers\n- 159\n-165 void fill ( const Value &value );\n- 166\n-171 void swap ( This &other );\n- 172\n- 173 // iterators\n- 174\n-180 ConstIterator begin () const;\n-186 Iterator begin ();\n- 187\n-193 ConstIterator end () const;\n-199 Iterator end ();\n- 200\n- 201 // information\n- 202\n-204 int codimension () const;\n- 205 };\n- 206\n- 207} // namespace Dune\n- 208\n- 209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH\n+ 3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH\n+ 4#define DUNE_GRID_UTILITY_MULTIINDEX_HH\n+ 5\n+ 11#include\n+ 12\n+ 13namespace Dune\n+ 14{\n+15 namespace FactoryUtilities\n+ 16 {\n+ 17 template\n+18 class MultiIndex : public std::array\n+ 19 {\n+ 20 // The range of each component\n+ 21 std::array limits_;\n+ 22\n+ 23 public:\n+25 MultiIndex(const std::array& limits) : limits_(limits)\n+ 26 {\n+ 27 std::fill(this->begin(), this->end(), 0);\n+ 28 }\n+ 29\n+31 MultiIndex& operator++()\n+ 32 {\n+ 33 for (std::size_t i=0; i &limits)\n+Constructor with a given range for each digit.\n+Definition: multiindex.hh:25\n+Dune::FactoryUtilities::MultiIndex::operator++\n+MultiIndex< dim > & operator++()\n+Increment the MultiIndex.\n+Definition: multiindex.hh:31\n+Dune::FactoryUtilities::MultiIndex::cycle\n+size_t cycle() const\n+Compute how many times you can call operator++ before getting to (0,...,0)\n+again.\n+Definition: multiindex.hh:48\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00995.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00995.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: parmetisgridpartitioner.hh File Reference\n+dune-grid: vertexorderfactory.hh File Reference\n \n \n \n \n \n \n \n@@ -62,32 +62,44 @@\n \n
    \n \n
    \n \n
    \n-
    parmetisgridpartitioner.hh File Reference
    \n+ \n+
    vertexorderfactory.hh File Reference
    \n
    \n
    \n-\n-

    Compute a repartitioning of a Dune grid using ParMetis. \n-More...

    \n
    #include <algorithm>
    \n+#include <cstddef>
    \n+#include <functional>
    \n #include <vector>
    \n-#include <dune/common/parallel/mpihelper.hh>
    \n-#include <dune/common/exceptions.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/utility/globalindexset.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n-#include <dune/grid/common/rangegenerators.hh>
    \n+#include <dune/geometry/generalvertexorder.hh>
    \n
    \n

    Go to the source code of this file.

    \n-

    Detailed Description

    \n-

    Compute a repartitioning of a Dune grid using ParMetis.

    \n-
    \n+\n+\n+\n+\n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::VertexOrderByIdFactory< IdSet, Index >
     Factory for GeneralVertexOrder objects using an IdSet. More...
     
    struct  Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim >
     type of vertex order object may depend on the dimension of the element More...
     
    \n+\n+\n+\n+\n+

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,23 +5,31 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-parmetisgridpartitioner.hh File Reference\n-Compute a repartitioning of a Dune grid using ParMetis. More...\n+Classes | Namespaces\n+vertexorderfactory.hh File Reference\n #include \n+#include \n+#include \n #include \n-#include \n-#include \n #include \n-#include \n-#include \n-#include \n+#include \n Go_to_the_source_code_of_this_file.\n-***** Detailed Description *****\n-Compute a repartitioning of a Dune grid using ParMetis.\n+ Classes\n+ class \u00a0Dune::VertexOrderByIdFactory<_IdSet,_Index_>\n+\u00a0 Factory for GeneralVertexOrder objects using an IdSet. More...\n+\u00a0\n+struct \u00a0Dune::VertexOrderByIdFactory<_IdSet,_Index_>::VertexOrder<_dim_>\n+\u00a0 type of vertex order object may depend on the dimension of the element\n+ More...\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00995_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: parmetisgridpartitioner.hh Source File\n+dune-grid: vertexorderfactory.hh Source File\n \n \n \n \n \n \n \n@@ -62,219 +62,77 @@\n \n
    \n \n
    \n \n
    \n-
    parmetisgridpartitioner.hh
    \n+
    vertexorderfactory.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
    \n-
    4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
    \n+
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    10#include <algorithm>
    \n-
    11#include <vector>
    \n-
    12
    \n-
    13#include <dune/common/parallel/mpihelper.hh>
    \n-
    14#include <dune/common/exceptions.hh>
    \n-
    15
    \n-
    16#include <dune/geometry/referenceelements.hh>
    \n-
    17
    \n-\n-\n-\n-
    21
    \n-
    22#if HAVE_PARMETIS
    \n-
    23
    \n-
    24#include <parmetis.h>
    \n-
    25
    \n-
    26// only enable for ParMETIS because the implementation uses functions that
    \n-
    27// are not emulated by scotch
    \n-
    28#ifdef PARMETIS_MAJOR_VERSION
    \n-
    29
    \n-
    30namespace Dune
    \n-
    31{
    \n-
    32
    \n-
    37 template<class GridView>
    \n-
    38 struct ParMetisGridPartitioner {
    \n-
    39
    \n-
    40 // define index type as provided by ParMETIS
    \n-
    41#if PARMETIS_MAJOR_VERSION > 3
    \n-
    42 typedef idx_t idx_type;
    \n-
    43 typedef ::real_t real_type;
    \n-
    44#else
    \n-
    45 typedef int idx_type;
    \n-
    46 typedef float real_type;
    \n-
    47#endif // PARMETIS_MAJOR_VERSION > 3
    \n-
    48
    \n-
    49 constexpr static int dimension = GridView::dimension;
    \n-
    50
    \n-
    51
    \n-
    62 static std::vector<unsigned> partition(const GridView& gv, const Dune::MPIHelper& mpihelper) {
    \n-
    63 const unsigned numElements = gv.size(0);
    \n-
    64
    \n-
    65 std::vector<unsigned> part(numElements);
    \n-
    66
    \n-
    67 // Setup parameters for ParMETIS
    \n-
    68 idx_type wgtflag = 0; // we don't use weights
    \n-
    69 idx_type numflag = 0; // we are using C-style arrays
    \n-
    70 idx_type ncon = 1; // number of balance constraints
    \n-
    71 idx_type ncommonnodes = 2; // number of nodes elements must have in common to be considered adjacent to each other
    \n-
    72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
    \n-
    73 idx_type edgecut; // will store number of edges cut by partition
    \n-
    74 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
    \n-
    75 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
    \n-
    76 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
    \n+
    6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
    \n+
    7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
    \n+
    8
    \n+
    9#include <algorithm>
    \n+
    10#include <cstddef>
    \n+
    11#include <functional>
    \n+
    12#include <vector>
    \n+
    13
    \n+
    14#include <dune/geometry/referenceelements.hh>
    \n+
    15#include <dune/geometry/generalvertexorder.hh>
    \n+
    16
    \n+
    17namespace Dune {
    \n+
    18
    \n+
    20
    \n+
    31 template<class IdSet, class Index = std::size_t>
    \n+\n+
    33 const IdSet& idset;
    \n+
    34
    \n+
    35 public:
    \n+
    37 template<std::size_t dim>
    \n+
    38 struct VertexOrder {
    \n+
    40 typedef GeneralVertexOrder<dim, Index> type;
    \n+
    41 };
    \n+
    42
    \n+
    44
    \n+
    53 VertexOrderByIdFactory(const IdSet &idset_) : idset(idset_) { }
    \n+
    54
    \n+
    56
    \n+
    62 template<typename Element>
    \n+\n+
    64 make(const Element &e) const {
    \n+
    65
    \n+
    66 std::size_t size = referenceElement(e.geometry()).size(Element::mydimension);
    \n+
    67
    \n+
    68 std::vector<typename IdSet::IdType> ids(size);
    \n+
    69 for(std::size_t i = 0; i < size; ++i)
    \n+
    70 ids[i] = idset.subId(e, i, Element::mydimension);
    \n+
    71 return GeneralVertexOrder<Element::mydimension, Index>
    \n+
    72 (e.type(), ids.begin(), ids.end());
    \n+
    73 }
    \n+
    74 };
    \n+
    75
    \n+
    76} // namespace Dune
    \n
    77
    \n-
    78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are on process i
    \n-
    79 std::vector<idx_type> elmdist(nparts+1);
    \n-
    80 elmdist[0] = 0;
    \n-
    81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements are on process zero
    \n-
    82
    \n-
    83 // Create and fill arrays "eptr", where eptr[i] is the number of vertices that belong to the i-th element, and
    \n-
    84 // "eind" contains the vertex-numbers of the i-the element in eind[eptr[i]] to eind[eptr[i+1]-1]
    \n-
    85 std::vector<idx_type> eptr, eind;
    \n-
    86 int numVertices = 0;
    \n-
    87 eptr.push_back(numVertices);
    \n-
    88
    \n-
    89 for (const auto& element : elements(gv, Partitions::interior)) {
    \n-
    90 const size_t curNumVertices = referenceElement<double, dimension>(element.type()).size(dimension);
    \n-
    91
    \n-
    92 numVertices += curNumVertices;
    \n-
    93 eptr.push_back(numVertices);
    \n-
    94
    \n-
    95 for (size_t k = 0; k < curNumVertices; ++k)
    \n-
    96 eind.push_back(gv.indexSet().subIndex(element, k, dimension));
    \n-
    97 }
    \n-
    98
    \n-
    99 // Partition mesh using ParMETIS
    \n-
    100 if (0 == mpihelper.rank()) {
    \n-
    101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator();
    \n-
    102
    \n-
    103#if PARMETIS_MAJOR_VERSION >= 4
    \n-
    104 const int OK =
    \n-
    105#endif
    \n-
    106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL, &wgtflag, &numflag,
    \n-
    107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(),
    \n-
    108 options, &edgecut, reinterpret_cast<idx_type*>(part.data()), &comm);
    \n-
    109
    \n-
    110#if PARMETIS_MAJOR_VERSION >= 4
    \n-
    111 if (OK != METIS_OK)
    \n-
    112 DUNE_THROW(Dune::Exception, "ParMETIS returned an error code.");
    \n-
    113#endif
    \n-
    114 }
    \n-
    115
    \n-
    116 return part;
    \n-
    117 }
    \n-
    118
    \n-
    130 static std::vector<unsigned> repartition(const GridView& gv, const Dune::MPIHelper& mpihelper, real_type itr = 1000) {
    \n-
    131
    \n-
    132 // Create global index map
    \n-
    133 GlobalIndexSet<GridView> globalIndex(gv,0);
    \n-
    134
    \n-
    135 int numElements = std::distance(gv.template begin<0, Interior_Partition>(),
    \n-
    136 gv.template end<0, Interior_Partition>());
    \n-
    137
    \n-
    138 std::vector<unsigned> interiorPart(numElements);
    \n-
    139
    \n-
    140 // Setup parameters for ParMETIS
    \n-
    141 idx_type wgtflag = 0; // we don't use weights
    \n-
    142 idx_type numflag = 0; // we are using C-style arrays
    \n-
    143 idx_type ncon = 1; // number of balance constraints
    \n-
    144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed, output and coupling
    \n-
    145 idx_type edgecut; // will store number of edges cut by partition
    \n-
    146 idx_type nparts = mpihelper.size(); // number of parts equals number of processes
    \n-
    147 std::vector<real_type> tpwgts(ncon*nparts, 1./nparts); // load per subdomain and weight (same load on every process)
    \n-
    148 std::vector<real_type> ubvec(ncon, 1.05); // weight tolerance (same weight tolerance for every weight there is)
    \n-
    149
    \n-
    150 MPI_Comm comm = Dune::MPIHelper::getCommunicator();
    \n-
    151
    \n-
    152 // Make the number of interior elements of each processor available to all processors
    \n-
    153 std::vector<int> offset(gv.comm().size());
    \n-
    154 std::fill(offset.begin(), offset.end(), 0);
    \n-
    155
    \n-
    156 gv.comm().template allgather<int>(&numElements, 1, offset.data());
    \n-
    157
    \n-
    158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that are on process i
    \n-
    159 std::vector<idx_type> vtxdist(gv.comm().size()+1);
    \n-
    160 vtxdist[0] = 0;
    \n-
    161
    \n-
    162 for (unsigned int i=1; i<vtxdist.size(); ++i)
    \n-
    163 vtxdist[i] = vtxdist[i-1] + offset[i-1];
    \n-
    164
    \n-
    165 // Set up element adjacency lists
    \n-
    166 std::vector<idx_type> xadj, adjncy;
    \n-
    167 xadj.push_back(0);
    \n-
    168
    \n-
    169 for (const auto& element : elements(gv, Partitions::interior)) {
    \n-
    170 size_t numNeighbors = 0;
    \n-
    171
    \n-
    172 for (const auto& in : intersections(gv, element)) {
    \n-
    173 if (in.neighbor()) {
    \n-
    174 adjncy.push_back(globalIndex.index(in.outside()));
    \n-
    175
    \n-
    176 ++numNeighbors;
    \n-
    177 }
    \n-
    178 }
    \n-
    179
    \n-
    180 xadj.push_back(xadj.back() + numNeighbors);
    \n-
    181 }
    \n-
    182
    \n-
    183#if PARMETIS_MAJOR_VERSION >= 4
    \n-
    184 const int OK =
    \n-
    185#endif
    \n-
    186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(), NULL, NULL, NULL,
    \n-
    187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(),
    \n-
    188 &itr, options, &edgecut, reinterpret_cast<idx_type*>(interiorPart.data()), &comm);
    \n-
    189
    \n-
    190#if PARMETIS_MAJOR_VERSION >= 4
    \n-
    191 if (OK != METIS_OK)
    \n-
    192 DUNE_THROW(Dune::Exception, "ParMETIS returned error code " << OK);
    \n-
    193#endif
    \n-
    194
    \n-
    195 // At this point, interiorPart contains a target rank for each interior element, and they are sorted
    \n-
    196 // by the order in which the grid view traverses them. Now we need to do two things:
    \n-
    197 // a) Add additional dummy entries for the ghost elements
    \n-
    198 // b) Use the element index for the actual ordering. Since there may be different types of elements,
    \n-
    199 // we cannot use the index set directly, but have to go through a Mapper.
    \n-
    200
    \n-
    201 typedef MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
    \n-
    202 ElementMapper elementMapper(gv, mcmgElementLayout());
    \n-
    203
    \n-
    204 std::vector<unsigned int> part(gv.size(0));
    \n-
    205 std::fill(part.begin(), part.end(), 0);
    \n-
    206 unsigned int c = 0;
    \n-
    207 for (const auto& element : elements(gv, Partitions::interior))
    \n-
    208 part[elementMapper.index(element)] = interiorPart[c++];
    \n-
    209
    \n-
    210 return part;
    \n-
    211 }
    \n-
    212 };
    \n-
    213
    \n-
    214} // namespace Dune
    \n-
    215
    \n-
    216#else // PARMETIS_MAJOR_VERSION
    \n-
    217#warning "You seem to be using the ParMETIS emulation layer of scotch, which does not work with this file."
    \n-
    218#endif
    \n-
    219
    \n-
    220#else // HAVE_PARMETIS
    \n-
    221#warning "PARMETIS was not found, please check your configuration"
    \n-
    222#endif
    \n-
    223
    \n-
    224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH
    \n-\n-
    Mapper for multiple codim and multiple geometry types.
    \n-
    Provides a globally unique index for all entities of a distributed Dune grid.
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n-
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n+
    78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    constexpr Interior interior
    PartitionSet for the interior partition.
    Definition: partitionset.hh:272
    \n+
    auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
    Definition: common/geometry.hh:558
    \n+
    ALBERTA EL Element
    Definition: misc.hh:54
    \n+
    Id Set Interface.
    Definition: indexidset.hh:452
    \n+
    IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
    Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
    Definition: indexidset.hh:486
    \n+
    Factory for GeneralVertexOrder objects using an IdSet.
    Definition: vertexorderfactory.hh:32
    \n+
    VertexOrderByIdFactory(const IdSet &idset_)
    construct a factory object
    Definition: vertexorderfactory.hh:53
    \n+
    VertexOrder< Element::mydimension >::type make(const Element &e) const
    construct a vertex ordering object
    Definition: vertexorderfactory.hh:64
    \n+
    type of vertex order object may depend on the dimension of the element
    Definition: vertexorderfactory.hh:38
    \n+
    GeneralVertexOrder< dim, Index > type
    type of vertex order object
    Definition: vertexorderfactory.hh:40
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,254 +5,100 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-parmetisgridpartitioner.hh\n+vertexorderfactory.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3#ifndef DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH\n- 4#define DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH\n+ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+ 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 10#include \n- 11#include \n- 12\n- 13#include \n- 14#include \n- 15\n- 16#include \n- 17\n- 18#include \n- 19#include \n- 20#include \n- 21\n- 22#if HAVE_PARMETIS\n- 23\n- 24#include \n- 25\n- 26// only enable for ParMETIS because the implementation uses functions that\n- 27// are not emulated by scotch\n- 28#ifdef PARMETIS_MAJOR_VERSION\n- 29\n- 30namespace Dune\n- 31{\n- 32\n- 37 template\n- 38 struct ParMetisGridPartitioner {\n- 39\n- 40 // define index type as provided by ParMETIS\n- 41#if PARMETIS_MAJOR_VERSION > 3\n- 42 typedef idx_t idx_type;\n- 43 typedef ::real_t real_type;\n- 44#else\n- 45 typedef int idx_type;\n- 46 typedef float real_type;\n- 47#endif // PARMETIS_MAJOR_VERSION > 3\n- 48\n- 49 constexpr static int dimension = GridView::dimension;\n- 50\n- 51\n- 62 static std::vector partition(const GridView& gv, const Dune::\n-MPIHelper& mpihelper) {\n- 63 const unsigned numElements = gv.size(0);\n- 64\n- 65 std::vector part(numElements);\n- 66\n- 67 // Setup parameters for ParMETIS\n- 68 idx_type wgtflag = 0; // we don't use weights\n- 69 idx_type numflag = 0; // we are using C-style arrays\n- 70 idx_type ncon = 1; // number of balance constraints\n- 71 idx_type ncommonnodes = 2; // number of nodes elements must have in common\n-to be considered adjacent to each other\n- 72 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed,\n-output and coupling\n- 73 idx_type edgecut; // will store number of edges cut by partition\n- 74 idx_type nparts = mpihelper.size(); // number of parts equals number of\n-processes\n- 75 std::vector tpwgts(ncon*nparts, 1./nparts); // load per\n-subdomain and weight (same load on every process)\n- 76 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight\n-tolerance for every weight there is)\n+ 6#ifndef DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH\n+ 7#define DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH\n+ 8\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16\n+ 17namespace Dune {\n+ 18\n+ 20\n+ 31 template\n+32 class VertexOrderByIdFactory {\n+ 33 const IdSet& idset;\n+ 34\n+ 35 public:\n+ 37 template\n+38 struct VertexOrder {\n+40 typedef GeneralVertexOrder type;\n+ 41 };\n+ 42\n+ 44\n+53 VertexOrderByIdFactory(const IdSet &idset_) : idset(idset_) { }\n+ 54\n+ 56\n+ 62 template\n+ 63 typename VertexOrder::type\n+64 make(const Element &e) const {\n+ 65\n+ 66 std::size_t size = referenceElement(e.geometry()).size(Element::\n+mydimension);\n+ 67\n+ 68 std::vector ids(size);\n+ 69 for(std::size_t i = 0; i < size; ++i)\n+ 70 ids[i] = idset.subId(e, i, Element::mydimension);\n+ 71 return GeneralVertexOrder\n+ 72 (e.type(), ids.begin(), ids.end());\n+ 73 }\n+ 74 };\n+ 75\n+ 76} // namespace Dune\n 77\n- 78 // The difference elmdist[i+1] - elmdist[i] is the number of nodes that are\n-on process i\n- 79 std::vector elmdist(nparts+1);\n- 80 elmdist[0] = 0;\n- 81 std::fill(elmdist.begin()+1, elmdist.end(), gv.size(0)); // all elements\n-are on process zero\n- 82\n- 83 // Create and fill arrays \"eptr\", where eptr[i] is the number of vertices\n-that belong to the i-th element, and\n- 84 // \"eind\" contains the vertex-numbers of the i-the element in eind[eptr[i]]\n-to eind[eptr[i+1]-1]\n- 85 std::vector eptr, eind;\n- 86 int numVertices = 0;\n- 87 eptr.push_back(numVertices);\n- 88\n- 89 for (const auto& element : elements(gv, Partitions::interior)) {\n- 90 const size_t curNumVertices = referenceElement\n-(element.type()).size(dimension);\n- 91\n- 92 numVertices += curNumVertices;\n- 93 eptr.push_back(numVertices);\n- 94\n- 95 for (size_t k = 0; k < curNumVertices; ++k)\n- 96 eind.push_back(gv.indexSet().subIndex(element, k, dimension));\n- 97 }\n- 98\n- 99 // Partition mesh using ParMETIS\n- 100 if (0 == mpihelper.rank()) {\n- 101 MPI_Comm comm = Dune::MPIHelper::getLocalCommunicator();\n- 102\n- 103#if PARMETIS_MAJOR_VERSION >= 4\n- 104 const int OK =\n- 105#endif\n- 106 ParMETIS_V3_PartMeshKway(elmdist.data(), eptr.data(), eind.data(), NULL,\n-&wgtflag, &numflag,\n- 107 &ncon, &ncommonnodes, &nparts, tpwgts.data(), ubvec.data(),\n- 108 options, &edgecut, reinterpret_cast(part.data()), &comm);\n- 109\n- 110#if PARMETIS_MAJOR_VERSION >= 4\n- 111 if (OK != METIS_OK)\n- 112 DUNE_THROW(Dune::Exception, \"ParMETIS returned an error code.\");\n- 113#endif\n- 114 }\n- 115\n- 116 return part;\n- 117 }\n- 118\n- 130 static std::vector repartition(const GridView& gv, const Dune::\n-MPIHelper& mpihelper, real_type itr = 1000) {\n- 131\n- 132 // Create global index map\n- 133 GlobalIndexSet globalIndex(gv,0);\n- 134\n- 135 int numElements = std::distance(gv.template begin<0, Interior_Partition>\n-(),\n- 136 gv.template end<0, Interior_Partition>());\n- 137\n- 138 std::vector interiorPart(numElements);\n- 139\n- 140 // Setup parameters for ParMETIS\n- 141 idx_type wgtflag = 0; // we don't use weights\n- 142 idx_type numflag = 0; // we are using C-style arrays\n- 143 idx_type ncon = 1; // number of balance constraints\n- 144 idx_type options[4] = {0, 0, 0, 0}; // use default values for random seed,\n-output and coupling\n- 145 idx_type edgecut; // will store number of edges cut by partition\n- 146 idx_type nparts = mpihelper.size(); // number of parts equals number of\n-processes\n- 147 std::vector tpwgts(ncon*nparts, 1./nparts); // load per\n-subdomain and weight (same load on every process)\n- 148 std::vector ubvec(ncon, 1.05); // weight tolerance (same weight\n-tolerance for every weight there is)\n- 149\n- 150 MPI_Comm comm = Dune::MPIHelper::getCommunicator();\n- 151\n- 152 // Make the number of interior elements of each processor available to all\n-processors\n- 153 std::vector offset(gv.comm().size());\n- 154 std::fill(offset.begin(), offset.end(), 0);\n- 155\n- 156 gv.comm().template allgather(&numElements, 1, offset.data());\n- 157\n- 158 // The difference vtxdist[i+1] - vtxdist[i] is the number of elements that\n-are on process i\n- 159 std::vector vtxdist(gv.comm().size()+1);\n- 160 vtxdist[0] = 0;\n- 161\n- 162 for (unsigned int i=1; i xadj, adjncy;\n- 167 xadj.push_back(0);\n- 168\n- 169 for (const auto& element : elements(gv, Partitions::interior)) {\n- 170 size_t numNeighbors = 0;\n- 171\n- 172 for (const auto& in : intersections(gv, element)) {\n- 173 if (in.neighbor()) {\n- 174 adjncy.push_back(globalIndex.index(in.outside()));\n- 175\n- 176 ++numNeighbors;\n- 177 }\n- 178 }\n- 179\n- 180 xadj.push_back(xadj.back() + numNeighbors);\n- 181 }\n- 182\n- 183#if PARMETIS_MAJOR_VERSION >= 4\n- 184 const int OK =\n- 185#endif\n- 186 ParMETIS_V3_AdaptiveRepart(vtxdist.data(), xadj.data(), adjncy.data(),\n-NULL, NULL, NULL,\n- 187 &wgtflag, &numflag, &ncon, &nparts, tpwgts.data(), ubvec.data(),\n- 188 &itr, options, &edgecut, reinterpret_cast(interiorPart.data()),\n-&comm);\n- 189\n- 190#if PARMETIS_MAJOR_VERSION >= 4\n- 191 if (OK != METIS_OK)\n- 192 DUNE_THROW(Dune::Exception, \"ParMETIS returned error code \" << OK);\n- 193#endif\n- 194\n- 195 // At this point, interiorPart contains a target rank for each interior\n-element, and they are sorted\n- 196 // by the order in which the grid view traverses them. Now we need to do\n-two things:\n- 197 // a) Add additional dummy entries for the ghost elements\n- 198 // b) Use the element index for the actual ordering. Since there may be\n-different types of elements,\n- 199 // we cannot use the index set directly, but have to go through a Mapper.\n- 200\n- 201 typedef MultipleCodimMultipleGeomTypeMapper ElementMapper;\n- 202 ElementMapper elementMapper(gv, mcmgElementLayout());\n- 203\n- 204 std::vector part(gv.size(0));\n- 205 std::fill(part.begin(), part.end(), 0);\n- 206 unsigned int c = 0;\n- 207 for (const auto& element : elements(gv, Partitions::interior))\n- 208 part[elementMapper.index(element)] = interiorPart[c++];\n- 209\n- 210 return part;\n- 211 }\n- 212 };\n- 213\n- 214} // namespace Dune\n- 215\n- 216#else // PARMETIS_MAJOR_VERSION\n- 217#warning \"You seem to be using the ParMETIS emulation layer of scotch,\n-which does not work with this file.\"\n- 218#endif\n- 219\n- 220#else // HAVE_PARMETIS\n- 221#warning \"PARMETIS was not found, please check your configuration\"\n- 222#endif\n- 223\n- 224#endif // DUNE_GRID_UTILITY_PARMETISGRIDPARTITIONER_HH\n-rangegenerators.hh\n-mcmgmapper.hh\n-Mapper for multiple codim and multiple geometry types.\n-globalindexset.hh\n-Provides a globally unique index for all entities of a distributed Dune grid.\n-Dune::GridView::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/gridview.hh:148\n-Dune::mcmgElementLayout\n-MCMGLayout mcmgElementLayout()\n-layout for elements (codim-0 entities)\n-Definition: mcmgmapper.hh:97\n+ 78#endif // DUNE_GRID_UTILITY_VERTEXORDERFACTORY_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Partitions::interior\n-constexpr Interior interior\n-PartitionSet for the interior partition.\n-Definition: partitionset.hh:272\n+Dune::referenceElement\n+auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo)\n+-> decltype(referenceElement(geo, geo.impl()))\n+Definition: common/geometry.hh:558\n+Dune::Alberta::Element\n+ALBERTA EL Element\n+Definition: misc.hh:54\n+Dune::IdSet\n+Id Set Interface.\n+Definition: indexidset.hh:452\n+Dune::IdSet::subId\n+IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim)\n+const\n+Get id of subentity i of co-dimension codim of a co-dimension 0 entity.\n+Definition: indexidset.hh:486\n+Dune::VertexOrderByIdFactory\n+Factory for GeneralVertexOrder objects using an IdSet.\n+Definition: vertexorderfactory.hh:32\n+Dune::VertexOrderByIdFactory::VertexOrderByIdFactory\n+VertexOrderByIdFactory(const IdSet &idset_)\n+construct a factory object\n+Definition: vertexorderfactory.hh:53\n+Dune::VertexOrderByIdFactory::make\n+VertexOrder< Element::mydimension >::type make(const Element &e) const\n+construct a vertex ordering object\n+Definition: vertexorderfactory.hh:64\n+Dune::VertexOrderByIdFactory::VertexOrder\n+type of vertex order object may depend on the dimension of the element\n+Definition: vertexorderfactory.hh:38\n+Dune::VertexOrderByIdFactory::VertexOrder::type\n+GeneralVertexOrder< dim, Index > type\n+type of vertex order object\n+Definition: vertexorderfactory.hh:40\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00998.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00998.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: tensorgridfactory.hh File Reference\n+dune-grid: gridinfo-gmsh-main.hh File Reference\n \n \n \n \n \n \n \n@@ -62,53 +62,55 @@\n \n
    \n \n
    \n \n
    \n- \n-
    tensorgridfactory.hh File Reference
    \n+
    gridinfo-gmsh-main.hh File Reference
    \n
    \n
    \n \n-

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

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

    \n-
    #include <array>
    \n+
    #include <cstddef>
    \n+#include <cstdlib>
    \n+#include <exception>
    \n+#include <iostream>
    \n #include <memory>
    \n+#include <ostream>
    \n+#include <sstream>
    \n+#include <stdexcept>
    \n+#include <string>
    \n #include <vector>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/grid/common/gridfactory.hh>
    \n-#include <dune/grid/yaspgrid.hh>
    \n-#include <dune/grid/utility/multiindex.hh>
    \n+#include <dune/common/classname.hh>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/parallel/mpihelper.hh>
    \n+#include <dune/grid/io/file/gmshreader.hh>
    \n+#include <dune/grid/utility/gridinfo.hh>
    \n
    \n

    Go to the source code of this file.

    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-

    \n-Classes

    class  Dune::TensorGridFactory< Grid >
     A factory class for conveniently creating tensorproduct grids. More...
     
    class  Dune::TensorGridFactoryCreator< Grid >
     
    class  Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >
     
    \n-\n-\n-\n-\n-

    \n-Namespaces

    namespace  Dune
     Include standard header files.
     
    \n

    Detailed Description

    \n-

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

    \n-

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

    \n-
    Author
    Dominic Kempf
    \n+

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

    \n+
    Author
    J\u00f6 Fahlke jorri.nosp@m.t@jo.nosp@m.rrit..nosp@m.de
    \n+
    Date
    2011
    \n+

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

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

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

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "encoding", "source2": "encoding", "unified_diff": "@@ -1 +1 @@\n-us-ascii\n+utf-8\n"}, {"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,48 +5,51 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-Classes | Namespaces\n-tensorgridfactory.hh File Reference\n-This file provides a factory class for tensorproduct grids. This is a\n-collection of methods to generate monotonous sequences as needed for a\n-tensorproduct grid. Apart from easy ones for locally equidistant grids, there\n-are also more involved methods like splitting a range according to a geometric\n-series. More...\n-#include \n+gridinfo-gmsh-main.hh File Reference\n+Generic main() function for printing information about a mesh read from a .msh-\n+file. More...\n+#include \n+#include \n+#include \n+#include \n #include \n+#include \n+#include \n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::TensorGridFactory<_Grid_>\n-\u00a0 A factory class for conveniently creating tensorproduct grids. More...\n-\u00a0\n-class \u00a0Dune::TensorGridFactoryCreator<_Grid_>\n-\u00a0\n-class \u00a0Dune::TensorGridFactoryCreator<_YaspGrid<_dim,\n- TensorProductCoordinates<_ctype,_dim_>_>_>\n-\u00a0\n- Namespaces\n-namespace \u00a0Dune\n-\u00a0 Include standard header files.\n-\u00a0\n ***** Detailed Description *****\n-This file provides a factory class for tensorproduct grids. This is a\n-collection of methods to generate monotonous sequences as needed for a\n-tensorproduct grid. Apart from easy ones for locally equidistant grids, there\n-are also more involved methods like splitting a range according to a geometric\n-series.\n-The grid generation process is implemented for unstructured grids and for\n-YaspGrid.\n+Generic main() function for printing information about a mesh read from a .msh-\n+file.\n Author\n- Dominic Kempf\n+ J\u00f6 Fahlke jorri.nosp@m.t@jo.nosp@m.rrit..nosp@m.de\n+ Date\n+ 2011\n+This header contains a generic main() function. To use it for your grid, write\n+a .cc file like this:\n+#ifdef HAVE_CONFIG_H\n+#include \"config.h\"\n+#endif\n+#include \n+#include \n+const std::string programName = \"dune-gridinfo-gmsh-mygrid-3d\";\n+typedef Dune::MyGrid<3> Grid;\n+#include \n+gridinfo-gmsh-main.hh\n+Generic main() function for printing information about a mesh read from a .msh-\n+file.\n+Write an automake target for your program as usual. No special libraries are\n+needed for you program, beyond what is needed for the grid in question.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00998_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: tensorgridfactory.hh Source File\n+dune-grid: gridinfo-gmsh-main.hh Source File\n \n \n \n \n \n \n \n@@ -62,370 +62,223 @@\n \n
    \n \n
    \n
    \n
    \n-
    tensorgridfactory.hh
    \n+
    gridinfo-gmsh-main.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
    \n-
    4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
    \n+
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n-
    20#include<array>
    \n-
    21#include<memory>
    \n-
    22#include<vector>
    \n+
    6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
    \n+
    7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
    \n+
    8
    \n+
    9#include <cstddef>
    \n+
    10#include <cstdlib>
    \n+
    11#include <exception>
    \n+
    12#include <iostream>
    \n+
    13#include <memory>
    \n+
    14#include <ostream>
    \n+
    15#include <sstream>
    \n+
    16#include <stdexcept>
    \n+
    17#include <string>
    \n+
    18#include <vector>
    \n+
    19
    \n+
    20#include <dune/common/classname.hh>
    \n+
    21#include <dune/common/exceptions.hh>
    \n+
    22#include <dune/common/parallel/mpihelper.hh>
    \n
    23
    \n-
    24#include <dune/common/fvector.hh>
    \n-\n-
    26#include <dune/grid/yaspgrid.hh>
    \n-\n-
    28
    \n-
    29namespace Dune
    \n-
    30{
    \n-
    31 // forward declaration of TensorGridFactoryCreator, which is the real factory
    \n-
    32 // that should be specialized for each grid.
    \n-
    33 template<typename Grid>
    \n-
    34 class TensorGridFactoryCreator;
    \n-
    35
    \n-
    40 template<typename Grid>
    \n-\n-
    42 {
    \n-
    43 public:
    \n-
    44 typedef typename Grid::Traits::Communication Comm;
    \n-
    45 typedef typename Grid::ctype ctype;
    \n-
    46 static const int dim = Grid::dimension;
    \n-
    47
    \n-
    48 std::unique_ptr<Grid> createGrid(Comm comm = Comm())
    \n-
    49 {
    \n-
    50 TensorGridFactoryCreator<Grid> creator(*this);
    \n-
    51 return creator.createGrid(comm);
    \n-
    52 }
    \n-
    53
    \n-
    54 std::array<std::vector<ctype> , dim> coords() const
    \n-
    55 {
    \n-
    56 return _coords;
    \n-
    57 }
    \n+\n+\n+
    26
    \n+
    54#ifdef HEADERCHECK
    \n+
    55// define so headercheck will run
    \n+
    56const std::string programName = "headercheck";
    \n+
    57#endif // HEADERCHECK
    \n
    58
    \n-
    60 std::vector<ctype>& operator[](std::size_t d)
    \n-
    61 {
    \n-
    62 return _coords[d];
    \n-
    63 }
    \n-
    64
    \n-
    66 const std::vector<ctype>& operator[](std::size_t d) const
    \n-
    67 {
    \n-
    68 return _coords[d];
    \n-
    69 }
    \n-
    70
    \n-
    79 void setStart (int d, ctype value)
    \n-
    80 {
    \n-
    81 _coords[d].resize(1);
    \n-
    82 _coords[d][0] = value;
    \n-
    83 }
    \n+
    59#ifndef DOXYGEN
    \n+
    60namespace {
    \n+
    61 // anonymous namespace so we don't freakishly conflict with another usage()
    \n+
    62 // function that may be linked in from another compilation unit.
    \n+
    63 void usage(std::ostream &stream) {
    \n+
    64 stream << "USAGE:\\n"
    \n+
    65 << " " << programName << " [-R REFINES] GRIDFILE\\n"
    \n+
    66 << "\\n"
    \n+
    67 << "PARAMETERS:\\n"
    \n+
    68 << " -R REFINES How many global refines to do after reading\\n"
    \n+
    69 << " (default: 0)\\n"
    \n+
    70 << " GRIDFILE Name of the .msh file to read the grid from.\\n"
    \n+
    71 << std::flush;
    \n+
    72 }
    \n+
    73
    \n+
    74 bool prefix_match(const std::string &prefix, const std::string &str)
    \n+
    75 {
    \n+
    76 return str.compare(0,prefix.size(), prefix) == 0;
    \n+
    77 }
    \n+
    78
    \n+
    79 void error_argument_required(const std::string &opt) {
    \n+
    80 std::cerr << "Error: option " << opt << " requires argument\\n";
    \n+
    81 usage(std::cerr);
    \n+
    82 std::exit(1);
    \n+
    83 }
    \n
    84
    \n-
    93 void fillIntervals (int d, int n, ctype h)
    \n-
    94 {
    \n-
    95 emptyCheck (d);
    \n-
    96 for (int i = 0; i < n; i++)
    \n-
    97 _coords[d].push_back (_coords[d].back () + h);
    \n-
    98 }
    \n-
    99
    \n-
    108 void fillRange (int d, int n, ctype end)
    \n-
    109 {
    \n-
    110 emptyCheck (d);
    \n-
    111 const ctype h = (end - _coords[d].back ()) / n;
    \n-
    112 for (int i = 0; i < n - 1; i++)
    \n-
    113 _coords[d].push_back (_coords[d].back () + h);
    \n-
    114 _coords[d].push_back (end);
    \n-
    115 }
    \n+
    85 void error_unknown_option(const std::string &opt) {
    \n+
    86 std::cerr << "Error: unknown option: " << opt << "\\n";
    \n+
    87 usage(std::cerr);
    \n+
    88 std::exit(1);
    \n+
    89 }
    \n+
    90
    \n+
    91 void error_parsing_optarg(const std::string &opt, const std::string &error) {
    \n+
    92 std::cerr << "Error: option " << opt << ": " << error << "\\n";
    \n+
    93 usage(std::cerr);
    \n+
    94 std::exit(1);
    \n+
    95 }
    \n+
    96
    \n+
    97 template<class T>
    \n+
    98 void parse(const std::string &arg, T &val) {
    \n+
    99 std::istringstream s(arg);
    \n+
    100 s >> val;
    \n+
    101 bool good = !s.fail();
    \n+
    102 if(good) {
    \n+
    103 char dummy;
    \n+
    104 s >> dummy;
    \n+
    105 good = s.fail() && s.eof();
    \n+
    106 }
    \n+
    107 if(!good) {
    \n+
    108 std::ostringstream s;
    \n+
    109 s << "Can't parse \\"" << arg << "\\" as a " << Dune::className(val);
    \n+
    110 throw std::runtime_error(s.str());
    \n+
    111 }
    \n+
    112 }
    \n+
    113
    \n+
    114 std::size_t refines = 0;
    \n+
    115 std::string gridFileName = "";
    \n
    116
    \n-
    125 void fillUntil (int d, ctype h, ctype end)
    \n-
    126 {
    \n-
    127 emptyCheck (d);
    \n-
    128 while (_coords[d].back () < end)
    \n-
    129 _coords[d].push_back (_coords[d].back () + h);
    \n-
    130 }
    \n-
    131
    \n-
    144 void geometricFillIntervals (int d, int n, ctype ratio, ctype h0 =
    \n-
    145 static_cast<ctype> (0))
    \n-
    146 {
    \n-
    147 emptyCheck (d);
    \n-
    148 ctype h = h0;
    \n-
    149 if (h0 == static_cast<ctype>(0))
    \n-
    150 h = lastInterval (d) * ratio;
    \n-
    151 for (int i = 0; i < n; i++)
    \n-
    152 {
    \n-
    153 _coords[d].push_back (_coords[d].back () + h);
    \n-
    154 h *= ratio;
    \n-
    155 }
    \n+
    117 void parseOptions(int argc, char **argv) {
    \n+
    118 std::vector<std::string> params;
    \n+
    119 for(++argv; *argv; ++argv) {
    \n+
    120 std::string arg = *argv;
    \n+
    121 if(prefix_match("-", arg)) {
    \n+
    122 std::string opt = arg;
    \n+
    123 if(opt == "--") {
    \n+
    124 for(++argv; *argv; ++argv)
    \n+
    125 params.push_back(*argv);
    \n+
    126 break;
    \n+
    127 }
    \n+
    128 else if(prefix_match("-h", opt) || prefix_match("-?", opt) ||
    \n+
    129 opt == "--help")
    \n+
    130 {
    \n+
    131 usage(std::cout);
    \n+
    132 std::exit(0);
    \n+
    133 }
    \n+
    134 else if(opt == "-R" || opt == "--global-refines") {
    \n+
    135 ++argv;
    \n+
    136 if(!*argv) error_argument_required(opt);
    \n+
    137 try { parse(*argv, refines); }
    \n+
    138 catch(const std::runtime_error &e)
    \n+
    139 { error_parsing_optarg(opt, e.what()); }
    \n+
    140 }
    \n+
    141 else if(prefix_match("-R", opt)) {
    \n+
    142 try { parse(*argv+std::strlen("-R"), refines); }
    \n+
    143 catch(const std::runtime_error &e)
    \n+
    144 { error_parsing_optarg(opt, e.what()); }
    \n+
    145 }
    \n+
    146 else if(prefix_match("--global-refines=", opt)) {
    \n+
    147 try { parse(*argv+std::strlen("--global-refines="), refines); }
    \n+
    148 catch(const std::runtime_error &e)
    \n+
    149 { error_parsing_optarg(opt, e.what()); }
    \n+
    150 }
    \n+
    151 else
    \n+
    152 error_unknown_option(opt);
    \n+
    153 }
    \n+
    154 else
    \n+
    155 params.push_back(arg);
    \n
    156 }
    \n-
    157
    \n-
    170 void geometricFillUntil (int d, ctype ratio, ctype end, ctype h0 = static_cast<ctype> (0))
    \n-
    171 {
    \n-
    172 emptyCheck (d);
    \n-
    173 ctype h = h0;
    \n-
    174 if (h0 == static_cast<ctype>(0))
    \n-
    175 h = lastInterval (d) * ratio;
    \n-
    176 while (_coords[d].back () < end)
    \n-
    177 {
    \n-
    178 _coords[d].push_back (_coords[d].back () + h);
    \n-
    179 h *= ratio;
    \n-
    180 }
    \n-
    181 }
    \n-
    182
    \n-
    197 void geometricFillRange (int d, int n, ctype end, ctype h =
    \n-
    198 static_cast<ctype> (0),
    \n-
    199 bool first = true)
    \n-
    200 {
    \n-
    201 emptyCheck (d);
    \n-
    202 if (h < 1e-8)
    \n-
    203 h = lastInterval (d);
    \n-
    204 ctype ratio = newton (n, _coords[d].back (), end, h);
    \n-
    205 if (!first)
    \n-
    206 {
    \n-
    207 h = h * pow (ratio, n - 1);
    \n-
    208 ratio = 1 / ratio;
    \n-
    209 }
    \n-
    210 for (int i = 0; i < n - 1; i++)
    \n-
    211 {
    \n-
    212 _coords[d].push_back (_coords[d].back () + h);
    \n-
    213 h *= ratio;
    \n-
    214 }
    \n-
    215 _coords[d].push_back (end);
    \n-
    216 }
    \n-
    217
    \n-
    219 void print()
    \n-
    220 {
    \n-
    221 for (int i=0; i<dim; i++)
    \n-
    222 {
    \n-
    223 std::cout << "Container in direction " << i << ":" << std::endl << "Coordinates: ";
    \n-
    224 for (auto it = _coords[i].begin(); it != _coords[i].end(); ++it)
    \n-
    225 std::cout << *it << " ";
    \n-
    226 std::cout << std::endl << "Interval lengths: ";
    \n-
    227
    \n-
    228 std::vector<ctype> meshsize;
    \n-
    229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;)
    \n-
    230 {
    \n-
    231 meshsize.push_back(-1.*(*it));
    \n-
    232 ++it;
    \n-
    233 meshsize.back() += *it;
    \n-
    234 }
    \n-
    235
    \n-
    236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it)
    \n-
    237 std::cout << *it << " ";
    \n-
    238 std::cout << std::endl << "Ratios between interval lengths: ";
    \n-
    239
    \n-
    240 std::vector<ctype> ratios;
    \n-
    241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;)
    \n-
    242 ratios.push_back((1./(*it)) * *(++it));
    \n-
    243
    \n-
    244 for (auto it = ratios.begin(); it != ratios.end(); ++it)
    \n-
    245 std::cout << *it << " ";
    \n-
    246 std::cout << std::endl << std::endl << std::endl;
    \n-
    247 }
    \n-
    248 }
    \n-
    249
    \n-
    250 private:
    \n-
    251 // check whether the ith component is empty and add a 0.0 entry if so
    \n-
    252 void emptyCheck (int i)
    \n-
    253 {
    \n-
    254 if (_coords[i].empty ())
    \n-
    255 _coords[i].push_back (static_cast<ctype> (0));
    \n-
    256 }
    \n-
    257
    \n-
    258 // returns the last interval length in direction d
    \n-
    259 ctype lastInterval (int d)
    \n-
    260 {
    \n-
    261 if (_coords[d].size () < 2)
    \n-
    262 DUNE_THROW(
    \n-
    263 GridError,
    \n-
    264 "Not enough elements in coordinate container to deduce interval length in TensorYaspFactory");
    \n-
    265 else
    \n-
    266 return _coords[d].back () - _coords[d][_coords[d].size () - 2];
    \n-
    267 }
    \n-
    268
    \n-
    272 ctype newton (int n, ctype x_s, ctype x_e, ctype h)
    \n-
    273 {
    \n-
    274 ctype m = (x_e - x_s) / h;
    \n-
    275 ctype xold = 0.0;
    \n-
    276 ctype xnew = x_e - x_s;
    \n-
    277 while (std::abs (xnew - xold) > 1E-8)
    \n-
    278 {
    \n-
    279 xold = xnew;
    \n-
    280 xnew = xold
    \n-
    281 - (-pow (xold, n) + m * xold - m + 1)
    \n-
    282 / (-n * pow (xold, n - 1) + m);
    \n-
    283 }
    \n-
    284 if (std::abs (xnew - 1) < 1E-6)
    \n-
    285 {
    \n-
    286 xold = x_e - x_s;
    \n-
    287 xnew = 0.0;
    \n-
    288 while (std::abs (xnew - xold) > 1E-8)
    \n-
    289 {
    \n-
    290 xold = xnew;
    \n-
    291 xnew = xold
    \n-
    292 - (-pow (xold, n) + m * xold - m + 1)
    \n-
    293 / (-n * pow (xold, n - 1) + m);
    \n-
    294 }
    \n-
    295 }
    \n-
    296 return xnew;
    \n-
    297 }
    \n-
    298
    \n-
    299 std::array<std::vector<ctype>, dim> _coords;
    \n-
    300 };
    \n-
    301
    \n-
    302 // class that implements the actual grid creation process. The default is implementing
    \n-
    303 // standard creation for unstructured grids. Provide a specialization for other grids.
    \n-
    304 template<typename Grid>
    \n-\n-
    306 {
    \n-
    307 public:
    \n-
    308 typedef typename Grid::Traits::Communication Comm;
    \n-
    309 typedef typename Grid::ctype ctype;
    \n-
    310 static const int dim = Grid::dimension;
    \n-
    311
    \n-
    312 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
    \n-
    313
    \n-
    314 std::unique_ptr<Grid> createGrid(Comm comm)
    \n-
    315 {
    \n-
    316 // The grid factory
    \n-\n-
    318
    \n-
    319 if (comm.rank() == 0)
    \n-
    320 {
    \n-
    321 // determine the size of the grid
    \n-
    322 std::array<unsigned int, dim> vsizes, esizes;
    \n-
    323 std::size_t size = 1;
    \n-
    324 for (std::size_t i = 0; i<dim; ++i)
    \n-
    325 {
    \n-
    326 vsizes[i] = _factory[i].size();
    \n-
    327 esizes[i] = vsizes[i] - 1;
    \n-
    328 size *= vsizes[i];
    \n-
    329 }
    \n-
    330
    \n-
    331 // insert all vertices
    \n-\n-
    333 for (std::size_t i=0; i<size; ++i, ++index)
    \n-
    334 {
    \n-
    335 Dune::FieldVector<ctype, dim> position;
    \n-
    336 for (std::size_t j = 0; j<dim; ++j)
    \n-
    337 position[j] = _factory[j][index[j]];
    \n-
    338 fac.insertVertex(position);
    \n-
    339 }
    \n-
    340
    \n-
    341 // compute the offsets
    \n-
    342 std::array<std::size_t, dim> offsets;
    \n-
    343 offsets[0] = 1;
    \n-
    344 for (std::size_t i=1; i<dim; i++)
    \n-
    345 offsets[i] = offsets[i-1] * vsizes[i-1];
    \n-
    346
    \n-
    347 // Compute an element template (the cube at (0,...,0). All
    \n-
    348 // other cubes are constructed by moving this template around
    \n-
    349 unsigned int nCorners = 1<<dim;
    \n-
    350
    \n-
    351 std::vector<unsigned int> cornersTemplate(nCorners,0);
    \n-
    352
    \n-
    353 for (size_t i=0; i<nCorners; i++)
    \n-
    354 for (int j=0; j<dim; j++)
    \n-
    355 if ( i & (1<<j) )
    \n-
    356 cornersTemplate[i] += offsets[j];
    \n-
    357
    \n-
    358 // Insert elements
    \n-\n-
    360
    \n-
    361 // Compute the total number of elements to be created
    \n-
    362 int numElements = eindex.cycle();
    \n-
    363
    \n-
    364 for (int i=0; i<numElements; i++, ++eindex)
    \n-
    365 {
    \n-
    366 // 'base' is the index of the lower left element corner
    \n-
    367 unsigned int base = 0;
    \n-
    368 for (int j=0; j<dim; j++)
    \n-
    369 base += eindex[j] * offsets[j];
    \n-
    370
    \n-
    371 // insert new element
    \n-
    372 std::vector<unsigned int> corners = cornersTemplate;
    \n-
    373 for (size_t j=0; j<corners.size(); j++)
    \n-
    374 corners[j] += base;
    \n-
    375
    \n-
    376 fac.insertElement(GeometryTypes::cube(dim), corners);
    \n-
    377 }
    \n-
    378 }
    \n-
    379
    \n-
    380 return std::unique_ptr<Grid>(fac.createGrid());
    \n-
    381 }
    \n-
    382
    \n-
    383 private:
    \n-
    384 const TensorGridFactory<Grid>& _factory;
    \n-
    385 };
    \n-
    386
    \n-
    387 template<typename ctype, int dim>
    \n-\n-
    389 {
    \n-
    390 public:
    \n-\n-
    392 typedef typename Grid::Communication Comm;
    \n-
    393
    \n-
    394 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
    \n-
    395
    \n-
    396 std::unique_ptr<Grid> createGrid(Comm comm)
    \n-
    397 {
    \n-
    398 return std::make_unique<Grid>(_factory.coords(), std::bitset<dim>(0ULL), 1, comm);
    \n-
    399 }
    \n-
    400 private:
    \n-
    401 const TensorGridFactory<Grid>& _factory;
    \n-
    402 };
    \n-
    403}
    \n-
    404
    \n-
    405#endif
    \n-
    Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
    \n-\n-
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n-
    ct ctype
    Define type used for coordinates in grid module.
    Definition: common/grid.hh:532
    \n-\n-
    virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
    Insert an element into the coarse grid.
    Definition: common/gridfactory.hh:346
    \n-
    virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
    Insert a vertex into the coarse grid.
    Definition: common/gridfactory.hh:335
    \n-
    virtual std::unique_ptr< GridType > createGrid()
    Finalize grid creation and hand over the grid.
    Definition: common/gridfactory.hh:372
    \n-
    Definition: multiindex.hh:19
    \n-
    size_t cycle() const
    Compute how many times you can call operator++ before getting to (0,...,0) again.
    Definition: multiindex.hh:48
    \n-
    Definition: tensorgridfactory.hh:306
    \n-
    Grid::ctype ctype
    Definition: tensorgridfactory.hh:309
    \n-
    Grid::Traits::Communication Comm
    Definition: tensorgridfactory.hh:308
    \n-
    TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
    Definition: tensorgridfactory.hh:312
    \n-
    std::unique_ptr< Grid > createGrid(Comm comm)
    Definition: tensorgridfactory.hh:314
    \n-
    static const int dim
    Definition: tensorgridfactory.hh:310
    \n-
    A factory class for conveniently creating tensorproduct grids.
    Definition: tensorgridfactory.hh:42
    \n-
    void fillRange(int d, int n, ctype end)
    fills the range to end with n intervals in direction d
    Definition: tensorgridfactory.hh:108
    \n-
    void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype >(0), bool first=true)
    fills a coordinate range in direction d with n intervals according to a geometric series
    Definition: tensorgridfactory.hh:197
    \n-
    Grid::ctype ctype
    Definition: tensorgridfactory.hh:45
    \n-
    void fillUntil(int d, ctype h, ctype end)
    adds intervals in direction d until a given coordinate is reached
    Definition: tensorgridfactory.hh:125
    \n-
    void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast< ctype >(0))
    adds intervals in direction d according with a given length ratio until a given coordinate is reached
    Definition: tensorgridfactory.hh:170
    \n-
    static const int dim
    Definition: tensorgridfactory.hh:46
    \n-
    void print()
    print the coordinate information given to the factory so far
    Definition: tensorgridfactory.hh:219
    \n-
    void fillIntervals(int d, int n, ctype h)
    pushs n intervals of length h in direction d
    Definition: tensorgridfactory.hh:93
    \n-
    void setStart(int d, ctype value)
    set a starting value in a given direction d
    Definition: tensorgridfactory.hh:79
    \n-
    void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast< ctype >(0))
    adds n intervals in direction d with a given length ratio and a given starting interval length.
    Definition: tensorgridfactory.hh:144
    \n-
    std::vector< ctype > & operator[](std::size_t d)
    allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
    Definition: tensorgridfactory.hh:60
    \n-
    const std::vector< ctype > & operator[](std::size_t d) const
    allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
    Definition: tensorgridfactory.hh:66
    \n-
    std::unique_ptr< Grid > createGrid(Comm comm=Comm())
    Definition: tensorgridfactory.hh:48
    \n-
    Grid::Traits::Communication Comm
    Definition: tensorgridfactory.hh:44
    \n-
    std::array< std::vector< ctype >, dim > coords() const
    Definition: tensorgridfactory.hh:54
    \n-
    std::unique_ptr< Grid > createGrid(Comm comm)
    Definition: tensorgridfactory.hh:396
    \n-
    TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
    Definition: tensorgridfactory.hh:394
    \n-\n-
    YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid
    Definition: tensorgridfactory.hh:391
    \n-
    [ provides Dune::Grid ]
    Definition: yaspgrid.hh:163
    \n-
    typename Base::Communication Communication
    Definition: yaspgrid.hh:178
    \n-
    Coordinate container for a tensor product YaspGrid.
    Definition: coordinates.hh:245
    \n-
    Provide a generic factory class for unstructured grids.
    \n+
    157 // check command line arguments
    \n+
    158 if(params.size() < 1) {
    \n+
    159 std::cerr << "Need name of a .msh file to read.\\n"
    \n+
    160 << std::endl;
    \n+
    161 usage(std::cerr);
    \n+
    162 std::exit(1);
    \n+
    163 }
    \n+
    164 if(params.size() > 1) {
    \n+
    165 std::cerr << "Too many arguments.\\n"
    \n+
    166 << std::endl;
    \n+
    167 usage(std::cerr);
    \n+
    168 std::exit(1);
    \n+
    169 }
    \n+
    170 gridFileName = params[0];
    \n+
    171 }
    \n+
    172}
    \n+
    173
    \n+
    174#ifndef HEADERCHECK
    \n+
    175int main(int argc, char **argv) {
    \n+
    176 try {
    \n+
    177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv);
    \n+
    178
    \n+
    179 // check that we are not run through mpirun
    \n+
    180 if(mpiHelper.size() > 1) {
    \n+
    181 if(mpiHelper.rank() == 0)
    \n+
    182 std::cerr << programName << ": Sorry, this program works only in "
    \n+
    183 << "serial." << std::endl;
    \n+
    184 return 1;
    \n+
    185 }
    \n+
    186
    \n+
    187 parseOptions(argc, argv);
    \n+
    188
    \n+
    189 // read grid
    \n+
    190 typedef Dune::GmshReader<Grid> Reader;
    \n+
    191 std::shared_ptr<Grid> gridp(Reader::read(gridFileName));
    \n+
    192 gridp->globalRefine(refines);
    \n+
    193
    \n+
    194 // collect information
    \n+\n+
    196 Dune::fillGridViewInfoSerial(gridp->leafGridView(), gridViewInfo);
    \n+
    197
    \n+
    198 // print it
    \n+
    199 std::cout << gridViewInfo << std::flush;
    \n+
    200 }
    \n+
    201 catch(const std::exception &e) {
    \n+
    202 std::cerr << "Caught exception of type " << Dune::className(e)
    \n+
    203 << std::endl
    \n+
    204 << "e.what(): " << e.what() << std::endl;
    \n+
    205 throw;
    \n+
    206 }
    \n+
    207 catch(const Dune::Exception &e) {
    \n+
    208 std::cerr << "Caught exception of type " << Dune::className(e)
    \n+
    209 << std::endl
    \n+
    210 << "Exception message: " << e << std::endl;
    \n+
    211 throw;
    \n+
    212 }
    \n+
    213 catch(const std::string &s) {
    \n+
    214 std::cerr << "Caught exception of type " << Dune::className(s)
    \n+
    215 << std::endl
    \n+
    216 << "Exception message: " << s << std::endl;
    \n+
    217 throw;
    \n+
    218 }
    \n+
    219 catch(...) {
    \n+
    220 std::cerr << "Caught exception of unknown type" << std::endl;
    \n+
    221 throw;
    \n+
    222 }
    \n+
    223}
    \n+
    224#endif // !HEADERCHECK
    \n+
    225#endif // !DOXYGEN
    \n+
    226
    \n+
    227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH
    \n+
    int main(int argc, char **argv)
    Definition: recipe-integration.cc:70
    \n+\n+
    void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > &gridViewInfo)
    fill a GridViewInfo structure from a serial grid
    Definition: utility/gridinfo.hh:214
    \n+
    Read Gmsh mesh file.
    Definition: gmshreader.hh:805
    \n+
    structure to hold information about a certain GridView.
    Definition: utility/gridinfo.hh:100
    \n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,483 +5,230 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-tensorgridfactory.hh\n+gridinfo-gmsh-main.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH\n- 4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH\n+ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+ 4// vi: set et ts=4 sw=2 sts=2:\n 5\n- 20#include\n- 21#include\n- 22#include\n+ 6#ifndef DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH\n+ 7#define DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH\n+ 8\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15#include \n+ 16#include \n+ 17#include \n+ 18#include \n+ 19\n+ 20#include \n+ 21#include \n+ 22#include \n 23\n- 24#include \n- 25#include \n- 26#include \n- 27#include\n- 28\n- 29namespace Dune\n- 30{\n- 31 // forward declaration of TensorGridFactoryCreator, which is the real\n-factory\n- 32 // that should be specialized for each grid.\n- 33 template\n- 34 class TensorGridFactoryCreator;\n- 35\n- 40 template\n-41 class TensorGridFactory\n- 42 {\n- 43 public:\n-44 typedef typename Grid::Traits::Communication Comm;\n-45 typedef typename Grid::ctype ctype;\n-46 static const int dim = Grid::dimension;\n- 47\n-48 std::unique_ptr createGrid(Comm comm = Comm())\n- 49 {\n- 50 TensorGridFactoryCreator creator(*this);\n- 51 return creator.createGrid(comm);\n- 52 }\n- 53\n-54 std::array , dim> coords() const\n- 55 {\n- 56 return _coords;\n- 57 }\n+ 24#include \n+ 25#include \n+ 26\n+ 54#ifdef HEADERCHECK\n+ 55// define so headercheck will run\n+ 56const std::string programName = \"headercheck\";\n+ 57#endif // HEADERCHECK\n 58\n-60 std::vector& operator[](std::size_t d)\n- 61 {\n- 62 return _coords[d];\n- 63 }\n- 64\n-66 const std::vector& operator[](std::size_t d) const\n- 67 {\n- 68 return _coords[d];\n- 69 }\n- 70\n-79 void setStart (int d, ctype value)\n- 80 {\n- 81 _coords[d].resize(1);\n- 82 _coords[d][0] = value;\n+ 59#ifndef DOXYGEN\n+ 60namespace {\n+ 61 // anonymous namespace so we don't freakishly conflict with another usage()\n+ 62 // function that may be linked in from another compilation unit.\n+ 63 void usage(std::ostream &stream) {\n+ 64 stream << \"USAGE:\\n\"\n+ 65 << \" \" << programName << \" [-R REFINES] GRIDFILE\\n\"\n+ 66 << \"\\n\"\n+ 67 << \"PARAMETERS:\\n\"\n+ 68 << \" -R REFINES How many global refines to do after reading\\n\"\n+ 69 << \" (default: 0)\\n\"\n+ 70 << \" GRIDFILE Name of the .msh file to read the grid from.\\n\"\n+ 71 << std::flush;\n+ 72 }\n+ 73\n+ 74 bool prefix_match(const std::string &prefix, const std::string &str)\n+ 75 {\n+ 76 return str.compare(0,prefix.size(), prefix) == 0;\n+ 77 }\n+ 78\n+ 79 void error_argument_required(const std::string &opt) {\n+ 80 std::cerr << \"Error: option \" << opt << \" requires argument\\n\";\n+ 81 usage(std::cerr);\n+ 82 std::exit(1);\n 83 }\n 84\n-93 void fillIntervals (int d, int n, ctype h)\n- 94 {\n- 95 emptyCheck (d);\n- 96 for (int i = 0; i < n; i++)\n- 97 _coords[d].push_back (_coords[d].back () + h);\n- 98 }\n- 99\n-108 void fillRange (int d, int n, ctype end)\n- 109 {\n- 110 emptyCheck (d);\n- 111 const ctype h = (end - _coords[d].back ()) / n;\n- 112 for (int i = 0; i < n - 1; i++)\n- 113 _coords[d].push_back (_coords[d].back () + h);\n- 114 _coords[d].push_back (end);\n- 115 }\n+ 85 void error_unknown_option(const std::string &opt) {\n+ 86 std::cerr << \"Error: unknown option: \" << opt << \"\\n\";\n+ 87 usage(std::cerr);\n+ 88 std::exit(1);\n+ 89 }\n+ 90\n+ 91 void error_parsing_optarg(const std::string &opt, const std::string &error)\n+{\n+ 92 std::cerr << \"Error: option \" << opt << \": \" << error << \"\\n\";\n+ 93 usage(std::cerr);\n+ 94 std::exit(1);\n+ 95 }\n+ 96\n+ 97 template\n+ 98 void parse(const std::string &arg, T &val) {\n+ 99 std::istringstream s(arg);\n+ 100 s >> val;\n+ 101 bool good = !s.fail();\n+ 102 if(good) {\n+ 103 char dummy;\n+ 104 s >> dummy;\n+ 105 good = s.fail() && s.eof();\n+ 106 }\n+ 107 if(!good) {\n+ 108 std::ostringstream s;\n+ 109 s << \"Can't parse \\\"\" << arg << \"\\\" as a \" << Dune::className(val);\n+ 110 throw std::runtime_error(s.str());\n+ 111 }\n+ 112 }\n+ 113\n+ 114 std::size_t refines = 0;\n+ 115 std::string gridFileName = \"\";\n 116\n-125 void fillUntil (int d, ctype h, ctype end)\n- 126 {\n- 127 emptyCheck (d);\n- 128 while (_coords[d].back () < end)\n- 129 _coords[d].push_back (_coords[d].back () + h);\n- 130 }\n- 131\n-144 void geometricFillIntervals (int d, int n, ctype ratio, ctype h0 =\n- 145 static_cast (0))\n- 146 {\n- 147 emptyCheck (d);\n- 148 ctype h = h0;\n- 149 if (h0 == static_cast(0))\n- 150 h = lastInterval (d) * ratio;\n- 151 for (int i = 0; i < n; i++)\n- 152 {\n- 153 _coords[d].push_back (_coords[d].back () + h);\n- 154 h *= ratio;\n- 155 }\n+ 117 void parseOptions(int argc, char **argv) {\n+ 118 std::vector params;\n+ 119 for(++argv; *argv; ++argv) {\n+ 120 std::string arg = *argv;\n+ 121 if(prefix_match(\"-\", arg)) {\n+ 122 std::string opt = arg;\n+ 123 if(opt == \"--\") {\n+ 124 for(++argv; *argv; ++argv)\n+ 125 params.push_back(*argv);\n+ 126 break;\n+ 127 }\n+ 128 else if(prefix_match(\"-h\", opt) || prefix_match(\"-?\", opt) ||\n+ 129 opt == \"--help\")\n+ 130 {\n+ 131 usage(std::cout);\n+ 132 std::exit(0);\n+ 133 }\n+ 134 else if(opt == \"-R\" || opt == \"--global-refines\") {\n+ 135 ++argv;\n+ 136 if(!*argv) error_argument_required(opt);\n+ 137 try { parse(*argv, refines); }\n+ 138 catch(const std::runtime_error &e)\n+ 139 { error_parsing_optarg(opt, e.what()); }\n+ 140 }\n+ 141 else if(prefix_match(\"-R\", opt)) {\n+ 142 try { parse(*argv+std::strlen(\"-R\"), refines); }\n+ 143 catch(const std::runtime_error &e)\n+ 144 { error_parsing_optarg(opt, e.what()); }\n+ 145 }\n+ 146 else if(prefix_match(\"--global-refines=\", opt)) {\n+ 147 try { parse(*argv+std::strlen(\"--global-refines=\"), refines); }\n+ 148 catch(const std::runtime_error &e)\n+ 149 { error_parsing_optarg(opt, e.what()); }\n+ 150 }\n+ 151 else\n+ 152 error_unknown_option(opt);\n+ 153 }\n+ 154 else\n+ 155 params.push_back(arg);\n 156 }\n- 157\n-170 void geometricFillUntil (int d, ctype ratio, ctype end, ctype h0 =\n-static_cast (0))\n- 171 {\n- 172 emptyCheck (d);\n- 173 ctype h = h0;\n- 174 if (h0 == static_cast(0))\n- 175 h = lastInterval (d) * ratio;\n- 176 while (_coords[d].back () < end)\n- 177 {\n- 178 _coords[d].push_back (_coords[d].back () + h);\n- 179 h *= ratio;\n- 180 }\n- 181 }\n- 182\n-197 void geometricFillRange (int d, int n, ctype end, ctype h =\n- 198 static_cast (0),\n- 199 bool first = true)\n- 200 {\n- 201 emptyCheck (d);\n- 202 if (h < 1e-8)\n- 203 h = lastInterval (d);\n- 204 ctype ratio = newton (n, _coords[d].back (), end, h);\n- 205 if (!first)\n- 206 {\n- 207 h = h * pow (ratio, n - 1);\n- 208 ratio = 1 / ratio;\n- 209 }\n- 210 for (int i = 0; i < n - 1; i++)\n- 211 {\n- 212 _coords[d].push_back (_coords[d].back () + h);\n- 213 h *= ratio;\n- 214 }\n- 215 _coords[d].push_back (end);\n- 216 }\n- 217\n-219 void print()\n- 220 {\n- 221 for (int i=0; i meshsize;\n- 229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;)\n- 230 {\n- 231 meshsize.push_back(-1.*(*it));\n- 232 ++it;\n- 233 meshsize.back() += *it;\n- 234 }\n- 235\n- 236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it)\n- 237 std::cout << *it << \" \";\n- 238 std::cout << std::endl << \"Ratios between interval lengths: \";\n- 239\n- 240 std::vector ratios;\n- 241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;)\n- 242 ratios.push_back((1./(*it)) * *(++it));\n- 243\n- 244 for (auto it = ratios.begin(); it != ratios.end(); ++it)\n- 245 std::cout << *it << \" \";\n- 246 std::cout << std::endl << std::endl << std::endl;\n- 247 }\n- 248 }\n- 249\n- 250 private:\n- 251 // check whether the ith component is empty and add a 0.0 entry if so\n- 252 void emptyCheck (int i)\n- 253 {\n- 254 if (_coords[i].empty ())\n- 255 _coords[i].push_back (static_cast (0));\n- 256 }\n- 257\n- 258 // returns the last interval length in direction d\n- 259 ctype lastInterval (int d)\n- 260 {\n- 261 if (_coords[d].size () < 2)\n- 262 DUNE_THROW(\n- 263 GridError,\n- 264 \"Not enough elements in coordinate container to deduce interval length in\n-TensorYaspFactory\");\n- 265 else\n- 266 return _coords[d].back () - _coords[d][_coords[d].size () - 2];\n- 267 }\n- 268\n- 272 ctype newton (int n, ctype x_s, ctype x_e, ctype h)\n- 273 {\n- 274 ctype m = (x_e - x_s) / h;\n- 275 ctype xold = 0.0;\n- 276 ctype xnew = x_e - x_s;\n- 277 while (std::abs (xnew - xold) > 1E-8)\n- 278 {\n- 279 xold = xnew;\n- 280 xnew = xold\n- 281 - (-pow (xold, n) + m * xold - m + 1)\n- 282 / (-n * pow (xold, n - 1) + m);\n- 283 }\n- 284 if (std::abs (xnew - 1) < 1E-6)\n- 285 {\n- 286 xold = x_e - x_s;\n- 287 xnew = 0.0;\n- 288 while (std::abs (xnew - xold) > 1E-8)\n- 289 {\n- 290 xold = xnew;\n- 291 xnew = xold\n- 292 - (-pow (xold, n) + m * xold - m + 1)\n- 293 / (-n * pow (xold, n - 1) + m);\n- 294 }\n- 295 }\n- 296 return xnew;\n- 297 }\n- 298\n- 299 std::array, dim> _coords;\n- 300 };\n- 301\n- 302 // class that implements the actual grid creation process. The default is\n-implementing\n- 303 // standard creation for unstructured grids. Provide a specialization for\n-other grids.\n- 304 template\n-305 class TensorGridFactoryCreator\n- 306 {\n- 307 public:\n-308 typedef typename Grid::Traits::Communication Comm;\n-309 typedef typename Grid::ctype ctype;\n-310 static const int dim = Grid::dimension;\n- 311\n-312 TensorGridFactoryCreator(const TensorGridFactory& factory) : _factory\n-(factory) {}\n- 313\n-314 std::unique_ptr createGrid(Comm comm)\n- 315 {\n- 316 // The grid factory\n- 317 GridFactory fac;\n- 318\n- 319 if (comm.rank() == 0)\n- 320 {\n- 321 // determine the size of the grid\n- 322 std::array vsizes, esizes;\n- 323 std::size_t size = 1;\n- 324 for (std::size_t i = 0; i index(vsizes);\n- 333 for (std::size_t i=0; i position;\n- 336 for (std::size_t j = 0; j offsets;\n- 343 offsets[0] = 1;\n- 344 for (std::size_t i=1; i cornersTemplate(nCorners,0);\n- 352\n- 353 for (size_t i=0; i eindex(esizes);\n- 360\n- 361 // Compute the total number of elements to be created\n- 362 int numElements = eindex.cycle();\n- 363\n- 364 for (int i=0; i corners = cornersTemplate;\n- 373 for (size_t j=0; j(fac.createGrid());\n- 381 }\n- 382\n- 383 private:\n- 384 const TensorGridFactory& _factory;\n- 385 };\n- 386\n- 387 template\n-388 class TensorGridFactoryCreator > >\n- 389 {\n- 390 public:\n-391 typedef YaspGrid > Grid;\n-392 typedef typename Grid::Communication Comm;\n- 393\n-394 TensorGridFactoryCreator(const TensorGridFactory& factory) : _factory\n-(factory) {}\n- 395\n-396 std::unique_ptr createGrid(Comm comm)\n- 397 {\n- 398 return std::make_unique(_factory.coords(), std::bitset(0ULL),\n-1, comm);\n- 399 }\n- 400 private:\n- 401 const TensorGridFactory& _factory;\n- 402 };\n- 403}\n- 404\n- 405#endif\n-multiindex.hh\n-Implements a multiindex with arbitrary dimension and fixed index ranges This is\n-used by various facto...\n-yaspgrid.hh\n-Dune\n-Include standard header files.\n-Definition: agrid.hh:60\n-Dune::Alberta::abs\n-void abs(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:328\n-Dune::Grid::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/grid.hh:387\n-Dune::Grid::ctype\n-ct ctype\n-Define type used for coordinates in grid module.\n-Definition: common/grid.hh:532\n-Dune::GridFactory<_Grid_>\n-Dune::GridFactory::insertElement\n-virtual void insertElement(const GeometryType &type, const std::vector<\n-unsigned int > &vertices)\n-Insert an element into the coarse grid.\n-Definition: common/gridfactory.hh:346\n-Dune::GridFactory::insertVertex\n-virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)\n-Insert a vertex into the coarse grid.\n-Definition: common/gridfactory.hh:335\n-Dune::GridFactory::createGrid\n-virtual std::unique_ptr< GridType > createGrid()\n-Finalize grid creation and hand over the grid.\n-Definition: common/gridfactory.hh:372\n-Dune::FactoryUtilities::MultiIndex\n-Definition: multiindex.hh:19\n-Dune::FactoryUtilities::MultiIndex::cycle\n-size_t cycle() const\n-Compute how many times you can call operator++ before getting to (0,...,0)\n-again.\n-Definition: multiindex.hh:48\n-Dune::TensorGridFactoryCreator\n-Definition: tensorgridfactory.hh:306\n-Dune::TensorGridFactoryCreator::ctype\n-Grid::ctype ctype\n-Definition: tensorgridfactory.hh:309\n-Dune::TensorGridFactoryCreator::Comm\n-Grid::Traits::Communication Comm\n-Definition: tensorgridfactory.hh:308\n-Dune::TensorGridFactoryCreator::TensorGridFactoryCreator\n-TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)\n-Definition: tensorgridfactory.hh:312\n-Dune::TensorGridFactoryCreator::createGrid\n-std::unique_ptr< Grid > createGrid(Comm comm)\n-Definition: tensorgridfactory.hh:314\n-Dune::TensorGridFactoryCreator::dim\n-static const int dim\n-Definition: tensorgridfactory.hh:310\n-Dune::TensorGridFactory\n-A factory class for conveniently creating tensorproduct grids.\n-Definition: tensorgridfactory.hh:42\n-Dune::TensorGridFactory::fillRange\n-void fillRange(int d, int n, ctype end)\n-fills the range to end with n intervals in direction d\n-Definition: tensorgridfactory.hh:108\n-Dune::TensorGridFactory::geometricFillRange\n-void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype >\n-(0), bool first=true)\n-fills a coordinate range in direction d with n intervals according to a\n-geometric series\n-Definition: tensorgridfactory.hh:197\n-Dune::TensorGridFactory::ctype\n-Grid::ctype ctype\n-Definition: tensorgridfactory.hh:45\n-Dune::TensorGridFactory::fillUntil\n-void fillUntil(int d, ctype h, ctype end)\n-adds intervals in direction d until a given coordinate is reached\n-Definition: tensorgridfactory.hh:125\n-Dune::TensorGridFactory::geometricFillUntil\n-void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast<\n-ctype >(0))\n-adds intervals in direction d according with a given length ratio until a given\n-coordinate is reached\n-Definition: tensorgridfactory.hh:170\n-Dune::TensorGridFactory::dim\n-static const int dim\n-Definition: tensorgridfactory.hh:46\n-Dune::TensorGridFactory::print\n-void print()\n-print the coordinate information given to the factory so far\n-Definition: tensorgridfactory.hh:219\n-Dune::TensorGridFactory::fillIntervals\n-void fillIntervals(int d, int n, ctype h)\n-pushs n intervals of length h in direction d\n-Definition: tensorgridfactory.hh:93\n-Dune::TensorGridFactory::setStart\n-void setStart(int d, ctype value)\n-set a starting value in a given direction d\n-Definition: tensorgridfactory.hh:79\n-Dune::TensorGridFactory::geometricFillIntervals\n-void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast<\n-ctype >(0))\n-adds n intervals in direction d with a given length ratio and a given starting\n-interval length.\n-Definition: tensorgridfactory.hh:144\n-Dune::TensorGridFactory::operator[]\n-std::vector< ctype > & operator[](std::size_t d)\n-allow to manually tune the factory by overloading operator[] to export the\n-coordinate vectors in the ...\n-Definition: tensorgridfactory.hh:60\n-Dune::TensorGridFactory::operator[]\n-const std::vector< ctype > & operator[](std::size_t d) const\n-allow to manually tune the factory by overloading operator[] to export the\n-coordinate vectors in the ...\n-Definition: tensorgridfactory.hh:66\n-Dune::TensorGridFactory::createGrid\n-std::unique_ptr< Grid > createGrid(Comm comm=Comm())\n-Definition: tensorgridfactory.hh:48\n-Dune::TensorGridFactory::Comm\n-Grid::Traits::Communication Comm\n-Definition: tensorgridfactory.hh:44\n-Dune::TensorGridFactory::coords\n-std::array< std::vector< ctype >, dim > coords() const\n-Definition: tensorgridfactory.hh:54\n-Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n-dim_>_>_>::createGrid\n-std::unique_ptr< Grid > createGrid(Comm comm)\n-Definition: tensorgridfactory.hh:396\n-Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n-dim_>_>_>::TensorGridFactoryCreator\n-TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)\n-Definition: tensorgridfactory.hh:394\n-Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n-dim_>_>_>::Comm\n-Grid::Communication Comm\n-Definition: tensorgridfactory.hh:392\n-Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n-dim_>_>_>::Grid\n-YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid\n-Definition: tensorgridfactory.hh:391\n-Dune::YaspGrid\n-[ provides Dune::Grid ]\n-Definition: yaspgrid.hh:163\n-Dune::YaspGrid::Communication\n-typename Base::Communication Communication\n-Definition: yaspgrid.hh:178\n-Dune::TensorProductCoordinates\n-Coordinate container for a tensor product YaspGrid.\n-Definition: coordinates.hh:245\n-gridfactory.hh\n-Provide a generic factory class for unstructured grids.\n+ 157 // check command line arguments\n+ 158 if(params.size() < 1) {\n+ 159 std::cerr << \"Need name of a .msh file to read.\\n\"\n+ 160 << std::endl;\n+ 161 usage(std::cerr);\n+ 162 std::exit(1);\n+ 163 }\n+ 164 if(params.size() > 1) {\n+ 165 std::cerr << \"Too many arguments.\\n\"\n+ 166 << std::endl;\n+ 167 usage(std::cerr);\n+ 168 std::exit(1);\n+ 169 }\n+ 170 gridFileName = params[0];\n+ 171 }\n+ 172}\n+ 173\n+ 174#ifndef HEADERCHECK\n+ 175int main(int argc, char **argv) {\n+ 176 try {\n+ 177 const Dune::MPIHelper &mpiHelper = Dune::MPIHelper::instance(argc, argv);\n+ 178\n+ 179 // check that we are not run through mpirun\n+ 180 if(mpiHelper.size() > 1) {\n+ 181 if(mpiHelper.rank() == 0)\n+ 182 std::cerr << programName << \": Sorry, this program works only in \"\n+ 183 << \"serial.\" << std::endl;\n+ 184 return 1;\n+ 185 }\n+ 186\n+ 187 parseOptions(argc, argv);\n+ 188\n+ 189 // read grid\n+ 190 typedef Dune::GmshReader Reader;\n+ 191 std::shared_ptr gridp(Reader::read(gridFileName));\n+ 192 gridp->globalRefine(refines);\n+ 193\n+ 194 // collect information\n+ 195 Dune::GridViewInfo gridViewInfo;\n+ 196 Dune::fillGridViewInfoSerial(gridp->leafGridView(), gridViewInfo);\n+ 197\n+ 198 // print it\n+ 199 std::cout << gridViewInfo << std::flush;\n+ 200 }\n+ 201 catch(const std::exception &e) {\n+ 202 std::cerr << \"Caught exception of type \" << Dune::className(e)\n+ 203 << std::endl\n+ 204 << \"e.what(): \" << e.what() << std::endl;\n+ 205 throw;\n+ 206 }\n+ 207 catch(const Dune::Exception &e) {\n+ 208 std::cerr << \"Caught exception of type \" << Dune::className(e)\n+ 209 << std::endl\n+ 210 << \"Exception message: \" << e << std::endl;\n+ 211 throw;\n+ 212 }\n+ 213 catch(const std::string &s) {\n+ 214 std::cerr << \"Caught exception of type \" << Dune::className(s)\n+ 215 << std::endl\n+ 216 << \"Exception message: \" << s << std::endl;\n+ 217 throw;\n+ 218 }\n+ 219 catch(...) {\n+ 220 std::cerr << \"Caught exception of unknown type\" << std::endl;\n+ 221 throw;\n+ 222 }\n+ 223}\n+ 224#endif // !HEADERCHECK\n+ 225#endif // !DOXYGEN\n+ 226\n+ 227#endif // DUNE_GRID_UTILITY_GRIDINFO_GMSH_MAIN_HH\n+main\n+int main(int argc, char **argv)\n+Definition: recipe-integration.cc:70\n+gmshreader.hh\n+Dune::fillGridViewInfoSerial\n+void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype >\n+&gridViewInfo)\n+fill a GridViewInfo structure from a serial grid\n+Definition: utility/gridinfo.hh:214\n+Dune::GmshReader\n+Read Gmsh mesh file.\n+Definition: gmshreader.hh:805\n+Dune::GridViewInfo\n+structure to hold information about a certain GridView.\n+Definition: utility/gridinfo.hh:100\n+gridinfo.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01001.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01001.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridtype.hh File Reference\n+dune-grid: persistentcontainermap.hh File Reference\n \n \n \n \n \n \n \n@@ -62,25 +62,44 @@\n \n
    \n \n
    \n
    \n
    \n-
    gridtype.hh File Reference
    \n+ \n+
    persistentcontainermap.hh File Reference
    \n
    \n
    \n-\n-

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

    \n-\n+
    #include <algorithm>
    \n+#include <cassert>
    \n+#include <type_traits>
    \n+#include <utility>
    \n+#include <dune/common/hybridutilities.hh>
    \n+#include <dune/common/typetraits.hh>
    \n+#include <dune/grid/common/capabilities.hh>
    \n+
    \n

    Go to the source code of this file.

    \n-

    Detailed Description

    \n-

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

    \n-
    Author
    Andreas Dedner
    \n-
    \n+\n+\n+\n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::PersistentContainerMap< G, IdSet, Map >
     map-based implementation of the PersistentContainer More...
     
    class  Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >
     
    \n+\n+\n+\n+\n+

    \n+Namespaces

    namespace  Dune
     Include standard header files.
     
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,19 +5,31 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-gridtype.hh File Reference\n-This file can be included directly following config.h to test if a grid type\n-was correctly selected. More...\n+Classes | Namespaces\n+persistentcontainermap.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n-***** Detailed Description *****\n-This file can be included directly following config.h to test if a grid type\n-was correctly selected.\n- Author\n- Andreas Dedner\n+ Classes\n+class \u00a0Dune::PersistentContainerMap<_G,_IdSet,_Map_>\n+\u00a0 map-based implementation of the PersistentContainer More...\n+\u00a0\n+class \u00a0Dune::PersistentContainerMap<_G,_IdSet,_Map_>::IteratorWrapper<_value,\n+ iterator_>\n+\u00a0\n+ Namespaces\n+namespace \u00a0Dune\n+\u00a0 Include standard header files.\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01001_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridtype.hh Source File\n+dune-grid: persistentcontainermap.hh Source File\n \n \n \n \n \n \n \n@@ -62,42 +62,336 @@\n \n
    \n \n
    \n \n
    \n-
    gridtype.hh
    \n+
    persistentcontainermap.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRIDTYPE_HH
    \n-
    6#define DUNE_GRIDTYPE_HH
    \n+
    5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH
    \n+
    6#define DUNE_PERSISTENTCONTAINERMAP_HH
    \n
    7
    \n-
    17#ifndef HEADERCHECK
    \n-
    18
    \n-
    19// NOGRID is used to specify that no default was set during configure
    \n-
    20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected
    \n-
    21// and an error is produced
    \n-
    22#if defined NOGRID
    \n-
    23 #if ! HAVE_GRIDTYPE
    \n-
    24 #error "No grid type selected, use GRIDTYPE=..."
    \n-
    25 #endif
    \n-
    26#else
    \n-
    27 #if ! HAVE_GRIDTYPE
    \n-
    28 #error "No grid type selected, typo in GRIDTYPE=...?"
    \n-
    29 #endif
    \n-
    30#endif
    \n-
    31
    \n-
    32#endif // HEADERCHECK
    \n-
    33
    \n-
    34#endif // DUNE_GRIDTYPE_HH
    \n+
    8#include <algorithm>
    \n+
    9#include <cassert>
    \n+
    10#include <type_traits>
    \n+
    11#include <utility>
    \n+
    12
    \n+
    13#include <dune/common/hybridutilities.hh>
    \n+
    14#include <dune/common/typetraits.hh>
    \n+\n+
    16
    \n+
    17namespace Dune
    \n+
    18{
    \n+
    19
    \n+
    20 // PersistentContainerMap
    \n+
    21 // ----------------------
    \n+
    22
    \n+
    24 template< class G, class IdSet, class Map >
    \n+\n+
    26 {
    \n+\n+
    28
    \n+
    29 protected:
    \n+
    30 template< class reference, class iterator >
    \n+
    31 class IteratorWrapper;
    \n+
    32
    \n+
    33 public:
    \n+
    34 typedef G Grid;
    \n+
    35
    \n+
    36 typedef typename Map::mapped_type Value;
    \n+
    37 typedef typename Map::size_type Size;
    \n+
    38
    \n+\n+\n+
    41
    \n+
    42 PersistentContainerMap ( const Grid &grid, int codim, const IdSet &idSet, const Value &value )
    \n+
    43 : grid_( &grid ),
    \n+
    44 codim_( codim ),
    \n+
    45 idSet_( &idSet ),
    \n+
    46 data_()
    \n+
    47 {
    \n+
    48 resize( value );
    \n+
    49 }
    \n+
    50
    \n+
    51 template< class Entity >
    \n+
    52 const Value &operator[] ( const Entity &entity ) const
    \n+
    53 {
    \n+
    54 assert( Entity::codimension == codimension() );
    \n+
    55 typename Map::const_iterator pos = data_.find( idSet().id( entity ) );
    \n+
    56 assert( pos != data_.end() );
    \n+
    57 return pos->second;
    \n+
    58 }
    \n+
    59
    \n+
    60 template< class Entity >
    \n+
    61 Value &operator[] ( const Entity &entity )
    \n+
    62 {
    \n+
    63 assert( Entity::codimension == codimension() );
    \n+
    64 typename Map::iterator pos = data_.find( idSet().id( entity ) );
    \n+
    65 assert( pos != data_.end() );
    \n+
    66 return pos->second;
    \n+
    67 }
    \n+
    68
    \n+
    69 template< class Entity >
    \n+
    70 const Value &operator() ( const Entity &entity, int subEntity ) const
    \n+
    71 {
    \n+
    72 typename Map::const_iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
    \n+
    73 assert( pos != data_.end() );
    \n+
    74 return pos->second;
    \n+
    75 }
    \n+
    76
    \n+
    77 template< class Entity >
    \n+
    78 Value &operator() ( const Entity &entity, int subEntity )
    \n+
    79 {
    \n+
    80 typename Map::iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
    \n+
    81 assert( pos != data_.end() );
    \n+
    82 return pos->second;
    \n+
    83 }
    \n+
    84
    \n+
    85 Size size () const { return data_.size(); }
    \n+
    86
    \n+
    87 void resize ( const Value &value = Value() )
    \n+
    88 {
    \n+
    89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{},
    \n+
    90 [ & ]( auto i ){ if( int(i) == this->codimension() ) this->template resize< i >( value ); } );
    \n+
    91 }
    \n+
    92
    \n+
    93 void shrinkToFit () {}
    \n+
    94
    \n+
    95 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
    \n+
    96
    \n+
    97 void swap ( This &other )
    \n+
    98 {
    \n+
    99 std::swap( grid_, other.grid_ );
    \n+
    100 std::swap( codim_, other.codim_ );
    \n+
    101 std::swap( idSet_, other.idSet_ );
    \n+
    102 std::swap( data_, other.data_ );
    \n+
    103 }
    \n+
    104
    \n+\n+\n+
    107
    \n+\n+\n+
    110
    \n+
    111 int codimension () const { return codim_; }
    \n+
    112
    \n+
    113 protected:
    \n+
    114 const Grid &grid () const { return *grid_; }
    \n+
    115
    \n+
    116 template< int codim >
    \n+
    117 void resize ( const Value &value );
    \n+
    118
    \n+
    119 template< int codim >
    \n+
    120 void migrateLevel ( int level, const Value &value, Map &data,
    \n+
    121 std::integral_constant< bool, true > );
    \n+
    122
    \n+
    123 template< int codim >
    \n+
    124 void migrateLevel ( int level, const Value &value, Map &data,
    \n+
    125 std::integral_constant< bool, false > );
    \n+
    126
    \n+
    127 static void migrateEntry ( const typename IdSet::IdType &id, const Value &value,
    \n+
    128 Map &oldData, Map &newData );
    \n+
    129
    \n+
    130 const IdSet &idSet () const { return *idSet_; }
    \n+
    131
    \n+
    132 const Grid *grid_;
    \n+\n+
    134 const IdSet *idSet_;
    \n+
    135 Map data_;
    \n+
    136 };
    \n+
    137
    \n+
    138
    \n+
    139
    \n+
    140 // PersistentContainerMap::IteratorWrapper
    \n+
    141 // ---------------------------------------
    \n+
    142
    \n+
    143 template< class G, class IdSet, class Map >
    \n+
    144 template< class value, class iterator >
    \n+\n+
    146 : public iterator
    \n+
    147 {
    \n+\n+
    149
    \n+
    150 public:
    \n+
    151 IteratorWrapper ( const iterator &it ) : it_( it ) {}
    \n+
    152
    \n+
    153 operator ConstWrapper () const { return ConstWrapper( it_ ); }
    \n+
    154
    \n+
    155 value &operator* () { return it_->second; }
    \n+
    156 value *operator-> () { return &(it_->second); }
    \n+
    157
    \n+
    158 bool operator== ( const IteratorWrapper &other ) const { return (it_ == other.it_); }
    \n+
    159 bool operator!= ( const IteratorWrapper &other ) const { return (it_ != other.it_); }
    \n+
    160
    \n+
    161 IteratorWrapper &operator++ () { ++it_; return *this; }
    \n+
    162
    \n+
    163 private:
    \n+
    164 iterator it_;
    \n+
    165 };
    \n+
    166
    \n+
    167
    \n+
    168
    \n+
    169
    \n+
    170 // Implementation of PersistentContainerMap
    \n+
    171 // ----------------------------------------
    \n+
    172
    \n+
    173 template< class G, class IdSet, class Map >
    \n+\n+\n+
    176 {
    \n+
    177 return ConstIterator( data_.begin() );
    \n+
    178 }
    \n+
    179
    \n+
    180 template< class G, class IdSet, class Map >
    \n+\n+\n+
    183 {
    \n+
    184 return Iterator( data_.begin() );
    \n+
    185 }
    \n+
    186
    \n+
    187
    \n+
    188 template< class G, class IdSet, class Map >
    \n+\n+\n+
    191 {
    \n+
    192 return ConstIterator( data_.end() );
    \n+
    193 }
    \n+
    194
    \n+
    195 template< class G, class IdSet, class Map >
    \n+\n+\n+
    198 {
    \n+
    199 return Iterator( data_.end() );
    \n+
    200 }
    \n+
    201
    \n+
    202
    \n+
    203 template< class G, class IdSet, class Map >
    \n+
    204 template< int codim >
    \n+
    205 inline void PersistentContainerMap< G, IdSet, Map >::resize ( const Value &value )
    \n+
    206 {
    \n+
    207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim >::v > hasEntityIterator;
    \n+
    208 assert( codim == codimension() );
    \n+
    209
    \n+
    210 // create empty map and swap it with current map (no need to copy twice)
    \n+
    211 Map data;
    \n+
    212 std::swap( data, data_ );
    \n+
    213
    \n+
    214 // copy all data from old map into new one (adding new entries, if necessary)
    \n+
    215 const int maxLevel = grid().maxLevel();
    \n+
    216 for ( int level = 0; level <= maxLevel; ++level )
    \n+
    217 migrateLevel< codim >( level, value, data, hasEntityIterator );
    \n+
    218 }
    \n+
    219
    \n+
    220
    \n+
    221 template< class G, class IdSet, class Map >
    \n+
    222 template< int codim >
    \n+\n+
    224 ::migrateLevel ( int level, const Value &value, Map &data,
    \n+
    225 std::integral_constant< bool, true > )
    \n+
    226 {
    \n+
    227 typedef typename Grid::LevelGridView LevelView;
    \n+
    228 typedef typename LevelView::template Codim< codim >::Iterator LevelIterator;
    \n+
    229
    \n+
    230 const LevelView levelView = grid().levelGridView( level );
    \n+
    231 const LevelIterator end = levelView.template end< codim >();
    \n+
    232 for( LevelIterator it = levelView.template begin< codim >(); it != end; ++it )
    \n+
    233 migrateEntry( idSet().id( *it ), value, data, data_ );
    \n+
    234 }
    \n+
    235
    \n+
    236
    \n+
    237 template< class G, class IdSet, class Map >
    \n+
    238 template< int codim >
    \n+\n+
    240 ::migrateLevel ( int level, const Value &value, Map &data,
    \n+
    241 std::integral_constant< bool, false > )
    \n+
    242 {
    \n+
    243 typedef typename Grid::LevelGridView LevelView;
    \n+
    244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator;
    \n+
    245
    \n+
    246 const LevelView levelView = grid().levelGridView( level );
    \n+
    247 const LevelIterator end = levelView.template end< 0 >();
    \n+
    248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it )
    \n+
    249 {
    \n+
    250 const typename LevelIterator::Entity &entity = *it;
    \n+
    251 const int subEntities = entity.subEntities( codim );
    \n+
    252 for( int i = 0; i < subEntities; ++i )
    \n+
    253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ );
    \n+
    254 }
    \n+
    255 }
    \n+
    256
    \n+
    257
    \n+
    258 template< class G, class IdSet, class Map >
    \n+\n+
    260 ::migrateEntry ( const typename IdSet::IdType &id, const Value &value,
    \n+
    261 Map &oldData, Map &newData )
    \n+
    262 {
    \n+
    263 // insert entry for id
    \n+
    264 const std::pair< typename Map::iterator, bool > inserted
    \n+
    265 = newData.insert( std::make_pair( id, value ) );
    \n+
    266
    \n+
    267 // if entry did not exist previously, copy data
    \n+
    268 if( inserted.second )
    \n+
    269 {
    \n+
    270 const typename Map::iterator pos = oldData.find( id );
    \n+
    271 if( pos != oldData.end() )
    \n+
    272 {
    \n+
    273 inserted.first->second = pos->second;
    \n+
    274 oldData.erase( pos );
    \n+
    275 }
    \n+
    276 }
    \n+
    277 }
    \n+
    278
    \n+
    279} // namespace Dune
    \n+
    280
    \n+
    281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH
    \n+
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n+
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    static constexpr int codimension
    Know your own codimension.
    Definition: common/entity.hh:106
    \n+
    Id Set Interface.
    Definition: indexidset.hh:452
    \n+
    IdTypeImp IdType
    Type used to represent an id.
    Definition: indexidset.hh:458
    \n+
    GridFamily::Traits::LevelGridView LevelGridView
    type of view for level grid
    Definition: common/grid.hh:402
    \n+
    map-based implementation of the PersistentContainer
    Definition: persistentcontainermap.hh:26
    \n+
    void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, false >)
    Definition: persistentcontainermap.hh:240
    \n+
    void swap(This &other)
    Definition: persistentcontainermap.hh:97
    \n+
    void fill(const Value &value)
    Definition: persistentcontainermap.hh:95
    \n+
    G Grid
    Definition: persistentcontainermap.hh:34
    \n+
    void resize(const Value &value)
    \n+
    IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator
    Definition: persistentcontainermap.hh:39
    \n+
    int codim_
    Definition: persistentcontainermap.hh:133
    \n+
    const Grid * grid_
    Definition: persistentcontainermap.hh:132
    \n+
    const Value & operator[](const Entity &entity) const
    Definition: persistentcontainermap.hh:52
    \n+
    int codimension() const
    Definition: persistentcontainermap.hh:111
    \n+
    void resize(const Value &value=Value())
    Definition: persistentcontainermap.hh:87
    \n+
    const IdSet & idSet() const
    Definition: persistentcontainermap.hh:130
    \n+
    ConstIterator begin() const
    Definition: persistentcontainermap.hh:175
    \n+
    static void migrateEntry(const typename IdSet::IdType &id, const Value &value, Map &oldData, Map &newData)
    Definition: persistentcontainermap.hh:260
    \n+
    Map::mapped_type Value
    Definition: persistentcontainermap.hh:36
    \n+
    Iterator end()
    Definition: persistentcontainermap.hh:197
    \n+
    const Grid & grid() const
    Definition: persistentcontainermap.hh:114
    \n+
    const Value & operator()(const Entity &entity, int subEntity) const
    Definition: persistentcontainermap.hh:70
    \n+
    PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const Value &value)
    Definition: persistentcontainermap.hh:42
    \n+
    Iterator begin()
    Definition: persistentcontainermap.hh:182
    \n+
    Map::size_type Size
    Definition: persistentcontainermap.hh:37
    \n+
    ConstIterator end() const
    Definition: persistentcontainermap.hh:190
    \n+
    Map data_
    Definition: persistentcontainermap.hh:135
    \n+
    Size size() const
    Definition: persistentcontainermap.hh:85
    \n+
    IteratorWrapper< Value, typename Map::iterator > Iterator
    Definition: persistentcontainermap.hh:40
    \n+
    const IdSet * idSet_
    Definition: persistentcontainermap.hh:134
    \n+
    void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, true >)
    Definition: persistentcontainermap.hh:224
    \n+
    void shrinkToFit()
    Definition: persistentcontainermap.hh:93
    \n+
    Definition: persistentcontainermap.hh:147
    \n+
    IteratorWrapper(const iterator &it)
    Definition: persistentcontainermap.hh:151
    \n+
    A set of traits classes to store static information about grid implementation.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,38 +5,429 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-gridtype.hh\n+persistentcontainermap.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRIDTYPE_HH\n- 6#define DUNE_GRIDTYPE_HH\n+ 5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH\n+ 6#define DUNE_PERSISTENTCONTAINERMAP_HH\n 7\n- 17#ifndef HEADERCHECK\n- 18\n- 19// NOGRID is used to specify that no default was set during configure\n- 20// If NOGRID and HAVE_GRIDTYPE are both not set then no grid was selected\n- 21// and an error is produced\n- 22#if defined NOGRID\n- 23 #if ! HAVE_GRIDTYPE\n- 24 #error \"No grid type selected, use GRIDTYPE=...\"\n- 25 #endif\n- 26#else\n- 27 #if ! HAVE_GRIDTYPE\n- 28 #error \"No grid type selected, typo in GRIDTYPE=...?\"\n- 29 #endif\n- 30#endif\n- 31\n- 32#endif // HEADERCHECK\n- 33\n- 34#endif // DUNE_GRIDTYPE_HH\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12\n+ 13#include \n+ 14#include \n+ 15#include \n+ 16\n+ 17namespace Dune\n+ 18{\n+ 19\n+ 20 // PersistentContainerMap\n+ 21 // ----------------------\n+ 22\n+ 24 template< class G, class IdSet, class Map >\n+25 class PersistentContainerMap\n+ 26 {\n+ 27 typedef PersistentContainerMap<_G,_IdSet,_Map_> This;\n+ 28\n+ 29 protected:\n+ 30 template< class reference, class iterator >\n+ 31 class IteratorWrapper;\n+ 32\n+ 33 public:\n+34 typedef G Grid;\n+ 35\n+36 typedef typename Map::mapped_type Value;\n+37 typedef typename Map::size_type Size;\n+ 38\n+39 typedef IteratorWrapper<_const_Value,_typename_Map::const_iterator_>\n+ConstIterator;\n+40 typedef IteratorWrapper<_Value,_typename_Map::iterator_> Iterator;\n+ 41\n+42 PersistentContainerMap ( const Grid &grid, int codim, const IdSet &idSet,\n+const Value &value )\n+ 43 : grid_( &grid ),\n+ 44 codim_( codim ),\n+ 45 idSet_( &idSet ),\n+ 46 data_()\n+ 47 {\n+ 48 resize( value );\n+ 49 }\n+ 50\n+ 51 template< class Entity >\n+52 const Value &operator[]( const Entity &entity ) const\n+ 53 {\n+ 54 assert( Entity::codimension == codimension() );\n+ 55 typename Map::const_iterator pos = data_.find( idSet().id( entity ) );\n+ 56 assert( pos != data_.end() );\n+ 57 return pos->second;\n+ 58 }\n+ 59\n+ 60 template< class Entity >\n+61 Value &operator[]( const Entity &entity )\n+ 62 {\n+ 63 assert( Entity::codimension == codimension() );\n+ 64 typename Map::iterator pos = data_.find( idSet().id( entity ) );\n+ 65 assert( pos != data_.end() );\n+ 66 return pos->second;\n+ 67 }\n+ 68\n+ 69 template< class Entity >\n+70 const Value &operator()( const Entity &entity, int subEntity ) const\n+ 71 {\n+ 72 typename Map::const_iterator pos = data_.find( idSet().subId( entity,\n+subEntity, codimension() ) );\n+ 73 assert( pos != data_.end() );\n+ 74 return pos->second;\n+ 75 }\n+ 76\n+ 77 template< class Entity >\n+78 Value &operator()( const Entity &entity, int subEntity )\n+ 79 {\n+ 80 typename Map::iterator pos = data_.find( idSet().subId( entity, subEntity,\n+codimension() ) );\n+ 81 assert( pos != data_.end() );\n+ 82 return pos->second;\n+ 83 }\n+ 84\n+85 Size size () const { return data_.size(); }\n+ 86\n+87 void resize ( const Value &value = Value() )\n+ 88 {\n+ 89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{},\n+ 90 [ & ]( auto i ){ if( int(i) == this->codimension() ) this->template resize<\n+i >( value ); } );\n+ 91 }\n+ 92\n+93 void shrinkToFit () {}\n+ 94\n+95 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }\n+ 96\n+97 void swap ( This &other )\n+ 98 {\n+ 99 std::swap( grid_, other.grid_ );\n+ 100 std::swap( codim_, other.codim_ );\n+ 101 std::swap( idSet_, other.idSet_ );\n+ 102 std::swap( data_, other.data_ );\n+ 103 }\n+ 104\n+105 ConstIterator begin () const;\n+106 Iterator begin ();\n+ 107\n+108 ConstIterator end () const;\n+109 Iterator end ();\n+ 110\n+111 int codimension () const { return codim_; }\n+ 112\n+ 113 protected:\n+114 const Grid &grid () const { return *grid_; }\n+ 115\n+ 116 template< int codim >\n+117 void resize ( const Value &value );\n+ 118\n+ 119 template< int codim >\n+120 void migrateLevel ( int level, const Value &value, Map &data,\n+ 121 std::integral_constant< bool, true > );\n+ 122\n+ 123 template< int codim >\n+124 void migrateLevel ( int level, const Value &value, Map &data,\n+ 125 std::integral_constant< bool, false > );\n+ 126\n+127 static void migrateEntry ( const typename IdSet::IdType &id, const Value\n+&value,\n+ 128 Map &oldData, Map &newData );\n+ 129\n+130 const IdSet &idSet () const { return *idSet_; }\n+ 131\n+132 const Grid *grid_;\n+133 int codim_;\n+134 const IdSet *idSet_;\n+135 Map data_;\n+ 136 };\n+ 137\n+ 138\n+ 139\n+ 140 // PersistentContainerMap::IteratorWrapper\n+ 141 // ---------------------------------------\n+ 142\n+ 143 template< class G, class IdSet, class Map >\n+ 144 template< class value, class iterator >\n+145 class PersistentContainerMap<_G,_IdSet,_Map_>::IteratorWrapper\n+ 146 : public iterator\n+ 147 {\n+ 148 typedef IteratorWrapper<_const_value,_typename_Map::const_iterator_>\n+ConstWrapper;\n+ 149\n+ 150 public:\n+151 IteratorWrapper ( const iterator &it ) : it_( it ) {}\n+ 152\n+153 operator ConstWrapper () const { return ConstWrapper( it_ ); }\n+ 154\n+155 value &operator* () { return it_->second; }\n+156 value *operator-> () { return &(it_->second); }\n+ 157\n+158 bool operator== ( const IteratorWrapper &other ) const { return (it_ ==\n+other.it_); }\n+159 bool operator!= ( const IteratorWrapper &other ) const { return (it_ !=\n+other.it_); }\n+ 160\n+161 IteratorWrapper &operator++ () { ++it_; return *this; }\n+ 162\n+ 163 private:\n+ 164 iterator it_;\n+ 165 };\n+ 166\n+ 167\n+ 168\n+ 169\n+ 170 // Implementation of PersistentContainerMap\n+ 171 // ----------------------------------------\n+ 172\n+ 173 template< class G, class IdSet, class Map >\n+ 174 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::ConstIterator\n+175 PersistentContainerMap<_G,_IdSet,_Map_>::begin () const\n+ 176 {\n+ 177 return ConstIterator( data_.begin() );\n+ 178 }\n+ 179\n+ 180 template< class G, class IdSet, class Map >\n+ 181 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::Iterator\n+182 PersistentContainerMap<_G,_IdSet,_Map_>::begin ()\n+ 183 {\n+ 184 return Iterator( data_.begin() );\n+ 185 }\n+ 186\n+ 187\n+ 188 template< class G, class IdSet, class Map >\n+ 189 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::ConstIterator\n+190 PersistentContainerMap<_G,_IdSet,_Map_>::end () const\n+ 191 {\n+ 192 return ConstIterator( data_.end() );\n+ 193 }\n+ 194\n+ 195 template< class G, class IdSet, class Map >\n+ 196 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::Iterator\n+197 PersistentContainerMap<_G,_IdSet,_Map_>::end ()\n+ 198 {\n+ 199 return Iterator( data_.end() );\n+ 200 }\n+ 201\n+ 202\n+ 203 template< class G, class IdSet, class Map >\n+ 204 template< int codim >\n+ 205 inline void PersistentContainerMap<_G,_IdSet,_Map_>::resize ( const Value\n+&value )\n+ 206 {\n+ 207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim\n+>::v > hasEntityIterator;\n+ 208 assert( codim == codimension() );\n+ 209\n+ 210 // create empty map and swap it with current map (no need to copy twice)\n+ 211 Map data;\n+ 212 std::swap( data, data_ );\n+ 213\n+ 214 // copy all data from old map into new one (adding new entries, if\n+necessary)\n+ 215 const int maxLevel = grid().maxLevel();\n+ 216 for ( int level = 0; level <= maxLevel; ++level )\n+ 217 migrateLevel< codim >( level, value, data, hasEntityIterator );\n+ 218 }\n+ 219\n+ 220\n+ 221 template< class G, class IdSet, class Map >\n+ 222 template< int codim >\n+ 223 inline void PersistentContainerMap<_G,_IdSet,_Map_>\n+224::migrateLevel ( int level, const Value &value, Map &data,\n+ 225 std::integral_constant< bool, true > )\n+ 226 {\n+ 227 typedef typename Grid::LevelGridView LevelView;\n+ 228 typedef typename LevelView::template Codim< codim >::Iterator\n+LevelIterator;\n+ 229\n+ 230 const LevelView levelView = grid().levelGridView( level );\n+ 231 const LevelIterator end = levelView.template end< codim >();\n+ 232 for( LevelIterator it = levelView.template begin< codim >(); it != end;\n+++it )\n+ 233 migrateEntry( idSet().id( *it ), value, data, data_ );\n+ 234 }\n+ 235\n+ 236\n+ 237 template< class G, class IdSet, class Map >\n+ 238 template< int codim >\n+ 239 inline void PersistentContainerMap<_G,_IdSet,_Map_>\n+240::migrateLevel ( int level, const Value &value, Map &data,\n+ 241 std::integral_constant< bool, false > )\n+ 242 {\n+ 243 typedef typename Grid::LevelGridView LevelView;\n+ 244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator;\n+ 245\n+ 246 const LevelView levelView = grid().levelGridView( level );\n+ 247 const LevelIterator end = levelView.template end< 0 >();\n+ 248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it )\n+ 249 {\n+ 250 const typename LevelIterator::Entity &entity = *it;\n+ 251 const int subEntities = entity.subEntities( codim );\n+ 252 for( int i = 0; i < subEntities; ++i )\n+ 253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ );\n+ 254 }\n+ 255 }\n+ 256\n+ 257\n+ 258 template< class G, class IdSet, class Map >\n+ 259 inline void PersistentContainerMap<_G,_IdSet,_Map_>\n+260::migrateEntry ( const typename IdSet::IdType &id, const Value &value,\n+ 261 Map &oldData, Map &newData )\n+ 262 {\n+ 263 // insert entry for id\n+ 264 const std::pair< typename Map::iterator, bool > inserted\n+ 265 = newData.insert( std::make_pair( id, value ) );\n+ 266\n+ 267 // if entry did not exist previously, copy data\n+ 268 if( inserted.second )\n+ 269 {\n+ 270 const typename Map::iterator pos = oldData.find( id );\n+ 271 if( pos != oldData.end() )\n+ 272 {\n+ 273 inserted.first->second = pos->second;\n+ 274 oldData.erase( pos );\n+ 275 }\n+ 276 }\n+ 277 }\n+ 278\n+ 279} // namespace Dune\n+ 280\n+ 281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH\n+std::swap\n+void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n+> &b)\n+Definition: utility/persistentcontainer.hh:83\n+Dune\n+Include standard header files.\n+Definition: agrid.hh:60\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::Entity::codimension\n+static constexpr int codimension\n+Know your own codimension.\n+Definition: common/entity.hh:106\n+Dune::IdSet\n+Id Set Interface.\n+Definition: indexidset.hh:452\n+Dune::IdSet::IdType\n+IdTypeImp IdType\n+Type used to represent an id.\n+Definition: indexidset.hh:458\n+Dune::Grid::LevelGridView\n+GridFamily::Traits::LevelGridView LevelGridView\n+type of view for level grid\n+Definition: common/grid.hh:402\n+Dune::PersistentContainerMap\n+map-based implementation of the PersistentContainer\n+Definition: persistentcontainermap.hh:26\n+Dune::PersistentContainerMap::migrateLevel\n+void migrateLevel(int level, const Value &value, Map &data, std::\n+integral_constant< bool, false >)\n+Definition: persistentcontainermap.hh:240\n+Dune::PersistentContainerMap::swap\n+void swap(This &other)\n+Definition: persistentcontainermap.hh:97\n+Dune::PersistentContainerMap::fill\n+void fill(const Value &value)\n+Definition: persistentcontainermap.hh:95\n+Dune::PersistentContainerMap::Grid\n+G Grid\n+Definition: persistentcontainermap.hh:34\n+Dune::PersistentContainerMap::resize\n+void resize(const Value &value)\n+Dune::PersistentContainerMap::ConstIterator\n+IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator\n+Definition: persistentcontainermap.hh:39\n+Dune::PersistentContainerMap::codim_\n+int codim_\n+Definition: persistentcontainermap.hh:133\n+Dune::PersistentContainerMap::grid_\n+const Grid * grid_\n+Definition: persistentcontainermap.hh:132\n+Dune::PersistentContainerMap::operator[]\n+const Value & operator[](const Entity &entity) const\n+Definition: persistentcontainermap.hh:52\n+Dune::PersistentContainerMap::codimension\n+int codimension() const\n+Definition: persistentcontainermap.hh:111\n+Dune::PersistentContainerMap::resize\n+void resize(const Value &value=Value())\n+Definition: persistentcontainermap.hh:87\n+Dune::PersistentContainerMap::idSet\n+const IdSet & idSet() const\n+Definition: persistentcontainermap.hh:130\n+Dune::PersistentContainerMap::begin\n+ConstIterator begin() const\n+Definition: persistentcontainermap.hh:175\n+Dune::PersistentContainerMap::migrateEntry\n+static void migrateEntry(const typename IdSet::IdType &id, const Value &value,\n+Map &oldData, Map &newData)\n+Definition: persistentcontainermap.hh:260\n+Dune::PersistentContainerMap::Value\n+Map::mapped_type Value\n+Definition: persistentcontainermap.hh:36\n+Dune::PersistentContainerMap::end\n+Iterator end()\n+Definition: persistentcontainermap.hh:197\n+Dune::PersistentContainerMap::grid\n+const Grid & grid() const\n+Definition: persistentcontainermap.hh:114\n+Dune::PersistentContainerMap::operator()\n+const Value & operator()(const Entity &entity, int subEntity) const\n+Definition: persistentcontainermap.hh:70\n+Dune::PersistentContainerMap::PersistentContainerMap\n+PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const\n+Value &value)\n+Definition: persistentcontainermap.hh:42\n+Dune::PersistentContainerMap::begin\n+Iterator begin()\n+Definition: persistentcontainermap.hh:182\n+Dune::PersistentContainerMap::Size\n+Map::size_type Size\n+Definition: persistentcontainermap.hh:37\n+Dune::PersistentContainerMap::end\n+ConstIterator end() const\n+Definition: persistentcontainermap.hh:190\n+Dune::PersistentContainerMap::data_\n+Map data_\n+Definition: persistentcontainermap.hh:135\n+Dune::PersistentContainerMap::size\n+Size size() const\n+Definition: persistentcontainermap.hh:85\n+Dune::PersistentContainerMap::Iterator\n+IteratorWrapper< Value, typename Map::iterator > Iterator\n+Definition: persistentcontainermap.hh:40\n+Dune::PersistentContainerMap::idSet_\n+const IdSet * idSet_\n+Definition: persistentcontainermap.hh:134\n+Dune::PersistentContainerMap::migrateLevel\n+void migrateLevel(int level, const Value &value, Map &data, std::\n+integral_constant< bool, true >)\n+Definition: persistentcontainermap.hh:224\n+Dune::PersistentContainerMap::shrinkToFit\n+void shrinkToFit()\n+Definition: persistentcontainermap.hh:93\n+Dune::PersistentContainerMap::IteratorWrapper\n+Definition: persistentcontainermap.hh:147\n+Dune::PersistentContainerMap::IteratorWrapper::IteratorWrapper\n+IteratorWrapper(const iterator &it)\n+Definition: persistentcontainermap.hh:151\n+capabilities.hh\n+A set of traits classes to store static information about grid implementation.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01004.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01004.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainermap.hh File Reference\n+dune-grid: persistentcontainerinterface.hh File Reference\n \n \n \n \n \n \n \n@@ -65,33 +65,24 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    persistentcontainermap.hh File Reference
    \n+
    persistentcontainerinterface.hh File Reference
    \n
    \n
    \n-
    #include <algorithm>
    \n-#include <cassert>
    \n-#include <type_traits>
    \n-#include <utility>
    \n-#include <dune/common/hybridutilities.hh>
    \n-#include <dune/common/typetraits.hh>
    \n-#include <dune/grid/common/capabilities.hh>
    \n-
    \n+\n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::PersistentContainerMap< G, IdSet, Map >
     map-based implementation of the PersistentContainer More...
     
    class  Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >
    class  Dune::PersistentContainerInterface< G, T >
     Persistent storage of data on all entities of a grid. More...
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,29 +6,19 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-persistentcontainermap.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+persistentcontainerinterface.hh File Reference\n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::PersistentContainerMap<_G,_IdSet,_Map_>\n-\u00a0 map-based implementation of the PersistentContainer More...\n-\u00a0\n-class \u00a0Dune::PersistentContainerMap<_G,_IdSet,_Map_>::IteratorWrapper<_value,\n- iterator_>\n+class \u00a0Dune::PersistentContainerInterface<_G,_T_>\n+\u00a0 Persistent storage of data on all entities of a grid. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01004_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainermap.hh Source File\n+dune-grid: persistentcontainerinterface.hh Source File\n \n \n \n \n \n \n \n@@ -62,336 +62,122 @@\n \n
    \n \n
    \n \n
    \n-
    persistentcontainermap.hh
    \n+
    persistentcontainerinterface.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH
    \n-
    6#define DUNE_PERSISTENTCONTAINERMAP_HH
    \n+
    5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
    \n+
    6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH
    \n
    7
    \n-
    8#include <algorithm>
    \n-
    9#include <cassert>
    \n-
    10#include <type_traits>
    \n-
    11#include <utility>
    \n-
    12
    \n-
    13#include <dune/common/hybridutilities.hh>
    \n-
    14#include <dune/common/typetraits.hh>
    \n-\n-
    16
    \n-
    17namespace Dune
    \n-
    18{
    \n-
    19
    \n-
    20 // PersistentContainerMap
    \n-
    21 // ----------------------
    \n-
    22
    \n-
    24 template< class G, class IdSet, class Map >
    \n-\n-
    26 {
    \n-\n-
    28
    \n-
    29 protected:
    \n-
    30 template< class reference, class iterator >
    \n-
    31 class IteratorWrapper;
    \n-
    32
    \n-
    33 public:
    \n-
    34 typedef G Grid;
    \n-
    35
    \n-
    36 typedef typename Map::mapped_type Value;
    \n-
    37 typedef typename Map::size_type Size;
    \n-
    38
    \n-\n-\n-
    41
    \n-
    42 PersistentContainerMap ( const Grid &grid, int codim, const IdSet &idSet, const Value &value )
    \n-
    43 : grid_( &grid ),
    \n-
    44 codim_( codim ),
    \n-
    45 idSet_( &idSet ),
    \n-
    46 data_()
    \n-
    47 {
    \n-
    48 resize( value );
    \n-
    49 }
    \n-
    50
    \n-
    51 template< class Entity >
    \n-
    52 const Value &operator[] ( const Entity &entity ) const
    \n-
    53 {
    \n-
    54 assert( Entity::codimension == codimension() );
    \n-
    55 typename Map::const_iterator pos = data_.find( idSet().id( entity ) );
    \n-
    56 assert( pos != data_.end() );
    \n-
    57 return pos->second;
    \n-
    58 }
    \n+
    8#ifndef HEADERCHECK
    \n+
    9#error "This header exists for documentation purposes only and should never be included directly."
    \n+
    10#endif
    \n+
    11
    \n+
    12namespace Dune
    \n+
    13{
    \n+
    14
    \n+
    53 template< class G, class T >
    \n+\n+
    55 {
    \n+\n+
    57
    \n+
    58 struct ImplementationDefined;
    \n
    59
    \n-
    60 template< class Entity >
    \n-
    61 Value &operator[] ( const Entity &entity )
    \n-
    62 {
    \n-
    63 assert( Entity::codimension == codimension() );
    \n-
    64 typename Map::iterator pos = data_.find( idSet().id( entity ) );
    \n-
    65 assert( pos != data_.end() );
    \n-
    66 return pos->second;
    \n-
    67 }
    \n+
    60 public:
    \n+
    61 typedef G Grid;
    \n+
    62
    \n+
    63 typedef T Value;
    \n+
    64
    \n+
    65 typedef ImplementationDefined Size;
    \n+
    66 typedef ImplementationDefined ConstIterator;
    \n+
    67 typedef ImplementationDefined Iterator;
    \n
    68
    \n-
    69 template< class Entity >
    \n-
    70 const Value &operator() ( const Entity &entity, int subEntity ) const
    \n-
    71 {
    \n-
    72 typename Map::const_iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
    \n-
    73 assert( pos != data_.end() );
    \n-
    74 return pos->second;
    \n-
    75 }
    \n-
    76
    \n-
    77 template< class Entity >
    \n-
    78 Value &operator() ( const Entity &entity, int subEntity )
    \n-
    79 {
    \n-
    80 typename Map::iterator pos = data_.find( idSet().subId( entity, subEntity, codimension() ) );
    \n-
    81 assert( pos != data_.end() );
    \n-
    82 return pos->second;
    \n-
    83 }
    \n-
    84
    \n-
    85 Size size () const { return data_.size(); }
    \n+
    69 // construction
    \n+
    70
    \n+
    79 PersistentContainerInterface ( Grid &grid, int codim, const Value &value = Value() );
    \n+
    80
    \n+\n+
    83
    \n+
    85 const This &operator= ( const This &other );
    \n
    86
    \n-
    87 void resize ( const Value &value = Value() )
    \n-
    88 {
    \n-
    89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{},
    \n-
    90 [ & ]( auto i ){ if( int(i) == this->codimension() ) this->template resize< i >( value ); } );
    \n-
    91 }
    \n-
    92
    \n-
    93 void shrinkToFit () {}
    \n-
    94
    \n-
    95 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
    \n-
    96
    \n-
    97 void swap ( This &other )
    \n-
    98 {
    \n-
    99 std::swap( grid_, other.grid_ );
    \n-
    100 std::swap( codim_, other.codim_ );
    \n-
    101 std::swap( idSet_, other.idSet_ );
    \n-
    102 std::swap( data_, other.data_ );
    \n-
    103 }
    \n-
    104
    \n-\n-\n-
    107
    \n-\n-\n+
    87 // element access
    \n+
    88
    \n+
    93 template< class Entity >
    \n+
    94 const Value &operator[] ( const Entity &entity ) const;
    \n+
    95
    \n+
    100 template< class Entity >
    \n+
    101 Value &operator[] ( const Entity &entity );
    \n+
    102
    \n+
    108 template< class Entity >
    \n+
    109 const Value &operator() ( const Entity &entity, int subEntity ) const;
    \n
    110
    \n-
    111 int codimension () const { return codim_; }
    \n-
    112
    \n-
    113 protected:
    \n-
    114 const Grid &grid () const { return *grid_; }
    \n-
    115
    \n-
    116 template< int codim >
    \n-
    117 void resize ( const Value &value );
    \n+
    116 template< class Entity >
    \n+
    117 Value &operator() ( const Entity &entity, int subEntity );
    \n
    118
    \n-
    119 template< int codim >
    \n-
    120 void migrateLevel ( int level, const Value &value, Map &data,
    \n-
    121 std::integral_constant< bool, true > );
    \n-
    122
    \n-
    123 template< int codim >
    \n-
    124 void migrateLevel ( int level, const Value &value, Map &data,
    \n-
    125 std::integral_constant< bool, false > );
    \n-
    126
    \n-
    127 static void migrateEntry ( const typename IdSet::IdType &id, const Value &value,
    \n-
    128 Map &oldData, Map &newData );
    \n-
    129
    \n-
    130 const IdSet &idSet () const { return *idSet_; }
    \n-
    131
    \n-
    132 const Grid *grid_;
    \n-\n-
    134 const IdSet *idSet_;
    \n-
    135 Map data_;
    \n-
    136 };
    \n-
    137
    \n-
    138
    \n-
    139
    \n-
    140 // PersistentContainerMap::IteratorWrapper
    \n-
    141 // ---------------------------------------
    \n+
    119 // capacity
    \n+
    120
    \n+
    126 Size size () const;
    \n+
    127
    \n+
    141 void resize ( const Value &value = Value() );
    \n
    142
    \n-
    143 template< class G, class IdSet, class Map >
    \n-
    144 template< class value, class iterator >
    \n-\n-
    146 : public iterator
    \n-
    147 {
    \n-\n-
    149
    \n-
    150 public:
    \n-
    151 IteratorWrapper ( const iterator &it ) : it_( it ) {}
    \n-
    152
    \n-
    153 operator ConstWrapper () const { return ConstWrapper( it_ ); }
    \n-
    154
    \n-
    155 value &operator* () { return it_->second; }
    \n-
    156 value *operator-> () { return &(it_->second); }
    \n+
    156 void shrinkToFit ();
    \n
    157
    \n-
    158 bool operator== ( const IteratorWrapper &other ) const { return (it_ == other.it_); }
    \n-
    159 bool operator!= ( const IteratorWrapper &other ) const { return (it_ != other.it_); }
    \n-
    160
    \n-
    161 IteratorWrapper &operator++ () { ++it_; return *this; }
    \n-
    162
    \n-
    163 private:
    \n-
    164 iterator it_;
    \n-
    165 };
    \n+
    158 // modifiers
    \n+
    159
    \n+
    165 void fill ( const Value &value );
    \n
    166
    \n-
    167
    \n-
    168
    \n-
    169
    \n-
    170 // Implementation of PersistentContainerMap
    \n-
    171 // ----------------------------------------
    \n+
    171 void swap ( This &other );
    \n
    172
    \n-
    173 template< class G, class IdSet, class Map >
    \n-\n-\n-
    176 {
    \n-
    177 return ConstIterator( data_.begin() );
    \n-
    178 }
    \n-
    179
    \n-
    180 template< class G, class IdSet, class Map >
    \n-\n-\n-
    183 {
    \n-
    184 return Iterator( data_.begin() );
    \n-
    185 }
    \n-
    186
    \n+
    173 // iterators
    \n+
    174
    \n+\n+\n
    187
    \n-
    188 template< class G, class IdSet, class Map >
    \n-\n-\n-
    191 {
    \n-
    192 return ConstIterator( data_.end() );
    \n-
    193 }
    \n-
    194
    \n-
    195 template< class G, class IdSet, class Map >
    \n-\n-\n-
    198 {
    \n-
    199 return Iterator( data_.end() );
    \n-
    200 }
    \n-
    201
    \n+\n+\n+
    200
    \n+
    201 // information
    \n
    202
    \n-
    203 template< class G, class IdSet, class Map >
    \n-
    204 template< int codim >
    \n-
    205 inline void PersistentContainerMap< G, IdSet, Map >::resize ( const Value &value )
    \n-
    206 {
    \n-
    207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim >::v > hasEntityIterator;
    \n-
    208 assert( codim == codimension() );
    \n-
    209
    \n-
    210 // create empty map and swap it with current map (no need to copy twice)
    \n-
    211 Map data;
    \n-
    212 std::swap( data, data_ );
    \n-
    213
    \n-
    214 // copy all data from old map into new one (adding new entries, if necessary)
    \n-
    215 const int maxLevel = grid().maxLevel();
    \n-
    216 for ( int level = 0; level <= maxLevel; ++level )
    \n-
    217 migrateLevel< codim >( level, value, data, hasEntityIterator );
    \n-
    218 }
    \n-
    219
    \n-
    220
    \n-
    221 template< class G, class IdSet, class Map >
    \n-
    222 template< int codim >
    \n-\n-
    224 ::migrateLevel ( int level, const Value &value, Map &data,
    \n-
    225 std::integral_constant< bool, true > )
    \n-
    226 {
    \n-
    227 typedef typename Grid::LevelGridView LevelView;
    \n-
    228 typedef typename LevelView::template Codim< codim >::Iterator LevelIterator;
    \n-
    229
    \n-
    230 const LevelView levelView = grid().levelGridView( level );
    \n-
    231 const LevelIterator end = levelView.template end< codim >();
    \n-
    232 for( LevelIterator it = levelView.template begin< codim >(); it != end; ++it )
    \n-
    233 migrateEntry( idSet().id( *it ), value, data, data_ );
    \n-
    234 }
    \n-
    235
    \n-
    236
    \n-
    237 template< class G, class IdSet, class Map >
    \n-
    238 template< int codim >
    \n-\n-
    240 ::migrateLevel ( int level, const Value &value, Map &data,
    \n-
    241 std::integral_constant< bool, false > )
    \n-
    242 {
    \n-
    243 typedef typename Grid::LevelGridView LevelView;
    \n-
    244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator;
    \n-
    245
    \n-
    246 const LevelView levelView = grid().levelGridView( level );
    \n-
    247 const LevelIterator end = levelView.template end< 0 >();
    \n-
    248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it )
    \n-
    249 {
    \n-
    250 const typename LevelIterator::Entity &entity = *it;
    \n-
    251 const int subEntities = entity.subEntities( codim );
    \n-
    252 for( int i = 0; i < subEntities; ++i )
    \n-
    253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ );
    \n-
    254 }
    \n-
    255 }
    \n-
    256
    \n-
    257
    \n-
    258 template< class G, class IdSet, class Map >
    \n-\n-
    260 ::migrateEntry ( const typename IdSet::IdType &id, const Value &value,
    \n-
    261 Map &oldData, Map &newData )
    \n-
    262 {
    \n-
    263 // insert entry for id
    \n-
    264 const std::pair< typename Map::iterator, bool > inserted
    \n-
    265 = newData.insert( std::make_pair( id, value ) );
    \n-
    266
    \n-
    267 // if entry did not exist previously, copy data
    \n-
    268 if( inserted.second )
    \n-
    269 {
    \n-
    270 const typename Map::iterator pos = oldData.find( id );
    \n-
    271 if( pos != oldData.end() )
    \n-
    272 {
    \n-
    273 inserted.first->second = pos->second;
    \n-
    274 oldData.erase( pos );
    \n-
    275 }
    \n-
    276 }
    \n-
    277 }
    \n-
    278
    \n-
    279} // namespace Dune
    \n-
    280
    \n-
    281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH
    \n-
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n+
    204 int codimension () const;
    \n+
    205 };
    \n+
    206
    \n+
    207} // namespace Dune
    \n+
    208
    \n+
    209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    static constexpr int codimension
    Know your own codimension.
    Definition: common/entity.hh:106
    \n-
    Id Set Interface.
    Definition: indexidset.hh:452
    \n-
    IdTypeImp IdType
    Type used to represent an id.
    Definition: indexidset.hh:458
    \n-
    GridFamily::Traits::LevelGridView LevelGridView
    type of view for level grid
    Definition: common/grid.hh:402
    \n-
    map-based implementation of the PersistentContainer
    Definition: persistentcontainermap.hh:26
    \n-
    void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, false >)
    Definition: persistentcontainermap.hh:240
    \n-
    void swap(This &other)
    Definition: persistentcontainermap.hh:97
    \n-
    void fill(const Value &value)
    Definition: persistentcontainermap.hh:95
    \n-
    G Grid
    Definition: persistentcontainermap.hh:34
    \n-
    void resize(const Value &value)
    \n-
    IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator
    Definition: persistentcontainermap.hh:39
    \n-
    int codim_
    Definition: persistentcontainermap.hh:133
    \n-
    const Grid * grid_
    Definition: persistentcontainermap.hh:132
    \n-
    const Value & operator[](const Entity &entity) const
    Definition: persistentcontainermap.hh:52
    \n-
    int codimension() const
    Definition: persistentcontainermap.hh:111
    \n-
    void resize(const Value &value=Value())
    Definition: persistentcontainermap.hh:87
    \n-
    const IdSet & idSet() const
    Definition: persistentcontainermap.hh:130
    \n-
    ConstIterator begin() const
    Definition: persistentcontainermap.hh:175
    \n-
    static void migrateEntry(const typename IdSet::IdType &id, const Value &value, Map &oldData, Map &newData)
    Definition: persistentcontainermap.hh:260
    \n-
    Map::mapped_type Value
    Definition: persistentcontainermap.hh:36
    \n-
    Iterator end()
    Definition: persistentcontainermap.hh:197
    \n-
    const Grid & grid() const
    Definition: persistentcontainermap.hh:114
    \n-
    const Value & operator()(const Entity &entity, int subEntity) const
    Definition: persistentcontainermap.hh:70
    \n-
    PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const Value &value)
    Definition: persistentcontainermap.hh:42
    \n-
    Iterator begin()
    Definition: persistentcontainermap.hh:182
    \n-
    Map::size_type Size
    Definition: persistentcontainermap.hh:37
    \n-
    ConstIterator end() const
    Definition: persistentcontainermap.hh:190
    \n-
    Map data_
    Definition: persistentcontainermap.hh:135
    \n-
    Size size() const
    Definition: persistentcontainermap.hh:85
    \n-
    IteratorWrapper< Value, typename Map::iterator > Iterator
    Definition: persistentcontainermap.hh:40
    \n-
    const IdSet * idSet_
    Definition: persistentcontainermap.hh:134
    \n-
    void migrateLevel(int level, const Value &value, Map &data, std::integral_constant< bool, true >)
    Definition: persistentcontainermap.hh:224
    \n-
    void shrinkToFit()
    Definition: persistentcontainermap.hh:93
    \n-
    Definition: persistentcontainermap.hh:147
    \n-
    IteratorWrapper(const iterator &it)
    Definition: persistentcontainermap.hh:151
    \n-
    A set of traits classes to store static information about grid implementation.
    \n+
    Persistent storage of data on all entities of a grid.
    Definition: persistentcontainerinterface.hh:55
    \n+
    ImplementationDefined Size
    Definition: persistentcontainerinterface.hh:65
    \n+
    PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value())
    constuctor
    \n+
    const Value & operator[](const Entity &entity) const
    access the data associated with an entity
    \n+
    T Value
    Definition: persistentcontainerinterface.hh:63
    \n+
    Size size() const
    number of entries in the container
    \n+
    ImplementationDefined Iterator
    Definition: persistentcontainerinterface.hh:67
    \n+
    PersistentContainerInterface(const This &other)
    copy constructor
    \n+
    ImplementationDefined ConstIterator
    Definition: persistentcontainerinterface.hh:66
    \n+
    ConstIterator end() const
    returns an iterator pointing to the last element of the container
    \n+
    ConstIterator begin() const
    returns an iterator pointing to the first element of the container
    \n+
    Iterator begin()
    returns an iterator pointing to the first element of the container
    \n+
    Iterator end()
    returns an iterator pointing to the last element of the container
    \n+
    void shrinkToFit()
    remove unnecessary entries from container
    \n+
    int codimension() const
    return the codimension, the container attaches data to
    \n+
    G Grid
    Definition: persistentcontainerinterface.hh:61
    \n+
    void swap(This &other)
    exchange the content of the container with another one
    \n+
    void resize(const Value &value=Value())
    reserve memory for all entities in the grid
    \n+
    void fill(const Value &value)
    set all accessible entries to a given value
    \n+
    const Value & operator()(const Entity &entity, int subEntity) const
    access the data associated with a subentity
    \n+
    const This & operator=(const This &other)
    assignment operator
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,429 +5,166 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-persistentcontainermap.hh\n+persistentcontainerinterface.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_PERSISTENTCONTAINERMAP_HH\n- 6#define DUNE_PERSISTENTCONTAINERMAP_HH\n+ 5#ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH\n+ 6#define DUNE_PERSISTENTCONTAINERINTERFACE_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12\n- 13#include \n- 14#include \n- 15#include \n- 16\n- 17namespace Dune\n- 18{\n- 19\n- 20 // PersistentContainerMap\n- 21 // ----------------------\n- 22\n- 24 template< class G, class IdSet, class Map >\n-25 class PersistentContainerMap\n- 26 {\n- 27 typedef PersistentContainerMap<_G,_IdSet,_Map_> This;\n- 28\n- 29 protected:\n- 30 template< class reference, class iterator >\n- 31 class IteratorWrapper;\n- 32\n- 33 public:\n-34 typedef G Grid;\n- 35\n-36 typedef typename Map::mapped_type Value;\n-37 typedef typename Map::size_type Size;\n- 38\n-39 typedef IteratorWrapper<_const_Value,_typename_Map::const_iterator_>\n-ConstIterator;\n-40 typedef IteratorWrapper<_Value,_typename_Map::iterator_> Iterator;\n- 41\n-42 PersistentContainerMap ( const Grid &grid, int codim, const IdSet &idSet,\n-const Value &value )\n- 43 : grid_( &grid ),\n- 44 codim_( codim ),\n- 45 idSet_( &idSet ),\n- 46 data_()\n- 47 {\n- 48 resize( value );\n- 49 }\n- 50\n- 51 template< class Entity >\n-52 const Value &operator[]( const Entity &entity ) const\n- 53 {\n- 54 assert( Entity::codimension == codimension() );\n- 55 typename Map::const_iterator pos = data_.find( idSet().id( entity ) );\n- 56 assert( pos != data_.end() );\n- 57 return pos->second;\n- 58 }\n+ 8#ifndef HEADERCHECK\n+ 9#error \"This header exists for documentation purposes only and should never\n+be included directly.\"\n+ 10#endif\n+ 11\n+ 12namespace Dune\n+ 13{\n+ 14\n+ 53 template< class G, class T >\n+54 class PersistentContainerInterface\n+ 55 {\n+ 56 typedef PersistentContainerInterface<_G,_T_> This;\n+ 57\n+ 58 struct ImplementationDefined;\n 59\n- 60 template< class Entity >\n-61 Value &operator[]( const Entity &entity )\n- 62 {\n- 63 assert( Entity::codimension == codimension() );\n- 64 typename Map::iterator pos = data_.find( idSet().id( entity ) );\n- 65 assert( pos != data_.end() );\n- 66 return pos->second;\n- 67 }\n+ 60 public:\n+61 typedef G Grid;\n+ 62\n+63 typedef T Value;\n+ 64\n+65 typedef ImplementationDefined Size;\n+66 typedef ImplementationDefined ConstIterator;\n+67 typedef ImplementationDefined Iterator;\n 68\n- 69 template< class Entity >\n-70 const Value &operator()( const Entity &entity, int subEntity ) const\n- 71 {\n- 72 typename Map::const_iterator pos = data_.find( idSet().subId( entity,\n-subEntity, codimension() ) );\n- 73 assert( pos != data_.end() );\n- 74 return pos->second;\n- 75 }\n- 76\n- 77 template< class Entity >\n-78 Value &operator()( const Entity &entity, int subEntity )\n- 79 {\n- 80 typename Map::iterator pos = data_.find( idSet().subId( entity, subEntity,\n-codimension() ) );\n- 81 assert( pos != data_.end() );\n- 82 return pos->second;\n- 83 }\n- 84\n-85 Size size () const { return data_.size(); }\n+ 69 // construction\n+ 70\n+79 PersistentContainerInterface ( Grid &grid, int codim, const Value &value =\n+Value() );\n+ 80\n+82 PersistentContainerInterface ( const This &other );\n+ 83\n+85 const This &operator=( const This &other );\n 86\n-87 void resize ( const Value &value = Value() )\n- 88 {\n- 89 Hybrid::forEach( std::make_index_sequence< Grid::dimension+1 >{},\n- 90 [ & ]( auto i ){ if( int(i) == this->codimension() ) this->template resize<\n-i >( value ); } );\n- 91 }\n- 92\n-93 void shrinkToFit () {}\n- 94\n-95 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }\n- 96\n-97 void swap ( This &other )\n- 98 {\n- 99 std::swap( grid_, other.grid_ );\n- 100 std::swap( codim_, other.codim_ );\n- 101 std::swap( idSet_, other.idSet_ );\n- 102 std::swap( data_, other.data_ );\n- 103 }\n- 104\n-105 ConstIterator begin () const;\n-106 Iterator begin ();\n- 107\n-108 ConstIterator end () const;\n-109 Iterator end ();\n+ 87 // element access\n+ 88\n+ 93 template< class Entity >\n+94 const Value &operator[]( const Entity &entity ) const;\n+ 95\n+ 100 template< class Entity >\n+101 Value &operator[]( const Entity &entity );\n+ 102\n+ 108 template< class Entity >\n+109 const Value &operator()( const Entity &entity, int subEntity ) const;\n 110\n-111 int codimension () const { return codim_; }\n- 112\n- 113 protected:\n-114 const Grid &grid () const { return *grid_; }\n- 115\n- 116 template< int codim >\n-117 void resize ( const Value &value );\n+ 116 template< class Entity >\n+117 Value &operator()( const Entity &entity, int subEntity );\n 118\n- 119 template< int codim >\n-120 void migrateLevel ( int level, const Value &value, Map &data,\n- 121 std::integral_constant< bool, true > );\n- 122\n- 123 template< int codim >\n-124 void migrateLevel ( int level, const Value &value, Map &data,\n- 125 std::integral_constant< bool, false > );\n- 126\n-127 static void migrateEntry ( const typename IdSet::IdType &id, const Value\n-&value,\n- 128 Map &oldData, Map &newData );\n- 129\n-130 const IdSet &idSet () const { return *idSet_; }\n- 131\n-132 const Grid *grid_;\n-133 int codim_;\n-134 const IdSet *idSet_;\n-135 Map data_;\n- 136 };\n- 137\n- 138\n- 139\n- 140 // PersistentContainerMap::IteratorWrapper\n- 141 // ---------------------------------------\n+ 119 // capacity\n+ 120\n+126 Size size () const;\n+ 127\n+141 void resize ( const Value &value = Value() );\n 142\n- 143 template< class G, class IdSet, class Map >\n- 144 template< class value, class iterator >\n-145 class PersistentContainerMap<_G,_IdSet,_Map_>::IteratorWrapper\n- 146 : public iterator\n- 147 {\n- 148 typedef IteratorWrapper<_const_value,_typename_Map::const_iterator_>\n-ConstWrapper;\n- 149\n- 150 public:\n-151 IteratorWrapper ( const iterator &it ) : it_( it ) {}\n- 152\n-153 operator ConstWrapper () const { return ConstWrapper( it_ ); }\n- 154\n-155 value &operator* () { return it_->second; }\n-156 value *operator-> () { return &(it_->second); }\n+156 void shrinkToFit ();\n 157\n-158 bool operator== ( const IteratorWrapper &other ) const { return (it_ ==\n-other.it_); }\n-159 bool operator!= ( const IteratorWrapper &other ) const { return (it_ !=\n-other.it_); }\n- 160\n-161 IteratorWrapper &operator++ () { ++it_; return *this; }\n- 162\n- 163 private:\n- 164 iterator it_;\n- 165 };\n+ 158 // modifiers\n+ 159\n+165 void fill ( const Value &value );\n 166\n- 167\n- 168\n- 169\n- 170 // Implementation of PersistentContainerMap\n- 171 // ----------------------------------------\n+171 void swap ( This &other );\n 172\n- 173 template< class G, class IdSet, class Map >\n- 174 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::ConstIterator\n-175 PersistentContainerMap<_G,_IdSet,_Map_>::begin () const\n- 176 {\n- 177 return ConstIterator( data_.begin() );\n- 178 }\n- 179\n- 180 template< class G, class IdSet, class Map >\n- 181 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::Iterator\n-182 PersistentContainerMap<_G,_IdSet,_Map_>::begin ()\n- 183 {\n- 184 return Iterator( data_.begin() );\n- 185 }\n- 186\n+ 173 // iterators\n+ 174\n+180 ConstIterator begin () const;\n+186 Iterator begin ();\n 187\n- 188 template< class G, class IdSet, class Map >\n- 189 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::ConstIterator\n-190 PersistentContainerMap<_G,_IdSet,_Map_>::end () const\n- 191 {\n- 192 return ConstIterator( data_.end() );\n- 193 }\n- 194\n- 195 template< class G, class IdSet, class Map >\n- 196 inline typename PersistentContainerMap<_G,_IdSet,_Map_>::Iterator\n-197 PersistentContainerMap<_G,_IdSet,_Map_>::end ()\n- 198 {\n- 199 return Iterator( data_.end() );\n- 200 }\n- 201\n+193 ConstIterator end () const;\n+199 Iterator end ();\n+ 200\n+ 201 // information\n 202\n- 203 template< class G, class IdSet, class Map >\n- 204 template< int codim >\n- 205 inline void PersistentContainerMap<_G,_IdSet,_Map_>::resize ( const Value\n-&value )\n- 206 {\n- 207 std::integral_constant< bool, Capabilities::hasEntityIterator< Grid, codim\n->::v > hasEntityIterator;\n- 208 assert( codim == codimension() );\n- 209\n- 210 // create empty map and swap it with current map (no need to copy twice)\n- 211 Map data;\n- 212 std::swap( data, data_ );\n- 213\n- 214 // copy all data from old map into new one (adding new entries, if\n-necessary)\n- 215 const int maxLevel = grid().maxLevel();\n- 216 for ( int level = 0; level <= maxLevel; ++level )\n- 217 migrateLevel< codim >( level, value, data, hasEntityIterator );\n- 218 }\n- 219\n- 220\n- 221 template< class G, class IdSet, class Map >\n- 222 template< int codim >\n- 223 inline void PersistentContainerMap<_G,_IdSet,_Map_>\n-224::migrateLevel ( int level, const Value &value, Map &data,\n- 225 std::integral_constant< bool, true > )\n- 226 {\n- 227 typedef typename Grid::LevelGridView LevelView;\n- 228 typedef typename LevelView::template Codim< codim >::Iterator\n-LevelIterator;\n- 229\n- 230 const LevelView levelView = grid().levelGridView( level );\n- 231 const LevelIterator end = levelView.template end< codim >();\n- 232 for( LevelIterator it = levelView.template begin< codim >(); it != end;\n-++it )\n- 233 migrateEntry( idSet().id( *it ), value, data, data_ );\n- 234 }\n- 235\n- 236\n- 237 template< class G, class IdSet, class Map >\n- 238 template< int codim >\n- 239 inline void PersistentContainerMap<_G,_IdSet,_Map_>\n-240::migrateLevel ( int level, const Value &value, Map &data,\n- 241 std::integral_constant< bool, false > )\n- 242 {\n- 243 typedef typename Grid::LevelGridView LevelView;\n- 244 typedef typename LevelView::template Codim< 0 >::Iterator LevelIterator;\n- 245\n- 246 const LevelView levelView = grid().levelGridView( level );\n- 247 const LevelIterator end = levelView.template end< 0 >();\n- 248 for( LevelIterator it = levelView.template begin< 0 >(); it != end; ++it )\n- 249 {\n- 250 const typename LevelIterator::Entity &entity = *it;\n- 251 const int subEntities = entity.subEntities( codim );\n- 252 for( int i = 0; i < subEntities; ++i )\n- 253 migrateEntry( idSet().subId( entity, i, codim ), value, data, data_ );\n- 254 }\n- 255 }\n- 256\n- 257\n- 258 template< class G, class IdSet, class Map >\n- 259 inline void PersistentContainerMap<_G,_IdSet,_Map_>\n-260::migrateEntry ( const typename IdSet::IdType &id, const Value &value,\n- 261 Map &oldData, Map &newData )\n- 262 {\n- 263 // insert entry for id\n- 264 const std::pair< typename Map::iterator, bool > inserted\n- 265 = newData.insert( std::make_pair( id, value ) );\n- 266\n- 267 // if entry did not exist previously, copy data\n- 268 if( inserted.second )\n- 269 {\n- 270 const typename Map::iterator pos = oldData.find( id );\n- 271 if( pos != oldData.end() )\n- 272 {\n- 273 inserted.first->second = pos->second;\n- 274 oldData.erase( pos );\n- 275 }\n- 276 }\n- 277 }\n- 278\n- 279} // namespace Dune\n- 280\n- 281#endif // #ifndef DUNE_PERSISTENTCONTAINERMAP_HH\n-std::swap\n-void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n-> &b)\n-Definition: utility/persistentcontainer.hh:83\n+204 int codimension () const;\n+ 205 };\n+ 206\n+ 207} // namespace Dune\n+ 208\n+ 209#endif // #ifndef DUNE_PERSISTENTCONTAINERINTERFACE_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::Entity\n Wrapper class for entities.\n Definition: common/entity.hh:66\n-Dune::Entity::codimension\n-static constexpr int codimension\n-Know your own codimension.\n-Definition: common/entity.hh:106\n-Dune::IdSet\n-Id Set Interface.\n-Definition: indexidset.hh:452\n-Dune::IdSet::IdType\n-IdTypeImp IdType\n-Type used to represent an id.\n-Definition: indexidset.hh:458\n-Dune::Grid::LevelGridView\n-GridFamily::Traits::LevelGridView LevelGridView\n-type of view for level grid\n-Definition: common/grid.hh:402\n-Dune::PersistentContainerMap\n-map-based implementation of the PersistentContainer\n-Definition: persistentcontainermap.hh:26\n-Dune::PersistentContainerMap::migrateLevel\n-void migrateLevel(int level, const Value &value, Map &data, std::\n-integral_constant< bool, false >)\n-Definition: persistentcontainermap.hh:240\n-Dune::PersistentContainerMap::swap\n-void swap(This &other)\n-Definition: persistentcontainermap.hh:97\n-Dune::PersistentContainerMap::fill\n-void fill(const Value &value)\n-Definition: persistentcontainermap.hh:95\n-Dune::PersistentContainerMap::Grid\n-G Grid\n-Definition: persistentcontainermap.hh:34\n-Dune::PersistentContainerMap::resize\n-void resize(const Value &value)\n-Dune::PersistentContainerMap::ConstIterator\n-IteratorWrapper< const Value, typename Map::const_iterator > ConstIterator\n-Definition: persistentcontainermap.hh:39\n-Dune::PersistentContainerMap::codim_\n-int codim_\n-Definition: persistentcontainermap.hh:133\n-Dune::PersistentContainerMap::grid_\n-const Grid * grid_\n-Definition: persistentcontainermap.hh:132\n-Dune::PersistentContainerMap::operator[]\n+Dune::PersistentContainerInterface\n+Persistent storage of data on all entities of a grid.\n+Definition: persistentcontainerinterface.hh:55\n+Dune::PersistentContainerInterface::Size\n+ImplementationDefined Size\n+Definition: persistentcontainerinterface.hh:65\n+Dune::PersistentContainerInterface::PersistentContainerInterface\n+PersistentContainerInterface(Grid &grid, int codim, const Value &value=Value())\n+constuctor\n+Dune::PersistentContainerInterface::operator[]\n const Value & operator[](const Entity &entity) const\n-Definition: persistentcontainermap.hh:52\n-Dune::PersistentContainerMap::codimension\n-int codimension() const\n-Definition: persistentcontainermap.hh:111\n-Dune::PersistentContainerMap::resize\n-void resize(const Value &value=Value())\n-Definition: persistentcontainermap.hh:87\n-Dune::PersistentContainerMap::idSet\n-const IdSet & idSet() const\n-Definition: persistentcontainermap.hh:130\n-Dune::PersistentContainerMap::begin\n+access the data associated with an entity\n+Dune::PersistentContainerInterface::Value\n+T Value\n+Definition: persistentcontainerinterface.hh:63\n+Dune::PersistentContainerInterface::size\n+Size size() const\n+number of entries in the container\n+Dune::PersistentContainerInterface::Iterator\n+ImplementationDefined Iterator\n+Definition: persistentcontainerinterface.hh:67\n+Dune::PersistentContainerInterface::PersistentContainerInterface\n+PersistentContainerInterface(const This &other)\n+copy constructor\n+Dune::PersistentContainerInterface::ConstIterator\n+ImplementationDefined ConstIterator\n+Definition: persistentcontainerinterface.hh:66\n+Dune::PersistentContainerInterface::end\n+ConstIterator end() const\n+returns an iterator pointing to the last element of the container\n+Dune::PersistentContainerInterface::begin\n ConstIterator begin() const\n-Definition: persistentcontainermap.hh:175\n-Dune::PersistentContainerMap::migrateEntry\n-static void migrateEntry(const typename IdSet::IdType &id, const Value &value,\n-Map &oldData, Map &newData)\n-Definition: persistentcontainermap.hh:260\n-Dune::PersistentContainerMap::Value\n-Map::mapped_type Value\n-Definition: persistentcontainermap.hh:36\n-Dune::PersistentContainerMap::end\n-Iterator end()\n-Definition: persistentcontainermap.hh:197\n-Dune::PersistentContainerMap::grid\n-const Grid & grid() const\n-Definition: persistentcontainermap.hh:114\n-Dune::PersistentContainerMap::operator()\n-const Value & operator()(const Entity &entity, int subEntity) const\n-Definition: persistentcontainermap.hh:70\n-Dune::PersistentContainerMap::PersistentContainerMap\n-PersistentContainerMap(const Grid &grid, int codim, const IdSet &idSet, const\n-Value &value)\n-Definition: persistentcontainermap.hh:42\n-Dune::PersistentContainerMap::begin\n+returns an iterator pointing to the first element of the container\n+Dune::PersistentContainerInterface::begin\n Iterator begin()\n-Definition: persistentcontainermap.hh:182\n-Dune::PersistentContainerMap::Size\n-Map::size_type Size\n-Definition: persistentcontainermap.hh:37\n-Dune::PersistentContainerMap::end\n-ConstIterator end() const\n-Definition: persistentcontainermap.hh:190\n-Dune::PersistentContainerMap::data_\n-Map data_\n-Definition: persistentcontainermap.hh:135\n-Dune::PersistentContainerMap::size\n-Size size() const\n-Definition: persistentcontainermap.hh:85\n-Dune::PersistentContainerMap::Iterator\n-IteratorWrapper< Value, typename Map::iterator > Iterator\n-Definition: persistentcontainermap.hh:40\n-Dune::PersistentContainerMap::idSet_\n-const IdSet * idSet_\n-Definition: persistentcontainermap.hh:134\n-Dune::PersistentContainerMap::migrateLevel\n-void migrateLevel(int level, const Value &value, Map &data, std::\n-integral_constant< bool, true >)\n-Definition: persistentcontainermap.hh:224\n-Dune::PersistentContainerMap::shrinkToFit\n+returns an iterator pointing to the first element of the container\n+Dune::PersistentContainerInterface::end\n+Iterator end()\n+returns an iterator pointing to the last element of the container\n+Dune::PersistentContainerInterface::shrinkToFit\n void shrinkToFit()\n-Definition: persistentcontainermap.hh:93\n-Dune::PersistentContainerMap::IteratorWrapper\n-Definition: persistentcontainermap.hh:147\n-Dune::PersistentContainerMap::IteratorWrapper::IteratorWrapper\n-IteratorWrapper(const iterator &it)\n-Definition: persistentcontainermap.hh:151\n-capabilities.hh\n-A set of traits classes to store static information about grid implementation.\n+remove unnecessary entries from container\n+Dune::PersistentContainerInterface::codimension\n+int codimension() const\n+return the codimension, the container attaches data to\n+Dune::PersistentContainerInterface::Grid\n+G Grid\n+Definition: persistentcontainerinterface.hh:61\n+Dune::PersistentContainerInterface::swap\n+void swap(This &other)\n+exchange the content of the container with another one\n+Dune::PersistentContainerInterface::resize\n+void resize(const Value &value=Value())\n+reserve memory for all entities in the grid\n+Dune::PersistentContainerInterface::fill\n+void fill(const Value &value)\n+set all accessible entries to a given value\n+Dune::PersistentContainerInterface::operator()\n+const Value & operator()(const Entity &entity, int subEntity) const\n+access the data associated with a subentity\n+Dune::PersistentContainerInterface::operator=\n+const This & operator=(const This &other)\n+assignment operator\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01007.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01007.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entitycommhelper.hh File Reference\n+dune-grid: hierarchicsearch.hh File Reference\n \n \n \n \n \n \n \n@@ -65,40 +65,46 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    entitycommhelper.hh File Reference
    \n+
    hierarchicsearch.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid/common/gridenums.hh>
    \n+\n+

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

    \n+
    #include <cstddef>
    \n+#include <sstream>
    \n+#include <string>
    \n+#include <utility>
    \n+#include <dune/common/classname.hh>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n \n

    \n Classes

    struct  Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface >
     
    struct  Dune::EntityCommHelper< InteriorBorder_All_Interface >
     
    struct  Dune::EntityCommHelper< Overlap_OverlapFront_Interface >
     
    struct  Dune::EntityCommHelper< Overlap_All_Interface >
     
    struct  Dune::EntityCommHelper< All_All_Interface >
    class  Dune::HierarchicSearch< Grid, IS >
     Search an IndexSet for an Entity containing a given point. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

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

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,28 +6,34 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-entitycommhelper.hh File Reference\n+hierarchicsearch.hh File Reference\n+Utility class for hierarchically searching for an Entity containing a given\n+point. More...\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::EntityCommHelper<_InteriorBorder_InteriorBorder_Interface_>\n-\u00a0\n-struct \u00a0Dune::EntityCommHelper<_InteriorBorder_All_Interface_>\n-\u00a0\n-struct \u00a0Dune::EntityCommHelper<_Overlap_OverlapFront_Interface_>\n-\u00a0\n-struct \u00a0Dune::EntityCommHelper<_Overlap_All_Interface_>\n-\u00a0\n-struct \u00a0Dune::EntityCommHelper<_All_All_Interface_>\n+class \u00a0Dune::HierarchicSearch<_Grid,_IS_>\n+\u00a0 Search an IndexSet for an Entity containing a given point. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+***** Detailed Description *****\n+Utility class for hierarchically searching for an Entity containing a given\n+point.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01007_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: entitycommhelper.hh Source File\n+dune-grid: hierarchicsearch.hh Source File\n \n \n \n \n \n \n \n@@ -62,139 +62,176 @@\n \n
    \n \n
    \n \n
    \n-
    entitycommhelper.hh
    \n+
    hierarchicsearch.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ENTITYCOMMHELPER_HH
    \n-
    6#define DUNE_ENTITYCOMMHELPER_HH
    \n-
    7
    \n-\n-
    9
    \n-
    10namespace Dune
    \n-
    11{
    \n-
    12
    \n-
    13 template< InterfaceType iftype >
    \n-\n-
    15
    \n-
    16
    \n-
    17 template<>
    \n-\n-
    19 {
    \n-
    20 static bool send ( const PartitionType p )
    \n-
    21 {
    \n-
    22 //return (p == InteriorEntity) || (p == BorderEntity);
    \n-
    23 return (p == BorderEntity);
    \n-
    24 }
    \n-
    25
    \n-
    26 static bool receive ( const PartitionType p )
    \n-
    27 {
    \n-
    28 //return (p == InteriorEntity) || (p == BorderEntity);
    \n-
    29 return (p == BorderEntity);
    \n-
    30 }
    \n-
    31 };
    \n-
    32
    \n-
    33
    \n-
    34 template<>
    \n-\n-
    36 {
    \n-
    37 static bool send ( const PartitionType p )
    \n-
    38 {
    \n-
    39 return (p == InteriorEntity) || (p == BorderEntity);
    \n-
    40 }
    \n+
    5
    \n+
    6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH
    \n+
    7#define DUNE_GRID_HIERARCHICSEARCH_HH
    \n+
    8
    \n+
    15#include <cstddef>
    \n+
    16#include <sstream>
    \n+
    17#include <string>
    \n+
    18#include <utility>
    \n+
    19
    \n+
    20#include <dune/common/classname.hh>
    \n+
    21#include <dune/common/exceptions.hh>
    \n+
    22#include <dune/common/fvector.hh>
    \n+
    23
    \n+\n+\n+
    26
    \n+
    27namespace Dune
    \n+
    28{
    \n+
    29
    \n+
    33 template<class Grid, class IS>
    \n+\n+
    35 {
    \n+
    37 constexpr static int dim = Grid::dimension;
    \n+
    38
    \n+
    40 constexpr static int dimw = Grid::dimensionworld;
    \n
    41
    \n-
    42 static bool receive ( const PartitionType p )
    \n-
    43 {
    \n-
    44 //return true;
    \n-
    45 return (p != InteriorEntity);
    \n-
    46 }
    \n-
    47 };
    \n-
    48
    \n-
    49
    \n-
    50 template<>
    \n-\n-
    52 {
    \n-
    53 static bool send ( const PartitionType p )
    \n-
    54 {
    \n-
    55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
    \n-
    56 return (p != FrontEntity) && (p != GhostEntity);
    \n-
    57 }
    \n-
    58
    \n-
    59 static bool receive ( const PartitionType p )
    \n-
    60 {
    \n-
    61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
    \n-
    62 return (p != GhostEntity);
    \n-
    63 }
    \n-
    64 };
    \n-
    65
    \n-
    66
    \n-
    67 template<>
    \n-\n-
    69 {
    \n-
    70 static bool send ( const PartitionType p )
    \n-
    71 {
    \n-
    72 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
    \n-
    73 return (p != FrontEntity) && (p != GhostEntity);
    \n-
    74 }
    \n-
    75
    \n-
    76 static bool receive ([[maybe_unused]] const PartitionType p)
    \n-
    77 {
    \n-
    78 return true;
    \n-
    79 }
    \n-
    80 };
    \n+
    43 typedef typename Grid::ctype ct;
    \n+
    44
    \n+
    46 typedef typename Grid::template Codim<0>::Entity Entity;
    \n+
    47
    \n+
    49 typedef typename Grid::HierarchicIterator HierarchicIterator;
    \n+
    50
    \n+
    51 static std::string formatEntityInformation ( const Entity &e ) {
    \n+
    52 const typename Entity::Geometry &geo = e.geometry();
    \n+
    53 std::ostringstream info;
    \n+
    54 info << "level=" << e.level() << " "
    \n+
    55 << "partition=" << e.partitionType() << " "
    \n+
    56 << "center=(" << geo.center() << ") "
    \n+
    57 << "corners=[(" << geo.corner(0) << ")";
    \n+
    58 for(int i = 1; i < geo.corners(); ++i)
    \n+
    59 info << " (" << e.geometry().corner(i) << ")";
    \n+
    60 info << "]";
    \n+
    61 return info.str();
    \n+
    62 }
    \n+
    63
    \n+
    74 Entity hFindEntity ( const Entity &entity,
    \n+
    75 const FieldVector<ct,dimw>& global) const
    \n+
    76 {
    \n+
    77 // type of element geometry
    \n+
    78 typedef typename Entity::Geometry Geometry;
    \n+
    79 // type of local coordinate
    \n+
    80 typedef typename Geometry::LocalCoordinate LocalCoordinate;
    \n
    81
    \n-
    82
    \n-
    83 template<>
    \n-\n-
    85 {
    \n-
    86 static bool send ([[maybe_unused]] const PartitionType p)
    \n-
    87 {
    \n-
    88 return true;
    \n-
    89 }
    \n-
    90
    \n-
    91 static bool receive ([[maybe_unused]] const PartitionType p)
    \n-
    92 {
    \n-
    93 return true;
    \n-
    94 }
    \n-
    95 };
    \n-
    96
    \n-
    97} // namespace Dune
    \n-
    98
    \n-
    99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH
    \n-\n-
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n-
    @ FrontEntity
    on boundary between overlap and ghost
    Definition: gridenums.hh:34
    \n-
    @ InteriorEntity
    all interior entities
    Definition: gridenums.hh:31
    \n-
    @ GhostEntity
    ghost entities
    Definition: gridenums.hh:35
    \n-
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n-
    @ InteriorBorder_All_Interface
    send interior and border, receive all entities
    Definition: gridenums.hh:88
    \n-
    @ All_All_Interface
    send all and receive all entities
    Definition: gridenums.hh:91
    \n-
    @ Overlap_All_Interface
    send overlap, receive all entities
    Definition: gridenums.hh:90
    \n-
    @ Overlap_OverlapFront_Interface
    send overlap, receive overlap and front entities
    Definition: gridenums.hh:89
    \n-
    @ InteriorBorder_InteriorBorder_Interface
    send/receive interior and border entities
    Definition: gridenums.hh:87
    \n+
    82 const int childLevel = entity.level()+1 ;
    \n+
    83 // loop over all child Entities
    \n+
    84 const HierarchicIterator end = entity.hend( childLevel );
    \n+
    85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it )
    \n+
    86 {
    \n+
    87 Entity child = *it;
    \n+
    88 Geometry geo = child.geometry();
    \n+
    89
    \n+
    90 LocalCoordinate local = geo.local(global);
    \n+
    91 if (referenceElement( geo ).checkInside(local))
    \n+
    92 {
    \n+
    93 // return if we found the leaf, else search through the child entites
    \n+
    94 if( indexSet_.contains( child ) )
    \n+
    95 return child;
    \n+
    96 else
    \n+
    97 return hFindEntity( child, global );
    \n+
    98 }
    \n+
    99 }
    \n+
    100 std::ostringstream children;
    \n+
    101 HierarchicIterator it = entity.hbegin( childLevel );
    \n+
    102 if(it != end) {
    \n+
    103 children << "{" << formatEntityInformation(*it) << "}";
    \n+
    104 for( ++it; it != end; ++it )
    \n+
    105 children << " {" << formatEntityInformation(*it) << "}";
    \n+
    106 }
    \n+
    107 DUNE_THROW(Exception, "{" << className(*this) << "} Unexpected "
    \n+
    108 "internal Error: none of the children of the entity "
    \n+
    109 "{" << formatEntityInformation(entity) << "} contains "
    \n+
    110 "coordinate (" << global << "). Children are: "
    \n+
    111 "[" << children.str() << "].");
    \n+
    112 }
    \n+
    113
    \n+
    114 public:
    \n+
    118 HierarchicSearch(const Grid & g, const IS & is) : grid_(g), indexSet_(is) {}
    \n+
    119
    \n+
    127 Entity findEntity(const FieldVector<ct,dimw>& global) const
    \n+
    128 { return findEntity<All_Partition>(global); }
    \n+
    129
    \n+
    137 template<PartitionIteratorType partition>
    \n+
    138 Entity findEntity(const FieldVector<ct,dimw>& global) const
    \n+
    139 {
    \n+
    140 typedef typename Grid::LevelGridView LevelGV;
    \n+
    141 const LevelGV &gv = grid_.levelGridView(0);
    \n+
    142
    \n+
    144 typedef typename LevelGV::template Codim<0>::template Partition<partition>::Iterator LevelIterator;
    \n+
    145
    \n+
    146 // type of element geometry
    \n+
    147 typedef typename Entity::Geometry Geometry;
    \n+
    148 // type of local coordinate
    \n+
    149 typedef typename Geometry::LocalCoordinate LocalCoordinate;
    \n+
    150
    \n+
    151 // loop over macro level
    \n+
    152 const LevelIterator end = gv.template end<0, partition>();
    \n+
    153 for (LevelIterator it = gv.template begin<0, partition>(); it != end; ++it)
    \n+
    154 {
    \n+
    155 Entity entity = *it;
    \n+
    156 Geometry geo = entity.geometry();
    \n+
    157
    \n+
    158 LocalCoordinate local = geo.local( global );
    \n+
    159 if( !referenceElement( geo ).checkInside( local ) )
    \n+
    160 continue;
    \n+
    161
    \n+
    162 if( (int(dim) != int(dimw)) && ((geo.global( local ) - global).two_norm() > 1e-8) )
    \n+
    163 continue;
    \n+
    164
    \n+
    165 // return if we found the leaf, else search through the child entites
    \n+
    166 if( indexSet_.contains( entity ) )
    \n+
    167 return entity;
    \n+
    168 else
    \n+
    169 return hFindEntity( entity, global );
    \n+
    170 }
    \n+
    171 DUNE_THROW( GridError, "Coordinate " << global << " is outside the grid." );
    \n+
    172 }
    \n+
    173
    \n+
    174 private:
    \n+
    175 const Grid& grid_;
    \n+
    176 const IS& indexSet_;
    \n+
    177 };
    \n+
    178
    \n+
    179} // end namespace Dune
    \n+
    180
    \n+
    181#endif // DUNE_GRID_HIERARCHICSEARCH_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: entitycommhelper.hh:14
    \n-
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:26
    \n-
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:20
    \n-
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:42
    \n-
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:37
    \n-
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:53
    \n-
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:59
    \n-
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:76
    \n-
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:70
    \n-
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:86
    \n-
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:91
    \n+
    auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
    Definition: common/geometry.hh:558
    \n+
    GridImp::template Codim< cd >::Geometry Geometry
    The corresponding geometry type.
    Definition: common/entity.hh:100
    \n+
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n+
    Wrapper class for geometries.
    Definition: common/geometry.hh:71
    \n+
    GlobalCoordinate global(const LocalCoordinate &local) const
    Evaluate the map .
    Definition: common/geometry.hh:228
    \n+
    FieldVector< ctype, mydim > LocalCoordinate
    type of local coordinates
    Definition: common/geometry.hh:103
    \n+
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n+
    GridFamily::Traits::HierarchicIterator HierarchicIterator
    A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine,...
    Definition: common/grid.hh:482
    \n+
    GridFamily::Traits::LevelGridView LevelGridView
    type of view for level grid
    Definition: common/grid.hh:402
    \n+
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/grid.hh:390
    \n+
    LevelGridView levelGridView(int level) const
    View for a grid level for All_Partition.
    Definition: common/grid.hh:598
    \n+
    ct ctype
    Define type used for coordinates in grid module.
    Definition: common/grid.hh:532
    \n+
    Search an IndexSet for an Entity containing a given point.
    Definition: hierarchicsearch.hh:35
    \n+
    Entity findEntity(const FieldVector< ct, dimw > &global) const
    Search the IndexSet of this HierarchicSearch for an Entity containing point global.
    Definition: hierarchicsearch.hh:127
    \n+
    Entity findEntity(const FieldVector< ct, dimw > &global) const
    Search the IndexSet of this HierarchicSearch for an Entity containing point global.
    Definition: hierarchicsearch.hh:138
    \n+
    HierarchicSearch(const Grid &g, const IS &is)
    Construct a HierarchicSearch object from a Grid and an IndexSet.
    Definition: hierarchicsearch.hh:118
    \n+
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,191 +5,230 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-entitycommhelper.hh\n+hierarchicsearch.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ENTITYCOMMHELPER_HH\n- 6#define DUNE_ENTITYCOMMHELPER_HH\n- 7\n- 8#include \n- 9\n- 10namespace Dune\n- 11{\n- 12\n- 13 template< InterfaceType iftype >\n-14 struct EntityCommHelper;\n- 15\n- 16\n- 17 template<>\n-18 struct EntityCommHelper< InteriorBorder_InteriorBorder_Interface >\n- 19 {\n-20 static bool send ( const PartitionType p )\n- 21 {\n- 22 //return (p == InteriorEntity) || (p == BorderEntity);\n- 23 return (p == BorderEntity);\n- 24 }\n- 25\n-26 static bool receive ( const PartitionType p )\n- 27 {\n- 28 //return (p == InteriorEntity) || (p == BorderEntity);\n- 29 return (p == BorderEntity);\n- 30 }\n- 31 };\n- 32\n- 33\n- 34 template<>\n-35 struct EntityCommHelper< InteriorBorder_All_Interface >\n- 36 {\n-37 static bool send ( const PartitionType p )\n- 38 {\n- 39 return (p == InteriorEntity) || (p == BorderEntity);\n- 40 }\n+ 5\n+ 6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH\n+ 7#define DUNE_GRID_HIERARCHICSEARCH_HH\n+ 8\n+ 15#include \n+ 16#include \n+ 17#include \n+ 18#include \n+ 19\n+ 20#include \n+ 21#include \n+ 22#include \n+ 23\n+ 24#include \n+ 25#include \n+ 26\n+ 27namespace Dune\n+ 28{\n+ 29\n+ 33 template\n+34 class HierarchicSearch\n+ 35 {\n+ 37 constexpr static int dim = Grid::dimension;\n+ 38\n+ 40 constexpr static int dimw = Grid::dimensionworld;\n 41\n-42 static bool receive ( const PartitionType p )\n- 43 {\n- 44 //return true;\n- 45 return (p != InteriorEntity);\n- 46 }\n- 47 };\n- 48\n- 49\n- 50 template<>\n-51 struct EntityCommHelper< Overlap_OverlapFront_Interface >\n- 52 {\n-53 static bool send ( const PartitionType p )\n- 54 {\n- 55 //return (p == InteriorEntity) || (p == BorderEntity) || (p ==\n-OverlapEntity);\n- 56 return (p != FrontEntity) && (p != GhostEntity);\n- 57 }\n- 58\n-59 static bool receive ( const PartitionType p )\n- 60 {\n- 61 //return (p == InteriorEntity) || (p == BorderEntity) || (p ==\n-OverlapEntity) || (p == FrontEntity);\n- 62 return (p != GhostEntity);\n- 63 }\n- 64 };\n- 65\n- 66\n- 67 template<>\n-68 struct EntityCommHelper< Overlap_All_Interface >\n- 69 {\n-70 static bool send ( const PartitionType p )\n- 71 {\n- 72 //return (p == InteriorEntity) || (p == BorderEntity) || (p ==\n-OverlapEntity);\n- 73 return (p != FrontEntity) && (p != GhostEntity);\n- 74 }\n- 75\n-76 static bool receive ([[maybe_unused]] const PartitionType p)\n- 77 {\n- 78 return true;\n- 79 }\n- 80 };\n+ 43 typedef typename Grid::ctype ct;\n+ 44\n+ 46 typedef typename Grid::template Codim<0>::Entity Entity;\n+ 47\n+ 49 typedef typename Grid::HierarchicIterator HierarchicIterator;\n+ 50\n+ 51 static std::string formatEntityInformation ( const Entity &e ) {\n+ 52 const typename Entity::Geometry &geo = e.geometry();\n+ 53 std::ostringstream info;\n+ 54 info << \"level=\" << e.level() << \" \"\n+ 55 << \"partition=\" << e.partitionType() << \" \"\n+ 56 << \"center=(\" << geo.center() << \") \"\n+ 57 << \"corners=[(\" << geo.corner(0) << \")\";\n+ 58 for(int i = 1; i < geo.corners(); ++i)\n+ 59 info << \" (\" << e.geometry().corner(i) << \")\";\n+ 60 info << \"]\";\n+ 61 return info.str();\n+ 62 }\n+ 63\n+ 74 Entity hFindEntity ( const Entity &entity,\n+ 75 const FieldVector& global) const\n+ 76 {\n+ 77 // type of element geometry\n+ 78 typedef typename Entity::Geometry Geometry;\n+ 79 // type of local coordinate\n+ 80 typedef typename Geometry::LocalCoordinate LocalCoordinate;\n 81\n- 82\n- 83 template<>\n-84 struct EntityCommHelper< All_All_Interface >\n- 85 {\n-86 static bool send ([[maybe_unused]] const PartitionType p)\n- 87 {\n- 88 return true;\n- 89 }\n- 90\n-91 static bool receive ([[maybe_unused]] const PartitionType p)\n+ 82 const int childLevel = entity.level()+1 ;\n+ 83 // loop over all child Entities\n+ 84 const HierarchicIterator end = entity.hend( childLevel );\n+ 85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it )\n+ 86 {\n+ 87 Entity child = *it;\n+ 88 Geometry geo = child.geometry();\n+ 89\n+ 90 LocalCoordinate local = geo.local(global);\n+ 91 if (referenceElement( geo ).checkInside(local))\n 92 {\n- 93 return true;\n- 94 }\n- 95 };\n- 96\n- 97} // namespace Dune\n- 98\n- 99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH\n+ 93 // return if we found the leaf, else search through the child entites\n+ 94 if( indexSet_.contains( child ) )\n+ 95 return child;\n+ 96 else\n+ 97 return hFindEntity( child, global );\n+ 98 }\n+ 99 }\n+ 100 std::ostringstream children;\n+ 101 HierarchicIterator it = entity.hbegin( childLevel );\n+ 102 if(it != end) {\n+ 103 children << \"{\" << formatEntityInformation(*it) << \"}\";\n+ 104 for( ++it; it != end; ++it )\n+ 105 children << \" {\" << formatEntityInformation(*it) << \"}\";\n+ 106 }\n+ 107 DUNE_THROW(Exception, \"{\" << className(*this) << \"} Unexpected \"\n+ 108 \"internal Error: none of the children of the entity \"\n+ 109 \"{\" << formatEntityInformation(entity) << \"} contains \"\n+ 110 \"coordinate (\" << global << \"). Children are: \"\n+ 111 \"[\" << children.str() << \"].\");\n+ 112 }\n+ 113\n+ 114 public:\n+118 HierarchicSearch(const Grid & g, const IS & is) : grid_(g), indexSet_(is)\n+{}\n+ 119\n+127 Entity findEntity(const FieldVector& global) const\n+ 128 { return findEntity(global); }\n+ 129\n+ 137 template\n+138 Entity findEntity(const FieldVector& global) const\n+ 139 {\n+ 140 typedef typename Grid::LevelGridView LevelGV;\n+ 141 const LevelGV &gv = grid_.levelGridView(0);\n+ 142\n+ 144 typedef typename LevelGV::template Codim<0>::template\n+Partition::Iterator LevelIterator;\n+ 145\n+ 146 // type of element geometry\n+ 147 typedef typename Entity::Geometry Geometry;\n+ 148 // type of local coordinate\n+ 149 typedef typename Geometry::LocalCoordinate LocalCoordinate;\n+ 150\n+ 151 // loop over macro level\n+ 152 const LevelIterator end = gv.template end<0, partition>();\n+ 153 for (LevelIterator it = gv.template begin<0, partition>(); it != end;\n+++it)\n+ 154 {\n+ 155 Entity entity = *it;\n+ 156 Geometry geo = entity.geometry();\n+ 157\n+ 158 LocalCoordinate local = geo.local( global );\n+ 159 if( !referenceElement( geo ).checkInside( local ) )\n+ 160 continue;\n+ 161\n+ 162 if( (int(dim) != int(dimw)) && ((geo.global( local ) - global).two_norm()\n+> 1e-8) )\n+ 163 continue;\n+ 164\n+ 165 // return if we found the leaf, else search through the child entites\n+ 166 if( indexSet_.contains( entity ) )\n+ 167 return entity;\n+ 168 else\n+ 169 return hFindEntity( entity, global );\n+ 170 }\n+ 171 DUNE_THROW( GridError, \"Coordinate \" << global << \" is outside the grid.\"\n+);\n+ 172 }\n+ 173\n+ 174 private:\n+ 175 const Grid& grid_;\n+ 176 const IS& indexSet_;\n+ 177 };\n+ 178\n+ 179} // end namespace Dune\n+ 180\n+ 181#endif // DUNE_GRID_HIERARCHICSEARCH_HH\n gridenums.hh\n-Dune::PartitionType\n-PartitionType\n-Attributes used in the generic overlap model.\n-Definition: gridenums.hh:30\n-Dune::FrontEntity\n-@ FrontEntity\n-on boundary between overlap and ghost\n-Definition: gridenums.hh:34\n-Dune::InteriorEntity\n-@ InteriorEntity\n-all interior entities\n-Definition: gridenums.hh:31\n-Dune::GhostEntity\n-@ GhostEntity\n-ghost entities\n-Definition: gridenums.hh:35\n-Dune::BorderEntity\n-@ BorderEntity\n-on boundary between interior and overlap\n-Definition: gridenums.hh:32\n-Dune::InteriorBorder_All_Interface\n-@ InteriorBorder_All_Interface\n-send interior and border, receive all entities\n-Definition: gridenums.hh:88\n-Dune::All_All_Interface\n-@ All_All_Interface\n-send all and receive all entities\n-Definition: gridenums.hh:91\n-Dune::Overlap_All_Interface\n-@ Overlap_All_Interface\n-send overlap, receive all entities\n-Definition: gridenums.hh:90\n-Dune::Overlap_OverlapFront_Interface\n-@ Overlap_OverlapFront_Interface\n-send overlap, receive overlap and front entities\n-Definition: gridenums.hh:89\n-Dune::InteriorBorder_InteriorBorder_Interface\n-@ InteriorBorder_InteriorBorder_Interface\n-send/receive interior and border entities\n-Definition: gridenums.hh:87\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::EntityCommHelper\n-Definition: entitycommhelper.hh:14\n-Dune::EntityCommHelper<_InteriorBorder_InteriorBorder_Interface_>::receive\n-static bool receive(const PartitionType p)\n-Definition: entitycommhelper.hh:26\n-Dune::EntityCommHelper<_InteriorBorder_InteriorBorder_Interface_>::send\n-static bool send(const PartitionType p)\n-Definition: entitycommhelper.hh:20\n-Dune::EntityCommHelper<_InteriorBorder_All_Interface_>::receive\n-static bool receive(const PartitionType p)\n-Definition: entitycommhelper.hh:42\n-Dune::EntityCommHelper<_InteriorBorder_All_Interface_>::send\n-static bool send(const PartitionType p)\n-Definition: entitycommhelper.hh:37\n-Dune::EntityCommHelper<_Overlap_OverlapFront_Interface_>::send\n-static bool send(const PartitionType p)\n-Definition: entitycommhelper.hh:53\n-Dune::EntityCommHelper<_Overlap_OverlapFront_Interface_>::receive\n-static bool receive(const PartitionType p)\n-Definition: entitycommhelper.hh:59\n-Dune::EntityCommHelper<_Overlap_All_Interface_>::receive\n-static bool receive(const PartitionType p)\n-Definition: entitycommhelper.hh:76\n-Dune::EntityCommHelper<_Overlap_All_Interface_>::send\n-static bool send(const PartitionType p)\n-Definition: entitycommhelper.hh:70\n-Dune::EntityCommHelper<_All_All_Interface_>::send\n-static bool send(const PartitionType p)\n-Definition: entitycommhelper.hh:86\n-Dune::EntityCommHelper<_All_All_Interface_>::receive\n-static bool receive(const PartitionType p)\n-Definition: entitycommhelper.hh:91\n+Dune::referenceElement\n+auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo)\n+-> decltype(referenceElement(geo, geo.impl()))\n+Definition: common/geometry.hh:558\n+Dune::Entity::Geometry\n+GridImp::template Codim< cd >::Geometry Geometry\n+The corresponding geometry type.\n+Definition: common/entity.hh:100\n+Dune::GridError\n+Base class for exceptions in Dune grid modules.\n+Definition: exceptions.hh:20\n+Dune::Geometry\n+Wrapper class for geometries.\n+Definition: common/geometry.hh:71\n+Dune::Geometry::global\n+GlobalCoordinate global(const LocalCoordinate &local) const\n+Evaluate the map .\n+Definition: common/geometry.hh:228\n+Dune::Geometry::LocalCoordinate\n+FieldVector< ctype, mydim > LocalCoordinate\n+type of local coordinates\n+Definition: common/geometry.hh:103\n+Dune::Grid\n+Grid abstract base class.\n+Definition: common/grid.hh:375\n+Dune::Grid::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/grid.hh:387\n+Dune::Grid::HierarchicIterator\n+GridFamily::Traits::HierarchicIterator HierarchicIterator\n+A type that is a model of Dune::HierarchicIterator A type of iterator that\n+allows to examine,...\n+Definition: common/grid.hh:482\n+Dune::Grid::LevelGridView\n+GridFamily::Traits::LevelGridView LevelGridView\n+type of view for level grid\n+Definition: common/grid.hh:402\n+Dune::Grid::dimensionworld\n+static constexpr int dimensionworld\n+The dimension of the world the grid lives in.\n+Definition: common/grid.hh:390\n+Dune::Grid::levelGridView\n+LevelGridView levelGridView(int level) const\n+View for a grid level for All_Partition.\n+Definition: common/grid.hh:598\n+Dune::Grid::ctype\n+ct ctype\n+Define type used for coordinates in grid module.\n+Definition: common/grid.hh:532\n+Dune::HierarchicSearch\n+Search an IndexSet for an Entity containing a given point.\n+Definition: hierarchicsearch.hh:35\n+Dune::HierarchicSearch::findEntity\n+Entity findEntity(const FieldVector< ct, dimw > &global) const\n+Search the IndexSet of this HierarchicSearch for an Entity containing point\n+global.\n+Definition: hierarchicsearch.hh:127\n+Dune::HierarchicSearch::findEntity\n+Entity findEntity(const FieldVector< ct, dimw > &global) const\n+Search the IndexSet of this HierarchicSearch for an Entity containing point\n+global.\n+Definition: hierarchicsearch.hh:138\n+Dune::HierarchicSearch::HierarchicSearch\n+HierarchicSearch(const Grid &g, const IS &is)\n+Construct a HierarchicSearch object from a Grid and an IndexSet.\n+Definition: hierarchicsearch.hh:118\n+grid.hh\n+Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01010.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01010.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainervector.hh File Reference\n+dune-grid: hostgridaccess.hh File Reference\n \n \n \n \n \n \n \n@@ -65,26 +65,33 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    persistentcontainervector.hh File Reference
    \n+
    hostgridaccess.hh File Reference
    \n
    \n
    \n-
    #include <algorithm>
    \n-#include <cassert>
    \n+
    #include <string>
    \n+#include <dune/grid/geometrygrid/intersection.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::PersistentContainerVector< G, IndexSet, Vector >
     vector-based implementation of the PersistentContainer More...
    struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
     
    struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim< codim >
     A Traits struct that collects return types of class member methods. More...
     
    struct  Dune::HostGridAccess< IdentityGrid< HG > >
     
    struct  Dune::HostGridAccess< IdentityGrid< HG > >::Codim< codim >
     A Traits struct that collects return types of class member methods. More...
     
    \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,21 +6,31 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-persistentcontainervector.hh File Reference\n-#include \n-#include \n+hostgridaccess.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::PersistentContainerVector<_G,_IndexSet,_Vector_>\n-\u00a0 vector-based implementation of the PersistentContainer More...\n+struct \u00a0Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>\n+\u00a0\n+struct \u00a0Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+ Codim<_codim_>\n+\u00a0 A Traits struct that collects return types of class member methods.\n+ More...\n+\u00a0\n+struct \u00a0Dune::HostGridAccess<_IdentityGrid<_HG_>_>\n+\u00a0\n+struct \u00a0Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Codim<_codim_>\n+\u00a0 A Traits struct that collects return types of class member methods.\n+ More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01010_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: persistentcontainervector.hh Source File\n+dune-grid: hostgridaccess.hh Source File\n \n \n \n \n \n \n \n@@ -62,159 +62,191 @@\n \n
    \n \n
    \n \n
    \n-
    persistentcontainervector.hh
    \n+
    hostgridaccess.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
    \n-
    6#define DUNE_PERSISTENTCONTAINERVECTOR_HH
    \n+
    5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH
    \n+
    6#define DUNE_GRID_HOSTGRIDACCESS_HH
    \n
    7
    \n-
    8#include <algorithm>
    \n-
    9#include <cassert>
    \n-
    10
    \n-
    11namespace Dune
    \n-
    12{
    \n-
    13
    \n-
    14 // PersistentContainerVector
    \n-
    15 // -------------------------
    \n-
    16
    \n-
    49 template< class G, class IndexSet, class Vector >
    \n-\n-
    51 {
    \n-\n-
    53
    \n-
    54 public:
    \n-
    55 typedef G Grid;
    \n-
    56
    \n-
    57 typedef typename Vector::value_type Value;
    \n-
    58 typedef typename Vector::size_type Size;
    \n-
    59 typedef typename Vector::const_iterator ConstIterator;
    \n-
    60 typedef typename Vector::iterator Iterator;
    \n-
    61
    \n-
    62 typedef typename Vector::allocator_type Allocator;
    \n-
    63
    \n-
    64 PersistentContainerVector ( const IndexSet &indexSet, int codim, const Value &value,
    \n-
    65 const Allocator &allocator = Allocator() )
    \n-
    66 : codim_( codim ),
    \n-\n-
    68 data_( indexSet.size( codim ), value, allocator )
    \n-
    69 {}
    \n-
    70
    \n-
    71 template< class Entity >
    \n-
    72 const Value &operator[] ( const Entity &entity ) const
    \n-
    73 {
    \n-
    74 assert( Entity::codimension == codimension() );
    \n-
    75 const Size index = indexSet().index( entity );
    \n-
    76 assert( index < data_.size() );
    \n-
    77 return data_[ index ];
    \n-
    78 }
    \n-
    79
    \n-
    80 template< class Entity >
    \n-
    81 Value &operator[] ( const Entity &entity )
    \n+
    8#include <string>
    \n+
    9
    \n+\n+
    11
    \n+
    12namespace Dune
    \n+
    13{
    \n+
    14
    \n+
    15 // External Forward Declarations
    \n+
    16 // -----------------------------
    \n+
    17
    \n+
    18 template< class HostGrid, class CoordFunction, class Allocator >
    \n+
    19 class GeometryGrid;
    \n+
    20
    \n+
    21 template< class >
    \n+
    22 class IdentityGrid;
    \n+
    23
    \n+
    24
    \n+
    25 // HostGridAccess
    \n+
    26 // --------------
    \n+
    27
    \n+
    28 template< class Grid >
    \n+
    29 struct HostGridAccess;
    \n+
    30
    \n+
    31
    \n+
    32
    \n+
    40 template< class HG, class CoordFunction, class Allocator >
    \n+
    41 struct HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
    \n+
    42 {
    \n+\n+
    47
    \n+
    49 typedef typename Grid::HostGrid HostGrid;
    \n+
    50
    \n+
    57 template< int codim >
    \n+
    58 struct Codim
    \n+
    59 {
    \n+
    61 typedef typename Grid::template Codim< codim >::Entity Entity;
    \n+
    62
    \n+
    64 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
    \n+
    65 };
    \n+
    66
    \n+
    68 typedef typename Grid::Traits::LeafIntersection LeafIntersection;
    \n+
    70 typedef typename Grid::Traits::LevelIntersection LevelIntersection;
    \n+
    71
    \n+
    73 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
    \n+
    75 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
    \n+
    76
    \n+
    81 static const HostGrid &hostGrid ( const Grid &grid )
    \n
    82 {
    \n-
    83 assert( Entity::codimension == codimension() );
    \n-
    84 const Size index = indexSet().index( entity );
    \n-
    85 assert( index < data_.size() );
    \n-
    86 return data_[ index ];
    \n-
    87 }
    \n-
    88
    \n-
    89 template< class Entity >
    \n-
    90 const Value &operator() ( const Entity &entity, int subEntity ) const
    \n-
    91 {
    \n-
    92 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
    \n-
    93 assert( index < data_.size() );
    \n-
    94 return data_[ index ];
    \n-
    95 }
    \n-
    96
    \n-
    97 template< class Entity >
    \n-
    98 Value &operator() ( const Entity &entity, int subEntity )
    \n-
    99 {
    \n-
    100 const Size index = indexSet().subIndex( entity, subEntity, codimension() );
    \n-
    101 assert( index < data_.size() );
    \n-
    102 return data_[ index ];
    \n-
    103 }
    \n-
    104
    \n-
    105 Size size () const { return data_.size(); }
    \n-
    106
    \n-
    107 void resize ( const Value &value = Value() )
    \n-
    108 {
    \n-
    109 const Size indexSetSize = indexSet().size( codimension() );
    \n-
    110 data_.resize( indexSetSize, value );
    \n-
    111 }
    \n-
    112
    \n-
    113 void shrinkToFit () {}
    \n-
    114
    \n-
    115 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }
    \n-
    116
    \n-
    117 void swap ( This &other )
    \n-
    118 {
    \n-
    119 std::swap( codim_, other.codim_ );
    \n-
    120 std::swap( indexSet_, other.indexSet_ );
    \n-
    121 std::swap( data_, other.data_ );
    \n-
    122 }
    \n+
    83 return grid.hostGrid();
    \n+
    84 }
    \n+
    85
    \n+
    86 template< class Entity >
    \n+
    87 static const typename Codim< Entity::codimension >::HostEntity &
    \n+
    88 hostEntity ( const Entity &entity )
    \n+
    89 {
    \n+
    90 return hostEntity< Entity::codimension >( entity );
    \n+
    91 }
    \n+
    92
    \n+
    93 template< int codim >
    \n+
    94 static const typename Codim< codim >::HostEntity &
    \n+
    95 hostEntity ( const typename Codim< codim >::Entity &entity )
    \n+
    96 {
    \n+
    97 return entity.impl().hostEntity();
    \n+
    98 }
    \n+
    99
    \n+
    100 template< class HostIntersection >
    \n+
    101 static const HostIntersection &
    \n+\n+
    103 {
    \n+
    104 return intersection.impl().hostIntersection();
    \n+
    105 }
    \n+
    106 };
    \n+
    107
    \n+
    108
    \n+
    116 template< class HG >
    \n+\n+
    118 {
    \n+\n
    123
    \n-
    124 ConstIterator begin () const { return data_.begin(); }
    \n-
    125 Iterator begin () { return data_.begin(); }
    \n+
    125 typedef HG HostGrid;
    \n
    126
    \n-
    127 ConstIterator end () const { return data_.end(); }
    \n-
    128 Iterator end () { return data_.end(); }
    \n-
    129
    \n-
    130 int codimension () const { return codim_; }
    \n-
    131
    \n-
    132 protected:
    \n-
    133 const IndexSet &indexSet () const { return *indexSet_; }
    \n-
    134
    \n-\n-\n-
    137 Vector data_;
    \n-
    138 };
    \n-
    139
    \n-
    140} // namespace Dune
    \n-
    141
    \n-
    142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH
    \n-
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n+
    133 template< int codim >
    \n+
    134 struct Codim
    \n+
    135 {
    \n+
    137 typedef typename Grid::template Codim< codim >::Entity Entity;
    \n+
    138
    \n+
    140 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
    \n+
    141 };
    \n+
    142
    \n+\n+\n+
    147
    \n+
    149 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
    \n+
    151 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
    \n+
    152
    \n+
    157 static const HostGrid &hostGrid ( const Grid &grid )
    \n+
    158 {
    \n+
    159 return grid.getHostGrid();
    \n+
    160 }
    \n+
    161
    \n+
    162 template< class Entity >
    \n+
    163 static const typename Codim< Entity::codimension >::HostEntity &
    \n+
    164 hostEntity ( const Entity &entity )
    \n+
    165 {
    \n+
    166 return hostEntity< Entity::codimension >( entity );
    \n+
    167 }
    \n+
    168
    \n+
    169 template< int codim >
    \n+
    170 static const typename Codim< codim >::HostEntity &
    \n+
    171 hostEntity ( const typename Codim< codim >::Entity &entity )
    \n+
    172 {
    \n+
    173 return *entity.impl().hostEntity_;
    \n+
    174 }
    \n+
    175
    \n+
    176 static const HostLeafIntersection &
    \n+
    177 hostIntersection ( const LeafIntersection &intersection )
    \n+
    178 {
    \n+
    179 return *intersection.impl().hostIterator_;
    \n+
    180 }
    \n+
    181
    \n+
    182 static const HostLevelIntersection &
    \n+
    183 hostIntersection ( const LevelIntersection &intersection )
    \n+
    184 {
    \n+
    185 return *intersection.impl().hostIterator_;
    \n+
    186 }
    \n+
    187 };
    \n+
    188
    \n+
    189} // namespace Dune
    \n+
    190
    \n+
    191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    static constexpr int codimension
    Know your own codimension.
    Definition: common/entity.hh:106
    \n-
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n-
    auto size(GeometryType type) const
    Return total number of entities of given geometry type in entity set .
    Definition: indexidset.hh:223
    \n-
    IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
    Map a subentity to an index.
    Definition: indexidset.hh:153
    \n-
    IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
    Map entity to index. The result of calling this method with an entity that is not in the index set is...
    Definition: indexidset.hh:113
    \n-
    vector-based implementation of the PersistentContainer
    Definition: persistentcontainervector.hh:51
    \n-
    PersistentContainerVector(const IndexSet &indexSet, int codim, const Value &value, const Allocator &allocator=Allocator())
    Definition: persistentcontainervector.hh:64
    \n-
    Iterator begin()
    Definition: persistentcontainervector.hh:125
    \n-
    Vector::size_type Size
    Definition: persistentcontainervector.hh:58
    \n-
    Vector::value_type Value
    Definition: persistentcontainervector.hh:57
    \n-
    Vector::allocator_type Allocator
    Definition: persistentcontainervector.hh:62
    \n-
    void fill(const Value &value)
    Definition: persistentcontainervector.hh:115
    \n-
    G Grid
    Definition: persistentcontainervector.hh:55
    \n-
    const Value & operator()(const Entity &entity, int subEntity) const
    Definition: persistentcontainervector.hh:90
    \n-
    const IndexSet * indexSet_
    Definition: persistentcontainervector.hh:136
    \n-
    Vector::iterator Iterator
    Definition: persistentcontainervector.hh:60
    \n-
    ConstIterator begin() const
    Definition: persistentcontainervector.hh:124
    \n-
    ConstIterator end() const
    Definition: persistentcontainervector.hh:127
    \n-
    int codim_
    Definition: persistentcontainervector.hh:135
    \n-
    void shrinkToFit()
    Definition: persistentcontainervector.hh:113
    \n-
    Vector::const_iterator ConstIterator
    Definition: persistentcontainervector.hh:59
    \n-
    Vector data_
    Definition: persistentcontainervector.hh:137
    \n-
    Iterator end()
    Definition: persistentcontainervector.hh:128
    \n-
    const IndexSet & indexSet() const
    Definition: persistentcontainervector.hh:133
    \n-
    int codimension() const
    Definition: persistentcontainervector.hh:130
    \n-
    Size size() const
    Definition: persistentcontainervector.hh:105
    \n-
    void swap(This &other)
    Definition: persistentcontainervector.hh:117
    \n-
    const Value & operator[](const Entity &entity) const
    Definition: persistentcontainervector.hh:72
    \n-
    void resize(const Value &value=Value())
    Definition: persistentcontainervector.hh:107
    \n+
    GridFamily::Traits::LeafIntersection LeafIntersection
    A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
    Definition: common/grid.hh:456
    \n+
    GridFamily::Traits::LevelIntersection LevelIntersection
    A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
    Definition: common/grid.hh:461
    \n+
    grid wrapper replacing the geometries
    Definition: geometrygrid/grid.hh:86
    \n+
    const HostGrid & hostGrid() const
    obtain constant reference to the host grid
    Definition: geometrygrid/grid.hh:538
    \n+
    Definition: geometrygrid/intersection.hh:22
    \n+
    Provides a meta grid that is identical to its host.
    Definition: identitygrid.hh:88
    \n+
    HostGridType & getHostGrid() const
    Returns the hostgrid this IdentityGrid lives in.
    Definition: identitygrid.hh:394
    \n+
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n+
    Grid::HostGrid HostGrid
    type of HostGrid
    Definition: hostgridaccess.hh:49
    \n+
    HostGrid::Traits::LevelIntersection HostLevelIntersection
    type of the host level intersection
    Definition: hostgridaccess.hh:75
    \n+
    static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
    Definition: hostgridaccess.hh:88
    \n+
    static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
    Definition: hostgridaccess.hh:95
    \n+
    static const HostIntersection & hostIntersection(const Intersection< const Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection)
    Definition: hostgridaccess.hh:102
    \n+
    GeometryGrid< HG, CoordFunction, Allocator > Grid
    Definition: hostgridaccess.hh:46
    \n+
    Grid::Traits::LeafIntersection LeafIntersection
    type of the GeometryGrid leaf intersection
    Definition: hostgridaccess.hh:68
    \n+
    HostGrid::Traits::LeafIntersection HostLeafIntersection
    type of the host leaf intersection
    Definition: hostgridaccess.hh:73
    \n+
    static const HostGrid & hostGrid(const Grid &grid)
    Get underlying HostGrid.
    Definition: hostgridaccess.hh:81
    \n+
    Grid::Traits::LevelIntersection LevelIntersection
    type of the GeometryGrid level intersection
    Definition: hostgridaccess.hh:70
    \n+
    HostGrid::template Codim< codim >::Entity HostEntity
    type of the host entity
    Definition: hostgridaccess.hh:64
    \n+
    Grid::template Codim< codim >::Entity Entity
    type of the GeometryGrid entity
    Definition: hostgridaccess.hh:61
    \n+
    Grid::Traits::LeafIntersection LeafIntersection
    type of the IdGrid leaf intersection
    Definition: hostgridaccess.hh:144
    \n+
    HG HostGrid
    type of HostGrid
    Definition: hostgridaccess.hh:125
    \n+
    IdentityGrid< HG > Grid
    Definition: hostgridaccess.hh:122
    \n+
    static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
    Definition: hostgridaccess.hh:171
    \n+
    HostGrid::Traits::LevelIntersection HostLevelIntersection
    type of the host level intersection
    Definition: hostgridaccess.hh:151
    \n+
    Grid::Traits::LevelIntersection LevelIntersection
    type of the IdGrid level intersection
    Definition: hostgridaccess.hh:146
    \n+
    static const HostLeafIntersection & hostIntersection(const LeafIntersection &intersection)
    Definition: hostgridaccess.hh:177
    \n+
    HostGrid::Traits::LeafIntersection HostLeafIntersection
    type of the host leaf intersection
    Definition: hostgridaccess.hh:149
    \n+
    static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
    Definition: hostgridaccess.hh:164
    \n+
    static const HostLevelIntersection & hostIntersection(const LevelIntersection &intersection)
    Definition: hostgridaccess.hh:183
    \n+
    static const HostGrid & hostGrid(const Grid &grid)
    Get underlying HostGrid.
    Definition: hostgridaccess.hh:157
    \n+
    Grid::template Codim< codim >::Entity Entity
    type of the IdGrid entity
    Definition: hostgridaccess.hh:137
    \n+
    HostGrid::template Codim< codim >::Entity HostEntity
    type of the host entity
    Definition: hostgridaccess.hh:140
    \n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,229 +5,300 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-persistentcontainervector.hh\n+hostgridaccess.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH\n- 6#define DUNE_PERSISTENTCONTAINERVECTOR_HH\n+ 5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH\n+ 6#define DUNE_GRID_HOSTGRIDACCESS_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11namespace Dune\n- 12{\n- 13\n- 14 // PersistentContainerVector\n- 15 // -------------------------\n- 16\n- 49 template< class G, class IndexSet, class Vector >\n-50 class PersistentContainerVector\n- 51 {\n- 52 typedef PersistentContainerVector<_G,_IndexSet,_Vector_> This;\n- 53\n- 54 public:\n-55 typedef G Grid;\n- 56\n-57 typedef typename Vector::value_type Value;\n-58 typedef typename Vector::size_type Size;\n-59 typedef typename Vector::const_iterator ConstIterator;\n-60 typedef typename Vector::iterator Iterator;\n- 61\n-62 typedef typename Vector::allocator_type Allocator;\n- 63\n-64 PersistentContainerVector ( const IndexSet &indexSet, int codim, const Value\n-&value,\n- 65 const Allocator &allocator = Allocator() )\n- 66 : codim_( codim ),\n- 67 indexSet_( &indexSet ),\n- 68 data_( indexSet.size( codim ), value, allocator )\n- 69 {}\n- 70\n- 71 template< class Entity >\n-72 const Value &operator[]( const Entity &entity ) const\n- 73 {\n- 74 assert( Entity::codimension == codimension() );\n- 75 const Size index = indexSet().index( entity );\n- 76 assert( index < data_.size() );\n- 77 return data_[ index ];\n- 78 }\n- 79\n- 80 template< class Entity >\n-81 Value &operator[]( const Entity &entity )\n+ 8#include \n+ 9\n+ 10#include \n+ 11\n+ 12namespace Dune\n+ 13{\n+ 14\n+ 15 // External Forward Declarations\n+ 16 // -----------------------------\n+ 17\n+ 18 template< class HostGrid, class CoordFunction, class Allocator >\n+ 19 class GeometryGrid;\n+ 20\n+ 21 template< class >\n+ 22 class IdentityGrid;\n+ 23\n+ 24\n+ 25 // HostGridAccess\n+ 26 // --------------\n+ 27\n+ 28 template< class Grid >\n+ 29 struct HostGridAccess;\n+ 30\n+ 31\n+ 32\n+ 40 template< class HG, class CoordFunction, class Allocator >\n+41 struct HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >\n+ 42 {\n+46 typedef GeometryGrid<_HG,_CoordFunction,_Allocator_> Grid;\n+ 47\n+49 typedef typename Grid::HostGrid HostGrid;\n+ 50\n+ 57 template< int codim >\n+58 struct Codim\n+ 59 {\n+61 typedef typename Grid::template Codim<_codim_>::Entity Entity;\n+ 62\n+64 typedef typename HostGrid::template Codim<_codim_>::Entity HostEntity;\n+ 65 };\n+ 66\n+68 typedef typename Grid::Traits::LeafIntersection LeafIntersection;\n+70 typedef typename Grid::Traits::LevelIntersection LevelIntersection;\n+ 71\n+73 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;\n+75 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;\n+ 76\n+81 static const HostGrid &hostGrid ( const Grid &grid )\n 82 {\n- 83 assert( Entity::codimension == codimension() );\n- 84 const Size index = indexSet().index( entity );\n- 85 assert( index < data_.size() );\n- 86 return data_[ index ];\n- 87 }\n- 88\n- 89 template< class Entity >\n-90 const Value &operator()( const Entity &entity, int subEntity ) const\n- 91 {\n- 92 const Size index = indexSet().subIndex( entity, subEntity, codimension() );\n- 93 assert( index < data_.size() );\n- 94 return data_[ index ];\n- 95 }\n- 96\n- 97 template< class Entity >\n-98 Value &operator()( const Entity &entity, int subEntity )\n- 99 {\n- 100 const Size index = indexSet().subIndex( entity, subEntity, codimension()\n-);\n- 101 assert( index < data_.size() );\n- 102 return data_[ index ];\n- 103 }\n- 104\n-105 Size size () const { return data_.size(); }\n- 106\n-107 void resize ( const Value &value = Value() )\n- 108 {\n- 109 const Size indexSetSize = indexSet().size( codimension() );\n- 110 data_.resize( indexSetSize, value );\n- 111 }\n- 112\n-113 void shrinkToFit () {}\n- 114\n-115 void fill ( const Value &value ) { std::fill( begin(), end(), value ); }\n- 116\n-117 void swap ( This &other )\n+ 83 return grid.hostGrid();\n+ 84 }\n+ 85\n+ 86 template< class Entity >\n+ 87 static const typename Codim< Entity::codimension >::HostEntity &\n+88 hostEntity ( const Entity &entity )\n+ 89 {\n+ 90 return hostEntity< Entity::codimension >( entity );\n+ 91 }\n+ 92\n+ 93 template< int codim >\n+ 94 static const typename Codim< codim >::HostEntity &\n+95 hostEntity ( const typename Codim<_codim_>::Entity &entity )\n+ 96 {\n+ 97 return entity.impl().hostEntity();\n+ 98 }\n+ 99\n+ 100 template< class HostIntersection >\n+ 101 static const HostIntersection &\n+102 hostIntersection ( const Intersection< const Grid, GeoGrid::Intersection<\n+const_Grid,_HostIntersection_> > &intersection )\n+ 103 {\n+ 104 return intersection.impl().hostIntersection();\n+ 105 }\n+ 106 };\n+ 107\n+ 108\n+ 116 template< class HG >\n+117 struct HostGridAccess< IdentityGrid< HG > >\n 118 {\n- 119 std::swap( codim_, other.codim_ );\n- 120 std::swap( indexSet_, other.indexSet_ );\n- 121 std::swap( data_, other.data_ );\n- 122 }\n+122 typedef IdentityGrid<_HG_> Grid;\n 123\n-124 ConstIterator begin () const { return data_.begin(); }\n-125 Iterator begin () { return data_.begin(); }\n+125 typedef HG HostGrid;\n 126\n-127 ConstIterator end () const { return data_.end(); }\n-128 Iterator end () { return data_.end(); }\n- 129\n-130 int codimension () const { return codim_; }\n- 131\n- 132 protected:\n-133 const IndexSet &indexSet () const { return *indexSet_; }\n- 134\n-135 int codim_;\n-136 const IndexSet *indexSet_;\n-137 Vector data_;\n- 138 };\n- 139\n- 140} // namespace Dune\n- 141\n- 142#endif // #ifndef DUNE_PERSISTENTCONTAINERVECTOR_HH\n-std::swap\n-void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T\n-> &b)\n-Definition: utility/persistentcontainer.hh:83\n+ 133 template< int codim >\n+134 struct Codim\n+ 135 {\n+137 typedef typename Grid::template Codim<_codim_>::Entity Entity;\n+ 138\n+140 typedef typename HostGrid::template Codim<_codim_>::Entity HostEntity;\n+ 141 };\n+ 142\n+144 typedef typename Grid::Traits::LeafIntersection LeafIntersection;\n+146 typedef typename Grid::Traits::LevelIntersection LevelIntersection;\n+ 147\n+149 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;\n+151 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;\n+ 152\n+157 static const HostGrid &hostGrid ( const Grid &grid )\n+ 158 {\n+ 159 return grid.getHostGrid();\n+ 160 }\n+ 161\n+ 162 template< class Entity >\n+ 163 static const typename Codim< Entity::codimension >::HostEntity &\n+164 hostEntity ( const Entity &entity )\n+ 165 {\n+ 166 return hostEntity< Entity::codimension >( entity );\n+ 167 }\n+ 168\n+ 169 template< int codim >\n+ 170 static const typename Codim< codim >::HostEntity &\n+171 hostEntity ( const typename Codim<_codim_>::Entity &entity )\n+ 172 {\n+ 173 return *entity.impl().hostEntity_;\n+ 174 }\n+ 175\n+ 176 static const HostLeafIntersection &\n+177 hostIntersection ( const LeafIntersection &intersection )\n+ 178 {\n+ 179 return *intersection.impl().hostIterator_;\n+ 180 }\n+ 181\n+ 182 static const HostLevelIntersection &\n+183 hostIntersection ( const LevelIntersection &intersection )\n+ 184 {\n+ 185 return *intersection.impl().hostIterator_;\n+ 186 }\n+ 187 };\n+ 188\n+ 189} // namespace Dune\n+ 190\n+ 191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::Intersection\n+Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n+element or with the d...\n+Definition: common/intersection.hh:164\n Dune::Entity\n Wrapper class for entities.\n Definition: common/entity.hh:66\n-Dune::Entity::codimension\n-static constexpr int codimension\n-Know your own codimension.\n-Definition: common/entity.hh:106\n-Dune::IndexSet\n-Index Set Interface base class.\n-Definition: indexidset.hh:78\n-Dune::IndexSet::size\n-auto size(GeometryType type) const\n-Return total number of entities of given geometry type in entity set .\n-Definition: indexidset.hh:223\n-Dune::IndexSet::subIndex\n-IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int\n-i, unsigned int codim) const\n-Map a subentity to an index.\n-Definition: indexidset.hh:153\n-Dune::IndexSet::index\n-IndexType index(const typename Traits::template Codim< cc >::Entity &e) const\n-Map entity to index. The result of calling this method with an entity that is\n-not in the index set is...\n-Definition: indexidset.hh:113\n-Dune::PersistentContainerVector\n-vector-based implementation of the PersistentContainer\n-Definition: persistentcontainervector.hh:51\n-Dune::PersistentContainerVector::PersistentContainerVector\n-PersistentContainerVector(const IndexSet &indexSet, int codim, const Value\n-&value, const Allocator &allocator=Allocator())\n-Definition: persistentcontainervector.hh:64\n-Dune::PersistentContainerVector::begin\n-Iterator begin()\n-Definition: persistentcontainervector.hh:125\n-Dune::PersistentContainerVector::Size\n-Vector::size_type Size\n-Definition: persistentcontainervector.hh:58\n-Dune::PersistentContainerVector::Value\n-Vector::value_type Value\n-Definition: persistentcontainervector.hh:57\n-Dune::PersistentContainerVector::Allocator\n-Vector::allocator_type Allocator\n-Definition: persistentcontainervector.hh:62\n-Dune::PersistentContainerVector::fill\n-void fill(const Value &value)\n-Definition: persistentcontainervector.hh:115\n-Dune::PersistentContainerVector::Grid\n-G Grid\n-Definition: persistentcontainervector.hh:55\n-Dune::PersistentContainerVector::operator()\n-const Value & operator()(const Entity &entity, int subEntity) const\n-Definition: persistentcontainervector.hh:90\n-Dune::PersistentContainerVector::indexSet_\n-const IndexSet * indexSet_\n-Definition: persistentcontainervector.hh:136\n-Dune::PersistentContainerVector::Iterator\n-Vector::iterator Iterator\n-Definition: persistentcontainervector.hh:60\n-Dune::PersistentContainerVector::begin\n-ConstIterator begin() const\n-Definition: persistentcontainervector.hh:124\n-Dune::PersistentContainerVector::end\n-ConstIterator end() const\n-Definition: persistentcontainervector.hh:127\n-Dune::PersistentContainerVector::codim_\n-int codim_\n-Definition: persistentcontainervector.hh:135\n-Dune::PersistentContainerVector::shrinkToFit\n-void shrinkToFit()\n-Definition: persistentcontainervector.hh:113\n-Dune::PersistentContainerVector::ConstIterator\n-Vector::const_iterator ConstIterator\n-Definition: persistentcontainervector.hh:59\n-Dune::PersistentContainerVector::data_\n-Vector data_\n-Definition: persistentcontainervector.hh:137\n-Dune::PersistentContainerVector::end\n-Iterator end()\n-Definition: persistentcontainervector.hh:128\n-Dune::PersistentContainerVector::indexSet\n-const IndexSet & indexSet() const\n-Definition: persistentcontainervector.hh:133\n-Dune::PersistentContainerVector::codimension\n-int codimension() const\n-Definition: persistentcontainervector.hh:130\n-Dune::PersistentContainerVector::size\n-Size size() const\n-Definition: persistentcontainervector.hh:105\n-Dune::PersistentContainerVector::swap\n-void swap(This &other)\n-Definition: persistentcontainervector.hh:117\n-Dune::PersistentContainerVector::operator[]\n-const Value & operator[](const Entity &entity) const\n-Definition: persistentcontainervector.hh:72\n-Dune::PersistentContainerVector::resize\n-void resize(const Value &value=Value())\n-Definition: persistentcontainervector.hh:107\n+Dune::Grid<_dim,_dimworld,_HostGrid::ctype,_IdentityGridFamily<_HostGrid::\n+dimension,_HostGrid_>_>::LeafIntersection\n+GridFamily::Traits::LeafIntersection LeafIntersection\n+A type that is a model of Dune::Intersection, an intersections of two\n+codimension 1 of two codimensio...\n+Definition: common/grid.hh:456\n+Dune::Grid<_dim,_dimworld,_HostGrid::ctype,_IdentityGridFamily<_HostGrid::\n+dimension,_HostGrid_>_>::LevelIntersection\n+GridFamily::Traits::LevelIntersection LevelIntersection\n+A type that is a model of Dune::Intersection, an intersections of two\n+codimension 1 of two codimensio...\n+Definition: common/grid.hh:461\n+Dune::GeometryGrid\n+grid wrapper replacing the geometries\n+Definition: geometrygrid/grid.hh:86\n+Dune::GeometryGrid::hostGrid\n+const HostGrid & hostGrid() const\n+obtain constant reference to the host grid\n+Definition: geometrygrid/grid.hh:538\n+Dune::GeoGrid::Intersection\n+Definition: geometrygrid/intersection.hh:22\n+Dune::IdentityGrid\n+Provides a meta grid that is identical to its host.\n+Definition: identitygrid.hh:88\n+Dune::IdentityGrid::getHostGrid\n+HostGridType & getHostGrid() const\n+Returns the hostgrid this IdentityGrid lives in.\n+Definition: identitygrid.hh:394\n+Dune::HostGridAccess\n+provides access to host grid objects from GeometryGrid\n+Definition: identitygrid.hh:37\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::HostGrid\n+Grid::HostGrid HostGrid\n+type of HostGrid\n+Definition: hostgridaccess.hh:49\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+HostLevelIntersection\n+HostGrid::Traits::LevelIntersection HostLevelIntersection\n+type of the host level intersection\n+Definition: hostgridaccess.hh:75\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+hostEntity\n+static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity\n+&entity)\n+Definition: hostgridaccess.hh:88\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+hostEntity\n+static const Codim< codim >::HostEntity & hostEntity(const typename Codim<\n+codim >::Entity &entity)\n+Definition: hostgridaccess.hh:95\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+hostIntersection\n+static const HostIntersection & hostIntersection(const Intersection< const\n+Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection)\n+Definition: hostgridaccess.hh:102\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::Grid\n+GeometryGrid< HG, CoordFunction, Allocator > Grid\n+Definition: hostgridaccess.hh:46\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+LeafIntersection\n+Grid::Traits::LeafIntersection LeafIntersection\n+type of the GeometryGrid leaf intersection\n+Definition: hostgridaccess.hh:68\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+HostLeafIntersection\n+HostGrid::Traits::LeafIntersection HostLeafIntersection\n+type of the host leaf intersection\n+Definition: hostgridaccess.hh:73\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::hostGrid\n+static const HostGrid & hostGrid(const Grid &grid)\n+Get underlying HostGrid.\n+Definition: hostgridaccess.hh:81\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n+LevelIntersection\n+Grid::Traits::LevelIntersection LevelIntersection\n+type of the GeometryGrid level intersection\n+Definition: hostgridaccess.hh:70\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::Codim::\n+HostEntity\n+HostGrid::template Codim< codim >::Entity HostEntity\n+type of the host entity\n+Definition: hostgridaccess.hh:64\n+Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::Codim::\n+Entity\n+Grid::template Codim< codim >::Entity Entity\n+type of the GeometryGrid entity\n+Definition: hostgridaccess.hh:61\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::LeafIntersection\n+Grid::Traits::LeafIntersection LeafIntersection\n+type of the IdGrid leaf intersection\n+Definition: hostgridaccess.hh:144\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::HostGrid\n+HG HostGrid\n+type of HostGrid\n+Definition: hostgridaccess.hh:125\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Grid\n+IdentityGrid< HG > Grid\n+Definition: hostgridaccess.hh:122\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostEntity\n+static const Codim< codim >::HostEntity & hostEntity(const typename Codim<\n+codim >::Entity &entity)\n+Definition: hostgridaccess.hh:171\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::HostLevelIntersection\n+HostGrid::Traits::LevelIntersection HostLevelIntersection\n+type of the host level intersection\n+Definition: hostgridaccess.hh:151\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::LevelIntersection\n+Grid::Traits::LevelIntersection LevelIntersection\n+type of the IdGrid level intersection\n+Definition: hostgridaccess.hh:146\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostIntersection\n+static const HostLeafIntersection & hostIntersection(const LeafIntersection\n+&intersection)\n+Definition: hostgridaccess.hh:177\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::HostLeafIntersection\n+HostGrid::Traits::LeafIntersection HostLeafIntersection\n+type of the host leaf intersection\n+Definition: hostgridaccess.hh:149\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostEntity\n+static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity\n+&entity)\n+Definition: hostgridaccess.hh:164\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostIntersection\n+static const HostLevelIntersection & hostIntersection(const LevelIntersection\n+&intersection)\n+Definition: hostgridaccess.hh:183\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostGrid\n+static const HostGrid & hostGrid(const Grid &grid)\n+Get underlying HostGrid.\n+Definition: hostgridaccess.hh:157\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Codim::Entity\n+Grid::template Codim< codim >::Entity Entity\n+type of the IdGrid entity\n+Definition: hostgridaccess.hh:137\n+Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Codim::HostEntity\n+HostGrid::template Codim< codim >::Entity HostEntity\n+type of the host entity\n+Definition: hostgridaccess.hh:140\n+intersection.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01013.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01013.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: hierarchicsearch.hh File Reference\n+dune-grid: entitycommhelper.hh File Reference\n \n \n \n \n \n \n \n@@ -65,46 +65,40 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    hierarchicsearch.hh File Reference
    \n+
    entitycommhelper.hh File Reference
    \n
    \n
    \n-\n-

    Utility class for hierarchically searching for an Entity containing a given point. \n-More...

    \n-
    #include <cstddef>
    \n-#include <sstream>
    \n-#include <string>
    \n-#include <utility>
    \n-#include <dune/common/classname.hh>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n+\n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n \n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::HierarchicSearch< Grid, IS >
     Search an IndexSet for an Entity containing a given point. More...
    struct  Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface >
     
    struct  Dune::EntityCommHelper< InteriorBorder_All_Interface >
     
    struct  Dune::EntityCommHelper< Overlap_OverlapFront_Interface >
     
    struct  Dune::EntityCommHelper< Overlap_All_Interface >
     
    struct  Dune::EntityCommHelper< All_All_Interface >
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-

    Detailed Description

    \n-

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

    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,34 +6,28 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-hierarchicsearch.hh File Reference\n-Utility class for hierarchically searching for an Entity containing a given\n-point. More...\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+entitycommhelper.hh File Reference\n #include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::HierarchicSearch<_Grid,_IS_>\n-\u00a0 Search an IndexSet for an Entity containing a given point. More...\n+struct \u00a0Dune::EntityCommHelper<_InteriorBorder_InteriorBorder_Interface_>\n+\u00a0\n+struct \u00a0Dune::EntityCommHelper<_InteriorBorder_All_Interface_>\n+\u00a0\n+struct \u00a0Dune::EntityCommHelper<_Overlap_OverlapFront_Interface_>\n+\u00a0\n+struct \u00a0Dune::EntityCommHelper<_Overlap_All_Interface_>\n+\u00a0\n+struct \u00a0Dune::EntityCommHelper<_All_All_Interface_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Utility class for hierarchically searching for an Entity containing a given\n-point.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01013_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: hierarchicsearch.hh Source File\n+dune-grid: entitycommhelper.hh Source File\n \n \n \n \n \n \n \n@@ -62,176 +62,139 @@\n \n
    \n \n
    \n \n
    \n-
    hierarchicsearch.hh
    \n+
    entitycommhelper.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH
    \n-
    7#define DUNE_GRID_HIERARCHICSEARCH_HH
    \n-
    8
    \n-
    15#include <cstddef>
    \n-
    16#include <sstream>
    \n-
    17#include <string>
    \n-
    18#include <utility>
    \n-
    19
    \n-
    20#include <dune/common/classname.hh>
    \n-
    21#include <dune/common/exceptions.hh>
    \n-
    22#include <dune/common/fvector.hh>
    \n-
    23
    \n-\n-\n-
    26
    \n-
    27namespace Dune
    \n-
    28{
    \n-
    29
    \n-
    33 template<class Grid, class IS>
    \n-\n-
    35 {
    \n-
    37 constexpr static int dim = Grid::dimension;
    \n-
    38
    \n-
    40 constexpr static int dimw = Grid::dimensionworld;
    \n+
    5#ifndef DUNE_ENTITYCOMMHELPER_HH
    \n+
    6#define DUNE_ENTITYCOMMHELPER_HH
    \n+
    7
    \n+\n+
    9
    \n+
    10namespace Dune
    \n+
    11{
    \n+
    12
    \n+
    13 template< InterfaceType iftype >
    \n+\n+
    15
    \n+
    16
    \n+
    17 template<>
    \n+\n+
    19 {
    \n+
    20 static bool send ( const PartitionType p )
    \n+
    21 {
    \n+
    22 //return (p == InteriorEntity) || (p == BorderEntity);
    \n+
    23 return (p == BorderEntity);
    \n+
    24 }
    \n+
    25
    \n+
    26 static bool receive ( const PartitionType p )
    \n+
    27 {
    \n+
    28 //return (p == InteriorEntity) || (p == BorderEntity);
    \n+
    29 return (p == BorderEntity);
    \n+
    30 }
    \n+
    31 };
    \n+
    32
    \n+
    33
    \n+
    34 template<>
    \n+\n+
    36 {
    \n+
    37 static bool send ( const PartitionType p )
    \n+
    38 {
    \n+
    39 return (p == InteriorEntity) || (p == BorderEntity);
    \n+
    40 }
    \n
    41
    \n-
    43 typedef typename Grid::ctype ct;
    \n-
    44
    \n-
    46 typedef typename Grid::template Codim<0>::Entity Entity;
    \n-
    47
    \n-
    49 typedef typename Grid::HierarchicIterator HierarchicIterator;
    \n-
    50
    \n-
    51 static std::string formatEntityInformation ( const Entity &e ) {
    \n-
    52 const typename Entity::Geometry &geo = e.geometry();
    \n-
    53 std::ostringstream info;
    \n-
    54 info << "level=" << e.level() << " "
    \n-
    55 << "partition=" << e.partitionType() << " "
    \n-
    56 << "center=(" << geo.center() << ") "
    \n-
    57 << "corners=[(" << geo.corner(0) << ")";
    \n-
    58 for(int i = 1; i < geo.corners(); ++i)
    \n-
    59 info << " (" << e.geometry().corner(i) << ")";
    \n-
    60 info << "]";
    \n-
    61 return info.str();
    \n-
    62 }
    \n-
    63
    \n-
    74 Entity hFindEntity ( const Entity &entity,
    \n-
    75 const FieldVector<ct,dimw>& global) const
    \n-
    76 {
    \n-
    77 // type of element geometry
    \n-
    78 typedef typename Entity::Geometry Geometry;
    \n-
    79 // type of local coordinate
    \n-
    80 typedef typename Geometry::LocalCoordinate LocalCoordinate;
    \n+
    42 static bool receive ( const PartitionType p )
    \n+
    43 {
    \n+
    44 //return true;
    \n+
    45 return (p != InteriorEntity);
    \n+
    46 }
    \n+
    47 };
    \n+
    48
    \n+
    49
    \n+
    50 template<>
    \n+\n+
    52 {
    \n+
    53 static bool send ( const PartitionType p )
    \n+
    54 {
    \n+
    55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
    \n+
    56 return (p != FrontEntity) && (p != GhostEntity);
    \n+
    57 }
    \n+
    58
    \n+
    59 static bool receive ( const PartitionType p )
    \n+
    60 {
    \n+
    61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
    \n+
    62 return (p != GhostEntity);
    \n+
    63 }
    \n+
    64 };
    \n+
    65
    \n+
    66
    \n+
    67 template<>
    \n+\n+
    69 {
    \n+
    70 static bool send ( const PartitionType p )
    \n+
    71 {
    \n+
    72 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
    \n+
    73 return (p != FrontEntity) && (p != GhostEntity);
    \n+
    74 }
    \n+
    75
    \n+
    76 static bool receive ([[maybe_unused]] const PartitionType p)
    \n+
    77 {
    \n+
    78 return true;
    \n+
    79 }
    \n+
    80 };
    \n
    81
    \n-
    82 const int childLevel = entity.level()+1 ;
    \n-
    83 // loop over all child Entities
    \n-
    84 const HierarchicIterator end = entity.hend( childLevel );
    \n-
    85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it )
    \n-
    86 {
    \n-
    87 Entity child = *it;
    \n-
    88 Geometry geo = child.geometry();
    \n-
    89
    \n-
    90 LocalCoordinate local = geo.local(global);
    \n-
    91 if (referenceElement( geo ).checkInside(local))
    \n-
    92 {
    \n-
    93 // return if we found the leaf, else search through the child entites
    \n-
    94 if( indexSet_.contains( child ) )
    \n-
    95 return child;
    \n-
    96 else
    \n-
    97 return hFindEntity( child, global );
    \n-
    98 }
    \n-
    99 }
    \n-
    100 std::ostringstream children;
    \n-
    101 HierarchicIterator it = entity.hbegin( childLevel );
    \n-
    102 if(it != end) {
    \n-
    103 children << "{" << formatEntityInformation(*it) << "}";
    \n-
    104 for( ++it; it != end; ++it )
    \n-
    105 children << " {" << formatEntityInformation(*it) << "}";
    \n-
    106 }
    \n-
    107 DUNE_THROW(Exception, "{" << className(*this) << "} Unexpected "
    \n-
    108 "internal Error: none of the children of the entity "
    \n-
    109 "{" << formatEntityInformation(entity) << "} contains "
    \n-
    110 "coordinate (" << global << "). Children are: "
    \n-
    111 "[" << children.str() << "].");
    \n-
    112 }
    \n-
    113
    \n-
    114 public:
    \n-
    118 HierarchicSearch(const Grid & g, const IS & is) : grid_(g), indexSet_(is) {}
    \n-
    119
    \n-
    127 Entity findEntity(const FieldVector<ct,dimw>& global) const
    \n-
    128 { return findEntity<All_Partition>(global); }
    \n-
    129
    \n-
    137 template<PartitionIteratorType partition>
    \n-
    138 Entity findEntity(const FieldVector<ct,dimw>& global) const
    \n-
    139 {
    \n-
    140 typedef typename Grid::LevelGridView LevelGV;
    \n-
    141 const LevelGV &gv = grid_.levelGridView(0);
    \n-
    142
    \n-
    144 typedef typename LevelGV::template Codim<0>::template Partition<partition>::Iterator LevelIterator;
    \n-
    145
    \n-
    146 // type of element geometry
    \n-
    147 typedef typename Entity::Geometry Geometry;
    \n-
    148 // type of local coordinate
    \n-
    149 typedef typename Geometry::LocalCoordinate LocalCoordinate;
    \n-
    150
    \n-
    151 // loop over macro level
    \n-
    152 const LevelIterator end = gv.template end<0, partition>();
    \n-
    153 for (LevelIterator it = gv.template begin<0, partition>(); it != end; ++it)
    \n-
    154 {
    \n-
    155 Entity entity = *it;
    \n-
    156 Geometry geo = entity.geometry();
    \n-
    157
    \n-
    158 LocalCoordinate local = geo.local( global );
    \n-
    159 if( !referenceElement( geo ).checkInside( local ) )
    \n-
    160 continue;
    \n-
    161
    \n-
    162 if( (int(dim) != int(dimw)) && ((geo.global( local ) - global).two_norm() > 1e-8) )
    \n-
    163 continue;
    \n-
    164
    \n-
    165 // return if we found the leaf, else search through the child entites
    \n-
    166 if( indexSet_.contains( entity ) )
    \n-
    167 return entity;
    \n-
    168 else
    \n-
    169 return hFindEntity( entity, global );
    \n-
    170 }
    \n-
    171 DUNE_THROW( GridError, "Coordinate " << global << " is outside the grid." );
    \n-
    172 }
    \n-
    173
    \n-
    174 private:
    \n-
    175 const Grid& grid_;
    \n-
    176 const IS& indexSet_;
    \n-
    177 };
    \n-
    178
    \n-
    179} // end namespace Dune
    \n-
    180
    \n-
    181#endif // DUNE_GRID_HIERARCHICSEARCH_HH
    \n-\n+
    82
    \n+
    83 template<>
    \n+\n+
    85 {
    \n+
    86 static bool send ([[maybe_unused]] const PartitionType p)
    \n+
    87 {
    \n+
    88 return true;
    \n+
    89 }
    \n+
    90
    \n+
    91 static bool receive ([[maybe_unused]] const PartitionType p)
    \n+
    92 {
    \n+
    93 return true;
    \n+
    94 }
    \n+
    95 };
    \n+
    96
    \n+
    97} // namespace Dune
    \n+
    98
    \n+
    99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH
    \n+\n+
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n+
    @ FrontEntity
    on boundary between overlap and ghost
    Definition: gridenums.hh:34
    \n+
    @ InteriorEntity
    all interior entities
    Definition: gridenums.hh:31
    \n+
    @ GhostEntity
    ghost entities
    Definition: gridenums.hh:35
    \n+
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n+
    @ InteriorBorder_All_Interface
    send interior and border, receive all entities
    Definition: gridenums.hh:88
    \n+
    @ All_All_Interface
    send all and receive all entities
    Definition: gridenums.hh:91
    \n+
    @ Overlap_All_Interface
    send overlap, receive all entities
    Definition: gridenums.hh:90
    \n+
    @ Overlap_OverlapFront_Interface
    send overlap, receive overlap and front entities
    Definition: gridenums.hh:89
    \n+
    @ InteriorBorder_InteriorBorder_Interface
    send/receive interior and border entities
    Definition: gridenums.hh:87
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
    Definition: common/geometry.hh:558
    \n-
    GridImp::template Codim< cd >::Geometry Geometry
    The corresponding geometry type.
    Definition: common/entity.hh:100
    \n-
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n-
    Wrapper class for geometries.
    Definition: common/geometry.hh:71
    \n-
    GlobalCoordinate global(const LocalCoordinate &local) const
    Evaluate the map .
    Definition: common/geometry.hh:228
    \n-
    FieldVector< ctype, mydim > LocalCoordinate
    type of local coordinates
    Definition: common/geometry.hh:103
    \n-
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n-
    GridFamily::Traits::HierarchicIterator HierarchicIterator
    A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine,...
    Definition: common/grid.hh:482
    \n-
    GridFamily::Traits::LevelGridView LevelGridView
    type of view for level grid
    Definition: common/grid.hh:402
    \n-
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/grid.hh:390
    \n-
    LevelGridView levelGridView(int level) const
    View for a grid level for All_Partition.
    Definition: common/grid.hh:598
    \n-
    ct ctype
    Define type used for coordinates in grid module.
    Definition: common/grid.hh:532
    \n-
    Search an IndexSet for an Entity containing a given point.
    Definition: hierarchicsearch.hh:35
    \n-
    Entity findEntity(const FieldVector< ct, dimw > &global) const
    Search the IndexSet of this HierarchicSearch for an Entity containing point global.
    Definition: hierarchicsearch.hh:127
    \n-
    Entity findEntity(const FieldVector< ct, dimw > &global) const
    Search the IndexSet of this HierarchicSearch for an Entity containing point global.
    Definition: hierarchicsearch.hh:138
    \n-
    HierarchicSearch(const Grid &g, const IS &is)
    Construct a HierarchicSearch object from a Grid and an IndexSet.
    Definition: hierarchicsearch.hh:118
    \n-
    Different resources needed by all grid implementations.
    \n+
    Definition: entitycommhelper.hh:14
    \n+
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:26
    \n+
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:20
    \n+
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:42
    \n+
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:37
    \n+
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:53
    \n+
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:59
    \n+
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:76
    \n+
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:70
    \n+
    static bool send(const PartitionType p)
    Definition: entitycommhelper.hh:86
    \n+
    static bool receive(const PartitionType p)
    Definition: entitycommhelper.hh:91
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,230 +5,191 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-hierarchicsearch.hh\n+entitycommhelper.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GRID_HIERARCHICSEARCH_HH\n- 7#define DUNE_GRID_HIERARCHICSEARCH_HH\n- 8\n- 15#include \n- 16#include \n- 17#include \n- 18#include \n- 19\n- 20#include \n- 21#include \n- 22#include \n- 23\n- 24#include \n- 25#include \n- 26\n- 27namespace Dune\n- 28{\n- 29\n- 33 template\n-34 class HierarchicSearch\n- 35 {\n- 37 constexpr static int dim = Grid::dimension;\n- 38\n- 40 constexpr static int dimw = Grid::dimensionworld;\n+ 5#ifndef DUNE_ENTITYCOMMHELPER_HH\n+ 6#define DUNE_ENTITYCOMMHELPER_HH\n+ 7\n+ 8#include \n+ 9\n+ 10namespace Dune\n+ 11{\n+ 12\n+ 13 template< InterfaceType iftype >\n+14 struct EntityCommHelper;\n+ 15\n+ 16\n+ 17 template<>\n+18 struct EntityCommHelper< InteriorBorder_InteriorBorder_Interface >\n+ 19 {\n+20 static bool send ( const PartitionType p )\n+ 21 {\n+ 22 //return (p == InteriorEntity) || (p == BorderEntity);\n+ 23 return (p == BorderEntity);\n+ 24 }\n+ 25\n+26 static bool receive ( const PartitionType p )\n+ 27 {\n+ 28 //return (p == InteriorEntity) || (p == BorderEntity);\n+ 29 return (p == BorderEntity);\n+ 30 }\n+ 31 };\n+ 32\n+ 33\n+ 34 template<>\n+35 struct EntityCommHelper< InteriorBorder_All_Interface >\n+ 36 {\n+37 static bool send ( const PartitionType p )\n+ 38 {\n+ 39 return (p == InteriorEntity) || (p == BorderEntity);\n+ 40 }\n 41\n- 43 typedef typename Grid::ctype ct;\n- 44\n- 46 typedef typename Grid::template Codim<0>::Entity Entity;\n- 47\n- 49 typedef typename Grid::HierarchicIterator HierarchicIterator;\n- 50\n- 51 static std::string formatEntityInformation ( const Entity &e ) {\n- 52 const typename Entity::Geometry &geo = e.geometry();\n- 53 std::ostringstream info;\n- 54 info << \"level=\" << e.level() << \" \"\n- 55 << \"partition=\" << e.partitionType() << \" \"\n- 56 << \"center=(\" << geo.center() << \") \"\n- 57 << \"corners=[(\" << geo.corner(0) << \")\";\n- 58 for(int i = 1; i < geo.corners(); ++i)\n- 59 info << \" (\" << e.geometry().corner(i) << \")\";\n- 60 info << \"]\";\n- 61 return info.str();\n- 62 }\n- 63\n- 74 Entity hFindEntity ( const Entity &entity,\n- 75 const FieldVector& global) const\n- 76 {\n- 77 // type of element geometry\n- 78 typedef typename Entity::Geometry Geometry;\n- 79 // type of local coordinate\n- 80 typedef typename Geometry::LocalCoordinate LocalCoordinate;\n+42 static bool receive ( const PartitionType p )\n+ 43 {\n+ 44 //return true;\n+ 45 return (p != InteriorEntity);\n+ 46 }\n+ 47 };\n+ 48\n+ 49\n+ 50 template<>\n+51 struct EntityCommHelper< Overlap_OverlapFront_Interface >\n+ 52 {\n+53 static bool send ( const PartitionType p )\n+ 54 {\n+ 55 //return (p == InteriorEntity) || (p == BorderEntity) || (p ==\n+OverlapEntity);\n+ 56 return (p != FrontEntity) && (p != GhostEntity);\n+ 57 }\n+ 58\n+59 static bool receive ( const PartitionType p )\n+ 60 {\n+ 61 //return (p == InteriorEntity) || (p == BorderEntity) || (p ==\n+OverlapEntity) || (p == FrontEntity);\n+ 62 return (p != GhostEntity);\n+ 63 }\n+ 64 };\n+ 65\n+ 66\n+ 67 template<>\n+68 struct EntityCommHelper< Overlap_All_Interface >\n+ 69 {\n+70 static bool send ( const PartitionType p )\n+ 71 {\n+ 72 //return (p == InteriorEntity) || (p == BorderEntity) || (p ==\n+OverlapEntity);\n+ 73 return (p != FrontEntity) && (p != GhostEntity);\n+ 74 }\n+ 75\n+76 static bool receive ([[maybe_unused]] const PartitionType p)\n+ 77 {\n+ 78 return true;\n+ 79 }\n+ 80 };\n 81\n- 82 const int childLevel = entity.level()+1 ;\n- 83 // loop over all child Entities\n- 84 const HierarchicIterator end = entity.hend( childLevel );\n- 85 for( HierarchicIterator it = entity.hbegin( childLevel ); it != end; ++it )\n- 86 {\n- 87 Entity child = *it;\n- 88 Geometry geo = child.geometry();\n- 89\n- 90 LocalCoordinate local = geo.local(global);\n- 91 if (referenceElement( geo ).checkInside(local))\n+ 82\n+ 83 template<>\n+84 struct EntityCommHelper< All_All_Interface >\n+ 85 {\n+86 static bool send ([[maybe_unused]] const PartitionType p)\n+ 87 {\n+ 88 return true;\n+ 89 }\n+ 90\n+91 static bool receive ([[maybe_unused]] const PartitionType p)\n 92 {\n- 93 // return if we found the leaf, else search through the child entites\n- 94 if( indexSet_.contains( child ) )\n- 95 return child;\n- 96 else\n- 97 return hFindEntity( child, global );\n- 98 }\n- 99 }\n- 100 std::ostringstream children;\n- 101 HierarchicIterator it = entity.hbegin( childLevel );\n- 102 if(it != end) {\n- 103 children << \"{\" << formatEntityInformation(*it) << \"}\";\n- 104 for( ++it; it != end; ++it )\n- 105 children << \" {\" << formatEntityInformation(*it) << \"}\";\n- 106 }\n- 107 DUNE_THROW(Exception, \"{\" << className(*this) << \"} Unexpected \"\n- 108 \"internal Error: none of the children of the entity \"\n- 109 \"{\" << formatEntityInformation(entity) << \"} contains \"\n- 110 \"coordinate (\" << global << \"). Children are: \"\n- 111 \"[\" << children.str() << \"].\");\n- 112 }\n- 113\n- 114 public:\n-118 HierarchicSearch(const Grid & g, const IS & is) : grid_(g), indexSet_(is)\n-{}\n- 119\n-127 Entity findEntity(const FieldVector& global) const\n- 128 { return findEntity(global); }\n- 129\n- 137 template\n-138 Entity findEntity(const FieldVector& global) const\n- 139 {\n- 140 typedef typename Grid::LevelGridView LevelGV;\n- 141 const LevelGV &gv = grid_.levelGridView(0);\n- 142\n- 144 typedef typename LevelGV::template Codim<0>::template\n-Partition::Iterator LevelIterator;\n- 145\n- 146 // type of element geometry\n- 147 typedef typename Entity::Geometry Geometry;\n- 148 // type of local coordinate\n- 149 typedef typename Geometry::LocalCoordinate LocalCoordinate;\n- 150\n- 151 // loop over macro level\n- 152 const LevelIterator end = gv.template end<0, partition>();\n- 153 for (LevelIterator it = gv.template begin<0, partition>(); it != end;\n-++it)\n- 154 {\n- 155 Entity entity = *it;\n- 156 Geometry geo = entity.geometry();\n- 157\n- 158 LocalCoordinate local = geo.local( global );\n- 159 if( !referenceElement( geo ).checkInside( local ) )\n- 160 continue;\n- 161\n- 162 if( (int(dim) != int(dimw)) && ((geo.global( local ) - global).two_norm()\n-> 1e-8) )\n- 163 continue;\n- 164\n- 165 // return if we found the leaf, else search through the child entites\n- 166 if( indexSet_.contains( entity ) )\n- 167 return entity;\n- 168 else\n- 169 return hFindEntity( entity, global );\n- 170 }\n- 171 DUNE_THROW( GridError, \"Coordinate \" << global << \" is outside the grid.\"\n-);\n- 172 }\n- 173\n- 174 private:\n- 175 const Grid& grid_;\n- 176 const IS& indexSet_;\n- 177 };\n- 178\n- 179} // end namespace Dune\n- 180\n- 181#endif // DUNE_GRID_HIERARCHICSEARCH_HH\n+ 93 return true;\n+ 94 }\n+ 95 };\n+ 96\n+ 97} // namespace Dune\n+ 98\n+ 99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH\n gridenums.hh\n+Dune::PartitionType\n+PartitionType\n+Attributes used in the generic overlap model.\n+Definition: gridenums.hh:30\n+Dune::FrontEntity\n+@ FrontEntity\n+on boundary between overlap and ghost\n+Definition: gridenums.hh:34\n+Dune::InteriorEntity\n+@ InteriorEntity\n+all interior entities\n+Definition: gridenums.hh:31\n+Dune::GhostEntity\n+@ GhostEntity\n+ghost entities\n+Definition: gridenums.hh:35\n+Dune::BorderEntity\n+@ BorderEntity\n+on boundary between interior and overlap\n+Definition: gridenums.hh:32\n+Dune::InteriorBorder_All_Interface\n+@ InteriorBorder_All_Interface\n+send interior and border, receive all entities\n+Definition: gridenums.hh:88\n+Dune::All_All_Interface\n+@ All_All_Interface\n+send all and receive all entities\n+Definition: gridenums.hh:91\n+Dune::Overlap_All_Interface\n+@ Overlap_All_Interface\n+send overlap, receive all entities\n+Definition: gridenums.hh:90\n+Dune::Overlap_OverlapFront_Interface\n+@ Overlap_OverlapFront_Interface\n+send overlap, receive overlap and front entities\n+Definition: gridenums.hh:89\n+Dune::InteriorBorder_InteriorBorder_Interface\n+@ InteriorBorder_InteriorBorder_Interface\n+send/receive interior and border entities\n+Definition: gridenums.hh:87\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::referenceElement\n-auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo)\n--> decltype(referenceElement(geo, geo.impl()))\n-Definition: common/geometry.hh:558\n-Dune::Entity::Geometry\n-GridImp::template Codim< cd >::Geometry Geometry\n-The corresponding geometry type.\n-Definition: common/entity.hh:100\n-Dune::GridError\n-Base class for exceptions in Dune grid modules.\n-Definition: exceptions.hh:20\n-Dune::Geometry\n-Wrapper class for geometries.\n-Definition: common/geometry.hh:71\n-Dune::Geometry::global\n-GlobalCoordinate global(const LocalCoordinate &local) const\n-Evaluate the map .\n-Definition: common/geometry.hh:228\n-Dune::Geometry::LocalCoordinate\n-FieldVector< ctype, mydim > LocalCoordinate\n-type of local coordinates\n-Definition: common/geometry.hh:103\n-Dune::Grid\n-Grid abstract base class.\n-Definition: common/grid.hh:375\n-Dune::Grid::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/grid.hh:387\n-Dune::Grid::HierarchicIterator\n-GridFamily::Traits::HierarchicIterator HierarchicIterator\n-A type that is a model of Dune::HierarchicIterator A type of iterator that\n-allows to examine,...\n-Definition: common/grid.hh:482\n-Dune::Grid::LevelGridView\n-GridFamily::Traits::LevelGridView LevelGridView\n-type of view for level grid\n-Definition: common/grid.hh:402\n-Dune::Grid::dimensionworld\n-static constexpr int dimensionworld\n-The dimension of the world the grid lives in.\n-Definition: common/grid.hh:390\n-Dune::Grid::levelGridView\n-LevelGridView levelGridView(int level) const\n-View for a grid level for All_Partition.\n-Definition: common/grid.hh:598\n-Dune::Grid::ctype\n-ct ctype\n-Define type used for coordinates in grid module.\n-Definition: common/grid.hh:532\n-Dune::HierarchicSearch\n-Search an IndexSet for an Entity containing a given point.\n-Definition: hierarchicsearch.hh:35\n-Dune::HierarchicSearch::findEntity\n-Entity findEntity(const FieldVector< ct, dimw > &global) const\n-Search the IndexSet of this HierarchicSearch for an Entity containing point\n-global.\n-Definition: hierarchicsearch.hh:127\n-Dune::HierarchicSearch::findEntity\n-Entity findEntity(const FieldVector< ct, dimw > &global) const\n-Search the IndexSet of this HierarchicSearch for an Entity containing point\n-global.\n-Definition: hierarchicsearch.hh:138\n-Dune::HierarchicSearch::HierarchicSearch\n-HierarchicSearch(const Grid &g, const IS &is)\n-Construct a HierarchicSearch object from a Grid and an IndexSet.\n-Definition: hierarchicsearch.hh:118\n-grid.hh\n-Different resources needed by all grid implementations.\n+Dune::EntityCommHelper\n+Definition: entitycommhelper.hh:14\n+Dune::EntityCommHelper<_InteriorBorder_InteriorBorder_Interface_>::receive\n+static bool receive(const PartitionType p)\n+Definition: entitycommhelper.hh:26\n+Dune::EntityCommHelper<_InteriorBorder_InteriorBorder_Interface_>::send\n+static bool send(const PartitionType p)\n+Definition: entitycommhelper.hh:20\n+Dune::EntityCommHelper<_InteriorBorder_All_Interface_>::receive\n+static bool receive(const PartitionType p)\n+Definition: entitycommhelper.hh:42\n+Dune::EntityCommHelper<_InteriorBorder_All_Interface_>::send\n+static bool send(const PartitionType p)\n+Definition: entitycommhelper.hh:37\n+Dune::EntityCommHelper<_Overlap_OverlapFront_Interface_>::send\n+static bool send(const PartitionType p)\n+Definition: entitycommhelper.hh:53\n+Dune::EntityCommHelper<_Overlap_OverlapFront_Interface_>::receive\n+static bool receive(const PartitionType p)\n+Definition: entitycommhelper.hh:59\n+Dune::EntityCommHelper<_Overlap_All_Interface_>::receive\n+static bool receive(const PartitionType p)\n+Definition: entitycommhelper.hh:76\n+Dune::EntityCommHelper<_Overlap_All_Interface_>::send\n+static bool send(const PartitionType p)\n+Definition: entitycommhelper.hh:70\n+Dune::EntityCommHelper<_All_All_Interface_>::send\n+static bool send(const PartitionType p)\n+Definition: entitycommhelper.hh:86\n+Dune::EntityCommHelper<_All_All_Interface_>::receive\n+static bool receive(const PartitionType p)\n+Definition: entitycommhelper.hh:91\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01016.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01016.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: hostgridaccess.hh File Reference\n+dune-grid: globalindexset.hh File Reference\n \n \n \n \n \n \n \n@@ -65,41 +65,66 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    hostgridaccess.hh File Reference
    \n+
    globalindexset.hh File Reference
    \n
    \n
    \n-
    #include <string>
    \n-#include <dune/grid/geometrygrid/intersection.hh>
    \n+\n+

    Provides a globally unique index for all entities of a distributed Dune grid. \n+More...

    \n+
    #include <vector>
    \n+#include <iostream>
    \n+#include <fstream>
    \n+#include <memory>
    \n+#include <map>
    \n+#include <utility>
    \n+#include <algorithm>
    \n+#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/common/parallel/mpihelper.hh>
    \n
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n+\n+\n \n-\n+\n+\n \n-\n-\n+\n \n

    \n Classes

    struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
     
    struct  Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim< codim >
     A Traits struct that collects return types of class member methods. More...
    class  Dune::GlobalIndexSet< GridView >
     Calculate globally unique index over all processes in a Dune grid. More...
     
    struct  Dune::HostGridAccess< IdentityGrid< HG > >
    struct  Dune::GlobalIndexSet< GridView >::SubPartitionTypeProvider< Entity, Codim >
     Helper class to provide access to subentity PartitionTypes with a run-time codimension. More...
     
    struct  Dune::HostGridAccess< IdentityGrid< HG > >::Codim< codim >
     A Traits struct that collects return types of class member methods. More...
    struct  Dune::GlobalIndexSet< GridView >::SubPartitionTypeProvider< Entity, 0 >
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    Provides a globally unique index for all entities of a distributed Dune grid.

    \n+

    Such functionality is relevant for a number of applications:

      \n+
    • Map a degree of freedom associated with an entity to its location in a global matrix or global vector
    • \n+
    • Such indices for elements are needed as input to external mesh partitioners
    • \n+
    • Using matrix and vector routines from the PETSc or trilinos parallel linear algebra packages for distributed memory parallel computers.
    • \n+
    \n+

    Method: (1) The UniqueEntityPartition class assigns an owner process to each entity

        (2) Compute the number of entities that are owned by each process\n+\n+    (3) we communicate the index of entities that are owned by the process to processes\n+        that also contain these entities but do not own them, so that on a non-owner process\n+        we have information on the index of the entity that it got from the owner-process;\n+
    Author
    Benedikt Oswald, Patrick Leidenberger, Oliver Sander
    \n+
    Attention
    globally unique indices are ONLY provided for entities of the InteriorBorder_Partition type, NOT for the Ghost_Partition type !!!
    \n+
    Bug:
    This code will most likely not work on grids with more than one element type. Please ask on the mailing list if you need this feature.
    \n+
    Note
    The interface in this file is experimental, and may change without prior notice.
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,32 +6,71 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-hostgridaccess.hh File Reference\n-#include \n-#include \n+globalindexset.hh File Reference\n+Provides a globally unique index for all entities of a distributed Dune grid.\n+More...\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>\n-\u00a0\n-struct \u00a0Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n- Codim<_codim_>\n-\u00a0 A Traits struct that collects return types of class member methods.\n+ class \u00a0Dune::GlobalIndexSet<_GridView_>\n+\u00a0 Calculate globally unique index over all processes in a Dune grid.\n More...\n \u00a0\n-struct \u00a0Dune::HostGridAccess<_IdentityGrid<_HG_>_>\n+struct \u00a0Dune::GlobalIndexSet<_GridView_>::SubPartitionTypeProvider<_Entity,\n+ Codim_>\n+\u00a0 Helper class to provide access to subentity PartitionTypes with a run-\n+ time codimension. More...\n \u00a0\n-struct \u00a0Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Codim<_codim_>\n-\u00a0 A Traits struct that collects return types of class member methods.\n- More...\n+struct \u00a0Dune::GlobalIndexSet<_GridView_>::SubPartitionTypeProvider<_Entity,_0\n+ >\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+***** Detailed Description *****\n+Provides a globally unique index for all entities of a distributed Dune grid.\n+Such functionality is relevant for a number of applications:\n+ * Map a degree of freedom associated with an entity to its location in a\n+ global matrix or global vector\n+ * Such indices for elements are needed as input to external mesh\n+ partitioners\n+ * Using matrix and vector routines from the PETSc or trilinos parallel\n+ linear algebra packages for distributed memory parallel computers.\n+Method: (1) The UniqueEntityPartition class assigns an owner process to each\n+entity\n+ (2) Compute the number of entities that are owned by each process\n+\n+ (3) we communicate the index of entities that are owned by the process to\n+processes\n+ that also contain these entities but do not own them, so that on a non-\n+owner process\n+ we have information on the index of the entity that it got from the\n+owner-process;\n+ Author\n+ Benedikt Oswald, Patrick Leidenberger, Oliver Sander\n+ Attention\n+ globally unique indices are ONLY provided for entities of the\n+ InteriorBorder_Partition type, NOT for the Ghost_Partition type !!!\n+ Bug:\n+ This code will most likely not work on grids with more than one element\n+ type. Please ask on the mailing list if you need this feature.\n+ Note\n+ The interface in this file is experimental, and may change without prior\n+ notice.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01016_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: hostgridaccess.hh Source File\n+dune-grid: globalindexset.hh Source File\n \n \n \n \n \n \n \n@@ -62,191 +62,462 @@\n \n
    \n \n
    \n \n
    \n-
    hostgridaccess.hh
    \n+
    globalindexset.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH
    \n-
    6#define DUNE_GRID_HOSTGRIDACCESS_HH
    \n-
    7
    \n-
    8#include <string>
    \n-
    9
    \n-\n-
    11
    \n-
    12namespace Dune
    \n-
    13{
    \n-
    14
    \n-
    15 // External Forward Declarations
    \n-
    16 // -----------------------------
    \n-
    17
    \n-
    18 template< class HostGrid, class CoordFunction, class Allocator >
    \n-
    19 class GeometryGrid;
    \n-
    20
    \n-
    21 template< class >
    \n-
    22 class IdentityGrid;
    \n-
    23
    \n-
    24
    \n-
    25 // HostGridAccess
    \n-
    26 // --------------
    \n-
    27
    \n-
    28 template< class Grid >
    \n-
    29 struct HostGridAccess;
    \n-
    30
    \n-
    31
    \n-
    32
    \n-
    40 template< class HG, class CoordFunction, class Allocator >
    \n-
    41 struct HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >
    \n-
    42 {
    \n-\n-
    47
    \n-
    49 typedef typename Grid::HostGrid HostGrid;
    \n+
    5
    \n+
    35#ifndef DUNE_GRID_UTILITY_GLOBALINDEXSET_HH
    \n+
    36#define DUNE_GRID_UTILITY_GLOBALINDEXSET_HH
    \n+
    37
    \n+
    39#include <vector>
    \n+
    40#include <iostream>
    \n+
    41#include <fstream>
    \n+
    42#include <memory>
    \n+
    43#include <map>
    \n+
    44#include <utility>
    \n+
    45#include <algorithm>
    \n+
    46
    \n+\n+\n
    50
    \n-
    57 template< int codim >
    \n-
    58 struct Codim
    \n-
    59 {
    \n-
    61 typedef typename Grid::template Codim< codim >::Entity Entity;
    \n-
    62
    \n-
    64 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
    \n-
    65 };
    \n-
    66
    \n-
    68 typedef typename Grid::Traits::LeafIntersection LeafIntersection;
    \n-
    70 typedef typename Grid::Traits::LevelIntersection LevelIntersection;
    \n-
    71
    \n-
    73 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
    \n-
    75 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
    \n-
    76
    \n-
    81 static const HostGrid &hostGrid ( const Grid &grid )
    \n-
    82 {
    \n-
    83 return grid.hostGrid();
    \n-
    84 }
    \n-
    85
    \n-
    86 template< class Entity >
    \n-
    87 static const typename Codim< Entity::codimension >::HostEntity &
    \n-
    88 hostEntity ( const Entity &entity )
    \n+
    52#if HAVE_MPI
    \n+
    53 #include <dune/common/parallel/mpihelper.hh>
    \n+
    54#endif
    \n+
    55
    \n+
    56namespace Dune
    \n+
    57{
    \n+
    58
    \n+
    61 template<class GridView>
    \n+\n+
    63 {
    \n+
    64 public:
    \n+
    66 typedef int Index;
    \n+
    67
    \n+
    73 template <class Entity, int Codim>
    \n+\n+
    75 {
    \n+
    78 static PartitionType get(const Entity& entity, int codim, int i)
    \n+
    79 {
    \n+
    80 if (codim==Codim)
    \n+
    81 return entity.template subEntity<Codim>(i).partitionType();
    \n+
    82 else
    \n+
    83 return SubPartitionTypeProvider<Entity,Codim-1>::get(entity, codim, i);
    \n+
    84 }
    \n+
    85 };
    \n+
    86
    \n+
    87 template <class Entity>
    \n+\n
    89 {
    \n-
    90 return hostEntity< Entity::codimension >( entity );
    \n-
    91 }
    \n-
    92
    \n-
    93 template< int codim >
    \n-
    94 static const typename Codim< codim >::HostEntity &
    \n-
    95 hostEntity ( const typename Codim< codim >::Entity &entity )
    \n-
    96 {
    \n-
    97 return entity.impl().hostEntity();
    \n-
    98 }
    \n+
    90 static PartitionType get(const Entity& entity, int codim, int i)
    \n+
    91 {
    \n+
    92 return entity.template subEntity<0>(i).partitionType();
    \n+
    93 }
    \n+
    94 };
    \n+
    95
    \n+
    96 private:
    \n+
    98 typedef typename GridView::Grid Grid;
    \n
    99
    \n-
    100 template< class HostIntersection >
    \n-
    101 static const HostIntersection &
    \n-\n-
    103 {
    \n-
    104 return intersection.impl().hostIntersection();
    \n-
    105 }
    \n-
    106 };
    \n-
    107
    \n+
    100 typedef typename GridView::Grid::GlobalIdSet GlobalIdSet;
    \n+
    101 typedef typename GridView::Grid::GlobalIdSet::IdType IdType;
    \n+
    102 typedef typename GridView::Traits::template Codim<0>::Iterator Iterator;
    \n+
    103
    \n+
    104 typedef typename Grid::Communication Communication;
    \n+
    105
    \n+
    106 typedef std::map<IdType,Index> MapId2Index;
    \n+
    107 typedef std::map<Index,Index> IndexMap;
    \n
    108
    \n-
    116 template< class HG >
    \n-\n-
    118 {
    \n-\n-
    123
    \n-
    125 typedef HG HostGrid;
    \n-
    126
    \n-
    133 template< int codim >
    \n-
    134 struct Codim
    \n-
    135 {
    \n-
    137 typedef typename Grid::template Codim< codim >::Entity Entity;
    \n-
    138
    \n-
    140 typedef typename HostGrid::template Codim< codim >::Entity HostEntity;
    \n-
    141 };
    \n-
    142
    \n-\n-\n-
    147
    \n-
    149 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;
    \n-
    151 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;
    \n+
    109 /*********************************************************************************************/
    \n+
    110 /* calculate unique partitioning for all entities of a given codim in a given GridView, */
    \n+
    111 /* assuming they all have the same geometry, i.e. codim, type */
    \n+
    112 /*********************************************************************************************/
    \n+
    113 class UniqueEntityPartition
    \n+
    114 {
    \n+
    115 private:
    \n+
    116 /* A DataHandle class to calculate the minimum of a std::vector which is accompanied by an index set */
    \n+
    117 template<class IS, class V> // mapper type and vector type
    \n+
    118 class MinimumExchange
    \n+
    119 : public Dune::CommDataHandleIF<MinimumExchange<IS,V>,typename V::value_type>
    \n+
    120 {
    \n+
    121 public:
    \n+
    123 typedef typename V::value_type DataType;
    \n+
    124
    \n+
    126 bool contains (int dim, unsigned int codim) const
    \n+
    127 {
    \n+
    128 return codim==indexSetCodim_;
    \n+
    129 }
    \n+
    130
    \n+
    132 bool fixedSize (int dim, int codim) const
    \n+
    133 {
    \n+
    134 return true ;
    \n+
    135 }
    \n+
    136
    \n+
    140 template<class EntityType>
    \n+
    141 size_t size (EntityType& e) const
    \n+
    142 {
    \n+
    143 return 1 ;
    \n+
    144 }
    \n+
    145
    \n+
    147 template<class MessageBuffer, class EntityType>
    \n+
    148 void gather (MessageBuffer& buff, const EntityType& e) const
    \n+
    149 {
    \n+
    150 buff.write(v_[indexset_.index(e)]);
    \n+
    151 }
    \n
    152
    \n-
    157 static const HostGrid &hostGrid ( const Grid &grid )
    \n-
    158 {
    \n-
    159 return grid.getHostGrid();
    \n-
    160 }
    \n-
    161
    \n-
    162 template< class Entity >
    \n-
    163 static const typename Codim< Entity::codimension >::HostEntity &
    \n-
    164 hostEntity ( const Entity &entity )
    \n-
    165 {
    \n-
    166 return hostEntity< Entity::codimension >( entity );
    \n-
    167 }
    \n-
    168
    \n-
    169 template< int codim >
    \n-
    170 static const typename Codim< codim >::HostEntity &
    \n-
    171 hostEntity ( const typename Codim< codim >::Entity &entity )
    \n-
    172 {
    \n-
    173 return *entity.impl().hostEntity_;
    \n-
    174 }
    \n-
    175
    \n-
    176 static const HostLeafIntersection &
    \n-
    177 hostIntersection ( const LeafIntersection &intersection )
    \n-
    178 {
    \n-
    179 return *intersection.impl().hostIterator_;
    \n-
    180 }
    \n-
    181
    \n-
    182 static const HostLevelIntersection &
    \n-
    183 hostIntersection ( const LevelIntersection &intersection )
    \n-
    184 {
    \n-
    185 return *intersection.impl().hostIterator_;
    \n-
    186 }
    \n-
    187 };
    \n-
    188
    \n-
    189} // namespace Dune
    \n-
    190
    \n-
    191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH
    \n+
    157 template<class MessageBuffer, class EntityType>
    \n+
    158 void scatter (MessageBuffer& buff, const EntityType& e, size_t n)
    \n+
    159 {
    \n+
    160 DataType x;
    \n+
    161 buff.read(x);
    \n+
    162 if (x>=0) // other is -1 means, he does not want it
    \n+
    163 v_[indexset_.index(e)] = std::min(x,v_[indexset_.index(e)]);
    \n+
    164 }
    \n+
    165
    \n+
    167 MinimumExchange (const IS& indexset, V& v, unsigned int indexSetCodim)
    \n+
    168 : indexset_(indexset),
    \n+
    169 v_(v),
    \n+
    170 indexSetCodim_(indexSetCodim)
    \n+
    171 {}
    \n+
    172
    \n+
    173 private:
    \n+
    174 const IS& indexset_;
    \n+
    175 V& v_;
    \n+
    176 unsigned int indexSetCodim_;
    \n+
    177 };
    \n+
    178
    \n+
    179 public:
    \n+
    182 UniqueEntityPartition (const GridView& gridview, unsigned int codim)
    \n+
    183 : assignment_(gridview.size(codim))
    \n+
    184 {
    \n+
    186 typedef typename GridView::IndexSet IndexSet;
    \n+
    187
    \n+
    188 // assign own rank to entities that I might have
    \n+
    189 for (auto it = gridview.template begin<0>(); it!=gridview.template end<0>(); ++it)
    \n+
    190 for (unsigned int i=0; i<it->subEntities(codim); i++)
    \n+
    191 {
    \n+
    192 // Evil hack: I need to call subEntity, which needs the entity codimension as a static parameter.
    \n+
    193 // However, we only have it as a run-time parameter.
    \n+
    194 PartitionType subPartitionType = SubPartitionTypeProvider<typename GridView::template Codim<0>::Entity, GridView::dimension>::get(*it,codim,i);
    \n+
    195
    \n+
    196 assignment_[gridview.indexSet().subIndex(*it,i,codim)]
    \n+
    197 = ( subPartitionType==Dune::InteriorEntity or subPartitionType==Dune::BorderEntity )
    \n+
    198 ? gridview.comm().rank() // set to own rank
    \n+
    199 : - 1; // it is a ghost entity, I will not possibly own it.
    \n+
    200 }
    \n+
    201
    \n+
    203 MinimumExchange<IndexSet,std::vector<Index> > dh(gridview.indexSet(),assignment_,codim);
    \n+
    204
    \n+\n+
    206 }
    \n+
    207
    \n+
    209 int owner(size_t i)
    \n+
    210 {
    \n+
    211 return assignment_[i];
    \n+
    212 }
    \n+
    213
    \n+
    215 size_t numOwners(int rank) const
    \n+
    216 {
    \n+
    217 return std::count(assignment_.begin(), assignment_.end(), rank);
    \n+
    218 }
    \n+
    219
    \n+
    220 private:
    \n+
    221 std::vector<int> assignment_;
    \n+
    222 };
    \n+
    223
    \n+
    224 private:
    \n+
    225 /* A DataHandle class to communicate the global index from the
    \n+
    226 * owning to the non-owning entity; the class is based on the MinimumExchange
    \n+
    227 * class in the parallelsolver.hh header file.
    \n+
    228 */
    \n+
    229 class IndexExchange
    \n+
    230 : public Dune::CommDataHandleIF<IndexExchange,Index>
    \n+
    231 {
    \n+
    232 public:
    \n+
    234 bool contains (int dim, unsigned int codim) const
    \n+
    235 {
    \n+
    236 return codim==indexSetCodim_;
    \n+
    237 }
    \n+
    238
    \n+
    240 bool fixedSize (int dim, int codim) const
    \n+
    241 {
    \n+
    242 return true;
    \n+
    243 }
    \n+
    244
    \n+
    249 template<class EntityType>
    \n+
    250 size_t size (EntityType& e) const
    \n+
    251 {
    \n+
    252 return 1;
    \n+
    253 }
    \n+
    254
    \n+
    256 template<class MessageBuffer, class EntityType>
    \n+
    257 void gather (MessageBuffer& buff, const EntityType& e) const
    \n+
    258 {
    \n+
    259 IdType id=globalidset_.id(e);
    \n+
    260
    \n+
    261 if (indexSetCodim_==0)
    \n+
    262 buff.write(mapid2entity_[id]);
    \n+
    263 else
    \n+
    264 buff.write((*mapid2entity_.find(id)).second);
    \n+
    265 }
    \n+
    266
    \n+
    271 template<class MessageBuffer, class EntityType>
    \n+
    272 void scatter (MessageBuffer& buff, const EntityType& entity, size_t n)
    \n+
    273 {
    \n+
    274 Index x;
    \n+
    275 buff.read(x);
    \n+
    276
    \n+
    284 if(x >= 0) {
    \n+
    285 const IdType id = globalidset_.id(entity);
    \n+
    286
    \n+
    287 if (indexSetCodim_==0)
    \n+
    288 mapid2entity_[id] = x;
    \n+
    289 else
    \n+
    290 {
    \n+
    291 mapid2entity_.erase(id);
    \n+
    292 mapid2entity_.insert(std::make_pair(id,x));
    \n+
    293
    \n+
    294 const Index lindex = indexSet_.index(entity);
    \n+
    295 localGlobalMap_[lindex] = x;
    \n+
    296 }
    \n+
    297 }
    \n+
    298 }
    \n+
    299
    \n+
    301 IndexExchange (const GlobalIdSet& globalidset, MapId2Index& mapid2entity,
    \n+
    302 const typename GridView::IndexSet& localIndexSet, IndexMap& localGlobal,
    \n+
    303 unsigned int indexSetCodim)
    \n+
    304 : globalidset_(globalidset),
    \n+
    305 mapid2entity_(mapid2entity),
    \n+
    306 indexSet_(localIndexSet),
    \n+
    307 localGlobalMap_(localGlobal),
    \n+
    308 indexSetCodim_(indexSetCodim)
    \n+
    309 {}
    \n+
    310
    \n+
    311 private:
    \n+
    312 const GlobalIdSet& globalidset_;
    \n+
    313 MapId2Index& mapid2entity_;
    \n+
    314
    \n+
    315 const typename GridView::IndexSet& indexSet_;
    \n+
    316 IndexMap& localGlobalMap_;
    \n+
    317 unsigned int indexSetCodim_;
    \n+
    318 };
    \n+
    319
    \n+
    320 public:
    \n+
    326 GlobalIndexSet(const GridView& gridview, int codim)
    \n+
    327 : gridview_(gridview),
    \n+
    328 codim_(codim)
    \n+
    329 {
    \n+
    330 int rank = gridview.comm().rank();
    \n+
    331 int size = gridview.comm().size();
    \n+
    332
    \n+
    333 const typename GridView::IndexSet& indexSet = gridview.indexSet();
    \n+
    334
    \n+
    335 std::unique_ptr<UniqueEntityPartition> uniqueEntityPartition;
    \n+
    336 if (codim_!=0)
    \n+
    337 uniqueEntityPartition = std::make_unique<UniqueEntityPartition>(gridview,codim_);
    \n+
    338
    \n+
    339 int nLocalEntity = (codim_==0)
    \n+
    340 ? std::distance(gridview.template begin<0, Dune::Interior_Partition>(), gridview.template end<0, Dune::Interior_Partition>())
    \n+
    341 : uniqueEntityPartition->numOwners(rank);
    \n+
    342
    \n+
    343 // Compute the global, non-redundant number of entities, i.e. the number of entities in the set
    \n+
    344 // without double, aka. redundant entities, on the interprocessor boundary via global reduce. */
    \n+
    345 nGlobalEntity_ = gridview.comm().template sum<int>(nLocalEntity);
    \n+
    346
    \n+
    347 /* communicate the number of locally owned entities to all other processes so that the respective offset
    \n+
    348 * can be calculated on the respective processor; we use the Dune mpi communication facility
    \n+
    349 * for this; first, we gather the number of locally owned entities on the root process and, second, we
    \n+
    350 * broadcast the array to all processes where the respective offset can be calculated. */
    \n+
    351
    \n+
    352 std::vector<int> offset(size);
    \n+
    353 std::fill(offset.begin(), offset.end(), 0);
    \n+
    354
    \n+
    356 gridview_.comm().template allgather<int>(&nLocalEntity, 1, offset.data());
    \n+
    357
    \n+
    358 int myoffset = 0;
    \n+
    359 for (int i=1; i<rank+1; i++)
    \n+
    360 myoffset += offset[i-1];
    \n+
    361
    \n+
    362 /* compute globally unique index over all processes; the idea of the algorithm is as follows: if
    \n+
    363 * an entity is owned by the process, it is assigned an index that is the addition of the offset
    \n+
    364 * specific for this process and a consecutively incremented counter; if the entity is not owned
    \n+
    365 * by the process, it is assigned -1, which signals that this specific entity will get its global
    \n+
    366 * unique index through communication afterwards;
    \n+
    367 *
    \n+
    368 * thus, the calculation of the globally unique index is divided into 2 stages:
    \n+
    369 *
    \n+
    370 * (1) we calculate the global index independently;
    \n+
    371 *
    \n+
    372 * (2) we achieve parallel adjustment by communicating the index
    \n+
    373 * from the owning entity to the non-owning entity.
    \n+
    374 *
    \n+
    375 */
    \n+
    376
    \n+
    377 // 1st stage of global index calculation: calculate global index for owned entities
    \n+
    378 // initialize map that stores an entity's global index via it's globally unique id as key
    \n+
    379 globalIndex_.clear();
    \n+
    380
    \n+
    381 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();
    \n+
    383 Index globalcontrib = 0;
    \n+
    385 if (codim_==0) // This case is simpler
    \n+
    386 {
    \n+
    387 for (Iterator iter = gridview_.template begin<0>(); iter!=gridview_.template end<0>(); ++iter)
    \n+
    388 {
    \n+
    389 const IdType id = globalIdSet.id(*iter);
    \n+
    392 if (iter->partitionType() == Dune::InteriorEntity)
    \n+
    393 {
    \n+
    394 const Index gindex = myoffset + globalcontrib;
    \n+
    396 globalIndex_[id] = gindex;
    \n+
    397 globalcontrib++;
    \n+
    398 }
    \n+
    399
    \n+
    401 else
    \n+
    402 {
    \n+
    403 globalIndex_[id] = -1;
    \n+
    404 }
    \n+
    405 }
    \n+
    406 }
    \n+
    407 else // if (codim==0) else
    \n+
    408 {
    \n+
    409 std::vector<bool> firstTime(gridview_.size(codim_));
    \n+
    410 std::fill(firstTime.begin(), firstTime.end(), true);
    \n+
    411
    \n+
    412 for(Iterator iter = gridview_.template begin<0>();iter!=gridview_.template end<0>(); ++iter)
    \n+
    413 {
    \n+
    414 for (size_t i=0; i<iter->subEntities(codim_); i++)
    \n+
    415 {
    \n+
    416 IdType id=globalIdSet.subId(*iter,i,codim_);
    \n+
    417
    \n+
    418 Index idx = gridview_.indexSet().subIndex(*iter,i,codim_);
    \n+
    419
    \n+
    420 if (!firstTime[idx] )
    \n+
    421 continue;
    \n+
    422
    \n+
    423 firstTime[idx] = false;
    \n+
    424
    \n+
    425 if (uniqueEntityPartition->owner(idx) == rank)
    \n+
    426 {
    \n+
    427 const Index gindex = myoffset + globalcontrib;
    \n+
    428 globalIndex_.insert(std::make_pair(id,gindex));
    \n+
    430 const Index lindex = idx;
    \n+
    431 localGlobalMap_[lindex] = gindex;
    \n+
    432
    \n+
    433 globalcontrib++;
    \n+
    434 }
    \n+
    435 else
    \n+
    436 {
    \n+
    437 globalIndex_.insert(std::make_pair(id,-1));
    \n+
    438 }
    \n+
    439 }
    \n+
    440
    \n+
    441 }
    \n+
    442 }
    \n+
    443
    \n+
    444 // 2nd stage of global index calculation: communicate global index for non-owned entities
    \n+
    445
    \n+
    446 // Create the data handle and communicate.
    \n+
    447 IndexExchange dataHandle(globalIdSet,globalIndex_,indexSet,localGlobalMap_,codim_);
    \n+\n+
    449 }
    \n+
    450
    \n+
    452 template <class Entity>
    \n+
    453 Index index(const Entity& entity) const
    \n+
    454 {
    \n+
    455 if (codim_==0)
    \n+
    456 {
    \n+
    458 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();
    \n+
    459 const IdType id = globalIdSet.id(entity);
    \n+
    460 const Index gindex = globalIndex_.find(id)->second;
    \n+
    462 return gindex;
    \n+
    463 }
    \n+
    464 else
    \n+
    465 return localGlobalMap_.find(gridview_.indexSet().index(entity))->second;
    \n+
    466 }
    \n+
    467
    \n+
    473 template <class Entity>
    \n+
    474 Index subIndex(const Entity& entity, unsigned int i, unsigned int codim) const
    \n+
    475 {
    \n+
    476 if (codim_==0)
    \n+
    477 {
    \n+
    479 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();
    \n+
    480 const IdType id = globalIdSet.subId(entity,i,codim);
    \n+
    481 const Index gindex = globalIndex_.find(id)->second;
    \n+
    483 return gindex;
    \n+
    484 }
    \n+
    485 else
    \n+
    486 return localGlobalMap_.find(gridview_.indexSet().subIndex(entity,i,codim))->second;
    \n+
    487 }
    \n+
    488
    \n+
    494 unsigned int size(unsigned int codim) const
    \n+
    495 {
    \n+
    496 return (codim_==codim) ? nGlobalEntity_ : 0;
    \n+
    497 }
    \n+
    498
    \n+
    499 protected:
    \n+\n+
    501
    \n+
    503 unsigned int codim_;
    \n+
    504
    \n+\n+
    507
    \n+\n+
    509
    \n+
    512 MapId2Index globalIndex_;
    \n+
    513 };
    \n+
    514
    \n+
    515} // namespace Dune
    \n+
    516
    \n+
    517#endif /* DUNE_GRID_UTILITY_GLOBALINDEXSET_HH */
    \n+
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+\n+
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n+
    @ InteriorEntity
    all interior entities
    Definition: gridenums.hh:31
    \n+
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n+
    @ ForwardCommunication
    communicate as given in InterfaceType
    Definition: gridenums.hh:171
    \n+
    @ All_All_Interface
    send all and receive all entities
    Definition: gridenums.hh:91
    \n+
    const IndexSet & indexSet() const
    obtain the index set
    Definition: common/gridview.hh:191
    \n+
    Traits::Grid Grid
    type of the grid
    Definition: common/gridview.hh:83
    \n+
    const Grid & grid() const
    obtain a const reference to the underlying hierarchic grid
    Definition: common/gridview.hh:180
    \n+
    Traits::IndexSet IndexSet
    type of the index set
    Definition: common/gridview.hh:86
    \n+
    int size(int codim) const
    obtain number of entities in a given codimension
    Definition: common/gridview.hh:197
    \n+
    auto communicate(CommDataHandleIF< DataHandleImp, DataType > &data, InterfaceType iftype, CommunicationDirection dir) const
    Communicate data on this view.
    Definition: common/gridview.hh:299
    \n+
    const Communication & comm() const
    obtain communication object
    Definition: common/gridview.hh:280
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n+
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n+
    CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
    Definition: datahandleif.hh:78
    \n+
    void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
    unpack data from message buffer to user.
    Definition: datahandleif.hh:207
    \n+
    bool contains(int dim, int codim) const
    returns true if data for given valid codim should be communicated
    Definition: datahandleif.hh:131
    \n+
    void gather(MessageBufferImp &buff, const EntityType &e) const
    pack data from user to message buffer
    Definition: datahandleif.hh:193
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    GridFamily::Traits::LeafIntersection LeafIntersection
    A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
    Definition: common/grid.hh:456
    \n-
    GridFamily::Traits::LevelIntersection LevelIntersection
    A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimensio...
    Definition: common/grid.hh:461
    \n-
    grid wrapper replacing the geometries
    Definition: geometrygrid/grid.hh:86
    \n-
    const HostGrid & hostGrid() const
    obtain constant reference to the host grid
    Definition: geometrygrid/grid.hh:538
    \n-
    Definition: geometrygrid/intersection.hh:22
    \n-
    Provides a meta grid that is identical to its host.
    Definition: identitygrid.hh:88
    \n-
    HostGridType & getHostGrid() const
    Returns the hostgrid this IdentityGrid lives in.
    Definition: identitygrid.hh:394
    \n-
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n-
    Grid::HostGrid HostGrid
    type of HostGrid
    Definition: hostgridaccess.hh:49
    \n-
    HostGrid::Traits::LevelIntersection HostLevelIntersection
    type of the host level intersection
    Definition: hostgridaccess.hh:75
    \n-
    static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
    Definition: hostgridaccess.hh:88
    \n-
    static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
    Definition: hostgridaccess.hh:95
    \n-
    static const HostIntersection & hostIntersection(const Intersection< const Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection)
    Definition: hostgridaccess.hh:102
    \n-
    GeometryGrid< HG, CoordFunction, Allocator > Grid
    Definition: hostgridaccess.hh:46
    \n-
    Grid::Traits::LeafIntersection LeafIntersection
    type of the GeometryGrid leaf intersection
    Definition: hostgridaccess.hh:68
    \n-
    HostGrid::Traits::LeafIntersection HostLeafIntersection
    type of the host leaf intersection
    Definition: hostgridaccess.hh:73
    \n-
    static const HostGrid & hostGrid(const Grid &grid)
    Get underlying HostGrid.
    Definition: hostgridaccess.hh:81
    \n-
    Grid::Traits::LevelIntersection LevelIntersection
    type of the GeometryGrid level intersection
    Definition: hostgridaccess.hh:70
    \n-
    HostGrid::template Codim< codim >::Entity HostEntity
    type of the host entity
    Definition: hostgridaccess.hh:64
    \n-
    Grid::template Codim< codim >::Entity Entity
    type of the GeometryGrid entity
    Definition: hostgridaccess.hh:61
    \n-
    Grid::Traits::LeafIntersection LeafIntersection
    type of the IdGrid leaf intersection
    Definition: hostgridaccess.hh:144
    \n-
    HG HostGrid
    type of HostGrid
    Definition: hostgridaccess.hh:125
    \n-
    IdentityGrid< HG > Grid
    Definition: hostgridaccess.hh:122
    \n-
    static const Codim< codim >::HostEntity & hostEntity(const typename Codim< codim >::Entity &entity)
    Definition: hostgridaccess.hh:171
    \n-
    HostGrid::Traits::LevelIntersection HostLevelIntersection
    type of the host level intersection
    Definition: hostgridaccess.hh:151
    \n-
    Grid::Traits::LevelIntersection LevelIntersection
    type of the IdGrid level intersection
    Definition: hostgridaccess.hh:146
    \n-
    static const HostLeafIntersection & hostIntersection(const LeafIntersection &intersection)
    Definition: hostgridaccess.hh:177
    \n-
    HostGrid::Traits::LeafIntersection HostLeafIntersection
    type of the host leaf intersection
    Definition: hostgridaccess.hh:149
    \n-
    static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity &entity)
    Definition: hostgridaccess.hh:164
    \n-
    static const HostLevelIntersection & hostIntersection(const LevelIntersection &intersection)
    Definition: hostgridaccess.hh:183
    \n-
    static const HostGrid & hostGrid(const Grid &grid)
    Get underlying HostGrid.
    Definition: hostgridaccess.hh:157
    \n-
    Grid::template Codim< codim >::Entity Entity
    type of the IdGrid entity
    Definition: hostgridaccess.hh:137
    \n-
    HostGrid::template Codim< codim >::Entity HostEntity
    type of the host entity
    Definition: hostgridaccess.hh:140
    \n-\n+
    PartitionType partitionType() const
    Partition type of this entity.
    Definition: common/entity.hh:127
    \n+
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n+
    detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t, typename GridFamily::Traits > Communication
    A type that is a model of Dune::Communication. It provides a portable way for communication on the se...
    Definition: common/grid.hh:525
    \n+
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n+
    Calculate globally unique index over all processes in a Dune grid.
    Definition: globalindexset.hh:63
    \n+
    Index subIndex(const Entity &entity, unsigned int i, unsigned int codim) const
    Return the global index of a subentity of a given entity.
    Definition: globalindexset.hh:474
    \n+
    MapId2Index globalIndex_
    Stores global index of entities with entity's globally unique id as key.
    Definition: globalindexset.hh:512
    \n+
    int Index
    The number type used for global indices
    Definition: globalindexset.hh:66
    \n+
    int nGlobalEntity_
    Global number of entities, i.e. number of entities without rendundant entities on interprocessor boun...
    Definition: globalindexset.hh:506
    \n+
    Index index(const Entity &entity) const
    Return the global index of a given entity.
    Definition: globalindexset.hh:453
    \n+
    unsigned int codim_
    Codimension of the entities that we hold indices for.
    Definition: globalindexset.hh:503
    \n+
    IndexMap localGlobalMap_
    Definition: globalindexset.hh:508
    \n+
    unsigned int size(unsigned int codim) const
    Return the total number of entities over all processes that we have indices for.
    Definition: globalindexset.hh:494
    \n+
    GlobalIndexSet(const GridView &gridview, int codim)
    Constructor for a given GridView.
    Definition: globalindexset.hh:326
    \n+
    const GridView gridview_
    Definition: globalindexset.hh:500
    \n+
    Helper class to provide access to subentity PartitionTypes with a run-time codimension.
    Definition: globalindexset.hh:75
    \n+
    static PartitionType get(const Entity &entity, int codim, int i)
    Get PartitionType of the i-th subentity of codimension 'codim' of entity 'entity'.
    Definition: globalindexset.hh:78
    \n+
    static PartitionType get(const Entity &entity, int codim, int i)
    Definition: globalindexset.hh:90
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,300 +5,605 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-hostgridaccess.hh\n+globalindexset.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_HOSTGRIDACCESS_HH\n- 6#define DUNE_GRID_HOSTGRIDACCESS_HH\n- 7\n- 8#include \n- 9\n- 10#include \n- 11\n- 12namespace Dune\n- 13{\n- 14\n- 15 // External Forward Declarations\n- 16 // -----------------------------\n- 17\n- 18 template< class HostGrid, class CoordFunction, class Allocator >\n- 19 class GeometryGrid;\n- 20\n- 21 template< class >\n- 22 class IdentityGrid;\n- 23\n- 24\n- 25 // HostGridAccess\n- 26 // --------------\n- 27\n- 28 template< class Grid >\n- 29 struct HostGridAccess;\n- 30\n- 31\n- 32\n- 40 template< class HG, class CoordFunction, class Allocator >\n-41 struct HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >\n- 42 {\n-46 typedef GeometryGrid<_HG,_CoordFunction,_Allocator_> Grid;\n- 47\n-49 typedef typename Grid::HostGrid HostGrid;\n+ 5\n+ 35#ifndef DUNE_GRID_UTILITY_GLOBALINDEXSET_HH\n+ 36#define DUNE_GRID_UTILITY_GLOBALINDEXSET_HH\n+ 37\n+ 39#include \n+ 40#include \n+ 41#include \n+ 42#include \n+ 43#include \n+ 44#include \n+ 45#include \n+ 46\n+ 48#include \n+ 49#include \n 50\n- 57 template< int codim >\n-58 struct Codim\n- 59 {\n-61 typedef typename Grid::template Codim<_codim_>::Entity Entity;\n- 62\n-64 typedef typename HostGrid::template Codim<_codim_>::Entity HostEntity;\n- 65 };\n- 66\n-68 typedef typename Grid::Traits::LeafIntersection LeafIntersection;\n-70 typedef typename Grid::Traits::LevelIntersection LevelIntersection;\n- 71\n-73 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;\n-75 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;\n- 76\n-81 static const HostGrid &hostGrid ( const Grid &grid )\n- 82 {\n- 83 return grid.hostGrid();\n+ 52#if HAVE_MPI\n+ 53 #include \n+ 54#endif\n+ 55\n+ 56namespace Dune\n+ 57{\n+ 58\n+ 61 template\n+62 class GlobalIndexSet\n+ 63 {\n+ 64 public:\n+66 typedef int Index;\n+ 67\n+ 73 template \n+74 struct SubPartitionTypeProvider\n+ 75 {\n+78 static PartitionType get(const Entity& entity, int codim, int i)\n+ 79 {\n+ 80 if (codim==Codim)\n+ 81 return entity.template subEntity(i).partitionType();\n+ 82 else\n+ 83 return SubPartitionTypeProvider::get(entity, codim, i);\n 84 }\n- 85\n- 86 template< class Entity >\n- 87 static const typename Codim< Entity::codimension >::HostEntity &\n-88 hostEntity ( const Entity &entity )\n+ 85 };\n+ 86\n+ 87 template \n+88 struct SubPartitionTypeProvider\n 89 {\n- 90 return hostEntity< Entity::codimension >( entity );\n- 91 }\n- 92\n- 93 template< int codim >\n- 94 static const typename Codim< codim >::HostEntity &\n-95 hostEntity ( const typename Codim<_codim_>::Entity &entity )\n- 96 {\n- 97 return entity.impl().hostEntity();\n- 98 }\n+90 static PartitionType get(const Entity& entity, int codim, int i)\n+ 91 {\n+ 92 return entity.template subEntity<0>(i).partitionType();\n+ 93 }\n+ 94 };\n+ 95\n+ 96 private:\n+ 98 typedef typename GridView::Grid Grid;\n 99\n- 100 template< class HostIntersection >\n- 101 static const HostIntersection &\n-102 hostIntersection ( const Intersection< const Grid, GeoGrid::Intersection<\n-const_Grid,_HostIntersection_> > &intersection )\n- 103 {\n- 104 return intersection.impl().hostIntersection();\n- 105 }\n- 106 };\n- 107\n+ 100 typedef typename GridView::Grid::GlobalIdSet GlobalIdSet;\n+ 101 typedef typename GridView::Grid::GlobalIdSet::IdType IdType;\n+ 102 typedef typename GridView::Traits::template Codim<0>::Iterator Iterator;\n+ 103\n+ 104 typedef typename Grid::Communication Communication;\n+ 105\n+ 106 typedef std::map MapId2Index;\n+ 107 typedef std::map IndexMap;\n 108\n- 116 template< class HG >\n-117 struct HostGridAccess< IdentityGrid< HG > >\n- 118 {\n-122 typedef IdentityGrid<_HG_> Grid;\n- 123\n-125 typedef HG HostGrid;\n- 126\n- 133 template< int codim >\n-134 struct Codim\n- 135 {\n-137 typedef typename Grid::template Codim<_codim_>::Entity Entity;\n- 138\n-140 typedef typename HostGrid::template Codim<_codim_>::Entity HostEntity;\n- 141 };\n- 142\n-144 typedef typename Grid::Traits::LeafIntersection LeafIntersection;\n-146 typedef typename Grid::Traits::LevelIntersection LevelIntersection;\n- 147\n-149 typedef typename HostGrid::Traits::LeafIntersection HostLeafIntersection;\n-151 typedef typename HostGrid::Traits::LevelIntersection HostLevelIntersection;\n+ 109 /\n+*********************************************************************************************/\n+ 110 /* calculate unique partitioning for all entities of a given codim in a\n+given GridView, */\n+ 111 /* assuming they all have the same geometry, i.e. codim, type */\n+ 112 /\n+*********************************************************************************************/\n+ 113 class UniqueEntityPartition\n+ 114 {\n+ 115 private:\n+ 116 /* A DataHandle class to calculate the minimum of a std::vector which is\n+accompanied by an index set */\n+ 117 template // mapper type and vector type\n+ 118 class MinimumExchange\n+ 119 : public Dune::CommDataHandleIF,typename V::\n+value_type>\n+ 120 {\n+ 121 public:\n+ 123 typedef typename V::value_type DataType;\n+ 124\n+ 126 bool contains (int dim, unsigned int codim) const\n+ 127 {\n+ 128 return codim==indexSetCodim_;\n+ 129 }\n+ 130\n+ 132 bool fixedSize (int dim, int codim) const\n+ 133 {\n+ 134 return true ;\n+ 135 }\n+ 136\n+ 140 template\n+ 141 size_t size (EntityType& e) const\n+ 142 {\n+ 143 return 1 ;\n+ 144 }\n+ 145\n+ 147 template\n+ 148 void gather (MessageBuffer& buff, const EntityType& e) const\n+ 149 {\n+ 150 buff.write(v_[indexset_.index(e)]);\n+ 151 }\n 152\n-157 static const HostGrid &hostGrid ( const Grid &grid )\n- 158 {\n- 159 return grid.getHostGrid();\n- 160 }\n- 161\n- 162 template< class Entity >\n- 163 static const typename Codim< Entity::codimension >::HostEntity &\n-164 hostEntity ( const Entity &entity )\n- 165 {\n- 166 return hostEntity< Entity::codimension >( entity );\n- 167 }\n- 168\n- 169 template< int codim >\n- 170 static const typename Codim< codim >::HostEntity &\n-171 hostEntity ( const typename Codim<_codim_>::Entity &entity )\n- 172 {\n- 173 return *entity.impl().hostEntity_;\n- 174 }\n- 175\n- 176 static const HostLeafIntersection &\n-177 hostIntersection ( const LeafIntersection &intersection )\n- 178 {\n- 179 return *intersection.impl().hostIterator_;\n- 180 }\n- 181\n- 182 static const HostLevelIntersection &\n-183 hostIntersection ( const LevelIntersection &intersection )\n+ 157 template\n+ 158 void scatter (MessageBuffer& buff, const EntityType& e, size_t n)\n+ 159 {\n+ 160 DataType x;\n+ 161 buff.read(x);\n+ 162 if (x>=0) // other is -1 means, he does not want it\n+ 163 v_[indexset_.index(e)] = std::min(x,v_[indexset_.index(e)]);\n+ 164 }\n+ 165\n+ 167 MinimumExchange (const IS& indexset, V& v, unsigned int indexSetCodim)\n+ 168 : indexset_(indexset),\n+ 169 v_(v),\n+ 170 indexSetCodim_(indexSetCodim)\n+ 171 {}\n+ 172\n+ 173 private:\n+ 174 const IS& indexset_;\n+ 175 V& v_;\n+ 176 unsigned int indexSetCodim_;\n+ 177 };\n+ 178\n+ 179 public:\n+ 182 UniqueEntityPartition (const GridView& gridview, unsigned int codim)\n+ 183 : assignment_(gridview.size(codim))\n 184 {\n- 185 return *intersection.impl().hostIterator_;\n- 186 }\n- 187 };\n- 188\n- 189} // namespace Dune\n- 190\n- 191#endif // #ifndef DUNE_GRID_HOSTGRIDACCESS_HH\n+ 186 typedef typename GridView::IndexSet IndexSet;\n+ 187\n+ 188 // assign own rank to entities that I might have\n+ 189 for (auto it = gridview.template begin<0>(); it!=gridview.template end<0>\n+(); ++it)\n+ 190 for (unsigned int i=0; isubEntities(codim); i++)\n+ 191 {\n+ 192 // Evil hack: I need to call subEntity, which needs the entity codimension\n+as a static parameter.\n+ 193 // However, we only have it as a run-time parameter.\n+ 194 PartitionType subPartitionType = SubPartitionTypeProvider::Entity, GridView::dimension>::get(*it,codim,i);\n+ 195\n+ 196 assignment_[gridview.indexSet().subIndex(*it,i,codim)]\n+ 197 = ( subPartitionType==Dune::InteriorEntity or subPartitionType==Dune::\n+BorderEntity )\n+ 198 ? gridview.comm().rank() // set to own rank\n+ 199 : - 1; // it is a ghost entity, I will not possibly own it.\n+ 200 }\n+ 201\n+ 203 MinimumExchange > dh(gridview.indexSet\n+(),assignment_,codim);\n+ 204\n+ 205 gridview.communicate(dh,Dune::All_All_Interface,Dune::\n+ForwardCommunication);\n+ 206 }\n+ 207\n+ 209 int owner(size_t i)\n+ 210 {\n+ 211 return assignment_[i];\n+ 212 }\n+ 213\n+ 215 size_t numOwners(int rank) const\n+ 216 {\n+ 217 return std::count(assignment_.begin(), assignment_.end(), rank);\n+ 218 }\n+ 219\n+ 220 private:\n+ 221 std::vector assignment_;\n+ 222 };\n+ 223\n+ 224 private:\n+ 225 /* A DataHandle class to communicate the global index from the\n+ 226 * owning to the non-owning entity; the class is based on the\n+MinimumExchange\n+ 227 * class in the parallelsolver.hh header file.\n+ 228 */\n+ 229 class IndexExchange\n+ 230 : public Dune::CommDataHandleIF\n+ 231 {\n+ 232 public:\n+ 234 bool contains (int dim, unsigned int codim) const\n+ 235 {\n+ 236 return codim==indexSetCodim_;\n+ 237 }\n+ 238\n+ 240 bool fixedSize (int dim, int codim) const\n+ 241 {\n+ 242 return true;\n+ 243 }\n+ 244\n+ 249 template\n+ 250 size_t size (EntityType& e) const\n+ 251 {\n+ 252 return 1;\n+ 253 }\n+ 254\n+ 256 template\n+ 257 void gather (MessageBuffer& buff, const EntityType& e) const\n+ 258 {\n+ 259 IdType id=globalidset_.id(e);\n+ 260\n+ 261 if (indexSetCodim_==0)\n+ 262 buff.write(mapid2entity_[id]);\n+ 263 else\n+ 264 buff.write((*mapid2entity_.find(id)).second);\n+ 265 }\n+ 266\n+ 271 template\n+ 272 void scatter (MessageBuffer& buff, const EntityType& entity, size_t n)\n+ 273 {\n+ 274 Index x;\n+ 275 buff.read(x);\n+ 276\n+ 284 if(x >= 0) {\n+ 285 const IdType id = globalidset_.id(entity);\n+ 286\n+ 287 if (indexSetCodim_==0)\n+ 288 mapid2entity_[id] = x;\n+ 289 else\n+ 290 {\n+ 291 mapid2entity_.erase(id);\n+ 292 mapid2entity_.insert(std::make_pair(id,x));\n+ 293\n+ 294 const Index lindex = indexSet_.index(entity);\n+ 295 localGlobalMap_[lindex] = x;\n+ 296 }\n+ 297 }\n+ 298 }\n+ 299\n+ 301 IndexExchange (const GlobalIdSet& globalidset, MapId2Index& mapid2entity,\n+ 302 const typename GridView::IndexSet& localIndexSet, IndexMap& localGlobal,\n+ 303 unsigned int indexSetCodim)\n+ 304 : globalidset_(globalidset),\n+ 305 mapid2entity_(mapid2entity),\n+ 306 indexSet_(localIndexSet),\n+ 307 localGlobalMap_(localGlobal),\n+ 308 indexSetCodim_(indexSetCodim)\n+ 309 {}\n+ 310\n+ 311 private:\n+ 312 const GlobalIdSet& globalidset_;\n+ 313 MapId2Index& mapid2entity_;\n+ 314\n+ 315 const typename GridView::IndexSet& indexSet_;\n+ 316 IndexMap& localGlobalMap_;\n+ 317 unsigned int indexSetCodim_;\n+ 318 };\n+ 319\n+ 320 public:\n+326 GlobalIndexSet(const GridView& gridview, int codim)\n+ 327 : gridview_(gridview),\n+ 328 codim_(codim)\n+ 329 {\n+ 330 int rank = gridview.comm().rank();\n+ 331 int size = gridview.comm().size();\n+ 332\n+ 333 const typename GridView::IndexSet& indexSet = gridview.indexSet();\n+ 334\n+ 335 std::unique_ptr uniqueEntityPartition;\n+ 336 if (codim_!=0)\n+ 337 uniqueEntityPartition = std::make_unique\n+(gridview,codim_);\n+ 338\n+ 339 int nLocalEntity = (codim_==0)\n+ 340 ? std::distance(gridview.template begin<0, Dune::Interior_Partition>(),\n+gridview.template end<0, Dune::Interior_Partition>())\n+ 341 : uniqueEntityPartition->numOwners(rank);\n+ 342\n+ 343 // Compute the global, non-redundant number of entities, i.e. the number\n+of entities in the set\n+ 344 // without double, aka. redundant entities, on the interprocessor boundary\n+via global reduce. */\n+ 345 nGlobalEntity_ = gridview.comm().template sum(nLocalEntity);\n+ 346\n+ 347 /* communicate the number of locally owned entities to all other processes\n+so that the respective offset\n+ 348 * can be calculated on the respective processor; we use the Dune mpi\n+communication facility\n+ 349 * for this; first, we gather the number of locally owned entities on the\n+root process and, second, we\n+ 350 * broadcast the array to all processes where the respective offset can be\n+calculated. */\n+ 351\n+ 352 std::vector offset(size);\n+ 353 std::fill(offset.begin(), offset.end(), 0);\n+ 354\n+ 356 gridview_.comm().template allgather(&nLocalEntity, 1, offset.data());\n+ 357\n+ 358 int myoffset = 0;\n+ 359 for (int i=1; i();\n+iter!=gridview_.template end<0>(); ++iter)\n+ 388 {\n+ 389 const IdType id = globalIdSet.id(*iter);\n+ 392 if (iter->partitionType() == Dune::InteriorEntity)\n+ 393 {\n+ 394 const Index gindex = myoffset + globalcontrib;\n+ 396 globalIndex_[id] = gindex;\n+ 397 globalcontrib++;\n+ 398 }\n+ 399\n+ 401 else\n+ 402 {\n+ 403 globalIndex_[id] = -1;\n+ 404 }\n+ 405 }\n+ 406 }\n+ 407 else // if (codim==0) else\n+ 408 {\n+ 409 std::vector firstTime(gridview_.size(codim_));\n+ 410 std::fill(firstTime.begin(), firstTime.end(), true);\n+ 411\n+ 412 for(Iterator iter = gridview_.template begin<0>();iter!=gridview_.template\n+end<0>(); ++iter)\n+ 413 {\n+ 414 for (size_t i=0; isubEntities(codim_); i++)\n+ 415 {\n+ 416 IdType id=globalIdSet.subId(*iter,i,codim_);\n+ 417\n+ 418 Index idx = gridview_.indexSet().subIndex(*iter,i,codim_);\n+ 419\n+ 420 if (!firstTime[idx] )\n+ 421 continue;\n+ 422\n+ 423 firstTime[idx] = false;\n+ 424\n+ 425 if (uniqueEntityPartition->owner(idx) == rank)\n+ 426 {\n+ 427 const Index gindex = myoffset + globalcontrib;\n+ 428 globalIndex_.insert(std::make_pair(id,gindex));\n+ 430 const Index lindex = idx;\n+ 431 localGlobalMap_[lindex] = gindex;\n+ 432\n+ 433 globalcontrib++;\n+ 434 }\n+ 435 else\n+ 436 {\n+ 437 globalIndex_.insert(std::make_pair(id,-1));\n+ 438 }\n+ 439 }\n+ 440\n+ 441 }\n+ 442 }\n+ 443\n+ 444 // 2nd stage of global index calculation: communicate global index for\n+non-owned entities\n+ 445\n+ 446 // Create the data handle and communicate.\n+ 447 IndexExchange dataHandle\n+(globalIdSet,globalIndex_,indexSet,localGlobalMap_,codim_);\n+ 448 gridview_.communicate(dataHandle, Dune::All_All_Interface, Dune::\n+ForwardCommunication);\n+ 449 }\n+ 450\n+ 452 template \n+453 Index index(const Entity& entity) const\n+ 454 {\n+ 455 if (codim_==0)\n+ 456 {\n+ 458 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();\n+ 459 const IdType id = globalIdSet.id(entity);\n+ 460 const Index gindex = globalIndex_.find(id)->second;\n+ 462 return gindex;\n+ 463 }\n+ 464 else\n+ 465 return localGlobalMap_.find(gridview_.indexSet().index(entity))->second;\n+ 466 }\n+ 467\n+ 473 template \n+474 Index subIndex(const Entity& entity, unsigned int i, unsigned int codim)\n+const\n+ 475 {\n+ 476 if (codim_==0)\n+ 477 {\n+ 479 const GlobalIdSet& globalIdSet = gridview_.grid().globalIdSet();\n+ 480 const IdType id = globalIdSet.subId(entity,i,codim);\n+ 481 const Index gindex = globalIndex_.find(id)->second;\n+ 483 return gindex;\n+ 484 }\n+ 485 else\n+ 486 return localGlobalMap_.find(gridview_.indexSet().subIndex\n+(entity,i,codim))->second;\n+ 487 }\n+ 488\n+494 unsigned int size(unsigned int codim) const\n+ 495 {\n+ 496 return (codim_==codim) ? nGlobalEntity_ : 0;\n+ 497 }\n+ 498\n+ 499 protected:\n+500 const GridView gridview_;\n+ 501\n+503 unsigned int codim_;\n+ 504\n+506 int nGlobalEntity_;\n+ 507\n+508 IndexMap localGlobalMap_;\n+ 509\n+512 MapId2Index globalIndex_;\n+ 513 };\n+ 514\n+ 515} // namespace Dune\n+ 516\n+ 517#endif /* DUNE_GRID_UTILITY_GLOBALINDEXSET_HH */\n+datahandleif.hh\n+Describes the parallel communication interface class for MessageBuffers and\n+DataHandles.\n+gridenums.hh\n+Dune::PartitionType\n+PartitionType\n+Attributes used in the generic overlap model.\n+Definition: gridenums.hh:30\n+Dune::InteriorEntity\n+@ InteriorEntity\n+all interior entities\n+Definition: gridenums.hh:31\n+Dune::BorderEntity\n+@ BorderEntity\n+on boundary between interior and overlap\n+Definition: gridenums.hh:32\n+Dune::ForwardCommunication\n+@ ForwardCommunication\n+communicate as given in InterfaceType\n+Definition: gridenums.hh:171\n+Dune::All_All_Interface\n+@ All_All_Interface\n+send all and receive all entities\n+Definition: gridenums.hh:91\n+Dune::GridView::indexSet\n+const IndexSet & indexSet() const\n+obtain the index set\n+Definition: common/gridview.hh:191\n+Dune::GridView::Grid\n+Traits::Grid Grid\n+type of the grid\n+Definition: common/gridview.hh:83\n+Dune::GridView::grid\n+const Grid & grid() const\n+obtain a const reference to the underlying hierarchic grid\n+Definition: common/gridview.hh:180\n+Dune::GridView::IndexSet\n+Traits::IndexSet IndexSet\n+type of the index set\n+Definition: common/gridview.hh:86\n+Dune::GridView::size\n+int size(int codim) const\n+obtain number of entities in a given codimension\n+Definition: common/gridview.hh:197\n+Dune::GridView::communicate\n+auto communicate(CommDataHandleIF< DataHandleImp, DataType > &data,\n+InterfaceType iftype, CommunicationDirection dir) const\n+Communicate data on this view.\n+Definition: common/gridview.hh:299\n+Dune::GridView::comm\n+const Communication & comm() const\n+obtain communication object\n+Definition: common/gridview.hh:280\n+Dune::GridView::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/gridview.hh:148\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Intersection\n-Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n-element or with the d...\n-Definition: common/intersection.hh:164\n+Dune::Alberta::min\n+int min(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:348\n+Dune::CommDataHandleIF\n+CommDataHandleIF describes the features of a data handle for communication in\n+parallel runs using the...\n+Definition: datahandleif.hh:78\n+Dune::CommDataHandleIF<_MinimumExchange<_IS,_V_>,_V::value_type_>::scatter\n+void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)\n+unpack data from message buffer to user.\n+Definition: datahandleif.hh:207\n+Dune::CommDataHandleIF<_IndexExchange,_Index_>::contains\n+bool contains(int dim, int codim) const\n+returns true if data for given valid codim should be communicated\n+Definition: datahandleif.hh:131\n+Dune::CommDataHandleIF<_MinimumExchange<_IS,_V_>,_V::value_type_>::gather\n+void gather(MessageBufferImp &buff, const EntityType &e) const\n+pack data from user to message buffer\n+Definition: datahandleif.hh:193\n Dune::Entity\n Wrapper class for entities.\n Definition: common/entity.hh:66\n-Dune::Grid<_dim,_dimworld,_HostGrid::ctype,_IdentityGridFamily<_HostGrid::\n-dimension,_HostGrid_>_>::LeafIntersection\n-GridFamily::Traits::LeafIntersection LeafIntersection\n-A type that is a model of Dune::Intersection, an intersections of two\n-codimension 1 of two codimensio...\n-Definition: common/grid.hh:456\n-Dune::Grid<_dim,_dimworld,_HostGrid::ctype,_IdentityGridFamily<_HostGrid::\n-dimension,_HostGrid_>_>::LevelIntersection\n-GridFamily::Traits::LevelIntersection LevelIntersection\n-A type that is a model of Dune::Intersection, an intersections of two\n-codimension 1 of two codimensio...\n-Definition: common/grid.hh:461\n-Dune::GeometryGrid\n-grid wrapper replacing the geometries\n-Definition: geometrygrid/grid.hh:86\n-Dune::GeometryGrid::hostGrid\n-const HostGrid & hostGrid() const\n-obtain constant reference to the host grid\n-Definition: geometrygrid/grid.hh:538\n-Dune::GeoGrid::Intersection\n-Definition: geometrygrid/intersection.hh:22\n-Dune::IdentityGrid\n-Provides a meta grid that is identical to its host.\n-Definition: identitygrid.hh:88\n-Dune::IdentityGrid::getHostGrid\n-HostGridType & getHostGrid() const\n-Returns the hostgrid this IdentityGrid lives in.\n-Definition: identitygrid.hh:394\n-Dune::HostGridAccess\n-provides access to host grid objects from GeometryGrid\n-Definition: identitygrid.hh:37\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::HostGrid\n-Grid::HostGrid HostGrid\n-type of HostGrid\n-Definition: hostgridaccess.hh:49\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n-HostLevelIntersection\n-HostGrid::Traits::LevelIntersection HostLevelIntersection\n-type of the host level intersection\n-Definition: hostgridaccess.hh:75\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n-hostEntity\n-static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity\n-&entity)\n-Definition: hostgridaccess.hh:88\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n-hostEntity\n-static const Codim< codim >::HostEntity & hostEntity(const typename Codim<\n-codim >::Entity &entity)\n-Definition: hostgridaccess.hh:95\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n-hostIntersection\n-static const HostIntersection & hostIntersection(const Intersection< const\n-Grid, GeoGrid::Intersection< const Grid, HostIntersection > > &intersection)\n-Definition: hostgridaccess.hh:102\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::Grid\n-GeometryGrid< HG, CoordFunction, Allocator > Grid\n-Definition: hostgridaccess.hh:46\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n-LeafIntersection\n-Grid::Traits::LeafIntersection LeafIntersection\n-type of the GeometryGrid leaf intersection\n-Definition: hostgridaccess.hh:68\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n-HostLeafIntersection\n-HostGrid::Traits::LeafIntersection HostLeafIntersection\n-type of the host leaf intersection\n-Definition: hostgridaccess.hh:73\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::hostGrid\n-static const HostGrid & hostGrid(const Grid &grid)\n-Get underlying HostGrid.\n-Definition: hostgridaccess.hh:81\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::\n-LevelIntersection\n-Grid::Traits::LevelIntersection LevelIntersection\n-type of the GeometryGrid level intersection\n-Definition: hostgridaccess.hh:70\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::Codim::\n-HostEntity\n-HostGrid::template Codim< codim >::Entity HostEntity\n-type of the host entity\n-Definition: hostgridaccess.hh:64\n-Dune::HostGridAccess<_GeometryGrid<_HG,_CoordFunction,_Allocator_>_>::Codim::\n-Entity\n-Grid::template Codim< codim >::Entity Entity\n-type of the GeometryGrid entity\n-Definition: hostgridaccess.hh:61\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::LeafIntersection\n-Grid::Traits::LeafIntersection LeafIntersection\n-type of the IdGrid leaf intersection\n-Definition: hostgridaccess.hh:144\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::HostGrid\n-HG HostGrid\n-type of HostGrid\n-Definition: hostgridaccess.hh:125\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Grid\n-IdentityGrid< HG > Grid\n-Definition: hostgridaccess.hh:122\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostEntity\n-static const Codim< codim >::HostEntity & hostEntity(const typename Codim<\n-codim >::Entity &entity)\n-Definition: hostgridaccess.hh:171\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::HostLevelIntersection\n-HostGrid::Traits::LevelIntersection HostLevelIntersection\n-type of the host level intersection\n-Definition: hostgridaccess.hh:151\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::LevelIntersection\n-Grid::Traits::LevelIntersection LevelIntersection\n-type of the IdGrid level intersection\n-Definition: hostgridaccess.hh:146\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostIntersection\n-static const HostLeafIntersection & hostIntersection(const LeafIntersection\n-&intersection)\n-Definition: hostgridaccess.hh:177\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::HostLeafIntersection\n-HostGrid::Traits::LeafIntersection HostLeafIntersection\n-type of the host leaf intersection\n-Definition: hostgridaccess.hh:149\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostEntity\n-static const Codim< Entity::codimension >::HostEntity & hostEntity(const Entity\n-&entity)\n-Definition: hostgridaccess.hh:164\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostIntersection\n-static const HostLevelIntersection & hostIntersection(const LevelIntersection\n-&intersection)\n-Definition: hostgridaccess.hh:183\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::hostGrid\n-static const HostGrid & hostGrid(const Grid &grid)\n-Get underlying HostGrid.\n-Definition: hostgridaccess.hh:157\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Codim::Entity\n-Grid::template Codim< codim >::Entity Entity\n-type of the IdGrid entity\n-Definition: hostgridaccess.hh:137\n-Dune::HostGridAccess<_IdentityGrid<_HG_>_>::Codim::HostEntity\n-HostGrid::template Codim< codim >::Entity HostEntity\n-type of the host entity\n-Definition: hostgridaccess.hh:140\n-intersection.hh\n+Dune::Entity::partitionType\n+PartitionType partitionType() const\n+Partition type of this entity.\n+Definition: common/entity.hh:127\n+Dune::Grid\n+Grid abstract base class.\n+Definition: common/grid.hh:375\n+Dune::Grid::Communication\n+detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t,\n+typename GridFamily::Traits > Communication\n+A type that is a model of Dune::Communication. It provides a portable way for\n+communication on the se...\n+Definition: common/grid.hh:525\n+Dune::GridView\n+Grid view abstract base class.\n+Definition: common/gridview.hh:66\n+Dune::GlobalIndexSet\n+Calculate globally unique index over all processes in a Dune grid.\n+Definition: globalindexset.hh:63\n+Dune::GlobalIndexSet::subIndex\n+Index subIndex(const Entity &entity, unsigned int i, unsigned int codim) const\n+Return the global index of a subentity of a given entity.\n+Definition: globalindexset.hh:474\n+Dune::GlobalIndexSet::globalIndex_\n+MapId2Index globalIndex_\n+Stores global index of entities with entity's globally unique id as key.\n+Definition: globalindexset.hh:512\n+Dune::GlobalIndexSet::Index\n+int Index\n+The number type used for global indices\n+Definition: globalindexset.hh:66\n+Dune::GlobalIndexSet::nGlobalEntity_\n+int nGlobalEntity_\n+Global number of entities, i.e. number of entities without rendundant entities\n+on interprocessor boun...\n+Definition: globalindexset.hh:506\n+Dune::GlobalIndexSet::index\n+Index index(const Entity &entity) const\n+Return the global index of a given entity.\n+Definition: globalindexset.hh:453\n+Dune::GlobalIndexSet::codim_\n+unsigned int codim_\n+Codimension of the entities that we hold indices for.\n+Definition: globalindexset.hh:503\n+Dune::GlobalIndexSet::localGlobalMap_\n+IndexMap localGlobalMap_\n+Definition: globalindexset.hh:508\n+Dune::GlobalIndexSet::size\n+unsigned int size(unsigned int codim) const\n+Return the total number of entities over all processes that we have indices\n+for.\n+Definition: globalindexset.hh:494\n+Dune::GlobalIndexSet::GlobalIndexSet\n+GlobalIndexSet(const GridView &gridview, int codim)\n+Constructor for a given GridView.\n+Definition: globalindexset.hh:326\n+Dune::GlobalIndexSet::gridview_\n+const GridView gridview_\n+Definition: globalindexset.hh:500\n+Dune::GlobalIndexSet::SubPartitionTypeProvider\n+Helper class to provide access to subentity PartitionTypes with a run-time\n+codimension.\n+Definition: globalindexset.hh:75\n+Dune::GlobalIndexSet::SubPartitionTypeProvider::get\n+static PartitionType get(const Entity &entity, int codim, int i)\n+Get PartitionType of the i-th subentity of codimension 'codim' of entity\n+'entity'.\n+Definition: globalindexset.hh:78\n+Dune::GlobalIndexSet::SubPartitionTypeProvider<_Entity,_0_>::get\n+static PartitionType get(const Entity &entity, int codim, int i)\n+Definition: globalindexset.hh:90\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01019.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01019.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: multiindex.hh File Reference\n+dune-grid: tensorgridfactory.hh File Reference\n \n \n \n \n \n \n \n@@ -65,39 +65,50 @@\n
  • dune
  • grid
  • utility
  • \n \n \n
    \n \n-
    multiindex.hh File Reference
    \n+
    tensorgridfactory.hh File Reference
    \n
    \n
    \n \n-

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

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

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

    Go to the source code of this file.

    \n \n \n-\n+\n+\n+\n+\n+\n+\n \n

    \n Classes

    class  Dune::FactoryUtilities::MultiIndex< dim >
    class  Dune::TensorGridFactory< Grid >
     A factory class for conveniently creating tensorproduct grids. More...
     
    class  Dune::TensorGridFactoryCreator< Grid >
     
    class  Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >
     
    \n \n \n \n \n-\n-\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::FactoryUtilities
     
    \n

    Detailed Description

    \n-

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

    \n+

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

    \n+

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

    \n+
    Author
    Dominic Kempf
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,27 +6,47 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n Classes | Namespaces\n-multiindex.hh File Reference\n-Implements a multiindex with arbitrary dimension and fixed index ranges This is\n-used by various factory classes. More...\n+tensorgridfactory.hh File Reference\n+This file provides a factory class for tensorproduct grids. This is a\n+collection of methods to generate monotonous sequences as needed for a\n+tensorproduct grid. Apart from easy ones for locally equidistant grids, there\n+are also more involved methods like splitting a range according to a geometric\n+series. More...\n #include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::FactoryUtilities::MultiIndex<_dim_>\n+class \u00a0Dune::TensorGridFactory<_Grid_>\n+\u00a0 A factory class for conveniently creating tensorproduct grids. More...\n+\u00a0\n+class \u00a0Dune::TensorGridFactoryCreator<_Grid_>\n+\u00a0\n+class \u00a0Dune::TensorGridFactoryCreator<_YaspGrid<_dim,\n+ TensorProductCoordinates<_ctype,_dim_>_>_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::FactoryUtilities\n-\u00a0\n ***** Detailed Description *****\n-Implements a multiindex with arbitrary dimension and fixed index ranges This is\n-used by various factory classes.\n+This file provides a factory class for tensorproduct grids. This is a\n+collection of methods to generate monotonous sequences as needed for a\n+tensorproduct grid. Apart from easy ones for locally equidistant grids, there\n+are also more involved methods like splitting a range according to a geometric\n+series.\n+The grid generation process is implemented for unstructured grids and for\n+YaspGrid.\n+ Author\n+ Dominic Kempf\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01019_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: multiindex.hh Source File\n+dune-grid: tensorgridfactory.hh Source File\n \n \n \n \n \n \n \n@@ -62,73 +62,370 @@\n \n
    \n \n
    \n
    \n
    \n-
    multiindex.hh
    \n+
    tensorgridfactory.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH
    \n-
    4#define DUNE_GRID_UTILITY_MULTIINDEX_HH
    \n+
    3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
    \n+
    4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH
    \n
    5
    \n-
    11#include<array>
    \n-
    12
    \n-
    13namespace Dune
    \n-
    14{
    \n-
    15 namespace FactoryUtilities
    \n-
    16 {
    \n-
    17 template<std::size_t dim>
    \n-
    18 class MultiIndex : public std::array<unsigned int,dim>
    \n-
    19 {
    \n-
    20 // The range of each component
    \n-
    21 std::array<unsigned int,dim> limits_;
    \n-
    22
    \n-
    23 public:
    \n-
    25 MultiIndex(const std::array<unsigned int,dim>& limits) : limits_(limits)
    \n-
    26 {
    \n-
    27 std::fill(this->begin(), this->end(), 0);
    \n-
    28 }
    \n-
    29
    \n-\n-
    32 {
    \n-
    33 for (std::size_t i=0; i<dim; i++)
    \n-
    34 {
    \n-
    35 // Augment digit
    \n-
    36 (*this)[i]++;
    \n-
    37
    \n-
    38 // If there is no carry-over we can stop here
    \n-
    39 if ((*this)[i]<limits_[i])
    \n-
    40 break;
    \n-
    41
    \n-
    42 (*this)[i] = 0;
    \n-
    43 }
    \n-
    44 return *this;
    \n-
    45 }
    \n-
    46
    \n-
    48 size_t cycle() const
    \n-
    49 {
    \n-
    50 size_t result = 1;
    \n-
    51 for (std::size_t i=0; i<dim; i++)
    \n-
    52 result *= limits_[i];
    \n-
    53 return result;
    \n-
    54 }
    \n-
    55 };
    \n-
    56 }
    \n-
    57}
    \n+
    20#include<array>
    \n+
    21#include<memory>
    \n+
    22#include<vector>
    \n+
    23
    \n+
    24#include <dune/common/fvector.hh>
    \n+\n+
    26#include <dune/grid/yaspgrid.hh>
    \n+\n+
    28
    \n+
    29namespace Dune
    \n+
    30{
    \n+
    31 // forward declaration of TensorGridFactoryCreator, which is the real factory
    \n+
    32 // that should be specialized for each grid.
    \n+
    33 template<typename Grid>
    \n+
    34 class TensorGridFactoryCreator;
    \n+
    35
    \n+
    40 template<typename Grid>
    \n+\n+
    42 {
    \n+
    43 public:
    \n+
    44 typedef typename Grid::Traits::Communication Comm;
    \n+
    45 typedef typename Grid::ctype ctype;
    \n+
    46 static const int dim = Grid::dimension;
    \n+
    47
    \n+
    48 std::unique_ptr<Grid> createGrid(Comm comm = Comm())
    \n+
    49 {
    \n+
    50 TensorGridFactoryCreator<Grid> creator(*this);
    \n+
    51 return creator.createGrid(comm);
    \n+
    52 }
    \n+
    53
    \n+
    54 std::array<std::vector<ctype> , dim> coords() const
    \n+
    55 {
    \n+
    56 return _coords;
    \n+
    57 }
    \n
    58
    \n-
    59#endif
    \n+
    60 std::vector<ctype>& operator[](std::size_t d)
    \n+
    61 {
    \n+
    62 return _coords[d];
    \n+
    63 }
    \n+
    64
    \n+
    66 const std::vector<ctype>& operator[](std::size_t d) const
    \n+
    67 {
    \n+
    68 return _coords[d];
    \n+
    69 }
    \n+
    70
    \n+
    79 void setStart (int d, ctype value)
    \n+
    80 {
    \n+
    81 _coords[d].resize(1);
    \n+
    82 _coords[d][0] = value;
    \n+
    83 }
    \n+
    84
    \n+
    93 void fillIntervals (int d, int n, ctype h)
    \n+
    94 {
    \n+
    95 emptyCheck (d);
    \n+
    96 for (int i = 0; i < n; i++)
    \n+
    97 _coords[d].push_back (_coords[d].back () + h);
    \n+
    98 }
    \n+
    99
    \n+
    108 void fillRange (int d, int n, ctype end)
    \n+
    109 {
    \n+
    110 emptyCheck (d);
    \n+
    111 const ctype h = (end - _coords[d].back ()) / n;
    \n+
    112 for (int i = 0; i < n - 1; i++)
    \n+
    113 _coords[d].push_back (_coords[d].back () + h);
    \n+
    114 _coords[d].push_back (end);
    \n+
    115 }
    \n+
    116
    \n+
    125 void fillUntil (int d, ctype h, ctype end)
    \n+
    126 {
    \n+
    127 emptyCheck (d);
    \n+
    128 while (_coords[d].back () < end)
    \n+
    129 _coords[d].push_back (_coords[d].back () + h);
    \n+
    130 }
    \n+
    131
    \n+
    144 void geometricFillIntervals (int d, int n, ctype ratio, ctype h0 =
    \n+
    145 static_cast<ctype> (0))
    \n+
    146 {
    \n+
    147 emptyCheck (d);
    \n+
    148 ctype h = h0;
    \n+
    149 if (h0 == static_cast<ctype>(0))
    \n+
    150 h = lastInterval (d) * ratio;
    \n+
    151 for (int i = 0; i < n; i++)
    \n+
    152 {
    \n+
    153 _coords[d].push_back (_coords[d].back () + h);
    \n+
    154 h *= ratio;
    \n+
    155 }
    \n+
    156 }
    \n+
    157
    \n+
    170 void geometricFillUntil (int d, ctype ratio, ctype end, ctype h0 = static_cast<ctype> (0))
    \n+
    171 {
    \n+
    172 emptyCheck (d);
    \n+
    173 ctype h = h0;
    \n+
    174 if (h0 == static_cast<ctype>(0))
    \n+
    175 h = lastInterval (d) * ratio;
    \n+
    176 while (_coords[d].back () < end)
    \n+
    177 {
    \n+
    178 _coords[d].push_back (_coords[d].back () + h);
    \n+
    179 h *= ratio;
    \n+
    180 }
    \n+
    181 }
    \n+
    182
    \n+
    197 void geometricFillRange (int d, int n, ctype end, ctype h =
    \n+
    198 static_cast<ctype> (0),
    \n+
    199 bool first = true)
    \n+
    200 {
    \n+
    201 emptyCheck (d);
    \n+
    202 if (h < 1e-8)
    \n+
    203 h = lastInterval (d);
    \n+
    204 ctype ratio = newton (n, _coords[d].back (), end, h);
    \n+
    205 if (!first)
    \n+
    206 {
    \n+
    207 h = h * pow (ratio, n - 1);
    \n+
    208 ratio = 1 / ratio;
    \n+
    209 }
    \n+
    210 for (int i = 0; i < n - 1; i++)
    \n+
    211 {
    \n+
    212 _coords[d].push_back (_coords[d].back () + h);
    \n+
    213 h *= ratio;
    \n+
    214 }
    \n+
    215 _coords[d].push_back (end);
    \n+
    216 }
    \n+
    217
    \n+
    219 void print()
    \n+
    220 {
    \n+
    221 for (int i=0; i<dim; i++)
    \n+
    222 {
    \n+
    223 std::cout << "Container in direction " << i << ":" << std::endl << "Coordinates: ";
    \n+
    224 for (auto it = _coords[i].begin(); it != _coords[i].end(); ++it)
    \n+
    225 std::cout << *it << " ";
    \n+
    226 std::cout << std::endl << "Interval lengths: ";
    \n+
    227
    \n+
    228 std::vector<ctype> meshsize;
    \n+
    229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;)
    \n+
    230 {
    \n+
    231 meshsize.push_back(-1.*(*it));
    \n+
    232 ++it;
    \n+
    233 meshsize.back() += *it;
    \n+
    234 }
    \n+
    235
    \n+
    236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it)
    \n+
    237 std::cout << *it << " ";
    \n+
    238 std::cout << std::endl << "Ratios between interval lengths: ";
    \n+
    239
    \n+
    240 std::vector<ctype> ratios;
    \n+
    241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;)
    \n+
    242 ratios.push_back((1./(*it)) * *(++it));
    \n+
    243
    \n+
    244 for (auto it = ratios.begin(); it != ratios.end(); ++it)
    \n+
    245 std::cout << *it << " ";
    \n+
    246 std::cout << std::endl << std::endl << std::endl;
    \n+
    247 }
    \n+
    248 }
    \n+
    249
    \n+
    250 private:
    \n+
    251 // check whether the ith component is empty and add a 0.0 entry if so
    \n+
    252 void emptyCheck (int i)
    \n+
    253 {
    \n+
    254 if (_coords[i].empty ())
    \n+
    255 _coords[i].push_back (static_cast<ctype> (0));
    \n+
    256 }
    \n+
    257
    \n+
    258 // returns the last interval length in direction d
    \n+
    259 ctype lastInterval (int d)
    \n+
    260 {
    \n+
    261 if (_coords[d].size () < 2)
    \n+
    262 DUNE_THROW(
    \n+
    263 GridError,
    \n+
    264 "Not enough elements in coordinate container to deduce interval length in TensorYaspFactory");
    \n+
    265 else
    \n+
    266 return _coords[d].back () - _coords[d][_coords[d].size () - 2];
    \n+
    267 }
    \n+
    268
    \n+
    272 ctype newton (int n, ctype x_s, ctype x_e, ctype h)
    \n+
    273 {
    \n+
    274 ctype m = (x_e - x_s) / h;
    \n+
    275 ctype xold = 0.0;
    \n+
    276 ctype xnew = x_e - x_s;
    \n+
    277 while (std::abs (xnew - xold) > 1E-8)
    \n+
    278 {
    \n+
    279 xold = xnew;
    \n+
    280 xnew = xold
    \n+
    281 - (-pow (xold, n) + m * xold - m + 1)
    \n+
    282 / (-n * pow (xold, n - 1) + m);
    \n+
    283 }
    \n+
    284 if (std::abs (xnew - 1) < 1E-6)
    \n+
    285 {
    \n+
    286 xold = x_e - x_s;
    \n+
    287 xnew = 0.0;
    \n+
    288 while (std::abs (xnew - xold) > 1E-8)
    \n+
    289 {
    \n+
    290 xold = xnew;
    \n+
    291 xnew = xold
    \n+
    292 - (-pow (xold, n) + m * xold - m + 1)
    \n+
    293 / (-n * pow (xold, n - 1) + m);
    \n+
    294 }
    \n+
    295 }
    \n+
    296 return xnew;
    \n+
    297 }
    \n+
    298
    \n+
    299 std::array<std::vector<ctype>, dim> _coords;
    \n+
    300 };
    \n+
    301
    \n+
    302 // class that implements the actual grid creation process. The default is implementing
    \n+
    303 // standard creation for unstructured grids. Provide a specialization for other grids.
    \n+
    304 template<typename Grid>
    \n+\n+
    306 {
    \n+
    307 public:
    \n+
    308 typedef typename Grid::Traits::Communication Comm;
    \n+
    309 typedef typename Grid::ctype ctype;
    \n+
    310 static const int dim = Grid::dimension;
    \n+
    311
    \n+
    312 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
    \n+
    313
    \n+
    314 std::unique_ptr<Grid> createGrid(Comm comm)
    \n+
    315 {
    \n+
    316 // The grid factory
    \n+\n+
    318
    \n+
    319 if (comm.rank() == 0)
    \n+
    320 {
    \n+
    321 // determine the size of the grid
    \n+
    322 std::array<unsigned int, dim> vsizes, esizes;
    \n+
    323 std::size_t size = 1;
    \n+
    324 for (std::size_t i = 0; i<dim; ++i)
    \n+
    325 {
    \n+
    326 vsizes[i] = _factory[i].size();
    \n+
    327 esizes[i] = vsizes[i] - 1;
    \n+
    328 size *= vsizes[i];
    \n+
    329 }
    \n+
    330
    \n+
    331 // insert all vertices
    \n+\n+
    333 for (std::size_t i=0; i<size; ++i, ++index)
    \n+
    334 {
    \n+
    335 Dune::FieldVector<ctype, dim> position;
    \n+
    336 for (std::size_t j = 0; j<dim; ++j)
    \n+
    337 position[j] = _factory[j][index[j]];
    \n+
    338 fac.insertVertex(position);
    \n+
    339 }
    \n+
    340
    \n+
    341 // compute the offsets
    \n+
    342 std::array<std::size_t, dim> offsets;
    \n+
    343 offsets[0] = 1;
    \n+
    344 for (std::size_t i=1; i<dim; i++)
    \n+
    345 offsets[i] = offsets[i-1] * vsizes[i-1];
    \n+
    346
    \n+
    347 // Compute an element template (the cube at (0,...,0). All
    \n+
    348 // other cubes are constructed by moving this template around
    \n+
    349 unsigned int nCorners = 1<<dim;
    \n+
    350
    \n+
    351 std::vector<unsigned int> cornersTemplate(nCorners,0);
    \n+
    352
    \n+
    353 for (size_t i=0; i<nCorners; i++)
    \n+
    354 for (int j=0; j<dim; j++)
    \n+
    355 if ( i & (1<<j) )
    \n+
    356 cornersTemplate[i] += offsets[j];
    \n+
    357
    \n+
    358 // Insert elements
    \n+\n+
    360
    \n+
    361 // Compute the total number of elements to be created
    \n+
    362 int numElements = eindex.cycle();
    \n+
    363
    \n+
    364 for (int i=0; i<numElements; i++, ++eindex)
    \n+
    365 {
    \n+
    366 // 'base' is the index of the lower left element corner
    \n+
    367 unsigned int base = 0;
    \n+
    368 for (int j=0; j<dim; j++)
    \n+
    369 base += eindex[j] * offsets[j];
    \n+
    370
    \n+
    371 // insert new element
    \n+
    372 std::vector<unsigned int> corners = cornersTemplate;
    \n+
    373 for (size_t j=0; j<corners.size(); j++)
    \n+
    374 corners[j] += base;
    \n+
    375
    \n+
    376 fac.insertElement(GeometryTypes::cube(dim), corners);
    \n+
    377 }
    \n+
    378 }
    \n+
    379
    \n+
    380 return std::unique_ptr<Grid>(fac.createGrid());
    \n+
    381 }
    \n+
    382
    \n+
    383 private:
    \n+
    384 const TensorGridFactory<Grid>& _factory;
    \n+
    385 };
    \n+
    386
    \n+
    387 template<typename ctype, int dim>
    \n+\n+
    389 {
    \n+
    390 public:
    \n+\n+
    392 typedef typename Grid::Communication Comm;
    \n+
    393
    \n+
    394 TensorGridFactoryCreator(const TensorGridFactory<Grid>& factory) : _factory(factory) {}
    \n+
    395
    \n+
    396 std::unique_ptr<Grid> createGrid(Comm comm)
    \n+
    397 {
    \n+
    398 return std::make_unique<Grid>(_factory.coords(), std::bitset<dim>(0ULL), 1, comm);
    \n+
    399 }
    \n+
    400 private:
    \n+
    401 const TensorGridFactory<Grid>& _factory;
    \n+
    402 };
    \n+
    403}
    \n+
    404
    \n+
    405#endif
    \n+
    Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n+
    ct ctype
    Define type used for coordinates in grid module.
    Definition: common/grid.hh:532
    \n+\n+
    virtual void insertElement(const GeometryType &type, const std::vector< unsigned int > &vertices)
    Insert an element into the coarse grid.
    Definition: common/gridfactory.hh:346
    \n+
    virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)
    Insert a vertex into the coarse grid.
    Definition: common/gridfactory.hh:335
    \n+
    virtual std::unique_ptr< GridType > createGrid()
    Finalize grid creation and hand over the grid.
    Definition: common/gridfactory.hh:372
    \n
    Definition: multiindex.hh:19
    \n-
    MultiIndex(const std::array< unsigned int, dim > &limits)
    Constructor with a given range for each digit.
    Definition: multiindex.hh:25
    \n-
    MultiIndex< dim > & operator++()
    Increment the MultiIndex.
    Definition: multiindex.hh:31
    \n
    size_t cycle() const
    Compute how many times you can call operator++ before getting to (0,...,0) again.
    Definition: multiindex.hh:48
    \n+
    Definition: tensorgridfactory.hh:306
    \n+
    Grid::ctype ctype
    Definition: tensorgridfactory.hh:309
    \n+
    Grid::Traits::Communication Comm
    Definition: tensorgridfactory.hh:308
    \n+
    TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
    Definition: tensorgridfactory.hh:312
    \n+
    std::unique_ptr< Grid > createGrid(Comm comm)
    Definition: tensorgridfactory.hh:314
    \n+
    static const int dim
    Definition: tensorgridfactory.hh:310
    \n+
    A factory class for conveniently creating tensorproduct grids.
    Definition: tensorgridfactory.hh:42
    \n+
    void fillRange(int d, int n, ctype end)
    fills the range to end with n intervals in direction d
    Definition: tensorgridfactory.hh:108
    \n+
    void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype >(0), bool first=true)
    fills a coordinate range in direction d with n intervals according to a geometric series
    Definition: tensorgridfactory.hh:197
    \n+
    Grid::ctype ctype
    Definition: tensorgridfactory.hh:45
    \n+
    void fillUntil(int d, ctype h, ctype end)
    adds intervals in direction d until a given coordinate is reached
    Definition: tensorgridfactory.hh:125
    \n+
    void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast< ctype >(0))
    adds intervals in direction d according with a given length ratio until a given coordinate is reached
    Definition: tensorgridfactory.hh:170
    \n+
    static const int dim
    Definition: tensorgridfactory.hh:46
    \n+
    void print()
    print the coordinate information given to the factory so far
    Definition: tensorgridfactory.hh:219
    \n+
    void fillIntervals(int d, int n, ctype h)
    pushs n intervals of length h in direction d
    Definition: tensorgridfactory.hh:93
    \n+
    void setStart(int d, ctype value)
    set a starting value in a given direction d
    Definition: tensorgridfactory.hh:79
    \n+
    void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast< ctype >(0))
    adds n intervals in direction d with a given length ratio and a given starting interval length.
    Definition: tensorgridfactory.hh:144
    \n+
    std::vector< ctype > & operator[](std::size_t d)
    allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
    Definition: tensorgridfactory.hh:60
    \n+
    const std::vector< ctype > & operator[](std::size_t d) const
    allow to manually tune the factory by overloading operator[] to export the coordinate vectors in the ...
    Definition: tensorgridfactory.hh:66
    \n+
    std::unique_ptr< Grid > createGrid(Comm comm=Comm())
    Definition: tensorgridfactory.hh:48
    \n+
    Grid::Traits::Communication Comm
    Definition: tensorgridfactory.hh:44
    \n+
    std::array< std::vector< ctype >, dim > coords() const
    Definition: tensorgridfactory.hh:54
    \n+
    std::unique_ptr< Grid > createGrid(Comm comm)
    Definition: tensorgridfactory.hh:396
    \n+
    TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)
    Definition: tensorgridfactory.hh:394
    \n+\n+
    YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid
    Definition: tensorgridfactory.hh:391
    \n+
    [ provides Dune::Grid ]
    Definition: yaspgrid.hh:163
    \n+
    typename Base::Communication Communication
    Definition: yaspgrid.hh:178
    \n+
    Coordinate container for a tensor product YaspGrid.
    Definition: coordinates.hh:245
    \n+
    Provide a generic factory class for unstructured grids.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,82 +5,483 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * utility\n-multiindex.hh\n+tensorgridfactory.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3#ifndef DUNE_GRID_UTILITY_MULTIINDEX_HH\n- 4#define DUNE_GRID_UTILITY_MULTIINDEX_HH\n+ 3#ifndef DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH\n+ 4#define DUNE_GRID_UTILITY_TENSORGRIDFACTORY_HH\n 5\n- 11#include\n- 12\n- 13namespace Dune\n- 14{\n-15 namespace FactoryUtilities\n- 16 {\n- 17 template\n-18 class MultiIndex : public std::array\n- 19 {\n- 20 // The range of each component\n- 21 std::array limits_;\n- 22\n- 23 public:\n-25 MultiIndex(const std::array& limits) : limits_(limits)\n- 26 {\n- 27 std::fill(this->begin(), this->end(), 0);\n- 28 }\n- 29\n-31 MultiIndex& operator++()\n- 32 {\n- 33 for (std::size_t i=0; i\n+ 21#include\n+ 22#include\n+ 23\n+ 24#include \n+ 25#include \n+ 26#include \n+ 27#include\n+ 28\n+ 29namespace Dune\n+ 30{\n+ 31 // forward declaration of TensorGridFactoryCreator, which is the real\n+factory\n+ 32 // that should be specialized for each grid.\n+ 33 template\n+ 34 class TensorGridFactoryCreator;\n+ 35\n+ 40 template\n+41 class TensorGridFactory\n+ 42 {\n+ 43 public:\n+44 typedef typename Grid::Traits::Communication Comm;\n+45 typedef typename Grid::ctype ctype;\n+46 static const int dim = Grid::dimension;\n+ 47\n+48 std::unique_ptr createGrid(Comm comm = Comm())\n 49 {\n- 50 size_t result = 1;\n- 51 for (std::size_t i=0; i creator(*this);\n+ 51 return creator.createGrid(comm);\n+ 52 }\n+ 53\n+54 std::array , dim> coords() const\n+ 55 {\n+ 56 return _coords;\n+ 57 }\n 58\n- 59#endif\n+60 std::vector& operator[](std::size_t d)\n+ 61 {\n+ 62 return _coords[d];\n+ 63 }\n+ 64\n+66 const std::vector& operator[](std::size_t d) const\n+ 67 {\n+ 68 return _coords[d];\n+ 69 }\n+ 70\n+79 void setStart (int d, ctype value)\n+ 80 {\n+ 81 _coords[d].resize(1);\n+ 82 _coords[d][0] = value;\n+ 83 }\n+ 84\n+93 void fillIntervals (int d, int n, ctype h)\n+ 94 {\n+ 95 emptyCheck (d);\n+ 96 for (int i = 0; i < n; i++)\n+ 97 _coords[d].push_back (_coords[d].back () + h);\n+ 98 }\n+ 99\n+108 void fillRange (int d, int n, ctype end)\n+ 109 {\n+ 110 emptyCheck (d);\n+ 111 const ctype h = (end - _coords[d].back ()) / n;\n+ 112 for (int i = 0; i < n - 1; i++)\n+ 113 _coords[d].push_back (_coords[d].back () + h);\n+ 114 _coords[d].push_back (end);\n+ 115 }\n+ 116\n+125 void fillUntil (int d, ctype h, ctype end)\n+ 126 {\n+ 127 emptyCheck (d);\n+ 128 while (_coords[d].back () < end)\n+ 129 _coords[d].push_back (_coords[d].back () + h);\n+ 130 }\n+ 131\n+144 void geometricFillIntervals (int d, int n, ctype ratio, ctype h0 =\n+ 145 static_cast (0))\n+ 146 {\n+ 147 emptyCheck (d);\n+ 148 ctype h = h0;\n+ 149 if (h0 == static_cast(0))\n+ 150 h = lastInterval (d) * ratio;\n+ 151 for (int i = 0; i < n; i++)\n+ 152 {\n+ 153 _coords[d].push_back (_coords[d].back () + h);\n+ 154 h *= ratio;\n+ 155 }\n+ 156 }\n+ 157\n+170 void geometricFillUntil (int d, ctype ratio, ctype end, ctype h0 =\n+static_cast (0))\n+ 171 {\n+ 172 emptyCheck (d);\n+ 173 ctype h = h0;\n+ 174 if (h0 == static_cast(0))\n+ 175 h = lastInterval (d) * ratio;\n+ 176 while (_coords[d].back () < end)\n+ 177 {\n+ 178 _coords[d].push_back (_coords[d].back () + h);\n+ 179 h *= ratio;\n+ 180 }\n+ 181 }\n+ 182\n+197 void geometricFillRange (int d, int n, ctype end, ctype h =\n+ 198 static_cast (0),\n+ 199 bool first = true)\n+ 200 {\n+ 201 emptyCheck (d);\n+ 202 if (h < 1e-8)\n+ 203 h = lastInterval (d);\n+ 204 ctype ratio = newton (n, _coords[d].back (), end, h);\n+ 205 if (!first)\n+ 206 {\n+ 207 h = h * pow (ratio, n - 1);\n+ 208 ratio = 1 / ratio;\n+ 209 }\n+ 210 for (int i = 0; i < n - 1; i++)\n+ 211 {\n+ 212 _coords[d].push_back (_coords[d].back () + h);\n+ 213 h *= ratio;\n+ 214 }\n+ 215 _coords[d].push_back (end);\n+ 216 }\n+ 217\n+219 void print()\n+ 220 {\n+ 221 for (int i=0; i meshsize;\n+ 229 for (auto it = _coords[i].begin(); it != _coords[i].end()-1;)\n+ 230 {\n+ 231 meshsize.push_back(-1.*(*it));\n+ 232 ++it;\n+ 233 meshsize.back() += *it;\n+ 234 }\n+ 235\n+ 236 for (auto it = meshsize.begin(); it != meshsize.end(); ++it)\n+ 237 std::cout << *it << \" \";\n+ 238 std::cout << std::endl << \"Ratios between interval lengths: \";\n+ 239\n+ 240 std::vector ratios;\n+ 241 for (auto it = meshsize.begin(); it != meshsize.end() - 1 ;)\n+ 242 ratios.push_back((1./(*it)) * *(++it));\n+ 243\n+ 244 for (auto it = ratios.begin(); it != ratios.end(); ++it)\n+ 245 std::cout << *it << \" \";\n+ 246 std::cout << std::endl << std::endl << std::endl;\n+ 247 }\n+ 248 }\n+ 249\n+ 250 private:\n+ 251 // check whether the ith component is empty and add a 0.0 entry if so\n+ 252 void emptyCheck (int i)\n+ 253 {\n+ 254 if (_coords[i].empty ())\n+ 255 _coords[i].push_back (static_cast (0));\n+ 256 }\n+ 257\n+ 258 // returns the last interval length in direction d\n+ 259 ctype lastInterval (int d)\n+ 260 {\n+ 261 if (_coords[d].size () < 2)\n+ 262 DUNE_THROW(\n+ 263 GridError,\n+ 264 \"Not enough elements in coordinate container to deduce interval length in\n+TensorYaspFactory\");\n+ 265 else\n+ 266 return _coords[d].back () - _coords[d][_coords[d].size () - 2];\n+ 267 }\n+ 268\n+ 272 ctype newton (int n, ctype x_s, ctype x_e, ctype h)\n+ 273 {\n+ 274 ctype m = (x_e - x_s) / h;\n+ 275 ctype xold = 0.0;\n+ 276 ctype xnew = x_e - x_s;\n+ 277 while (std::abs (xnew - xold) > 1E-8)\n+ 278 {\n+ 279 xold = xnew;\n+ 280 xnew = xold\n+ 281 - (-pow (xold, n) + m * xold - m + 1)\n+ 282 / (-n * pow (xold, n - 1) + m);\n+ 283 }\n+ 284 if (std::abs (xnew - 1) < 1E-6)\n+ 285 {\n+ 286 xold = x_e - x_s;\n+ 287 xnew = 0.0;\n+ 288 while (std::abs (xnew - xold) > 1E-8)\n+ 289 {\n+ 290 xold = xnew;\n+ 291 xnew = xold\n+ 292 - (-pow (xold, n) + m * xold - m + 1)\n+ 293 / (-n * pow (xold, n - 1) + m);\n+ 294 }\n+ 295 }\n+ 296 return xnew;\n+ 297 }\n+ 298\n+ 299 std::array, dim> _coords;\n+ 300 };\n+ 301\n+ 302 // class that implements the actual grid creation process. The default is\n+implementing\n+ 303 // standard creation for unstructured grids. Provide a specialization for\n+other grids.\n+ 304 template\n+305 class TensorGridFactoryCreator\n+ 306 {\n+ 307 public:\n+308 typedef typename Grid::Traits::Communication Comm;\n+309 typedef typename Grid::ctype ctype;\n+310 static const int dim = Grid::dimension;\n+ 311\n+312 TensorGridFactoryCreator(const TensorGridFactory& factory) : _factory\n+(factory) {}\n+ 313\n+314 std::unique_ptr createGrid(Comm comm)\n+ 315 {\n+ 316 // The grid factory\n+ 317 GridFactory fac;\n+ 318\n+ 319 if (comm.rank() == 0)\n+ 320 {\n+ 321 // determine the size of the grid\n+ 322 std::array vsizes, esizes;\n+ 323 std::size_t size = 1;\n+ 324 for (std::size_t i = 0; i index(vsizes);\n+ 333 for (std::size_t i=0; i position;\n+ 336 for (std::size_t j = 0; j offsets;\n+ 343 offsets[0] = 1;\n+ 344 for (std::size_t i=1; i cornersTemplate(nCorners,0);\n+ 352\n+ 353 for (size_t i=0; i eindex(esizes);\n+ 360\n+ 361 // Compute the total number of elements to be created\n+ 362 int numElements = eindex.cycle();\n+ 363\n+ 364 for (int i=0; i corners = cornersTemplate;\n+ 373 for (size_t j=0; j(fac.createGrid());\n+ 381 }\n+ 382\n+ 383 private:\n+ 384 const TensorGridFactory& _factory;\n+ 385 };\n+ 386\n+ 387 template\n+388 class TensorGridFactoryCreator > >\n+ 389 {\n+ 390 public:\n+391 typedef YaspGrid > Grid;\n+392 typedef typename Grid::Communication Comm;\n+ 393\n+394 TensorGridFactoryCreator(const TensorGridFactory& factory) : _factory\n+(factory) {}\n+ 395\n+396 std::unique_ptr createGrid(Comm comm)\n+ 397 {\n+ 398 return std::make_unique(_factory.coords(), std::bitset(0ULL),\n+1, comm);\n+ 399 }\n+ 400 private:\n+ 401 const TensorGridFactory& _factory;\n+ 402 };\n+ 403}\n+ 404\n+ 405#endif\n+multiindex.hh\n+Implements a multiindex with arbitrary dimension and fixed index ranges This is\n+used by various facto...\n+yaspgrid.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::Alberta::abs\n+void abs(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:328\n+Dune::Grid::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/grid.hh:387\n+Dune::Grid::ctype\n+ct ctype\n+Define type used for coordinates in grid module.\n+Definition: common/grid.hh:532\n+Dune::GridFactory<_Grid_>\n+Dune::GridFactory::insertElement\n+virtual void insertElement(const GeometryType &type, const std::vector<\n+unsigned int > &vertices)\n+Insert an element into the coarse grid.\n+Definition: common/gridfactory.hh:346\n+Dune::GridFactory::insertVertex\n+virtual void insertVertex(const FieldVector< ctype, dimworld > &pos)\n+Insert a vertex into the coarse grid.\n+Definition: common/gridfactory.hh:335\n+Dune::GridFactory::createGrid\n+virtual std::unique_ptr< GridType > createGrid()\n+Finalize grid creation and hand over the grid.\n+Definition: common/gridfactory.hh:372\n Dune::FactoryUtilities::MultiIndex\n Definition: multiindex.hh:19\n-Dune::FactoryUtilities::MultiIndex::MultiIndex\n-MultiIndex(const std::array< unsigned int, dim > &limits)\n-Constructor with a given range for each digit.\n-Definition: multiindex.hh:25\n-Dune::FactoryUtilities::MultiIndex::operator++\n-MultiIndex< dim > & operator++()\n-Increment the MultiIndex.\n-Definition: multiindex.hh:31\n Dune::FactoryUtilities::MultiIndex::cycle\n size_t cycle() const\n Compute how many times you can call operator++ before getting to (0,...,0)\n again.\n Definition: multiindex.hh:48\n+Dune::TensorGridFactoryCreator\n+Definition: tensorgridfactory.hh:306\n+Dune::TensorGridFactoryCreator::ctype\n+Grid::ctype ctype\n+Definition: tensorgridfactory.hh:309\n+Dune::TensorGridFactoryCreator::Comm\n+Grid::Traits::Communication Comm\n+Definition: tensorgridfactory.hh:308\n+Dune::TensorGridFactoryCreator::TensorGridFactoryCreator\n+TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)\n+Definition: tensorgridfactory.hh:312\n+Dune::TensorGridFactoryCreator::createGrid\n+std::unique_ptr< Grid > createGrid(Comm comm)\n+Definition: tensorgridfactory.hh:314\n+Dune::TensorGridFactoryCreator::dim\n+static const int dim\n+Definition: tensorgridfactory.hh:310\n+Dune::TensorGridFactory\n+A factory class for conveniently creating tensorproduct grids.\n+Definition: tensorgridfactory.hh:42\n+Dune::TensorGridFactory::fillRange\n+void fillRange(int d, int n, ctype end)\n+fills the range to end with n intervals in direction d\n+Definition: tensorgridfactory.hh:108\n+Dune::TensorGridFactory::geometricFillRange\n+void geometricFillRange(int d, int n, ctype end, ctype h=static_cast< ctype >\n+(0), bool first=true)\n+fills a coordinate range in direction d with n intervals according to a\n+geometric series\n+Definition: tensorgridfactory.hh:197\n+Dune::TensorGridFactory::ctype\n+Grid::ctype ctype\n+Definition: tensorgridfactory.hh:45\n+Dune::TensorGridFactory::fillUntil\n+void fillUntil(int d, ctype h, ctype end)\n+adds intervals in direction d until a given coordinate is reached\n+Definition: tensorgridfactory.hh:125\n+Dune::TensorGridFactory::geometricFillUntil\n+void geometricFillUntil(int d, ctype ratio, ctype end, ctype h0=static_cast<\n+ctype >(0))\n+adds intervals in direction d according with a given length ratio until a given\n+coordinate is reached\n+Definition: tensorgridfactory.hh:170\n+Dune::TensorGridFactory::dim\n+static const int dim\n+Definition: tensorgridfactory.hh:46\n+Dune::TensorGridFactory::print\n+void print()\n+print the coordinate information given to the factory so far\n+Definition: tensorgridfactory.hh:219\n+Dune::TensorGridFactory::fillIntervals\n+void fillIntervals(int d, int n, ctype h)\n+pushs n intervals of length h in direction d\n+Definition: tensorgridfactory.hh:93\n+Dune::TensorGridFactory::setStart\n+void setStart(int d, ctype value)\n+set a starting value in a given direction d\n+Definition: tensorgridfactory.hh:79\n+Dune::TensorGridFactory::geometricFillIntervals\n+void geometricFillIntervals(int d, int n, ctype ratio, ctype h0=static_cast<\n+ctype >(0))\n+adds n intervals in direction d with a given length ratio and a given starting\n+interval length.\n+Definition: tensorgridfactory.hh:144\n+Dune::TensorGridFactory::operator[]\n+std::vector< ctype > & operator[](std::size_t d)\n+allow to manually tune the factory by overloading operator[] to export the\n+coordinate vectors in the ...\n+Definition: tensorgridfactory.hh:60\n+Dune::TensorGridFactory::operator[]\n+const std::vector< ctype > & operator[](std::size_t d) const\n+allow to manually tune the factory by overloading operator[] to export the\n+coordinate vectors in the ...\n+Definition: tensorgridfactory.hh:66\n+Dune::TensorGridFactory::createGrid\n+std::unique_ptr< Grid > createGrid(Comm comm=Comm())\n+Definition: tensorgridfactory.hh:48\n+Dune::TensorGridFactory::Comm\n+Grid::Traits::Communication Comm\n+Definition: tensorgridfactory.hh:44\n+Dune::TensorGridFactory::coords\n+std::array< std::vector< ctype >, dim > coords() const\n+Definition: tensorgridfactory.hh:54\n+Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n+dim_>_>_>::createGrid\n+std::unique_ptr< Grid > createGrid(Comm comm)\n+Definition: tensorgridfactory.hh:396\n+Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n+dim_>_>_>::TensorGridFactoryCreator\n+TensorGridFactoryCreator(const TensorGridFactory< Grid > &factory)\n+Definition: tensorgridfactory.hh:394\n+Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n+dim_>_>_>::Comm\n+Grid::Communication Comm\n+Definition: tensorgridfactory.hh:392\n+Dune::TensorGridFactoryCreator<_YaspGrid<_dim,_TensorProductCoordinates<_ctype,\n+dim_>_>_>::Grid\n+YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid\n+Definition: tensorgridfactory.hh:391\n+Dune::YaspGrid\n+[ provides Dune::Grid ]\n+Definition: yaspgrid.hh:163\n+Dune::YaspGrid::Communication\n+typename Base::Communication Communication\n+Definition: yaspgrid.hh:178\n+Dune::TensorProductCoordinates\n+Coordinate container for a tensor product YaspGrid.\n+Definition: coordinates.hh:245\n+gridfactory.hh\n+Provide a generic factory class for unstructured grids.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01022.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01022.html", "unified_diff": "@@ -90,31 +90,31 @@\n #include <dune/common/math.hh>
    \n #include <dune/common/typetraits.hh>
    \n #include <dune/common/reservedvector.hh>
    \n #include <dune/common/parallel/communication.hh>
    \n #include <dune/common/parallel/mpihelper.hh>
    \n #include <dune/geometry/axisalignedcubegeometry.hh>
    \n #include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/indexidset.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/grid/common/indexidset.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n #include <dune/common/parallel/mpicommunication.hh>
    \n-#include <dune/grid/yaspgrid/coordinates.hh>
    \n-#include <dune/grid/yaspgrid/torus.hh>
    \n-#include <dune/grid/yaspgrid/ygrid.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridgeometry.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridentity.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridintersection.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridintersectioniterator.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridhierarchiciterator.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridentityseed.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridleveliterator.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridindexsets.hh>
    \n-#include <dune/grid/yaspgrid/yaspgrididset.hh>
    \n-#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>
    \n-#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>
    \n+#include <dune/grid/yaspgrid/coordinates.hh>
    \n+#include <dune/grid/yaspgrid/torus.hh>
    \n+#include <dune/grid/yaspgrid/ygrid.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridgeometry.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridentity.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridintersection.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridintersectioniterator.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridhierarchiciterator.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridentityseed.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridleveliterator.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridindexsets.hh>
    \n+#include <dune/grid/yaspgrid/yaspgrididset.hh>
    \n+#include <dune/grid/yaspgrid/yaspgridpersistentcontainer.hh>
    \n+#include <dune/grid/yaspgrid/structuredyaspgridfactory.hh>
    \n #include <dune/grid/yaspgrid/backuprestore.hh>
    \n \n

    Go to the source code of this file.

    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01022_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01022_source.html", "unified_diff": "@@ -92,16 +92,16 @@\n
    21#include <dune/common/math.hh>
    \n
    22#include <dune/common/typetraits.hh>
    \n
    23#include <dune/common/reservedvector.hh>
    \n
    24#include <dune/common/parallel/communication.hh>
    \n
    25#include <dune/common/parallel/mpihelper.hh>
    \n
    26#include <dune/geometry/axisalignedcubegeometry.hh>
    \n
    27#include <dune/geometry/type.hh>
    \n-\n-\n+\n+\n
    30
    \n
    31
    \n
    32#if HAVE_MPI
    \n
    33#include <dune/common/parallel/mpicommunication.hh>
    \n
    34#endif
    \n
    35
    \n
    43namespace Dune {
    \n@@ -125,27 +125,27 @@\n
    61 template<class GridImp> class YaspHierarchicIterator;
    \n
    62 template<class GridImp, bool isLeafIndexSet> class YaspIndexSet;
    \n
    63 template<class GridImp> class YaspGlobalIdSet;
    \n
    64 template<class GridImp> class YaspPersistentContainerIndex;
    \n
    65
    \n
    66} // namespace Dune
    \n
    67
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n
    81
    \n
    82namespace Dune {
    \n
    83
    \n
    84#if HAVE_MPI
    \n
    85 using YaspCommunication = Communication<MPI_Comm>;
    \n
    86#else
    \n
    87 using YaspCommunication = Communication<No_Comm>;
    \n@@ -1937,35 +1937,35 @@\n
    2069 };
    \n
    2070
    \n
    2071 }
    \n
    2072
    \n
    2073} // end namespace
    \n
    2074
    \n
    2075// Include the specialization of the StructuredGridFactory class for YaspGrid
    \n-\n+\n
    2077// Include the specialization of the BackupRestoreFacility class for YaspGrid
    \n \n
    2079
    \n
    2080#endif
    \n-\n-
    The YaspIntersection class.
    \n-
    Specialization of the PersistentContainer for YaspGrid.
    \n-
    the YaspEntity class and its specializations
    \n-
    This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the...
    \n-
    The YaspLevelIterator class.
    \n-
    This file provides the infrastructure for toroidal communication in YaspGrid.
    \n-
    The YaspGeometry class and its specializations.
    \n-
    Specialization of the StructuredGridFactory class for YaspGrid.
    \n-
    level-wise, non-persistent, consecutive indices for YaspGrid
    \n-
    This provides a YGrid, the elemental component of the yaspgrid implementation.
    \n-
    The YaspEntitySeed class.
    \n-\n-
    The YaspIntersectionIterator class.
    \n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n-
    Provides base classes for index and id sets.
    \n+
    the YaspEntity class and its specializations
    \n+
    The YaspEntitySeed class.
    \n+
    The YaspGeometry class and its specializations.
    \n+
    The YaspIntersectionIterator class.
    \n+
    The YaspLevelIterator class.
    \n+
    This file provides the infrastructure for toroidal communication in YaspGrid.
    \n+
    Specialization of the StructuredGridFactory class for YaspGrid.
    \n+
    This provides a YGrid, the elemental component of the yaspgrid implementation.
    \n+
    The YaspIntersection class.
    \n+\n+
    This provides container classes for the coordinates to be used in YaspGrid Upon implementation of the...
    \n+
    level-wise, non-persistent, consecutive indices for YaspGrid
    \n+\n+
    Specialization of the PersistentContainer for YaspGrid.
    \n+
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+
    Provides base classes for index and id sets.
    \n
    std::ostream & operator<<(std::ostream &out, const PartitionType &type)
    write a PartitionType to a stream
    Definition: gridenums.hh:72
    \n
    CommunicationDirection
    Define a type for communication direction parameter.
    Definition: gridenums.hh:170
    \n
    InterfaceType
    Parameter to be used for the communication functions.
    Definition: gridenums.hh:86
    \n
    @ All_Partition
    all entities
    Definition: gridenums.hh:141
    \n
    @ Interior_Partition
    only interior entities
    Definition: gridenums.hh:137
    \n
    @ InteriorBorder_Partition
    interior and border entities
    Definition: gridenums.hh:138
    \n
    @ Overlap_Partition
    interior, border, and overlap entities
    Definition: gridenums.hh:139
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2104,41 +2104,41 @@\n YaspGrid\n 2076#include \n 2077// Include the specialization of the BackupRestoreFacility class for\n YaspGrid\n 2078#include \n 2079\n 2080#endif\n-yaspgrididset.hh\n-yaspgridintersection.hh\n-The YaspIntersection class.\n-yaspgridpersistentcontainer.hh\n-Specialization of the PersistentContainer for YaspGrid.\n yaspgridentity.hh\n the YaspEntity class and its specializations\n-coordinates.hh\n-This provides container classes for the coordinates to be used in YaspGrid Upon\n-implementation of the...\n+yaspgridentityseed.hh\n+The YaspEntitySeed class.\n+yaspgridgeometry.hh\n+The YaspGeometry class and its specializations.\n+yaspgridintersectioniterator.hh\n+The YaspIntersectionIterator class.\n yaspgridleveliterator.hh\n The YaspLevelIterator class.\n torus.hh\n This file provides the infrastructure for toroidal communication in YaspGrid.\n-yaspgridgeometry.hh\n-The YaspGeometry class and its specializations.\n structuredyaspgridfactory.hh\n Specialization of the StructuredGridFactory class for YaspGrid.\n-yaspgridindexsets.hh\n-level-wise, non-persistent, consecutive indices for YaspGrid\n ygrid.hh\n This provides a YGrid, the elemental component of the yaspgrid implementation.\n-yaspgridentityseed.hh\n-The YaspEntitySeed class.\n+yaspgridintersection.hh\n+The YaspIntersection class.\n+yaspgrididset.hh\n+coordinates.hh\n+This provides container classes for the coordinates to be used in YaspGrid Upon\n+implementation of the...\n+yaspgridindexsets.hh\n+level-wise, non-persistent, consecutive indices for YaspGrid\n yaspgridhierarchiciterator.hh\n-yaspgridintersectioniterator.hh\n-The YaspIntersectionIterator class.\n+yaspgridpersistentcontainer.hh\n+Specialization of the PersistentContainer for YaspGrid.\n datahandleif.hh\n Describes the parallel communication interface class for MessageBuffers and\n DataHandles.\n indexidset.hh\n Provides base classes for index and id sets.\n Dune::operator<<\n std::ostream & operator<<(std::ostream &out, const PartitionType &type)\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01027.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01027.html", "unified_diff": "@@ -64,15 +64,15 @@\n
    \n
    Bug List
    \n
    \n
    \n
    \n
    Member Dune::UGGrid< dim >::loadBalance (int minlevel=0)
    \n
    The return value is always 'true'
    \n-
    File globalindexset.hh
    \n+
    File globalindexset.hh
    \n
    This code will most likely not work on grids with more than one element type. Please ask on the mailing list if you need this feature.
    \n
    \n
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01031.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01031.html", "unified_diff": "@@ -164,16 +164,16 @@\n
    \n \n \n

    \n Classes

    struct  Dune::YaspGridFamily< dim, Coordinates >
    enum Dune::CommunicationDirection
    \n
    \n \n

    Define a type for communication direction parameter.

    \n-
    \n-\n+ \n \n \n
    Enumerator
    ForwardCommunication 

    communicate as given in InterfaceType

    \n
    BackwardCommunication 

    reverse communication direction

    \n
    \n \n@@ -188,15 +188,15 @@\n \n enum Dune::InterfaceType\n \n \n
    \n \n

    Parameter to be used for the communication functions.

    \n-
    \n+ \n \n \n \n@@ -217,15 +217,15 @@\n \n \n \n
    Enumerator
    InteriorBorder_InteriorBorder_Interface 

    send/receive interior and border entities

    \n
    InteriorBorder_All_Interface 

    send interior and border, receive all entities

    \n
    Overlap_OverlapFront_Interface 

    send overlap, receive overlap and front entities

    \n
    enum Dune::PartitionIteratorType
    \n
    \n \n

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

    \n-
    \n+ \n \n \n \n@@ -248,15 +248,15 @@\n \n \n \n
    Enumerator
    Interior_Partition 

    only interior entities

    \n
    InteriorBorder_Partition 

    interior and border entities

    \n
    Overlap_Partition 

    interior, border, and overlap entities

    \n
    enum Dune::PartitionType
    \n
    \n \n

    Attributes used in the generic overlap model.

    \n-
    \n+

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

    \n \n \n \n \n \n
    Enumerator
    InteriorEntity 

    all interior entities

    \n
    BorderEntity 

    on boundary between interior and overlap

    \n
    OverlapEntity 

    all entities lying in the overlap zone

    \n@@ -301,15 +301,15 @@\n
    \n inline
    \n
    \n \n

    write an InterfaceType to a stream

    \n-\n
    \n \n

    ◆ operator<<() [2/3]

    \n \n
    \n@@ -340,15 +340,15 @@\n \n inline \n \n \n
    \n \n

    write a PartitionIteratorType to a stream

    \n-\n
    \n \n

    ◆ operator<<() [3/3]

    \n \n
    \n@@ -379,15 +379,15 @@\n \n inline \n \n \n
    \n \n

    write a PartitionType to a stream

    \n-\n
    \n \n

    ◆ PartitionName()

    \n \n
    \n@@ -408,15 +408,15 @@\n \n inline \n \n \n
    \n \n

    Provide names for the partition types.

    \n-\n
    \n \n

    ◆ partitionSet()

    \n \n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01055.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01055.html", "unified_diff": "@@ -77,19 +77,19 @@\n \"\"\n \"\"\n \n
    \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n

    \n Files

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

    \n Namespaces

    namespace  Dune::VTK
     
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01064.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01064.html", "unified_diff": "@@ -216,33 +216,33 @@\n \n \n
    struct  Twist< dim, 2 >
     
    \n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n-\n+\n \n

    \n Typedefs

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

    \n Functions

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

    ◆ AffineTransformation

    \n \n
    \n
    \n

    \n Variables

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

    ◆ BoundaryId

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA BNDRY_TYPE Dune::Alberta::BoundaryIdtypedef ALBERTA BNDRY_TYPE Dune::Alberta::BoundaryId
    \n
    \n \n
    \n
    \n \n

    ◆ DofSpace

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA FE_SPACE Dune::Alberta::DofSpacetypedef ALBERTA FE_SPACE Dune::Alberta::DofSpace
    \n
    \n \n
    \n
    \n \n

    ◆ Element

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA EL Dune::Alberta::Elementtypedef ALBERTA EL Dune::Alberta::Element
    \n
    \n \n
    \n
    \n \n@@ -399,29 +399,29 @@\n \n

    ◆ GlobalMatrix

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA REAL_DD Dune::Alberta::GlobalMatrixtypedef ALBERTA REAL_DD Dune::Alberta::GlobalMatrix
    \n
    \n \n
    \n
    \n \n

    ◆ GlobalVector

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA REAL_D Dune::Alberta::GlobalVectortypedef ALBERTA REAL_D Dune::Alberta::GlobalVector
    \n
    \n \n
    \n
    \n \n@@ -441,43 +441,43 @@\n \n

    ◆ LocalVector

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA REAL_B Dune::Alberta::LocalVectortypedef ALBERTA REAL_B Dune::Alberta::LocalVector
    \n
    \n \n
    \n
    \n \n

    ◆ Mesh

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA MESH Dune::Alberta::Meshtypedef ALBERTA MESH Dune::Alberta::Mesh
    \n
    \n \n
    \n
    \n \n

    ◆ Real

    \n \n
    \n
    \n \n \n- \n+ \n \n
    typedef ALBERTA REAL Dune::Alberta::Realtypedef ALBERTA REAL Dune::Alberta::Real
    \n
    \n \n
    \n
    \n

    Function Documentation

    \n@@ -1264,15 +1264,15 @@\n
    \n
    \n \n \n \n \n \n
    \n \n \n- \n+ \n \n
    const int Dune::Alberta::dimWorld = DIM_OF_WORLDconst int Dune::Alberta::dimWorld = DIM_OF_WORLD
    \n
    \n static
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01075.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01075.html", "unified_diff": "@@ -254,16 +254,16 @@\n \n enum Dune::VTK::DataMode\n \n \n
    \n \n

    Whether to produce conforming or non-conforming output.

    \n-
    \n-
    Common stuff for the VTKWriter.
    \n+
    \n+
    Common stuff for the VTKWriter.
    \n

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

    \n \n \n \n \n \n
    Enumerator
    conforming 

    Output conforming data.

    \n

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

    \n
    nonconforming 

    Output non-conforming data.

    \n

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

    \n@@ -281,15 +281,15 @@\n
    enum Dune::VTK::FileType
    \n
    \n \n

    which type of VTK file to write

    \n-
    \n+ \n \n \n
    Enumerator
    polyData 

    for .vtp files (PolyData)

    \n
    unstructuredGrid 

    for .vtu files (UnstructuredGrid)

    \n
    \n \n@@ -304,15 +304,15 @@\n \n enum Dune::VTK::GeometryType\n \n \n
    \n \n

    Type representing VTK's entity geometry types.

    \n-
    \n+

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

    \n \n \n \n \n \n \n@@ -334,15 +334,15 @@\n \n \n \n
    Enumerator
    vertex 
    line 
    triangle 
    polygon 
    quadrilateral 
    enum Dune::VTK::OutputType
    \n
    \n \n

    How the bulk data should be stored in the file.

    \n-
    \n+ \n \n \n \n@@ -369,15 +369,15 @@\n \n \n
    Enumerator
    ascii 

    Output to the file is in ascii.

    \n
    base64 

    Output to the file is inline base64 binary.

    \n
    appendedraw 

    Output is to the file is appended raw binary.

    \n
    \n strong
    \n
    \n \n

    which precision to use when writing out data to vtk files

    \n-
    \n+ \n \n \n \n \n \n
    Enumerator
    int32 
    uint8 
    uint32 
    float32 
    float64 
    \n@@ -406,15 +406,15 @@\n \n inline \n \n \n
    \n \n

    mapping from GeometryType to VTKGeometryType

    \n-\n
    \n \n

    ◆ getEndiannessString()

    \n \n
    \n@@ -473,15 +473,15 @@\n \n inline \n \n \n
    \n \n

    renumber VTK <-> Dune

    \n-
    \n+

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

    \n \n
    \n
    \n \n

    ◆ renumber() [2/2]

    \n \n@@ -507,15 +507,15 @@\n )\n \n \n \n
    \n \n

    renumber VTK <-> Dune

    \n-
    \n+

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

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

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DGFGridFactory< G >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -481,16 +481,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following files:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01898.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01898.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::AlbertaGrid< dim, dimworld > Class Template Reference
    \n
    \n
    \n \n

    [ provides Dune::Grid ] \n More...

    \n \n-

    #include <dune/grid/albertagrid/agrid.hh>

    \n+

    #include <dune/grid/albertagrid/agrid.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaGrid< dim, dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -250,15 +250,15 @@\n  \n const GlobalIdSetglobalIdSet () const\n  return global IdSet More...
    \n  \n const LocalIdSetlocalIdSet () const\n  return local IdSet More...
    \n  \n-ALBERTA MESH * getMesh () const\n+ALBERTA MESH * getMesh () const\n  \n const MeshPointermeshPointer () const\n  \n const DofNumberingdofNumbering () const\n  \n const LevelProviderlevelProvider () const\n  \n@@ -1455,15 +1455,15 @@\n
    \n template<int dim, int dimworld = Alberta::dimWorld>
    \n \n \n \n \n
    \n \n \n- \n+ \n \n \n \n \n
    ALBERTA MESH * Dune::AlbertaGrid< dim, dimworld >::getMesh ALBERTA MESH * Dune::AlbertaGrid< dim, dimworld >::getMesh () const
    \n
    \n@@ -2978,16 +2978,16 @@\n
    \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01910.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01910.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members
    \n
    Dune::AlbertaReader< Grid > Class Template Reference
    \n
    \n
    \n \n-

    #include <dune/grid/albertagrid/albertareader.hh>

    \n+

    #include <dune/grid/albertagrid/albertareader.hh>

    \n \n \n \n \n \n \n@@ -244,15 +244,15 @@\n \n

    \n Public Types

    typedef Dune::GridFactory< GridGridFactory
     
    typedef Grid::ctype ctype
     
    \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01950.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01950.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::CoordCache< dim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/coordcache.hh>

    \n+

    #include <dune/grid/albertagrid/coordcache.hh>

    \n \n \n \n \n \n \n@@ -313,15 +313,15 @@\n \n

    \n Classes

    struct  Interpolation
     
    class  LocalCaching
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01954.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01954.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::CoordCache< dim >::LocalCaching Class Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/coordcache.hh>

    \n+

    #include <dune/grid/albertagrid/coordcache.hh>

    \n \n \n \n \n \n \n@@ -137,15 +137,15 @@\n \n

    \n Public Member Functions

     LocalCaching (const CoordVectorPointer &coords)
     
    void operator() (const ElementInfo &elementInfo) const
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01958.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01958.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::CoordCache< dim >::Interpolation Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/coordcache.hh>

    \n+

    #include <dune/grid/albertagrid/coordcache.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Alberta::Patch< dimensionPatch
     
    \n \n

    \n@@ -170,15 +170,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01978.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01978.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Public Member Functions |\n List of all members \n
    Dune::Alberta::MeshPointer< dim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/meshpointer.hh>

    \n+

    #include <dune/grid/albertagrid/meshpointer.hh>

    \n
    \n Inheritance diagram for Dune::Alberta::MeshPointer< dim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -764,16 +764,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01982.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01982.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::DofAccess< dim, codim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofadmin.hh>

    \n+

    #include <dune/grid/albertagrid/dofadmin.hh>

    \n
    \n Inheritance diagram for Dune::Alberta::DofAccess< dim, codim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -425,15 +425,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01986.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01986.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::HierarchyDofNumbering< dim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofadmin.hh>

    \n+

    #include <dune/grid/albertagrid/dofadmin.hh>

    \n
    \n Inheritance diagram for Dune::Alberta::HierarchyDofNumbering< dim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -515,15 +515,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a01998.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a01998.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::Alberta::DofVectorProvider< Dof > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02002.html", "unified_diff": "@@ -70,19 +70,19 @@\n Public Types |\n Static Public Member Functions |\n List of all members \n
    Dune::Alberta::DofVectorProvider< int > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofvector.hh>

    \n+

    #include <dune/grid/albertagrid/dofvector.hh>

    \n \n \n-\n+\n \n

    \n Public Types

    typedef ALBERTA DOF_INT_VEC DofVector
    typedef ALBERTA DOF_INT_VEC DofVector
     
    \n \n \n \n \n@@ -96,15 +96,15 @@\n \n

    ◆ DofVector

    \n \n
    \n
    \n

    \n Static Public Member Functions

    static DofVectorget (const DofSpace *dofSpace, const std::string &name)
     
    static void free (DofVector *dofVector)
    \n \n- \n+ \n \n
    typedef ALBERTA DOF_INT_VEC Dune::Alberta::DofVectorProvider< int >::DofVectortypedef ALBERTA DOF_INT_VEC Dune::Alberta::DofVectorProvider< int >::DofVector
    \n
    \n \n
    \n \n

    Member Function Documentation

    \n@@ -245,15 +245,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02006.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02006.html", "unified_diff": "@@ -70,19 +70,19 @@\n Public Types |\n Static Public Member Functions |\n List of all members \n
    Dune::Alberta::DofVectorProvider< signed char > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofvector.hh>

    \n+

    #include <dune/grid/albertagrid/dofvector.hh>

    \n \n \n-\n+\n \n

    \n Public Types

    typedef ALBERTA DOF_SCHAR_VEC DofVector
    typedef ALBERTA DOF_SCHAR_VEC DofVector
     
    \n \n \n \n \n@@ -96,15 +96,15 @@\n \n

    ◆ DofVector

    \n \n
    \n
    \n

    \n Static Public Member Functions

    static DofVectorget (const DofSpace *dofSpace, const std::string &name)
     
    static void free (DofVector *dofVector)
    \n \n- \n+ \n \n
    typedef ALBERTA DOF_SCHAR_VEC Dune::Alberta::DofVectorProvider< signed char >::DofVectortypedef ALBERTA DOF_SCHAR_VEC Dune::Alberta::DofVectorProvider< signed char >::DofVector
    \n
    \n \n
    \n \n

    Member Function Documentation

    \n@@ -245,15 +245,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02010.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02010.html", "unified_diff": "@@ -70,19 +70,19 @@\n Public Types |\n Static Public Member Functions |\n List of all members \n
    Dune::Alberta::DofVectorProvider< unsigned char > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofvector.hh>

    \n+

    #include <dune/grid/albertagrid/dofvector.hh>

    \n \n \n-\n+\n \n

    \n Public Types

    typedef ALBERTA DOF_UCHAR_VEC DofVector
    typedef ALBERTA DOF_UCHAR_VEC DofVector
     
    \n \n \n \n \n@@ -96,15 +96,15 @@\n \n

    ◆ DofVector

    \n \n
    \n
    \n

    \n Static Public Member Functions

    static DofVectorget (const DofSpace *dofSpace, const std::string &name)
     
    static void free (DofVector *dofVector)
    \n \n- \n+ \n \n
    typedef ALBERTA DOF_UCHAR_VEC Dune::Alberta::DofVectorProvider< unsigned char >::DofVectortypedef ALBERTA DOF_UCHAR_VEC Dune::Alberta::DofVectorProvider< unsigned char >::DofVector
    \n
    \n \n
    \n \n

    Member Function Documentation

    \n@@ -245,15 +245,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02014.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02014.html", "unified_diff": "@@ -70,19 +70,19 @@\n Public Types |\n Static Public Member Functions |\n List of all members \n
    Dune::Alberta::DofVectorProvider< Real > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofvector.hh>

    \n+

    #include <dune/grid/albertagrid/dofvector.hh>

    \n \n \n-\n+\n \n

    \n Public Types

    typedef ALBERTA DOF_REAL_VEC DofVector
    typedef ALBERTA DOF_REAL_VEC DofVector
     
    \n \n \n \n \n@@ -96,15 +96,15 @@\n \n

    ◆ DofVector

    \n \n
    \n
    \n

    \n Static Public Member Functions

    static DofVectorget (const DofSpace *dofSpace, const std::string &name)
     
    static void free (DofVector *dofVector)
    \n \n- \n+ \n \n
    typedef ALBERTA DOF_REAL_VEC Dune::Alberta::DofVectorProvider< Real >::DofVectortypedef ALBERTA DOF_REAL_VEC Dune::Alberta::DofVectorProvider< Real >::DofVector
    \n
    \n \n
    \n \n

    Member Function Documentation

    \n@@ -245,15 +245,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02018.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02018.html", "unified_diff": "@@ -70,19 +70,19 @@\n Public Types |\n Static Public Member Functions |\n List of all members \n
    Dune::Alberta::DofVectorProvider< GlobalVector > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofvector.hh>

    \n+

    #include <dune/grid/albertagrid/dofvector.hh>

    \n \n \n-\n+\n \n

    \n Public Types

    typedef ALBERTA DOF_REAL_D_VEC DofVector
    typedef ALBERTA DOF_REAL_D_VEC DofVector
     
    \n \n \n \n \n@@ -96,15 +96,15 @@\n \n

    ◆ DofVector

    \n \n
    \n
    \n

    \n Static Public Member Functions

    static DofVectorget (const DofSpace *dofSpace, const std::string &name)
     
    static void free (DofVector *dofVector)
    \n \n- \n+ \n \n
    typedef ALBERTA DOF_REAL_D_VEC Dune::Alberta::DofVectorProvider< GlobalVector >::DofVectortypedef ALBERTA DOF_REAL_D_VEC Dune::Alberta::DofVectorProvider< GlobalVector >::DofVector
    \n
    \n \n
    \n \n

    Member Function Documentation

    \n@@ -245,15 +245,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02022.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02022.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::DofVectorPointer< Dof > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/dofvector.hh>

    \n+

    #include <dune/grid/albertagrid/dofvector.hh>

    \n
    \n Inheritance diagram for Dune::Alberta::DofVectorPointer< Dof >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -720,15 +720,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02026.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02026.html", "unified_diff": "@@ -73,15 +73,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::ElementInfo< dim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n+

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n
    \n Inheritance diagram for Dune::Alberta::ElementInfo< dim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -189,24 +189,24 @@\n  \n const Elementelement () const\n  \n const Elementneighbor (int face) const\n  \n Elementel () const\n  \n-ALBERTA EL_INFO & elInfo () const\n+ALBERTA EL_INFO & elInfo () const\n  \n int type () const\n  \n \n \n \n \n-\n+\n \n

    \n Static Public Member Functions

    static ElementInfo createFake (const MeshPointer &mesh, const Element *element, int level, int type=0)
     
    static ElementInfo createFake (const ALBERTA EL_INFO &elInfo)
    static ElementInfo createFake (const ALBERTA EL_INFO &elInfo)
     
    \n \n \n \n \n@@ -599,15 +599,15 @@\n

    \n Static Public Attributes

    static const int dimension = dim
     
    static const int numVertices = NumSubEntities< dimension, dimension >::value
    \n \n \n \n@@ -723,15 +723,15 @@\n
    \n template<int dim>
    \n
    \n \n \n \n \n- \n+ \n \n \n \n
    ElementInfo< dim > Dune::Alberta::ElementInfo< dim >::createFake (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
    \n
    \n inlinestatic
    \n \n \n \n \n
    \n \n \n- \n+ \n \n
    ALBERTA EL_INFO & Dune::Alberta::ElementInfo< dim >::elInfoALBERTA EL_INFO & Dune::Alberta::ElementInfo< dim >::elInfo
    \n
    \n inline
    \n@@ -1642,15 +1642,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02034.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02034.html", "unified_diff": "@@ -70,24 +70,24 @@\n Public Member Functions |\n Public Attributes |\n List of all members \n
    Dune::Alberta::ElementInfo< dim >::Instance Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n+

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n \n \n \n \n

    \n Public Member Functions

    InstancePtrparent ()
     
    \n \n-\n+\n \n \n \n \n \n

    \n Public Attributes

    ALBERTA EL_INFO elInfo
    ALBERTA EL_INFO elInfo
     
    unsigned int refCount
     
    Alberta::GeometryCache< dim > geometryCache
     
    \n

    Member Function Documentation

    \n@@ -124,15 +124,15 @@\n \n
    \n
    \n
    \n template<int dim>
    \n \n \n- \n+ \n \n
    ALBERTA EL_INFO Dune::Alberta::ElementInfo< dim >::Instance::elInfoALBERTA EL_INFO Dune::Alberta::ElementInfo< dim >::Instance::elInfo
    \n
    \n \n
    \n
    \n \n@@ -164,15 +164,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02038.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02038.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::ElementInfo< dim >::Stack Class Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n+

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n \n \n \n \n \n \n@@ -211,15 +211,15 @@\n \n

    \n Public Member Functions

     Stack ()
     
     ~Stack ()
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02042.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02042.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::ElementInfo< dim >::Seed Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n+

    #include <dune/grid/albertagrid/elementinfo.hh>

    \n \n \n \n \n \n \n@@ -448,15 +448,15 @@\n \n

    \n Public Member Functions

     Seed ()
     
     Seed (const int macroIndex, const int level, const unsigned long path)
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02046.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02046.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Member Functions |\n List of all members \n
    Dune::AlbertaGridTreeIterator< codim, GridImp, leafIterator > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/treeiterator.hh>

    \n+

    #include <dune/grid/albertagrid/treeiterator.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaGridTreeIterator< codim, GridImp, leafIterator >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -655,15 +655,15 @@\n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02050.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02050.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Protected Member Functions |\n List of all members \n
    Dune::AlbertaGridHierarchicIterator< GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/hierarchiciterator.hh>

    \n+

    #include <dune/grid/albertagrid/hierarchiciterator.hh>

    \n \n \n \n \n \n \n@@ -531,15 +531,15 @@\n \n

    assignment operator

    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02054.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02054.html", "unified_diff": "@@ -1425,15 +1425,15 @@\n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02062.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02062.html", "unified_diff": "@@ -128,15 +128,15 @@\n \n \n \n \n \n \n \n-\n+\n \n \n \n \n \n \n \n@@ -450,15 +450,15 @@\n
    \n template<int codim, int dim, class Grid >
    \n

    \n Public Types

    typedef GridImp::template Codim< 0 >::Entity Entity
     
    typedef GridImp::ctype ctype
     
     
    EntitySeed seed () const
     obtain entity seed More...
     
    unsigned int subEntities (unsigned int cd) const
     Obtain the number of subentities of a given codimension. More...
     
    ALBERTA EL_INFO * getElInfo () const
    ALBERTA EL_INFO * getElInfo () const
     needed for the LevelIterator and LeafIterator More...
     
    const ElementInfoelementInfo () const
     
    bool equals (const This &other) const
     equality of entities More...
     
    \n \n \n \n \n
    \n \n \n- \n+ \n \n
    ALBERTA EL_INFO * Dune::AlbertaGridEntity< codim, dim, Grid >::getElInfoALBERTA EL_INFO * Dune::AlbertaGridEntity< codim, dim, Grid >::getElInfo
    \n
    \n inline
    \n@@ -837,15 +837,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02070.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02070.html", "unified_diff": "@@ -181,15 +181,15 @@\n  \n PartitionType partitionType () const\n  return partition type of this entity More...
    \n  \n bool equals (const This &i) const\n  equality of entities More...
    \n  \n-ALBERTA EL_INFO * getElInfo () const\n+ALBERTA EL_INFO * getElInfo () const\n  \n const ElementInfoelementInfo () const\n  \n void clearElement ()\n  \n void setElement (const ElementInfo &elementInfo, int subEntity)\n  \n@@ -662,15 +662,15 @@\n
    \n template<int dim, class Grid >
    \n \n \n \n \n \n
    \n \n \n- \n+ \n \n
    ALBERTA EL_INFO * Dune::AlbertaGridEntity< 0, dim, Grid >::getElInfoALBERTA EL_INFO * Dune::AlbertaGridEntity< 0, dim, Grid >::getElInfo
    \n
    \n inline
    \n@@ -1421,15 +1421,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02090.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02090.html", "unified_diff": "@@ -266,15 +266,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02094.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02094.html", "unified_diff": "@@ -266,15 +266,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02102.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02102.html", "unified_diff": "@@ -1014,15 +1014,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02114.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02114.html", "unified_diff": "@@ -420,15 +420,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02122.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02122.html", "unified_diff": "@@ -70,32 +70,32 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::Alberta::GeometryCache< dim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/geometrycache.hh>

    \n+

    #include <dune/grid/albertagrid/geometrycache.hh>

    \n \n \n \n \n \n \n

    \n Public Types

    typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
     
    typedef FieldMatrix< Real, dim, dimWorldJacobianTransposed
     
    \n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n

    \n Public Member Functions

     GeometryCache ()
     
    const RealintegrationElement (const ALBERTA EL_INFO &elInfo)
    const RealintegrationElement (const ALBERTA EL_INFO &elInfo)
     
    const JacobianTransposedjacobianTransposed (const ALBERTA EL_INFO &elInfo)
    const JacobianTransposedjacobianTransposed (const ALBERTA EL_INFO &elInfo)
     
    const JacobianInverseTransposedjacobianInverseTransposed (const ALBERTA EL_INFO &elInfo)
    const JacobianInverseTransposedjacobianInverseTransposed (const ALBERTA EL_INFO &elInfo)
     
    \n

    Member Typedef Documentation

    \n \n

    ◆ JacobianInverseTransposed

    \n \n
    \n@@ -166,15 +166,15 @@\n \n \n \n \n@@ -194,15 +194,15 @@\n
    \n \n \n \n \n- \n+ \n \n \n \n
    const Real & Dune::Alberta::GeometryCache< dim >::integrationElement (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
    \n
    \n inline
    \n \n \n \n@@ -222,30 +222,30 @@\n
    \n \n \n \n \n- \n+ \n \n \n \n
    const JacobianInverseTransposed & Dune::Alberta::GeometryCache< dim >::jacobianInverseTransposed (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
    \n
    \n inline
    \n \n \n \n \n
    \n \n \n \n \n- \n+ \n \n \n \n
    const JacobianTransposed & Dune::Alberta::GeometryCache< dim >::jacobianTransposed (const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo)
    \n
    \n inline
    \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02126.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02126.html", "unified_diff": "@@ -70,26 +70,26 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::Alberta::GeometryCacheProxy< dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/geometrycache.hh>

    \n+

    #include <dune/grid/albertagrid/geometrycache.hh>

    \n \n \n \n \n \n \n

    \n Public Types

    typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
     
    typedef FieldMatrix< Real, dim, dimWorldJacobianTransposed
     
    \n \n-\n+\n \n \n \n \n \n \n \n@@ -144,15 +144,15 @@\n \n \n \n \n \n \n \n- \n+ \n \n \n \n \n \n \n \n@@ -245,15 +245,15 @@\n \n

    \n Public Member Functions

     GeometryCacheProxy (GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
     GeometryCacheProxy (GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
     
    const RealintegrationElement ()
     
    const JacobianTransposedjacobianTransposed ()
     
    const JacobianInverseTransposedjacobianInverseTransposed ()
     
    (GeometryCache< dim > & geometryCache,
    const ALBERTA EL_INFO & const ALBERTA EL_INFO & elInfo 
    )
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02130.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02130.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeometryReference< Implementation > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/geometryreference.hh>

    \n+

    #include <dune/grid/albertagrid/geometryreference.hh>

    \n
    \n Inheritance diagram for Dune::GeometryReference< Implementation >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -719,15 +719,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02134.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02134.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::LocalGeometryReference< mydim, cdim, Grid > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/geometryreference.hh>

    \n+

    #include <dune/grid/albertagrid/geometryreference.hh>

    \n
    \n Inheritance diagram for Dune::LocalGeometryReference< mydim, cdim, Grid >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -729,15 +729,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02154.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02154.html", "unified_diff": "@@ -904,15 +904,15 @@\n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02166.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02166.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Member Functions |\n List of all members \n
    Dune::AlbertaGridLeafIterator< codim, pitype, GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/leafiterator.hh>

    \n+

    #include <dune/grid/albertagrid/leafiterator.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaGridLeafIterator< codim, pitype, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -604,15 +604,15 @@\n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02170.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02170.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Member Functions |\n List of all members \n
    Dune::AlbertaGridLevelIterator< codim, pitype, GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/leveliterator.hh>

    \n+

    #include <dune/grid/albertagrid/leveliterator.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaGridLevelIterator< codim, pitype, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -604,15 +604,15 @@\n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02250.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02250.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Public Member Functions |\n List of all members \n
    Dune::IndexStack< T, length > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/indexstack.hh>

    \n+

    #include <dune/grid/albertagrid/indexstack.hh>

    \n \n \n \n \n \n \n@@ -420,15 +420,15 @@\n
    \n \n

    test stack functionality

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02258.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02258.html", "unified_diff": "@@ -429,15 +429,15 @@\n \n

    \n Public Member Functions

     IndexStack ()
     Constructor, create new IndexStack. More...
     
     ~IndexStack ()
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02262.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02262.html", "unified_diff": "@@ -443,15 +443,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02266.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02266.html", "unified_diff": "@@ -970,15 +970,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02278.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02278.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Member Functions |\n List of all members \n
    Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/leafiterator.hh>

    \n+

    #include <dune/grid/albertagrid/leafiterator.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -603,15 +603,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02282.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02282.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::AlbertaGridLevelProvider< dim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/level.hh>

    \n+

    #include <dune/grid/albertagrid/level.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaGridLevelProvider< dim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -420,15 +420,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02290.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02290.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::AlbertaGridLevelProvider< dim >::SetLocal Class Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/level.hh>

    \n+

    #include <dune/grid/albertagrid/level.hh>

    \n \n \n \n \n \n \n@@ -137,15 +137,15 @@\n \n

    \n Public Member Functions

     SetLocal (const DofVectorPointer &level)
     
    void operator() (const Alberta::ElementInfo< dim > &elementInfo) const
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02294.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02294.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::AlbertaGridLevelProvider< dim >::CalcMaxLevel Class Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/level.hh>

    \n+

    #include <dune/grid/albertagrid/level.hh>

    \n \n \n \n \n \n \n@@ -195,15 +195,15 @@\n \n

    \n Public Member Functions

     CalcMaxLevel ()
     
    void operator() (const Level &dof)
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02298.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02298.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::AlbertaGridLevelProvider< dim >::Interpolation Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/level.hh>

    \n+

    #include <dune/grid/albertagrid/level.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Alberta::Patch< dimensionPatch
     
    \n \n

    \n@@ -170,15 +170,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02302.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02302.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Member Functions |\n List of all members \n
    Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/leveliterator.hh>

    \n+

    #include <dune/grid/albertagrid/leveliterator.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -603,15 +603,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02310.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02310.html", "unified_diff": "@@ -302,15 +302,15 @@\n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02314.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02314.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::MacroElement< dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/macroelement.hh>

    \n+

    #include <dune/grid/albertagrid/macroelement.hh>

    \n
    \n Inheritance diagram for Dune::Alberta::MacroElement< dim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -197,15 +197,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02322.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02322.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::Alberta::MeshPointer< dim >::MacroIterator Class Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/meshpointer.hh>

    \n+

    #include <dune/grid/albertagrid/meshpointer.hh>

    \n \n \n \n \n \n \n@@ -441,15 +441,15 @@\n \n

    \n Public Types

    typedef Alberta::MeshPointer< dim > MeshPointer
     
    typedef Alberta::ElementInfo< dim > ElementInfo
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02326.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02326.html", "unified_diff": "@@ -66,26 +66,26 @@\n \n \n
    \n
    Dune::AlbertaError Class Reference
    \n
    \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaError:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n \n
    \n
    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02330.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02330.html", "unified_diff": "@@ -66,26 +66,26 @@\n \n \n
    \n
    Dune::AlbertaIOError Class Reference
    \n
    \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaIOError:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n \n
    \n
    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02334.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02334.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Static Public Member Functions |\n List of all members \n
    Dune::Alberta::GlobalSpace Class Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n \n \n@@ -167,15 +167,15 @@\n \n

    \n Public Types

    typedef GlobalMatrix Matrix
     
    typedef GlobalVector Vector
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02338.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02338.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::Alberta::NumSubEntities< dim, codim > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02342.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02342.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::NumSubEntities< dim, 0 > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = 1
     
    \n

    Member Data Documentation

    \n@@ -102,15 +102,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02346.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02346.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::NumSubEntities< dim, dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = dim+1
     
    \n

    Member Data Documentation

    \n@@ -102,15 +102,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02350.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02350.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::NumSubEntities< 0, 0 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = 1
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02354.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02354.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::NumSubEntities< 2, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = 3
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02358.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02358.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::NumSubEntities< 3, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = 4
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02362.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02362.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::NumSubEntities< 3, 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = 6
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02366.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02366.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::Alberta::CodimType< dim, codim > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02370.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02370.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::CodimType< dim, 0 > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = CENTER
     
    \n

    Member Data Documentation

    \n@@ -102,15 +102,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02374.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02374.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::CodimType< dim, dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = VERTEX
     
    \n

    Member Data Documentation

    \n@@ -102,15 +102,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02378.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02378.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::CodimType< 2, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = EDGE
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02382.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02382.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::CodimType< 3, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = FACE
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02386.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02386.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::CodimType< 3, 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = EDGE
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02390.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02390.html", "unified_diff": "@@ -70,19 +70,19 @@\n Public Types |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::FillFlags< dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n-\n+\n \n

    \n Public Types

    typedef ALBERTA FLAGS Flags
    typedef ALBERTA FLAGS Flags
     
    \n \n \n \n \n@@ -112,15 +112,15 @@\n \n
    \n
    \n
    \n template<int dim>
    \n

    \n Static Public Attributes

    static const Flags nothing = FILL_NOTHING
     
    static const Flags coords = FILL_COORDS
    \n \n- \n+ \n \n
    typedef ALBERTA FLAGS Dune::Alberta::FillFlags< dim >::Flagstypedef ALBERTA FLAGS Dune::Alberta::FillFlags< dim >::Flags
    \n
    \n \n
    \n \n

    Member Data Documentation

    \n@@ -394,15 +394,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02394.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02394.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::RefinementEdge< dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = 0
     
    \n

    Member Data Documentation

    \n@@ -102,15 +102,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02398.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02398.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::RefinementEdge< 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Attributes

    static const int value = 2
     
    \n

    Member Data Documentation

    \n@@ -100,15 +100,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02402.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02402.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::Dune2AlbertaNumbering< dim, codim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (const int i)
     
    \n

    Member Function Documentation

    \n@@ -106,15 +106,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02406.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02406.html", "unified_diff": "@@ -70,15 +70,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Dune2AlbertaNumbering< 3, 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (const int i)
     
    \n \n

    \n@@ -133,15 +133,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02410.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02410.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::Generic2AlbertaNumbering< dim, codim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (const int i)
     
    \n

    Member Function Documentation

    \n@@ -106,15 +106,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02414.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02414.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::Generic2AlbertaNumbering< dim, 1 > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (const int i)
     
    \n

    Member Function Documentation

    \n@@ -106,15 +106,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02418.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02418.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::Generic2AlbertaNumbering< 1, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (const int i)
     
    \n

    Member Function Documentation

    \n@@ -104,15 +104,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02422.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02422.html", "unified_diff": "@@ -70,15 +70,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Generic2AlbertaNumbering< 3, 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (const int i)
     
    \n \n

    \n@@ -133,15 +133,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02426.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02426.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Public Member Functions |\n List of all members \n
    Dune::Alberta::NumberingMap< dim, Numbering > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n
    \n Inheritance diagram for Dune::Alberta::NumberingMap< dim, Numbering >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -257,15 +257,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02434.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02434.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::Alberta::MapVertices< dim, codim > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02438.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02438.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::MapVertices< dim, 0 > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (int subEntity, int vertex)
     
    \n

    Member Function Documentation

    \n@@ -116,15 +116,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02442.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02442.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::MapVertices< 2, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (int subEntity, int vertex)
     
    \n

    Member Function Documentation

    \n@@ -114,15 +114,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02446.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02446.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::MapVertices< 3, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (int subEntity, int vertex)
     
    \n

    Member Function Documentation

    \n@@ -114,15 +114,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02450.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02450.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::MapVertices< 3, 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (int subEntity, int vertex)
     
    \n

    Member Function Documentation

    \n@@ -114,15 +114,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02454.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02454.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::MapVertices< dim, dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int apply (int subEntity, int vertex)
     
    \n

    Member Function Documentation

    \n@@ -116,15 +116,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02458.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02458.html", "unified_diff": "@@ -70,15 +70,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Twist< dim, subdim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int twist (const Element *element, int subEntity)
     
    \n \n

    \n@@ -199,15 +199,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02462.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02462.html", "unified_diff": "@@ -70,15 +70,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Twist< dim, 1 > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int twist (const Element *element, int subEntity)
     
    \n \n

    \n@@ -199,15 +199,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02466.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02466.html", "unified_diff": "@@ -70,15 +70,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Twist< 1, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int twist (const Element *element, int subEntity)
     
    \n \n

    \n@@ -167,15 +167,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02470.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02470.html", "unified_diff": "@@ -70,15 +70,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Twist< dim, 2 > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int twist (const Element *element, int subEntity)
     
    \n \n

    \n@@ -199,15 +199,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02474.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02474.html", "unified_diff": "@@ -70,15 +70,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Twist< 2, 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/misc.hh>

    \n+

    #include <dune/grid/albertagrid/misc.hh>

    \n \n \n \n \n

    \n Static Public Member Functions

    static int twist (const Element *element, int subEntity)
     
    \n \n

    \n@@ -167,15 +167,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02506.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02506.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::Alberta::ForEachInteriorSubChild< dim, codim > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02510.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02510.html", "unified_diff": "@@ -71,21 +71,21 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::Patch< dim > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n-\n+\n \n

    \n Public Types

    typedef Alberta::ElementInfo< dimensionElementInfo
     
    typedef ALBERTA RC_LIST_EL ElementList
    typedef ALBERTA RC_LIST_EL ElementList
     
    \n \n \n \n \n@@ -137,15 +137,15 @@\n \n
    \n
    \n
    \n template<int dim>
    \n

    \n Public Member Functions

     Patch (ElementList *list, int count)
     
    Elementoperator[] (int i) const
    \n \n- \n+ \n \n
    typedef ALBERTA RC_LIST_EL Dune::Alberta::Patch< dim >::ElementListtypedef ALBERTA RC_LIST_EL Dune::Alberta::Patch< dim >::ElementList
    \n
    \n \n
    \n \n

    Constructor & Destructor Documentation

    \n@@ -505,15 +505,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02514.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02514.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::ForEachInteriorSubChild< dim, 0 > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n \n

    \n Static Public Member Functions

    template<class Functor >
    static void apply (Functor &functor, const Patch< dim > &patch)
     
    \n@@ -119,15 +119,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02518.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02518.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::ForEachInteriorSubChild< dim, dim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n \n

    \n Static Public Member Functions

    template<class Functor >
    static void apply (Functor &functor, const Patch< dim > &patch)
     
    \n@@ -119,15 +119,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02522.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02522.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::ForEachInteriorSubChild< 2, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n \n

    \n Static Public Member Functions

    template<class Functor >
    static void apply (Functor &functor, const Patch< 2 > &patch)
     
    \n@@ -117,15 +117,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02526.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02526.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::ForEachInteriorSubChild< 3, 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n \n

    \n Static Public Member Functions

    template<class Functor >
    static void apply (Functor &functor, const Patch< 3 > &patch)
     
    \n@@ -117,15 +117,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02530.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02530.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Alberta::ForEachInteriorSubChild< 3, 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n \n

    \n Static Public Member Functions

    template<class Functor >
    static void apply (Functor &functor, const Patch< 3 > &patch)
     
    \n@@ -117,15 +117,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02534.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02534.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::Alberta::GeometryInFather< dim > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02538.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02538.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::GeometryInFather< 1 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Real LocalVector[dim]
     
    \n \n

    \n@@ -170,15 +170,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02542.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02542.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::GeometryInFather< 2 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Real LocalVector[dim]
     
    \n \n

    \n@@ -170,15 +170,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02546.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02546.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::Alberta::GeometryInFather< 3 > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/refinement.hh>

    \n+

    #include <dune/grid/albertagrid/refinement.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Real LocalVector[dim]
     
    \n \n

    \n@@ -170,15 +170,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02558.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02558.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::AlbertaTransformation Class Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/transformation.hh>

    \n+

    #include <dune/grid/albertagrid/transformation.hh>

    \n \n \n \n \n \n \n@@ -265,15 +265,15 @@\n \n

    \n Public Types

    typedef Alberta::Real ctype
     
    typedef FieldVector< ctype, dimensionWorldVector
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02562.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02562.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::AlbertaMarkerVector< dim, dimworld > Class Template Reference
    \n \n
    \n \n

    marker assigning subentities to one element containing them \n More...

    \n \n-

    #include <dune/grid/albertagrid/treeiterator.hh>

    \n+

    #include <dune/grid/albertagrid/treeiterator.hh>

    \n
    \n Inheritance diagram for Dune::AlbertaMarkerVector< dim, dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -369,15 +369,15 @@\n
    \n \n

    return true if marking is up to date

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02574.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02574.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::AlbertaMarkerVector< dim, dimworld >::MarkSubEntities< bool >::Codim< codim > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid/albertagrid/treeiterator.hh>

    \n+

    #include <dune/grid/albertagrid/treeiterator.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Alberta::ElementInfo< dimension > ElementInfo
     
    \n \n

    \n@@ -188,15 +188,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02578.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02578.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Protected Member Functions |\n List of all members \n
    Dune::AdaptDataHandle< Grid, Impl > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::AdaptDataHandle< Grid, Impl >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -292,15 +292,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02582.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02582.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::AdaptDataHandleInterface< Grid, Impl > Class Template Reference
    \n \n
    \n \n

    Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::AdaptDataHandleInterface< Grid, Impl >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -346,15 +346,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02586.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02586.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::CombinedAdaptProlongRestrict< A, B > Class Template Reference
    \n \n
    \n \n

    class for combining 2 index sets together for adaptation process \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -230,15 +230,15 @@\n
    \n \n

    restrict data to father

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02598.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02598.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::DuneBoundaryProjection< dimworld > Struct Template Referenceabstract
    \n \n
    \n \n

    Interface class for vertex projection at the boundary. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DuneBoundaryProjection< dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -547,15 +547,15 @@\n \n

    \n Public Member Functions

     CombinedAdaptProlongRestrict (A &a, B &b)
     constructor storing the two references More...
     
    template<class Entity >
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02602.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02602.html", "unified_diff": "@@ -74,15 +74,15 @@\n Static Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::BoundaryProjectionWrapper< dimworld > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::BoundaryProjectionWrapper< dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -624,15 +624,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02606.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02606.html", "unified_diff": "@@ -74,15 +74,15 @@\n Protected Member Functions |\n Static Protected Member Functions |\n List of all members \n
    Dune::BoundarySegmentWrapper< dim, dimworld > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::BoundarySegmentWrapper< dim, dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -655,15 +655,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02610.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02610.html", "unified_diff": "@@ -74,15 +74,15 @@\n Static Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::CircleBoundaryProjection< dimworld > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::CircleBoundaryProjection< dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -630,15 +630,15 @@\n
    \n \n

    radius of circ

    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02614.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02614.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::BoundarySegment< dim, dimworld, ctype > Struct Template Referenceabstract
    \n \n
    \n \n

    Base class for classes implementing geometries of boundary segments. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::BoundarySegment< dim, dimworld, ctype >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -394,15 +394,15 @@\n \n \n
    Returns
    Object derived from BoundarySegment.
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02618.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02618.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Types |\n Static Protected Member Functions |\n List of all members \n
    Dune::BoundarySegmentBackupRestore< BndSeg > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::BoundarySegmentBackupRestore< BndSeg >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -249,15 +249,15 @@\n \n \n
    Returns
    Object derived from BoundarySegment.
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02706.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02706.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::MessageBufferIF< MessageBufferImp > Class Template Reference
    \n \n
    \n \n

    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. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -207,15 +207,15 @@\n

    \n Public Member Functions

     MessageBufferIF (MessageBufferImp &buff)
     stores reference to original buffer buff More...
     
    template<class T >
    \n \n \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02710.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02710.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::CommDataHandleIF< DataHandleImp, DataTypeImp > Class Template Reference
    \n \n
    \n \n

    CommDataHandleIF describes the features of a data handle for communication in parallel runs using the Grid::communicate methods. Here the Barton-Nackman trick is used to interprete data handle objects as its interface. Therefore usable data handle classes need to be derived from this class. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::CommDataHandleIF< DataHandleImp, DataTypeImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -513,15 +513,15 @@\n \n \n \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02726.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02726.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::DefaultLevelGridView< GridImp > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Classes

    struct  Codim
     Codim Structure. More...
     
    \n@@ -822,15 +822,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02730.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02730.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::DefaultLeafGridView< GridImp > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Classes

    struct  Codim
     Codim Structure. More...
     
    \n@@ -812,15 +812,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02734.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02734.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Types |\n Static Public Attributes |\n List of all members \n
    Dune::DefaultLevelGridViewTraits< GridImp > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Classes

    struct  Codim
     
    \n \n

    \n@@ -255,15 +255,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02738.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02738.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Public Types |\n List of all members \n
    Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Classes

    struct  Partition
     Define types needed to iterate over entities of a given partition type. More...
     
    \n@@ -163,15 +163,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02742.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02742.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd >::Partition< pit > Struct Template Reference
    \n \n
    \n \n

    Define types needed to iterate over entities of a given partition type. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Public Types

    typedef Grid::template Codim< cd >::template Partition< pit >::LevelIterator Iterator
     iterator over a given codim and partition type More...
     
    \n@@ -109,15 +109,15 @@\n
    \n \n

    iterator over a given codim and partition type

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02746.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02746.html", "unified_diff": "@@ -69,30 +69,30 @@\n
    Dune::DefaultLevelGridView< GridImp >::Codim< cd > Struct Template Reference
    \n \n
    \n \n

    Codim Structure. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DefaultLevelGridView< GridImp >::Codim< cd >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n \n
    \n

    Detailed Description

    \n
    template<class GridImp>
    \n template<int cd>
    \n struct Dune::DefaultLevelGridView< GridImp >::Codim< cd >

    Codim Structure.

    \n

    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02750.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02750.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Types |\n Static Public Attributes |\n List of all members \n
    Dune::DefaultLeafGridViewTraits< GridImp > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Classes

    struct  Codim
     
    \n \n

    \n@@ -255,15 +255,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02754.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02754.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Public Types |\n List of all members \n
    Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Classes

    struct  Partition
     Define types needed to iterate over entities of a given partition type. More...
     
    \n@@ -163,15 +163,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02758.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02758.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::DefaultLeafGridViewTraits< GridImp >::Codim< cd >::Partition< pit > Struct Template Reference
    \n \n
    \n \n

    Define types needed to iterate over entities of a given partition type. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Public Types

    typedef Grid::template Codim< cd >::template Partition< pit >::LeafIterator Iterator
     iterator over a given codim and partition type More...
     
    \n@@ -109,15 +109,15 @@\n
    \n \n

    iterator over a given codim and partition type

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02762.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02762.html", "unified_diff": "@@ -69,30 +69,30 @@\n
    Dune::DefaultLeafGridView< GridImp >::Codim< cd > Struct Template Reference
    \n \n
    \n \n

    Codim Structure. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DefaultLeafGridView< GridImp >::Codim< cd >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n \n
    \n

    Detailed Description

    \n
    template<class GridImp>
    \n template<int cd>
    \n struct Dune::DefaultLeafGridView< GridImp >::Codim< cd >

    Codim Structure.

    \n

    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02766.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02766.html", "unified_diff": "@@ -936,15 +936,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02786.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02786.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::EntityIterator< codim, Grid, IteratorImp > Class Template Reference
    \n \n
    \n \n

    interface class for an iterator over grid entities \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -505,15 +505,15 @@\n \n

    \n Public Types

    typedef IteratorImp Implementation
     type of underlying implementation More...
     
    typedef Grid::template Codim< codim >::Entity Entity
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02790.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02790.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -166,15 +166,15 @@\n \n

    \n Public Types

    typedef ptrdiff_t difference_type
     
    typedef const IteratorImp::Entity value_type
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02798.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02798.html", "unified_diff": "@@ -69,28 +69,28 @@\n
    Dune::GridError Class Reference
    \n \n
    \n \n

    Base class for exceptions in Dune grid modules. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::GridError:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n \n
    \n

    Detailed Description

    \n

    Base class for exceptions in Dune grid modules.

    \n

    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02826.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02826.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp > Class Template Reference
    \n \n
    \n \n

    Index Set Interface base class. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -714,15 +714,15 @@\n \n

    dimension of the grid (maximum allowed codimension)

    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02830.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02830.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::IdSet< GridImp, IdSetImp, IdTypeImp > Class Template Reference
    \n \n
    \n \n

    Id Set Interface. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::IdSet< GridImp, IdSetImp, IdTypeImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -452,15 +452,15 @@\n \n

    dimension of the grid (maximum allowed codimension)

    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02882.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02882.html", "unified_diff": "@@ -296,15 +296,15 @@\n

    Detailed Description

    \n
    template<class ViewTraits>
    \n class Dune::GridView< ViewTraits >

    Grid view abstract base class.

    \n

    Interface class for a view on grids. Grids return two types of view, a view of the leaf grid and of a level grid, which both satisfy the same interface. Through the view the user has access to the iterators, the intersections and the index set.

    \n

    The interface is implemented using the engine concept.

    \n

    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02902.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02902.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >::Codim< cc > Struct Template Reference
    \n \n
    \n \n

    Export the type of the entity used as parameter in the index(...) method. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Public Types

    typedef Traits::template Codim< cc >::Entity Entity
     
    \n

    Detailed Description

    \n@@ -103,15 +103,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02906.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02906.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp > Class Template Reference
    \n \n
    \n \n

    Provide default implementation of method if IndexSet. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -518,15 +518,15 @@\n
    \n \n

    dimension of the grid (maximum allowed codimension)

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02910.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02910.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::IdSet< GridImp, IdSetImp, IdTypeImp >::Codim< cc > Struct Template Reference
    \n \n
    \n \n

    Export the type of the entity used as parameter in the id(...) method. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Public Types

    using Entity = typename Traits::template Codim< cc >::Entity
     
    \n

    Detailed Description

    \n@@ -103,15 +103,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02922.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02922.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::Mapper< G, MapperImp, IndexType > Class Template Reference
    \n \n
    \n \n

    Mapper interface. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::Mapper< G, MapperImp, IndexType >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -459,15 +459,15 @@\n
    \n \n

    Reinitialize mapper after grid has been modified.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02926.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02926.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::MultipleCodimMultipleGeomTypeMapper< GV > Class Template Reference
    \n \n
    \n \n

    Implementation class for a multiple codim and multiple geometry type mapper. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::MultipleCodimMultipleGeomTypeMapper< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -956,15 +956,15 @@\n \n

    Recalculates indices after grid adaptation.

    \n

    After grid adaptation you need to call this to update the stored gridview and recalculate the indices.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02930.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02930.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::LeafMultipleCodimMultipleGeomTypeMapper< G > Class Template Reference
    \n \n
    \n \n

    Multiple codim and multiple geometry type mapper for leaf entities. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::LeafMultipleCodimMultipleGeomTypeMapper< G >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -943,15 +943,15 @@\n
    \n \n

    Reinitialize mapper after grid has been modified.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02934.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02934.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::LevelMultipleCodimMultipleGeomTypeMapper< G > Class Template Reference
    \n \n
    \n \n

    Multiple codim and multiple geometry type mapper for entities of one level. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::LevelMultipleCodimMultipleGeomTypeMapper< G >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -950,15 +950,15 @@\n
    \n \n

    Reinitialize mapper after grid has been modified.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02994.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02994.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::PartitionSet< partitions > Struct Template Reference
    \n \n
    \n \n

    A set of PartitionType values. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -388,15 +388,15 @@\n
    \n \n

    creates a PartitionSet for the given PartitionIteratorType

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a02998.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a02998.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::SingleCodimSingleGeomTypeMapper< GV, c > Class Template Reference
    \n \n
    \n \n

    Implementation class for a single codim and single geometry type mapper. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::SingleCodimSingleGeomTypeMapper< GV, c >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -691,15 +691,15 @@\n \n

    Recalculates indices after grid adaptation.

    \n

    After grid adaptation you need to call this to update the stored gridview and recalculate the indices.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03002.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::LeafSingleCodimSingleGeomTypeMapper< G, c > Class Template Reference
    \n \n
    \n \n

    Single codim and single geometry type mapper for leaf entities. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::LeafSingleCodimSingleGeomTypeMapper< G, c >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -684,15 +684,15 @@\n
    \n \n

    Reinitialize mapper after grid has been modified.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03006.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03006.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::LevelSingleCodimSingleGeomTypeMapper< G, c > Class Template Reference
    \n \n
    \n \n

    Single codim and single geometry type mapper for entities of one level. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::LevelSingleCodimSingleGeomTypeMapper< G, c >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -685,15 +685,15 @@\n
    \n \n

    Reinitialize mapper after grid has been modified.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03010.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03010.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::SizeCache< GridImp > Class Template Reference
    \n \n
    \n \n

    organizes the caching of sizes for one grid and one GeometryType \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::SizeCache< GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -311,15 +311,15 @@\n
    \n \n

    Return number of grid entities of a given codim on a given level in this process.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03110.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03110.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::AnalyticalCoordFunction< ct, dimD, dimR, Impl > Class Template Reference
    \n \n
    \n \n

    Derive an implementation of an analytical coordinate function from this class. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::AnalyticalCoordFunction< ct, dimD, dimR, Impl >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -567,15 +567,15 @@\n
    \n \n

    dimension of the range vector

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03114.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03114.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::DiscreteCoordFunction< ct, dimR, Impl > Class Template Reference
    \n \n
    \n \n

    Derive an implementation of a discrete coordinate function from this class. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DiscreteCoordFunction< ct, dimR, Impl >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -497,15 +497,15 @@\n
    \n \n

    dimension of the range vector

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03118.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03118.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > Class Template Reference
    \n \n
    \n \n

    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 \"$ has to be supplied. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -374,15 +374,15 @@\n
    \n \n

    dimension of the range vector

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03122.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03122.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::DiscreteCoordFunctionInterface< ct, dimR, Impl > Class Template Reference
    \n \n
    \n \n

    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 \"$ 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. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DiscreteCoordFunctionInterface< ct, dimR, Impl >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -374,15 +374,15 @@\n
    \n \n

    dimension of the range vector

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03126.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03126.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::GeoGrid::isCoordFunctionInterface< CoordFunctionInterface > Struct Template Reference
    \n \n

    \n Public Member Functions

    template<unsigned int p>
    struct PartitionSet< partitions|p > constexpr operator+ (const PartitionSet< p > &) const
     Returns a new PartitionSet that also contains the partitions in set. More...
     
    \n \n \n \n

    \n Static Public Attributes

    static const bool value = false
     
    \n

    Member Data Documentation

    \n@@ -102,15 +102,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03138.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03138.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::GeoGrid::isDiscreteCoordFunctionInterface< CoordFunctionInterface > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Static Public Attributes

    static const bool value = false
     
    \n

    Member Data Documentation

    \n@@ -102,15 +102,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03146.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03146.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::GeoGrid::AdaptCoordFunction< CoordFunctionInterface > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Static Public Member Functions

    static void adapt (CoordFunctionInterface &)
     
    \n

    Member Function Documentation

    \n@@ -106,15 +106,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03154.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03154.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::GeoGrid::CoordFunctionCaller< HostEntity, CoordFunctionInterface > Class Template Reference
    \n
    \n
    \n
    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03166.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03166.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::GeoGrid::CoordVector< mydim, Grid, fake > Class Template Reference
    \n
    \n
    \n
    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03170.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03170.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::GeoGrid::CoordVector< mydim, Grid, false > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -150,15 +150,15 @@\n \n

    \n Public Member Functions

     CoordVector (const HostEntity &hostEntity, const CoordFunction &coordFunction)
     
    template<std::size_t size>
    void calculate (std::array< Coordinate, size >(&corners)) const
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03174.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03174.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::GeoGrid::CoordVector< mydim, Grid, true > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -156,15 +156,15 @@\n \n

    \n Public Member Functions

     CoordVector (const HostElement &hostElement, const unsigned int subEntity, const CoordFunction &coordFunction)
     
    template<std::size_t size>
    void calculate (std::array< Coordinate, size >(&corners)) const
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03178.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03178.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::GeoGrid::IntersectionCoordVector< Grid > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -183,15 +183,15 @@\n \n

    \n Public Member Functions

     IntersectionCoordVector (const ElementGeometryImpl &elementGeometry, const HostLocalGeometry &hostLocalGeometry)
     
    template<std::size_t size>
    void calculate (std::array< Coordinate, size >(&corners)) const
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03182.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03182.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::GeoGrid::CornerStorage< mydim, cdim, Grid > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Public Types

    typedef Coords::const_iterator const_iterator
     
    \n \n

    \n@@ -251,15 +251,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03190.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03190.html", "unified_diff": "@@ -1559,15 +1559,15 @@\n

    update grid caches

    \n

    This method has to be called whenever the underlying host grid changes.

    \n
    Note
    If you adapt the host grid through this geometry grid's adaptation or load balancing methods, update is automatically called.
    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03202.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03202.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::HierarchicIterator< G > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -365,15 +365,15 @@\n

    \n Public Types

    typedef Traits::Grid Grid
     
    typedef Traits::template Codim< codimension >::Entity Entity
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03322.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03322.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Member Functions |\n List of all members \n
    Dune::IdenticalCoordFunction< ctype, dim > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::IdenticalCoordFunction< ctype, dim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -429,15 +429,15 @@\n
    \n \n

    dimension of the range vector

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03326.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03326.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::IdSet< Grid, HostIdSet > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::GeoGrid::IdSet< Grid, HostIdSet >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -560,15 +560,15 @@\n
    \n \n

    dimension of the grid (maximum allowed codimension)

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03338.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03338.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::GeoGrid::Iterator< HostGridView, codim, pitype, Grid, fake > Class Template Reference
    \n
    \n
    \n
    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03342.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03342.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::GeoGrid::PartitionIteratorFilter< codim, pitype, Grid > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03346.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03346.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -264,15 +264,15 @@\n \n

    \n Public Types

    typedef std::remove_const< Grid >::type::ctype ctype
     
    typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03350.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03350.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -264,15 +264,15 @@\n \n

    \n Public Types

    typedef std::remove_const< Grid >::type::ctype ctype
     
    typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03354.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03354.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -264,15 +264,15 @@\n \n

    \n Public Types

    typedef std::remove_const< Grid >::type::ctype ctype
     
    typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03358.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03358.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -264,15 +264,15 @@\n \n

    \n Public Types

    typedef std::remove_const< Grid >::type::ctype ctype
     
    typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03362.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03362.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -264,15 +264,15 @@\n \n

    \n Public Types

    typedef std::remove_const< Grid >::type::ctype ctype
     
    typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03366.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03366.html", "unified_diff": "@@ -71,15 +71,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -264,15 +264,15 @@\n \n

    \n Public Types

    typedef std::remove_const< Grid >::type::ctype ctype
     
    typedef std::remove_const< Grid >::type::Traits::template Codim< 0 >::Entity Element
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03370.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03370.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, false > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -474,15 +474,15 @@\n \n

    \n Public Types

    typedef Traits::Grid Grid
     
    typedef Traits::template Codim< codimension >::Entity Entity
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03374.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03374.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, true > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -460,15 +460,15 @@\n \n

    \n Public Types

    typedef Traits::Grid Grid
     
    typedef Traits::template Codim< codimension >::Entity Entity
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03386.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03386.html", "unified_diff": "@@ -69,15 +69,15 @@\n
    Dune::HostGridAccess< Grid > Class Template Reference
    \n \n
    \n \n

    provides access to host grid objects from GeometryGrid \n More...

    \n \n-

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

    \n+

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

    \n

    Detailed Description

    \n
    template<class Grid>
    \n class Dune::HostGridAccess< Grid >

    provides access to host grid objects from GeometryGrid

    \n

    provides access to host grid objects from IdentityGrid

    \n
    Template Parameters
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03414.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03414.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::IdentityGridEntity< codim, dim, GridImp > Class Template Reference
    \n \n
    \n \n

    The implementation of entities in a IdentityGrid. \n More...

    \n \n-

    #include <dune/grid/identitygrid/identitygridentity.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridentity.hh>

    \n
    \n Inheritance diagram for Dune::IdentityGridEntity< codim, dim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -731,15 +731,15 @@\n
    \n \n

    Know dimension of the entity.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03418.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03418.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::IdentityGridLevelIterator< codim, pitype, GridImp > Class Template Reference
    \n \n
    \n \n

    Iterator over all entities of a given codimension and level of a grid. \n More...

    \n \n-

    #include <dune/grid/identitygrid/identitygridleveliterator.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridleveliterator.hh>

    \n
    GeometryGrid
    \n \n \n \n

    \n Public Types

    typedef GridImp::template Codim< codim >::Entity Entity
     
    \n \n

    \n@@ -334,16 +334,16 @@\n

    \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03422.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03422.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::IdentityGridLevelIntersectionIterator< GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Dune::Intersection< const GridImp, Dune::IdentityGridLevelIntersection< GridImp > > Intersection
     
    \n \n

    \n@@ -269,16 +269,16 @@\n
    \n \n

    prefix increment

    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03426.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03426.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::IdentityGridLeafIntersectionIterator< GridImp > Class Template Reference
    \n \n
    \n \n

    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! \n More...

    \n \n-

    #include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridintersectioniterator.hh>

    \n \n \n \n \n

    \n Public Types

    typedef Dune::Intersection< const GridImp, Dune::IdentityGridLeafIntersection< GridImp > > Intersection
     
    \n \n

    \n@@ -273,16 +273,16 @@\n
    \n \n

    prefix increment

    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03430.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03430.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::IdentityGridHierarchicIterator< GridImp > Class Template Reference
    \n \n
    \n \n

    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. \n More...

    \n \n-

    #include <dune/grid/identitygrid/identitygridhierarchiciterator.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridhierarchiciterator.hh>

    \n \n \n \n \n

    \n Public Types

    typedef GridImp::template Codim< 0 >::Entity Entity
     
    \n \n

    \n@@ -335,16 +335,16 @@\n

    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03434.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03434.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::IdentityGridEntity< 0, dim, GridImp > Class Template Reference
    \n \n
    \n \n

    Specialization for codim-0-entities. \n More...

    \n \n-

    #include <dune/grid/identitygrid/identitygridentity.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridentity.hh>

    \n
    \n Inheritance diagram for Dune::IdentityGridEntity< 0, dim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1258,15 +1258,15 @@\n
    \n \n

    Know dimension of the entity.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03438.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03438.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::IdentityGridEntitySeed< codim, GridImp > Class Template Reference
    \n \n
    \n \n

    The EntitySeed class provides the minimal information needed to restore an Entity using the grid. \n More...

    \n \n-

    #include <dune/grid/identitygrid/identitygridentityseed.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridentityseed.hh>

    \n \n \n \n \n \n \n@@ -301,15 +301,15 @@\n \n

    \n Public Member Functions

     IdentityGridEntitySeed ()
     Construct an empty (i.e. isValid() == false) seed. More...
     
     IdentityGridEntitySeed (const HostEntity &hostEntity)
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03446.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03446.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Attributes |\n Static Public Attributes |\n List of all members \n
    Dune::IdentityGridLevelIndexSet< GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n
    \n Inheritance diagram for Dune::IdentityGridLevelIndexSet< GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -794,15 +794,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03450.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03450.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Attributes |\n Static Public Attributes |\n List of all members \n
    Dune::IdentityGridLeafIndexSet< GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n
    \n Inheritance diagram for Dune::IdentityGridLeafIndexSet< GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -777,15 +777,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03454.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03454.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Attributes |\n Static Public Attributes |\n List of all members \n
    Dune::IdentityGridGlobalIdSet< GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n
    \n Inheritance diagram for Dune::IdentityGridGlobalIdSet< GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -425,15 +425,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03458.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03458.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Attributes |\n Static Public Attributes |\n List of all members \n
    Dune::IdentityGridLocalIdSet< GridImp > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridindexsets.hh>

    \n
    \n Inheritance diagram for Dune::IdentityGridLocalIdSet< GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -425,15 +425,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03462.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03462.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::IdentityGridLeafIntersection< GridImp > Class Template Reference
    \n \n
    \n \n

    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! \n More...

    \n \n-

    #include <dune/grid/identitygrid/identitygridintersections.hh>

    \n+

    #include <dune/grid/identitygrid/identitygridintersections.hh>

    \n \n \n \n \n \n \n@@ -806,15 +806,15 @@\n
    \n \n

    return unit outer normal

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03466.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03466.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members\n
    Dune::IdentityGridLevelIntersection< GridImp > Class Template Reference
    \n \n

    \n Public Types

    typedef GridImp::template Codim< 1 >::Geometry Geometry
     
    typedef GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
     
    \n \n \n \n \n \n@@ -802,15 +802,15 @@\n
    \n \n

    return unit outer normal

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03474.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03474.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members\n
    Dune::dgf::BasicBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::BasicBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -450,16 +450,16 @@\n \n

    \n Public Types

    typedef GridImp::template Codim< 1 >::Geometry Geometry
     
    typedef GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03478.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03478.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::dgf::DomainData Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Public Types

    typedef DGFBoundaryParameter::type BoundaryParameter
     
    \n \n

    \n@@ -348,15 +348,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03482.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03482.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members \n
    Dune::dgf::Domain Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Public Types

    typedef DGFBoundaryParameter::type BoundaryParameter
     
    \n \n

    \n@@ -327,15 +327,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03486.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03486.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::BoundaryDomBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::BoundaryDomBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -647,16 +647,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03490.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03490.html", "unified_diff": "@@ -72,15 +72,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::BoundarySegBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::BoundarySegBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -574,16 +574,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03494.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03494.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::CubeBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::CubeBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -537,16 +537,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03498.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03498.html", "unified_diff": "@@ -72,15 +72,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::DimBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::DimBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -534,16 +534,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03502.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03502.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::GeneralBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::GeneralBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -537,16 +537,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03506.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03506.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::dgf::GridParameterBlock Class Reference
    \n \n
    \n \n

    Common Grid parameters. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::GridParameterBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -751,15 +751,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03510.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03510.html", "unified_diff": "@@ -72,15 +72,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::IntervalBlock Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::IntervalBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -731,16 +731,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03514.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03514.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members \n
    Dune::dgf::IntervalBlock::Interval Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -233,15 +233,15 @@\n \n

    \n Public Member Functions

     Interval ()
     
     Interval (const Interval &interval, const std::vector< int > &map)
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03518.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03518.html", "unified_diff": "@@ -72,15 +72,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::PeriodicFaceTransformationBlock Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::PeriodicFaceTransformationBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -498,16 +498,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03522.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03522.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::PeriodicFaceTransformationBlock::Matrix< T >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -264,15 +264,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03526.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03526.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members \n
    Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Public Member Functions

     AffineTransformation (int dimworld)
     
    \n \n

    \n@@ -141,15 +141,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03530.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03530.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::PolygonBlock Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::PolygonBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -525,15 +525,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03534.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03534.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::PolyhedronBlock Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::PolyhedronBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -495,15 +495,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03538.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03538.html", "unified_diff": "@@ -209,15 +209,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03542.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03542.html", "unified_diff": "@@ -152,15 +152,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03546.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03546.html", "unified_diff": "@@ -191,15 +191,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03550.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03550.html", "unified_diff": "@@ -181,15 +181,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03554.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03554.html", "unified_diff": "@@ -191,15 +191,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03558.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03558.html", "unified_diff": "@@ -181,15 +181,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03562.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03562.html", "unified_diff": "@@ -181,15 +181,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03566.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03566.html", "unified_diff": "@@ -181,15 +181,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03570.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03570.html", "unified_diff": "@@ -181,15 +181,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03574.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03574.html", "unified_diff": "@@ -181,15 +181,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03578.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03578.html", "unified_diff": "@@ -191,15 +191,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03582.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03582.html", "unified_diff": "@@ -191,15 +191,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03586.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03586.html", "unified_diff": "@@ -191,15 +191,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03590.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03590.html", "unified_diff": "@@ -191,15 +191,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03594.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03594.html", "unified_diff": "@@ -191,15 +191,15 @@\n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03598.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03598.html", "unified_diff": "@@ -840,15 +840,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03614.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03614.html", "unified_diff": "@@ -72,15 +72,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::SimplexBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::SimplexBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -585,16 +585,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03618.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03618.html", "unified_diff": "@@ -71,15 +71,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::SimplexGenerationBlock Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::SimplexGenerationBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -722,16 +722,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03622.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03622.html", "unified_diff": "@@ -526,15 +526,15 @@\n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03626.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03626.html", "unified_diff": "@@ -69,28 +69,28 @@\n
    Dune::DGFException Class Reference
    \n \n
    \n \n

    exception class for IO errors in the DGF parser \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DGFException:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n \n
    \n

    Detailed Description

    \n

    exception class for IO errors in the DGF parser

    \n

    The documentation for this class was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03630.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03630.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Member Functions |\n List of all members \n
    Dune::DGFCoordFunction< dimD, dimR > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DGFCoordFunction< dimD, dimR >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -452,15 +452,15 @@\n
    \n \n

    dimension of the range vector

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03634.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03634.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, discrete > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03638.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03638.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Static Public Member Functions

    static CoordFunction * create (std::istream &, const HostGrid &)
     
    \n

    Member Function Documentation

    \n@@ -116,15 +116,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03642.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03642.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Static Public Member Functions

    static CoordFunction * create (std::istream &, const HostGrid &hostGrid)
     
    \n

    Member Function Documentation

    \n@@ -116,15 +116,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03646.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03646.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Static Public Member Functions |\n List of all members \n
    Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Public Types

    typedef DGFCoordFunction< dimD, dimR > CoordFunction
     
    \n \n

    \n@@ -139,15 +139,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03650.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03650.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -505,15 +505,15 @@\n \n

    \n Public Types

    typedef GeometryGrid< HostGrid, CoordFunction, Allocator > Grid
     
    typedef MPIHelper::MPICommunicator MPICommunicator
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03654.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03654.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -134,15 +134,15 @@\n \n

    \n Static Public Member Functions

    static int refineStepsForHalf ()
     
    static double refineWeight ()
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03662.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03662.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::DGFGridFactory< IdentityGrid< HostGrid > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -425,15 +425,15 @@\n \n

    \n Public Types

    typedef IdentityGrid< HostGrid > Grid
     
    typedef MPIHelper::MPICommunicator MPICommunicator
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03666.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03666.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::DGFGridInfo< IdentityGrid< HostGrid > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -134,15 +134,15 @@\n \n

    \n Static Public Member Functions

    static int refineStepsForHalf ()
     
    static double refineWeight ()
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03686.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03686.html", "unified_diff": "@@ -73,15 +73,15 @@\n Protected Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::dgf::UGGridParameterBlock Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::UGGridParameterBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -915,16 +915,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03690.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03690.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::DGFGridInfo< UGGrid< dim > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -134,15 +134,15 @@\n \n

    \n Static Public Member Functions

    static int refineStepsForHalf ()
     
    static double refineWeight ()
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03694.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03694.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::DGFGridFactory< UGGrid< dim > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -553,16 +553,16 @@\n
    \n \n

    grid dimension

    \n \n
    \n \n
    The documentation for this struct was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03698.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03698.html", "unified_diff": "@@ -77,15 +77,15 @@\n
    Dune::DGFWriter< GV > Class Template Reference
    \n \n
    \n \n

    write a GridView to a DGF file \n More...

    \n \n-

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

    \n+

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

    \n

    \n Public Types

    typedef UGGrid< dim > Grid
     grid type More...
     
    typedef MPIHelper::MPICommunicator MPICommunicatorType
    \n \n \n \n \n \n@@ -1048,15 +1048,15 @@\n \n

    \n Public Types

    typedef GV GridView
     type of grid view More...
     
    typedef GridView::Grid Grid
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03702.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03702.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::dgf::YaspGridParameterBlock Class Reference
    \n \n
    \n \n

    Grid parameters for YaspGrid. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::dgf::YaspGridParameterBlock:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -817,15 +817,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03706.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03706.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > > Struct Template Reference
    \n \n
    \n \n

    Grid factory for YaspGrid with equidistant coordinates. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -486,15 +486,15 @@\n \n

    \n Public Types

    typedef YaspGrid< dim, EquidistantCoordinates< ctype, dim > > Grid
     
    typedef MPIHelper::MPICommunicator MPICommunicatorType
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03710.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03710.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > > Struct Template Reference
    \n \n
    \n \n

    Grid factory for YaspGrid with equidistant coordinates. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -486,15 +486,15 @@\n \n

    \n Public Types

    typedef YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > Grid
     
    typedef MPIHelper::MPICommunicator MPICommunicatorType
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03714.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03714.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > > Class Template Reference
    \n \n
    \n \n

    Placeholder for grid factory for YaspGrid with tensor product coordinates. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -146,15 +146,15 @@\n \n

    \n Public Member Functions

    template<typename In >
     DGFGridFactory (const In &)
     
    Gridgrid ()
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03718.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03718.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::DGFGridInfo< YaspGrid< dim, Coordinates > > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -134,15 +134,15 @@\n \n

    \n Static Public Member Functions

    static int refineStepsForHalf ()
     
    static double refineWeight ()
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03722.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03722.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::DGFEntityKey< A > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DGFEntityKey< A >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -442,16 +442,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this struct was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03726.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03726.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Member Functions |\n Static Public Member Functions |\n List of all members \n
    Dune::ElementFaceUtil Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Public Member Functions

    template<int dim>
    DGFEntityKey< unsigned int > generateSimplexFace (const std ::vector< unsigned int > &element, int f)
     
    \n@@ -241,16 +241,16 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03730.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03730.html", "unified_diff": "@@ -78,15 +78,15 @@\n
    Dune::GridPtr< GridType > Struct Template Reference
    \n \n
    \n \n

    Class for constructing grids from DGF files. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -1331,15 +1331,15 @@\n \n

    \n Classes

    struct  DataHandle
     
    class  mygrid_ptr
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03734.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03734.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members \n
    Dune::GridPtr< GridType >::mygrid_ptr Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::GridPtr< GridType >::mygrid_ptr:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -322,15 +322,15 @@\n
    \n \n

    STL member.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03738.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03738.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::GridPtr< GridType >::DataHandle Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::GridPtr< GridType >::DataHandle:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -701,15 +701,15 @@\n \n \n \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03750.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03750.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::DGFBoundaryParameter Struct Reference
    \n \n
    \n \n

    Contains types for additional features. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Public Types

    typedef std::string type
     type of additional boundary parameters More...
     
    \n@@ -198,15 +198,15 @@\n
    \n \n

    delimiter

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03754.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03754.html", "unified_diff": "@@ -78,15 +78,15 @@\n
    Dune::DuneGridFormatParser Class Reference
    \n \n
    \n \n

    The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::DuneGridFormatParser:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1317,15 +1317,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03758.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03758.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::GmshReaderOptions Struct Reference
    \n \n
    \n \n

    Options for read operation. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n@@ -105,15 +105,15 @@\n \n

    \n Public Types

    enum  GeometryOrder { firstOrder\n , secondOrder\n }
     
    secondOrder 

    quadratic boundary approximation.

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03774.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03774.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::GmshReaderParser< GridType > Class Template Reference
    \n \n
    \n \n

    dimension independent parts for GmshReaderParser \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -925,15 +925,15 @@\n \n

    \n Public Member Functions

     GmshReaderParser (Dune::GridFactory< GridType > &_factory, bool v, bool i)
     
    std::vector< int > & boundaryIdMap ()
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03778.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03778.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::GmshReader< GridType > Class Template Reference
    \n \n
    \n \n

    Read Gmsh mesh file. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -878,15 +878,15 @@\n Initial value:
    =
    \n
    Opts::verbose | Opts::insertBoundarySegments | Opts::readElementData | Opts::readBoundaryData
    \n \n
    \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03790.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03790.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::GmshWriter< GridView > Class Template Reference
    \n \n
    \n \n

    Write Gmsh mesh file. \n More...

    \n \n-

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

    \n+

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

    \n

    \n Public Types

    typedef GridType Grid
     
    using Opts = Gmsh::ReaderOptions
     
    \n \n \n \n \n \n@@ -232,15 +232,15 @@\n

    If the optional parameter physicalBoundaries is provided, also the boundaries are written on file with the corresponding physical value.

    \n

    The physicalBoundaries vector need to be sorted according to the interesection boundary segment index.

    \n

    Throws an IOError if file could not be opened or an unsupported element type is encountered.

    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03794.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03794.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::GnuplotWriter< GridView > Class Template Reference
    \n \n
    \n \n

    Writer for 1D grids in gnuplot format. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::GnuplotWriter< GridView >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -269,16 +269,16 @@\n

    \n Public Member Functions

     GmshWriter (const GridView &gridView, int numDigits=6)
     Constructor expecting GridView of Grid to be written. More...
     
    void setPrecision (int numDigits)
    \n \n \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03798.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03798.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::LeafGnuplotWriter< G > Class Template Reference
    \n \n
    \n \n

    GnuplotWriter on the leaf grid. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::LeafGnuplotWriter< G >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -259,15 +259,15 @@\n \n \n \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03802.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03802.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::LevelGnuplotWriter< G > Class Template Reference
    \n \n
    \n \n

    GnuplotWriter on a given level grid. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::LevelGnuplotWriter< G >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -269,15 +269,15 @@\n \n \n \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03814.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03814.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::StarCDReader< GridType > Class Template Reference
    \n \n
    \n \n

    File reader for the Star-CD format. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Static Public Member Functions

    static std::unique_ptr< GridType > read (const std::string &fileName, bool verbose=true)
     Read grid from a Star-CD file. More...
     
    \n@@ -146,15 +146,15 @@\n \n \n
    Returns
    The return type is a special pointer type that casts into std::unique_ptr<GridType>, and std::shared_ptr<GridType>. It is scheduled to be replaced by std::unique_ptr<GridType> eventually.
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03818.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03818.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::b64chunk Struct Reference
    \n \n
    \n \n

    struct representing the three byte text as well as the four 6 bit chunks \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/b64enc.hh>

    \n+

    #include <dune/grid/io/file/vtk/b64enc.hh>

    \n \n \n \n \n

    \n Public Types

    using size_type = unsigned char
     
    \n \n

    \n@@ -260,15 +260,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03822.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03822.html", "unified_diff": "@@ -72,15 +72,15 @@\n Protected Member Functions |\n Static Protected Member Functions |\n List of all members \n
    Dune::VTK::BasicWriter< IteratorFactory > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/basicwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/basicwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::BasicWriter< IteratorFactory >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1001,15 +1001,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03826.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03826.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::BoundaryIterator< GV > Class Template Reference
    \n \n
    \n \n

    iterate over the GridViews boundary intersections \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/boundaryiterators.hh>

    \n+

    #include <dune/grid/io/file/vtk/boundaryiterators.hh>

    \n
    \n Inheritance diagram for Dune::VTK::BoundaryIterator< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -432,15 +432,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03830.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03830.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::VTK::IntersectionIndexSet< ElementIndexSet > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/boundaryiterators.hh>

    \n+

    #include <dune/grid/io/file/vtk/boundaryiterators.hh>

    \n \n \n \n \n

    \n Public Member Functions

     IntersectionIndexSet (const ElementIndexSet &eis_)
     
    \n

    Constructor & Destructor Documentation

    \n@@ -106,15 +106,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03834.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03834.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::VTK::NonConformingBoundaryIteratorFactory< GV > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/boundaryiterators.hh>

    \n+

    #include <dune/grid/io/file/vtk/boundaryiterators.hh>

    \n
    \n Inheritance diagram for Dune::VTK::NonConformingBoundaryIteratorFactory< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -528,15 +528,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03838.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03838.html", "unified_diff": "@@ -73,15 +73,15 @@\n Protected Member Functions |\n Static Protected Member Functions |\n List of all members \n
    Dune::VTK::NonConformingBoundaryWriter< GV > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/boundarywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/boundarywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::NonConformingBoundaryWriter< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1615,15 +1615,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03842.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03842.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::PrintType< T > Struct Template Reference
    \n \n
    \n \n

    determine a type to safely put another type into a stream \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/common.hh>

    \n+

    #include <dune/grid/io/file/vtk/common.hh>

    \n \n \n \n \n \n

    \n Public Types

    typedef T Type
     type to convert T to before putting it into a stream with << More...
     
    \n@@ -104,15 +104,15 @@\n
    \n \n

    type to convert T to before putting it into a stream with <<

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03846.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03846.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::VTK::PrintType< unsigned char > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/common.hh>

    \n+

    #include <dune/grid/io/file/vtk/common.hh>

    \n \n \n \n \n

    \n Public Types

    typedef unsigned Type
     
    \n

    Member Typedef Documentation

    \n@@ -92,15 +92,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03850.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03850.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::VTK::PrintType< signed char > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/common.hh>

    \n+

    #include <dune/grid/io/file/vtk/common.hh>

    \n \n \n \n \n

    \n Public Types

    typedef int Type
     
    \n

    Member Typedef Documentation

    \n@@ -92,15 +92,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03854.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03854.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::VTK::PrintType< char > Struct Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/common.hh>

    \n+

    #include <dune/grid/io/file/vtk/common.hh>

    \n \n \n \n \n

    \n Public Types

    typedef std::conditional< std::numeric_limits< char >::is_signed, int, unsigned >::type Type
     
    \n

    Member Typedef Documentation

    \n@@ -92,15 +92,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03858.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03858.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::FieldInfo Class Reference
    \n \n
    \n \n

    Descriptor struct for VTK fields. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/common.hh>

    \n+

    #include <dune/grid/io/file/vtk/common.hh>

    \n \n \n \n@@ -300,15 +300,15 @@\n
    \n \n

    The type of the data field.

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03862.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03862.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::Corner< Cell > Class Template Reference
    \n \n
    \n \n

    simple class representing a corner of a cell \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/corner.hh>

    \n+

    #include <dune/grid/io/file/vtk/corner.hh>

    \n
    \n Inheritance diagram for Dune::VTK::Corner< Cell >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -378,15 +378,15 @@\n \n

    set the index of the corner within the cell in VTK-numbering

    \n

    This requires that the cell is valid

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03866.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03866.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::VTK::CornerIterator< CellIterator > Class Template Reference
    \n \n
    \n \n

    iterate over the corners of some cell range \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/corneriterator.hh>

    \n+

    #include <dune/grid/io/file/vtk/corneriterator.hh>

    \n
    \n Inheritance diagram for Dune::VTK::CornerIterator< CellIterator >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -465,15 +465,15 @@\n
    \n Initial value:
    = std::iterator_traits<CellIterator>::
    \n
    value_type::mydimension
    \n
    \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03870.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03870.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::DataArrayWriter Class Referenceabstract
    \n \n
    \n \n

    base class for data array writers \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::DataArrayWriter:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -232,15 +232,15 @@\n

    whether calls to write may be skipped

    \n \n

    Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03874.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03874.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::AsciiDataArrayWriter Class Reference
    \n \n
    \n \n

    a streaming writer for data array tags, uses ASCII inline format \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::AsciiDataArrayWriter:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -255,15 +255,15 @@\n

    whether calls to write may be skipped

    \n \n

    Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03878.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03878.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::BinaryDataArrayWriter Class Reference
    \n \n
    \n \n

    a streaming writer for data array tags, uses binary inline format \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::BinaryDataArrayWriter:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -262,15 +262,15 @@\n

    whether calls to write may be skipped

    \n \n

    Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03882.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03882.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::AppendedRawDataArrayWriter Class Reference
    \n \n
    \n \n

    a streaming writer for data array tags, uses appended raw format \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::AppendedRawDataArrayWriter:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -239,15 +239,15 @@\n

    whether calls to write may be skipped

    \n \n

    Reimplemented from Dune::VTK::DataArrayWriter.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03886.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03886.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::AppendedBase64DataArrayWriter Class Reference
    \n \n
    \n \n

    a streaming writer for data array tags, uses appended base64 format \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::AppendedBase64DataArrayWriter:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -239,15 +239,15 @@\n

    whether calls to write may be skipped

    \n \n

    Reimplemented from Dune::VTK::DataArrayWriter.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03890.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03890.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::NakedBase64DataArrayWriter Class Reference
    \n \n
    \n \n

    a streaming writer for appended data array tags, uses base64 format \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::NakedBase64DataArrayWriter:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -218,15 +218,15 @@\n

    whether calls to write may be skipped

    \n \n

    Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03894.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03894.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::NakedRawDataArrayWriter Class Reference
    \n \n
    \n \n

    a streaming writer for appended data arrays, uses raw format \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::NakedRawDataArrayWriter:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -218,15 +218,15 @@\n

    whether calls to write may be skipped

    \n \n

    Reimplemented in Dune::VTK::AppendedRawDataArrayWriter, and Dune::VTK::AppendedBase64DataArrayWriter.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03898.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03898.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::DataArrayWriterFactory Class Reference
    \n \n
    \n \n

    a factory for DataArrayWriters \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/dataarraywriter.hh>

    \n

    \n Public Types

    enum class  Type { scalar\n , vector\n , tensor\n }
    \n \n \n \n \n \n@@ -269,15 +269,15 @@\n \n \n

    The should never be more than one DataArrayWriter on the same stream around. The returned object should be freed with delete.

    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03902.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03902.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::VTKFunction< GridView > Class Template Referenceabstract
    \n \n
    \n \n

    A base class for grid functions with any return type and dimension. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/function.hh>

    \n+

    #include <dune/grid/io/file/vtk/function.hh>

    \n
    \n Inheritance diagram for Dune::VTKFunction< GridView >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -359,15 +359,15 @@\n \n

    \n Public Member Functions

     DataArrayWriterFactory (OutputType type_, std::ostream &stream_)
     create a DataArrayWriterFactory More...
     
    bool beginAppended ()
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03906.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03906.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::P0VTKFunction< GV, V > Class Template Reference
    \n \n
    \n \n

    Take a vector and interpret it as cell data for the VTKWriter. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/function.hh>

    \n+

    #include <dune/grid/io/file/vtk/function.hh>

    \n
    \n Inheritance diagram for Dune::P0VTKFunction< GV, V >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -435,15 +435,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03910.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03910.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::P1VTKFunction< GV, V > Class Template Reference
    \n \n
    \n \n

    Take a vector and interpret it as point data for the VTKWriter. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/function.hh>

    \n+

    #include <dune/grid/io/file/vtk/function.hh>

    \n
    \n Inheritance diagram for Dune::P1VTKFunction< GV, V >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -435,15 +435,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03914.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03914.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::FunctionWriterBase< Cell_ > Class Template Referenceabstract
    \n \n
    \n \n

    Base class for function writers. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::FunctionWriterBase< Cell_ >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -448,15 +448,15 @@\n Domain&).

    \n \n

    Reimplemented in Dune::VTK::NonConformingConnectivityWriter< Cell >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03918.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03918.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::VTKFunctionWriter< Func > Class Template Reference
    \n \n
    \n \n

    Base class for function writers. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::VTKFunctionWriter< Func >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -496,15 +496,15 @@\n
    \n \n

    write at the given position

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03922.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03922.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::CoordinatesWriter< Cell > Class Template Reference
    \n \n
    \n \n

    writer for the Coordinates array \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::CoordinatesWriter< Cell >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -488,15 +488,15 @@\n
    \n \n

    write at the given position

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03926.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03926.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::ConformingConnectivityWriter< IteratorFactory > Class Template Reference
    \n \n
    \n \n

    writer for the connectivity array in conforming mode \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::ConformingConnectivityWriter< IteratorFactory >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -490,15 +490,15 @@\n
    \n \n

    write at the given corner

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03930.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03930.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::NonConformingConnectivityWriter< Cell > Class Template Reference
    \n \n
    \n \n

    writer for the connectivity array in nonconforming mode \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::NonConformingConnectivityWriter< Cell >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -414,15 +414,15 @@\n

    write at the given corner

    \n \n

    Reimplemented from Dune::VTK::FunctionWriterBase< Cell >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03934.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03934.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::OffsetsWriter< Cell > Class Template Reference
    \n \n
    \n \n

    writer for the offsets array \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::OffsetsWriter< Cell >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -457,15 +457,15 @@\n Domain&).

    \n \n

    Reimplemented in Dune::VTK::NonConformingConnectivityWriter< Cell >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03938.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03938.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::TypesWriter< Cell > Class Template Reference
    \n \n
    \n \n

    writer for the types array \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/functionwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::TypesWriter< Cell >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -457,15 +457,15 @@\n Domain&).

    \n \n

    Reimplemented in Dune::VTK::NonConformingConnectivityWriter< Cell >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03942.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03942.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::VTK::PointIterator< CellIterator, IS > Class Template Reference
    \n \n
    \n \n

    iterate over the points of some corner range \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/pointiterator.hh>

    \n+

    #include <dune/grid/io/file/vtk/pointiterator.hh>

    \n
    \n Inheritance diagram for Dune::VTK::PointIterator< CellIterator, IS >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -445,15 +445,15 @@\n
    \n Initial value:
    = std::iterator_traits<CellIterator>::
    \n
    value_type::mydimension
    \n
    \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03946.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03946.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTK::PVTUWriter Class Reference
    \n \n
    \n \n

    Dump a .vtu/.vtp files contents to a stream. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/pvtuwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/pvtuwriter.hh>

    \n \n \n \n \n \n \n@@ -583,15 +583,15 @@\n
    \n \n

    finish section for the point coordinates

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03950.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03950.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Static Public Attributes |\n List of all members\n
    Dune::VTK::SkeletonFunctionTraits< GV, RF > Struct Template Reference
    \n \n

    \n Public Member Functions

     PVTUWriter (std::ostream &stream_, FileType fileType_)
     create a PVTUWriter object More...
     
     ~PVTUWriter ()
    \n \n \n \n \n \n@@ -215,15 +215,15 @@\n \n

    \n Public Types

    typedef GV GridView
     
    typedef GV::Intersection Cell
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03954.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03954.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::SkeletonFunctionInterface< GV, RF > Class Template Reference
    \n \n
    \n \n

    A prototype for VTKFunctions on the skeleton. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/skeletonfunction.hh>

    \n+

    #include <dune/grid/io/file/vtk/skeletonfunction.hh>

    \n \n \n \n \n

    \n Public Types

    typedef SkeletonFunctionTraits< GV, RF > Traits
     
    \n

    \n@@ -178,15 +178,15 @@\n

    \n \n \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03958.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03958.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTK::SkeletonFunctionWriter< Func > Class Template Reference
    \n \n
    \n \n

    function writer for skeleton functions \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/skeletonfunction.hh>

    \n+

    #include <dune/grid/io/file/vtk/skeletonfunction.hh>

    \n
    \n Inheritance diagram for Dune::VTK::SkeletonFunctionWriter< Func >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -560,15 +560,15 @@\n
    \n \n

    write at the given position

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03962.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03962.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::Base64Stream Class Reference
    \n \n
    \n \n

    class to base64 encode a stream of data \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/streams.hh>

    \n+

    #include <dune/grid/io/file/vtk/streams.hh>

    \n \n \n \n \n \n \n@@ -217,15 +217,15 @@\n \n

    encode a data item

    \n

    The result will be written to the stream, eventually. This method may be called multiple times in a row. After this method has been called, no one else may write to the underlying stream until flush() has been called or this writer object has been destroyed.

    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03966.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03966.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::RawStream Class Reference
    \n \n
    \n \n

    write out data in binary \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/streams.hh>

    \n+

    #include <dune/grid/io/file/vtk/streams.hh>

    \n

    \n Public Member Functions

     Base64Stream (std::ostream &s_)
     Construct a Base64Stream. More...
     
    template<class X >
    \n \n \n \n \n \n@@ -147,15 +147,15 @@\n
    \n \n

    write data to stream

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03970.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03970.html", "unified_diff": "@@ -77,15 +77,15 @@\n
    Dune::SubsamplingVTKWriter< GridView > Class Template Reference
    \n \n
    \n \n

    Writer for the output of subsampled grid functions in the vtk format. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/subsamplingvtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::SubsamplingVTKWriter< GridView >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1662,15 +1662,15 @@\n \n

    \n Public Member Functions

     RawStream (std::ostream &theStream)
     make a new stream More...
     
    template<class T >
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03978.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03978.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::VTK::ConformingVolumeIteratorFactory< GV > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/volumeiterators.hh>

    \n+

    #include <dune/grid/io/file/vtk/volumeiterators.hh>

    \n
    \n Inheritance diagram for Dune::VTK::ConformingVolumeIteratorFactory< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -528,15 +528,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03982.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03982.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::VTK::NonConformingVolumeIteratorFactory< GV > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/volumeiterators.hh>

    \n+

    #include <dune/grid/io/file/vtk/volumeiterators.hh>

    \n \n \n \n \n \n \n@@ -519,15 +519,15 @@\n \n

    \n Public Types

    typedef GV::template Codim< 0 >::Entity Cell
     
    typedef GV::template Codim< 0 >::template Partition< InteriorBorder_Partition >::Iterator CellIterator
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03986.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03986.html", "unified_diff": "@@ -73,15 +73,15 @@\n Protected Member Functions |\n Static Protected Member Functions |\n List of all members \n
    Dune::VTK::ConformingVolumeWriter< GV > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid/io/file/vtk/volumewriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/volumewriter.hh>

    \n
    \n Inheritance diagram for Dune::VTK::ConformingVolumeWriter< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1695,15 +1695,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03990.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03990.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTKSequenceWriter< GridView > Class Template Reference
    \n \n
    \n \n

    Writer for the ouput of grid functions in the vtk format. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtksequencewriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtksequencewriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKSequenceWriter< GridView >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -633,15 +633,15 @@\n \n \n \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a03994.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a03994.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTKSequenceWriterBase< GridView > Class Template Reference
    \n \n
    \n \n

    Base class to write pvd-files which contains a list of all collected vtk-files. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtksequencewriterbase.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtksequencewriterbase.hh>

    \n
    \n Inheritance diagram for Dune::VTKSequenceWriterBase< GridView >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -538,15 +538,15 @@\n \n \n \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04014.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04014.html", "unified_diff": "@@ -78,15 +78,15 @@\n
    Dune::VTKWriter< GridView > Class Template Reference
    \n \n
    \n \n

    Writer for the ouput of grid functions in the vtk format. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1996,15 +1996,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04018.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04018.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::VTKWriter< GridView >::VTKLocalFunction Class Reference
    \n \n
    \n \n

    Type erasure wrapper for VTK data sets. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n \n \n \n \n \n \n@@ -507,15 +507,15 @@\n \n

    \n Classes

    struct  FunctionWrapper
     Type erasure implementation for functions conforming to the dune-functions LocalFunction interface. More...
     
    struct  FunctionWrapperBase
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04022.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04022.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase Struct Referenceabstract
    \n \n
    \n \n

    Base class for polymorphic container of underlying data set. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase:
    \n \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04026.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04026.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapper< F > Struct Template Reference
    \n \n
    \n \n

    Type erasure implementation for functions conforming to the dune-functions LocalFunction interface. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapper< F >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -280,15 +280,15 @@\n

    The function must write count scalar values as determined by the VTK::FieldInfo.

    \n \n

    Implements Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase.

    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04030.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04030.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F > Struct Template Reference
    \n \n
    \n \n

    Type erasure implementation for C++ functions, i.e., functions that can be evaluated in global coordinates. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::GlobalFunctionWrapper< F >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -280,15 +280,15 @@\n

    The function must write count scalar values as determined by the VTK::FieldInfo.

    \n \n

    Implements Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase.

    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04034.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04034.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper Struct Reference
    \n \n
    \n \n

    Type erasure implementation for legacy VTKFunctions. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >::VTKLocalFunction::VTKFunctionWrapper:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -243,15 +243,15 @@\n

    The function must write count scalar values as determined by the VTK::FieldInfo.

    \n \n

    Implements Dune::VTKWriter< GridView >::VTKLocalFunction::FunctionWrapperBase.

    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04038.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04038.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTKWriter< GridView >::CellIterator Class Reference
    \n \n
    \n \n

    Iterator over the grids elements. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >::CellIterator:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -156,15 +156,15 @@\n \n
    \n

    get the position of the center of the element, in element-local coordinates

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04042.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04042.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VTKWriter< GridView >::VertexIterator Class Reference
    \n \n
    \n \n

    Iterate over the grid's vertices. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >::VertexIterator:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -331,15 +331,15 @@\n
    \n \n

    position of vertex inside the entity

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04046.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04046.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VTKWriter< GridView >::CornerIterator Class Reference
    \n \n
    \n \n

    Iterate over the elements' corners. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtkwriter.hh>

    \n
    \n Inheritance diagram for Dune::VTKWriter< GridView >::CornerIterator:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -273,15 +273,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04050.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04050.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::VTK::VTUWriter Class Reference
    \n \n
    \n \n

    Dump a .vtu/.vtp files contents to a stream. \n More...

    \n \n-

    #include <dune/grid/io/file/vtk/vtuwriter.hh>

    \n+

    #include <dune/grid/io/file/vtk/vtuwriter.hh>

    \n \n \n \n \n@@ -815,15 +815,15 @@\n \n

    \n Public Types

    enum  Phase { main\n , appended\n }
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04126.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04126.html", "unified_diff": "@@ -66,15 +66,15 @@\n \n \n
    \n
    Dune::EntityCommHelper< iftype > Struct Template Reference
    \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04130.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04130.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface > Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -132,15 +132,15 @@\n \n

    \n Static Public Member Functions

    static bool send (const PartitionType p)
     
    static bool receive (const PartitionType p)
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04134.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04134.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::EntityCommHelper< InteriorBorder_All_Interface > Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -132,15 +132,15 @@\n \n

    \n Static Public Member Functions

    static bool send (const PartitionType p)
     
    static bool receive (const PartitionType p)
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04138.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04138.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::EntityCommHelper< Overlap_OverlapFront_Interface > Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -132,15 +132,15 @@\n \n

    \n Static Public Member Functions

    static bool send (const PartitionType p)
     
    static bool receive (const PartitionType p)
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04142.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04142.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::EntityCommHelper< Overlap_All_Interface > Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -132,15 +132,15 @@\n \n

    \n Static Public Member Functions

    static bool send (const PartitionType p)
     
    static bool receive (const PartitionType p)
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04146.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04146.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::EntityCommHelper< All_All_Interface > Struct Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -132,15 +132,15 @@\n \n

    \n Static Public Member Functions

    static bool send (const PartitionType p)
     
    static bool receive (const PartitionType p)
     
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04150.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04150.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::GlobalIndexSet< GridView > Class Template Reference
    \n \n
    \n \n

    Calculate globally unique index over all processes in a Dune grid. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -465,15 +465,15 @@\n
    \n \n

    Global number of entities, i.e. number of entities without rendundant entities on interprocessor boundaries.

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04154.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04154.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::GlobalIndexSet< GridView >::SubPartitionTypeProvider< Entity, Codim > Struct Template Reference
    \n \n
    \n \n

    Helper class to provide access to subentity PartitionTypes with a run-time codimension. \n More...

    \n \n-

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

    \n+

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

    \n

    \n Classes

    struct  SubPartitionTypeProvider
     Helper class to provide access to subentity PartitionTypes with a run-time codimension. More...
     
    struct  SubPartitionTypeProvider< Entity, 0 >
    \n \n \n \n \n

    \n Static Public Member Functions

    static PartitionType get (const Entity &entity, int codim, int i)
     Get PartitionType of the i-th subentity of codimension 'codim' of entity 'entity'. More...
     
    \n@@ -135,15 +135,15 @@\n
    \n \n

    Get PartitionType of the i-th subentity of codimension 'codim' of entity 'entity'.

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04158.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04158.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::GlobalIndexSet< GridView >::SubPartitionTypeProvider< Entity, 0 > Struct Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Static Public Member Functions

    static PartitionType get (const Entity &entity, int codim, int i)
     
    \n

    Member Function Documentation

    \n@@ -124,15 +124,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04186.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04186.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::HierarchicSearch< Grid, IS > Class Template Reference
    \n \n
    \n \n

    Search an IndexSet for an Entity containing a given point. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -208,15 +208,15 @@\n \n \n

    type of LevelIterator

    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04190.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04190.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Types |\n Static Public Member Functions |\n List of all members\n
    Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > > Struct Template Reference
    \n \n

    \n Public Member Functions

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

    \n Classes

    struct  Codim
     A Traits struct that collects return types of class member methods. More...
     
    \n@@ -351,15 +351,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04194.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04194.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim< codim > Struct Template Reference
    \n \n
    \n \n

    A Traits struct that collects return types of class member methods. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -135,15 +135,15 @@\n
    \n \n

    type of the host entity

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04198.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04198.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Types |\n Static Public Member Functions |\n List of all members\n
    Dune::HostGridAccess< IdentityGrid< HG > > Struct Template Reference
    \n \n

    \n Public Types

    typedef Grid::template Codim< codim >::Entity Entity
     type of the GeometryGrid entity More...
     
    typedef HostGrid::template Codim< codim >::Entity HostEntity
    \n \n \n \n \n

    \n Classes

    struct  Codim
     A Traits struct that collects return types of class member methods. More...
     
    \n@@ -378,15 +378,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04202.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04202.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::HostGridAccess< IdentityGrid< HG > >::Codim< codim > Struct Template Reference
    \n \n
    \n \n

    A Traits struct that collects return types of class member methods. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -135,15 +135,15 @@\n
    \n \n

    type of the host entity

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04206.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04206.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members\n
    Dune::FactoryUtilities::MultiIndex< dim > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::FactoryUtilities::MultiIndex< dim >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -215,15 +215,15 @@\n
    \n \n

    STL member.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04218.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04218.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::PersistentContainerInterface< G, T > Class Template Reference
    \n \n
    \n \n

    Persistent storage of data on all entities of a grid. \n More...

    \n \n-

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

    \n+

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

    \n

    \n Public Types

    typedef Grid::template Codim< codim >::Entity Entity
     type of the IdGrid entity More...
     
    typedef HostGrid::template Codim< codim >::Entity HostEntity
    \n \n \n \n \n \n@@ -682,15 +682,15 @@\n \n

    exchange the content of the container with another one

    \n
    Note
    std::swap is overloaded to refor to this method
    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04222.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04222.html", "unified_diff": "@@ -77,15 +77,15 @@\n
    Dune::PersistentContainerMap< G, IdSet, Map > Class Template Reference
    \n \n
    \n \n

    map-based implementation of the PersistentContainer \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::PersistentContainerMap< G, IdSet, Map >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1058,15 +1058,15 @@\n \n

    \n Public Types

    typedef G Grid
     
    typedef T Value
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04226.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04226.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::PersistentContainerMap< G, IdSet, Map >::IteratorWrapper< value, iterator >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -306,15 +306,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04230.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04230.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::PersistentContainerVector< G, IndexSet, Vector > Class Template Reference
    \n \n
    \n \n

    vector-based implementation of the PersistentContainer \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::PersistentContainerVector< G, IndexSet, Vector >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -840,15 +840,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04234.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04234.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::PersistentContainerWrapper< G, T > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::PersistentContainerWrapper< G, T >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -704,15 +704,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04238.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04238.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::TensorGridFactoryCreator< Grid > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -209,15 +209,15 @@\n \n

    \n Public Types

    typedef Grid::Traits::Communication Comm
     
    typedef Grid::ctype ctype
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04242.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04242.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::TensorGridFactory< Grid > Class Template Reference
    \n \n
    \n \n

    A factory class for conveniently creating tensorproduct grids. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::TensorGridFactory< Grid >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -754,15 +754,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04246.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04246.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -178,15 +178,15 @@\n \n

    \n Public Types

    typedef YaspGrid< dim, TensorProductCoordinates< ctype, dim > > Grid
     
    typedef Grid::Communication Comm
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04250.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04250.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::VertexOrderByIdFactory< IdSet, Index > Class Template Reference
    \n \n
    \n \n

    Factory for GeneralVertexOrder objects using an IdSet. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Classes

    struct  VertexOrder
     type of vertex order object may depend on the dimension of the element More...
     
    \n@@ -182,15 +182,15 @@\n \n \n

    The returned object will remain valid even after the factory has become singular or has been destroyed.

    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04254.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04254.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::VertexOrderByIdFactory< IdSet, Index >::VertexOrder< dim > Struct Template Reference
    \n \n
    \n \n

    type of vertex order object may depend on the dimension of the element \n More...

    \n \n-

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

    \n+

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

    \n
    \n \n \n \n \n

    \n Public Types

    typedef GeneralVertexOrder< dim, Index > type
     type of vertex order object More...
     
    \n@@ -106,15 +106,15 @@\n
    \n \n

    type of vertex order object

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04262.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04262.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YaspGeometry< mydim, cdim, GridImp > Class Template Reference
    \n \n
    \n \n

    The general version that handles all codimensions but 0 and dim. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspGeometry< mydim, cdim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -174,15 +174,15 @@\n \n

    constructor from midpoint and extension and a bitset defining which unit vectors span the entity

    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04266.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04266.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Attributes |\n List of all members \n
    Dune::YaspEntity< codim, dim, GridImp > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspEntity< codim, dim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -948,15 +948,15 @@\n \n

    Know dimension of the entity.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04270.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04270.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::YaspEntitySeed< codim, GridImp > Class Template Reference
    \n \n
    \n \n

    Describes the minimal information necessary to create a fully functional YaspEntity. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -400,15 +400,15 @@\n \n

    codimension of entity

    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04274.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04274.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::YaspLevelIterator< codim, pitype, GridImp > Class Template Reference
    \n \n
    \n \n

    Iterates over entities of one grid level. \n More...

    \n \n-

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

    \n+

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

    \n

    \n Public Member Functions

     YaspEntitySeed ()
     default construct an invalid entity seed More...
     
     YaspEntitySeed (int level, std::array< int, dim > coord, int o=0)
    \n \n \n \n \n \n@@ -349,15 +349,15 @@\n \n

    entity

    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04278.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04278.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YaspIntersectionIterator< GridImp > Class Template Reference
    \n \n
    \n \n

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

    \n \n-

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

    \n+

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

    \n

    \n Public Types

    typedef GridImp::template Codim< codim >::Entity Entity
     
    typedef GridImp::YGridLevelIterator YGLI
     
    \n \n \n \n \n \n@@ -360,15 +360,15 @@\n \n

    assignment

    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04282.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04282.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YaspIntersection< GridImp > Class Template Reference
    \n \n
    \n \n

    YaspIntersection provides data about intersection with neighboring codim 0 entities. \n More...

    \n \n-

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

    \n+

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

    \n

    \n Public Types

    typedef Dune::YaspIntersection< GridImp > IntersectionImp
     
    typedef Dune::Intersection< GridImp, IntersectionImpIntersection
     
    \n \n \n \n \n \n@@ -845,15 +845,15 @@\n

    \n Public Types

    typedef GridImp::YGridLevelIterator YGLI
     
    typedef GridImp::YGrid::Iterator I
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04286.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04286.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::YaspHierarchicIterator< GridImp > Class Template Reference
    \n \n
    \n \n

    YaspHierarchicIterator enables iteration over son entities of codim 0. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -352,15 +352,15 @@\n

    \n Public Types

    typedef GridImp::YGridLevelIterator YGLI
     
    typedef GridImp::YGrid::Iterator I
     
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04290.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04290.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::YaspIndexSet< GridImp, isLeafIndexSet > Class Template Reference
    \n \n
    \n \n

    Implementation of Level- and LeafIndexSets for YaspGrid. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspIndexSet< GridImp, isLeafIndexSet >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -765,15 +765,15 @@\n \n

    dimension of the grid (maximum allowed codimension)

    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04294.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04294.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::YaspGlobalIdSet< GridImp > Class Template Reference
    \n \n
    \n \n

    persistent, globally unique Ids \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspGlobalIdSet< GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -380,15 +380,15 @@\n \n

    dimension of the grid (maximum allowed codimension)

    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04298.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04298.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::YaspPersistentContainerIndex< Grid > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspPersistentContainerIndex< Grid >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -306,15 +306,15 @@\n
    Note
    The parameter codim denotes the codimension with respect to the grid, i.e., it must satisfy cc <= codim <= dimension.
    \n
    Returns
    An index in the range 0 ... Max number of entities in set - 1.
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04362.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04362.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::EquidistantCoordinates< ct, dim > Class Template Reference
    \n \n
    \n \n

    Container for equidistant coordinates in a YaspGrid. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n

    \n Public Types

    typedef ct ctype
     export the coordinate type More...
     
    \n@@ -460,15 +460,15 @@\n
    \n \n

    export dimension

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04366.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04366.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::EquidistantOffsetCoordinates< ct, dim > Class Template Reference
    \n \n
    \n \n

    Container for equidistant coordinates in a YaspGrid with non-trivial origin. \n More...

    \n \n-

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

    \n+

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

    \n
    \n \n \n \n \n

    \n Public Types

    typedef ct ctype
     export the coordinate type More...
     
    \n@@ -505,15 +505,15 @@\n
    \n \n

    export dimension

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04370.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04370.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    Dune::TensorProductCoordinates< ct, dim > Class Template Reference
    \n \n
    \n \n

    Coordinate container for a tensor product YaspGrid. \n More...

    \n \n-

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

    \n+

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

    \n
    \n \n \n \n \n

    \n Public Types

    typedef ct ctype
     export the coordinate type More...
     
    \n@@ -460,15 +460,15 @@\n
    \n \n

    export dimension

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04374.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04374.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::Yasp::Partitioning< d > Class Template Referenceabstract
    \n \n
    \n \n

    a base class for the yaspgrid partitioning strategy \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::Yasp::Partitioning< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -205,15 +205,15 @@\n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04378.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04378.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members\n
    Dune::Yasp::DefaultPartitioning< d > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::Yasp::DefaultPartitioning< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -172,15 +172,15 @@\n \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04382.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04382.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::Yasp::PowerDPartitioning< d > Class Template Reference
    \n \n
    \n \n

    Implement yaspgrid load balance strategy for P=x^{dim} processors. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::Yasp::PowerDPartitioning< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -198,15 +198,15 @@\n
    \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04386.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04386.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::Yasp::FixedSizePartitioning< d > Class Template Reference
    \n \n
    \n \n

    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. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::Yasp::FixedSizePartitioning< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -236,15 +236,15 @@\n
    \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04390.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04390.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YLoadBalance< d > Class Template Referenceabstract
    \n \n
    \n \n

    a base class for the yaspgrid partitioning strategy \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YLoadBalance< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -251,15 +251,15 @@\n
    \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04394.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04394.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Types |\n Public Member Functions |\n List of all members\n
    Dune::YLoadBalanceForward< d > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YLoadBalanceForward< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -274,15 +274,15 @@\n
    \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04398.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04398.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YLoadBalanceDefault< d > Class Template Reference
    \n \n
    \n \n

    Implement the default load balance strategy of yaspgrid. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YLoadBalanceDefault< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -257,15 +257,15 @@\n
    \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04402.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04402.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YLoadBalancePowerD< d > Class Template Reference
    \n \n
    \n \n

    Implement yaspgrid load balance strategy for P=x^{dim} processors. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YLoadBalancePowerD< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -249,15 +249,15 @@\n
    \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04406.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04406.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YaspFixedSizePartitioner< d > Class Template Reference
    \n \n
    \n \n

    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. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspFixedSizePartitioner< d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -250,15 +250,15 @@\n
    \n \n

    Implements Dune::Yasp::Partitioning< d >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04410.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04410.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > > Class Template Reference
    \n \n
    \n \n \n \n \n \n@@ -194,15 +194,15 @@\n \n

    Create a structured simplex grid.

    \n
    Note
    Simplices are not supported in YaspGrid, so this functions unconditionally throws a GridError.
    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04414.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04414.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > > Class Template Reference
    \n \n
    \n \n

    Specialization of the StructuredGridFactory for YaspGrid<EquidistantOffsetCoordinates> \n More...

    \n \n-

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

    \n+

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

    \n

    \n Static Public Member Functions

    static std::unique_ptr< GridTypecreateCubeGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
     Create a structured cube grid. More...
     
    static std::unique_ptr< GridTypecreateSimplexGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    \n \n \n \n \n \n@@ -192,15 +192,15 @@\n \n

    Create a structured simplex grid.

    \n
    Note
    Simplices are not supported in YaspGrid, so this functions unconditionally throws a GridError.
    \n \n \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04418.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04418.html", "unified_diff": "@@ -71,15 +71,15 @@\n Public Types |\n Public Member Functions |\n List of all members\n
    Dune::Torus< Communication, d > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::Torus< Communication, d >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1128,15 +1128,15 @@\n
    \n \n

    return tag used by torus

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04430.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04430.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::Torus< Communication, d >::ProcListIterator Class Reference
    \n \n

    \n Static Public Member Functions

    static std::unique_ptr< GridTypecreateCubeGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
     Create a structured cube grid. More...
     
    static std::unique_ptr< GridTypecreateSimplexGrid (const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    \n \n \n \n \n \n@@ -339,15 +339,15 @@\n
    \n \n

    return rank of neighboring process

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04434.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04434.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members\n
    Dune::YaspEntity< 0, dim, GridImp > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspEntity< 0, dim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1454,15 +1454,15 @@\n
    \n \n

    Know dimension of the entity.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04438.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04438.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::YaspEntity< 0, dim, GridImp >::Codim< cd > Struct Template Reference
    \n \n

    \n Public Member Functions

     ProcListIterator (typename std::deque< CommPartner >::const_iterator iter)
     make an iterator More...
     
    int rank () const
    \n \n \n \n

    \n Public Types

    typedef GridImp::template Codim< cd >::Entity Entity
     
    \n

    Member Typedef Documentation

    \n@@ -96,15 +96,15 @@\n \n \n
    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04442.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04442.html", "unified_diff": "@@ -72,15 +72,15 @@\n Static Public Attributes |\n Protected Attributes |\n List of all members \n
    Dune::YaspEntity< dim, dim, GridImp > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspEntity< dim, dim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -888,15 +888,15 @@\n
    \n \n

    Know dimension of the entity.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04446.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04446.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YaspGeometry< mydim, mydim, GridImp > Class Template Reference
    \n \n
    \n \n

    specialize for dim=dimworld, i.e. a volume element \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspGeometry< mydim, mydim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -190,15 +190,15 @@\n
    \n \n

    copy constructor (skipping temporary variables)

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04450.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04450.html", "unified_diff": "@@ -73,15 +73,15 @@\n
    Dune::YaspGeometry< 0, cdim, GridImp > Class Template Reference
    \n \n
    \n \n

    specialization for dim=0, this is a vertex \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::YaspGeometry< 0, cdim, GridImp >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -193,15 +193,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04458.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04458.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T > Class Template Reference
    \n \n
    \n \n

    Specialization of the PersistentContainer for YaspGrid. \n More...

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -804,15 +804,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04462.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04462.html", "unified_diff": "@@ -72,15 +72,15 @@\n Public Member Functions |\n Static Public Attributes |\n List of all members \n
    Dune::YGridComponent< Coordinates > Class Template Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n

    \n Classes

    class  Iterator
     
    \n \n

    \n@@ -188,15 +188,15 @@\n

    \n

    together with an affine mapping.

    \n

    A YGrid is characterized by the following quantities:

    \n
      \n
    • The origin \"$,
    • \n
    • the size \"$,
    • \n
    • The shift \"$.
    • \n-
    • a coordinate container, that gives the mapping of the index to global coordinates (see coordinates.hh)
    • \n+
    • a coordinate container, that gives the mapping of the index to global coordinates (see coordinates.hh)
    • \n
    \n

    The shift can be used to interpret the points of a grid as midpoints of cells, faces, edges, etc.

    \n

    Here is a graphical illustration of a grid:

    \n
    \n \"\"/\n
    \n A YGrid.
    \n@@ -1190,15 +1190,15 @@\n

    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04466.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04466.html", "unified_diff": "@@ -70,15 +70,15 @@\n Public Member Functions |\n Protected Attributes |\n List of all members \n
    Dune::YGridComponent< Coordinates >::Iterator Class Reference
    \n \n
    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -871,15 +871,15 @@\n
    \n \n

    consecutive index in enclosing grid

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04470.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04470.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::YGrid< Coordinates > Class Template Reference
    \n \n
    \n \n

    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). \n More...

    \n \n-

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

    \n+

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

    \n

    \n Public Member Functions

     Iterator ()=default
     
     Iterator (const YGridComponent< Coordinates > &r)
     Make iterator pointing to first cell in a grid. More...
    \n \n \n \n \n

    \n Classes

    class  Iterator
     Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid. More...
     
    \n@@ -521,15 +521,15 @@\n \n
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04474.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04474.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::YGrid< Coordinates >::Iterator Class Reference
    \n \n
    \n \n

    Iterator over a collection o YGrids A YGrid::Iterator is the heart of an entity in YaspGrid. \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -833,15 +833,15 @@\n
    \n \n

    return the current component number

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04478.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04478.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    Dune::YGridList< Coordinates > Class Template Reference
    \n \n
    \n \n

    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. \n More...

    \n \n-

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

    \n+

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

    \n

    \n Public Member Functions

     Iterator ()=default
     default constructor More...
     
     Iterator (const YGrid< Coordinates > &yg, const std::array< int, dim > &coords, int which=0)
    \n \n \n \n \n \n@@ -382,15 +382,15 @@\n \n

    \n Classes

    struct  Intersection
     type describing an intersection with a neighboring processor More...
     
    class  Iterator
    \n
    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04482.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04482.html", "unified_diff": "@@ -72,15 +72,15 @@\n
    Dune::YGridList< Coordinates >::Intersection Struct Reference
    \n \n
    \n \n

    type describing an intersection with a neighboring processor \n More...

    \n \n-

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

    \n+

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

    \n \n \n \n \n \n \n@@ -166,15 +166,15 @@\n
    \n \n

    a YGrid stub, that acts wraps above YGrid Component and handels the index offset

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04486.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04486.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    Dune::YGridList< Coordinates >::Iterator Class Reference
    \n \n

    \n Public Attributes

    YGridComponent< Coordinates > grid
     The intersection as a subgrid of the local grid. More...
     
    int rank
    \n \n \n \n \n \n@@ -282,15 +282,15 @@\n
    \n \n

    compare two iterators

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a04492.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a04492.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    #include<dune/common/parallel/mpihelper.hh>
    \n
    #include<dune/common/parametertreeparser.hh>
    \n
    #include<dune/common/timer.hh>
    \n
    // dune-grid includes
    \n \n
    \n
    \n-
    int main(int argc, char** argv)
    \n+
    int main(int argc, char** argv)
    \n
    {
    \n
    // Maybe initialize Mpi
    \n
    [[maybe_unused]] Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
    \n
    \n
    // [set up grid]
    \n
    const int dim = 4;
    \n
    using Grid = Dune::YaspGrid<dim>;
    \n@@ -115,15 +115,15 @@\n
    \n
    // [access to subentities]
    \n
    const int mycodim = 2;
    \n
    for (const auto& e : elements(gv))
    \n
    for (unsigned int i=0; i<e.subEntities(mycodim); ++i)
    \n
    [[maybe_unused]] auto v = e.template subEntity<codim>(i);
    \n
    }
    \n-
    int main(int argc, char **argv)
    Definition: recipe-iterate-over-grid.cc:55
    \n+
    int main(int argc, char **argv)
    Definition: recipe-iterate-over-grid.cc:55
    \n \n
    IteratorRange<... > vertices(const GV &gv)
    Iterates over all vertices (entities with dimension 0) of a GridView.
    \n
    IteratorRange<... > elements(const GV &gv)
    Iterates over all elements / cells (entities with codimension 0) of a GridView.
    \n
    IteratorRange<... > entities(const GV &gv, Codim< codim > cd)
    Iterates over all entities of a GridView with the given codimension.
    \n
    IteratorRange<... > facets(const GV &gv)
    Iterates over all facets (entities with codimension 1) of a GridView.
    \n
    IteratorRange<... > edges(const GV &gv)
    Iterates over all edges (entities with dimension 1) of a GridView.
    \n
    [ provides Dune::Grid ]
    Definition: yaspgrid.hh:163
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07199.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07199.html", "unified_diff": "@@ -71,15 +71,15 @@\n Namespaces\n
    geometrygrid/backuprestore.hh File Reference
    \n \n
    \n
    #include <type_traits>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/grid/common/backuprestore.hh>
    \n-#include <dune/grid/geometrygrid/declaration.hh>
    \n+#include <dune/grid/geometrygrid/declaration.hh>
    \n #include <dune/grid/geometrygrid/capabilities.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Public Member Functions

     Iterator (const YGridList< Coordinates > &ygl, bool end=false)
     return iterator to begin and end of the container More...
     
    Iteratoroperator++ ()
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07199_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07199_source.html", "unified_diff": "@@ -77,15 +77,15 @@\n
    6#define DUNE_GEOGRID_BACKUPRESTORE_HH
    \n
    7
    \n
    8#include <type_traits>
    \n
    9
    \n
    10#include <dune/common/exceptions.hh>
    \n \n
    12
    \n-\n+\n \n
    15
    \n
    16namespace Dune
    \n
    17{
    \n
    18
    \n
    19 namespace GeoGrid
    \n
    20 {
    \n@@ -167,15 +167,15 @@\n
    98 return nullptr;
    \n
    99 }
    \n
    100 };
    \n
    101
    \n
    102} // namespace Dune
    \n
    103
    \n
    104#endif // #ifndef DUNE_GEOGRID_BACKUPRESTORE_HH
    \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    facility for writing and reading grids
    Definition: common/backuprestore.hh:43
    \n
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    Definition: geometrygrid/backuprestore.hh:27
    \n
    Definition: geometrygrid/backuprestore.hh:31
    \n
    const Grid & asImp() const
    Definition: geometrygrid/backuprestore.hh:43
    \n
    BackupRestoreFacilities()
    Definition: geometrygrid/backuprestore.hh:35
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07211.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07211.html", "unified_diff": "@@ -73,15 +73,15 @@\n \n
    \n
    #include <cassert>
    \n #include <type_traits>
    \n #include <utility>
    \n #include <dune/common/hybridutilities.hh>
    \n #include <dune/grid/common/capabilities.hh>
    \n-#include <dune/grid/geometrygrid/declaration.hh>
    \n+#include <dune/grid/geometrygrid/declaration.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GeoGrid::BackupRestoreFacilities< Grid, hasBackupRestoreFacilities >
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07211_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07211_source.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    8#include <cassert>
    \n
    9#include <type_traits>
    \n
    10#include <utility>
    \n
    11
    \n
    12#include <dune/common/hybridutilities.hh>
    \n
    13
    \n \n-\n+\n
    16
    \n
    17namespace Dune
    \n
    18{
    \n
    19
    \n
    20 // Capabilities
    \n
    21 // ------------
    \n
    22
    \n@@ -210,15 +210,15 @@\n
    139 };
    \n
    140
    \n
    141 } // namespace Capabilities
    \n
    142
    \n
    143} // namespace Dune
    \n
    144
    \n
    145#endif // #ifndef DUNE_GEOGRID_CAPABILITIES_HH
    \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Specialize with 'true' for if the codimension 0 entity of the grid has only one possible geometry typ...
    Definition: common/capabilities.hh:27
    \n
    static const bool v
    Definition: common/capabilities.hh:28
    \n
    static const unsigned int topologyId
    Definition: common/capabilities.hh:31
    \n
    Specialize with 'true' for all codims that a grid implements entities for. (default=false)
    Definition: common/capabilities.hh:58
    \n
    static const bool v
    Definition: common/capabilities.hh:59
    \n
    specialize with 'true' for all codims that a grid provides an iterator for (default=hasEntity<codim>:...
    Definition: common/capabilities.hh:74
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07214.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07214.html", "unified_diff": "@@ -70,18 +70,18 @@\n Classes |\n Namespaces\n
    albertagrid/datahandle.hh File Reference
    \n \n

    \n Classes

    struct  Dune::Capabilities::hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07214_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07214_source.html", "unified_diff": "@@ -76,18 +76,18 @@\n
    5#ifndef DUNE_ALBERTAGRIDDATAHANDLE_HH
    \n
    6#define DUNE_ALBERTAGRIDDATAHANDLE_HH
    \n
    7
    \n
    8#include <iostream>
    \n
    9
    \n \n
    11
    \n-\n-\n-\n-\n+\n+\n+\n+\n
    16
    \n
    17#if HAVE_ALBERTA
    \n
    18
    \n
    19namespace Dune
    \n
    20{
    \n
    21
    \n
    22 namespace Alberta
    \n@@ -134,18 +134,18 @@\n
    63 }
    \n
    64
    \n
    65}
    \n
    66
    \n
    67#endif // #if HAVE_ALBERTA
    \n
    68
    \n
    69#endif
    \n-\n-\n-
    provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: albertagrid/datahandle.hh:27
    \n
    AdaptRestrictProlongHandler(Grid &grid, RestrictProlongOperator &rpOp)
    Definition: albertagrid/datahandle.hh:42
    \n
    void restrictLocal(const Patch &patch, int i)
    Definition: albertagrid/datahandle.hh:48
    \n
    void prolongLocal(const Patch &patch, int i)
    Definition: albertagrid/datahandle.hh:55
    \n \n
    Definition: refinement.hh:40
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -77,21 +77,21 @@\n 63 }\n 64\n 65}\n 66\n 67#endif // #if HAVE_ALBERTA\n 68\n 69#endif\n-misc.hh\n-albertaheader.hh\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n refinement.hh\n provides a wrapper for ALBERTA's refinement patches and the corners for\n geometryInFather\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n+misc.hh\n+albertaheader.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::Alberta::AdaptRestrictProlongHandler\n Definition: albertagrid/datahandle.hh:27\n Dune::Alberta::AdaptRestrictProlongHandler::AdaptRestrictProlongHandler\n AdaptRestrictProlongHandler(Grid &grid, RestrictProlongOperator &rpOp)\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07217.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07217.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    geometrygrid/datahandle.hh File Reference
    \n \n

    \n Classes

    class  Dune::Alberta::AdaptRestrictProlongHandler< Grid, RestrictProlongOperator >
     
    \n \n \n \n \n

    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07217_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07217_source.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GEOGRID_DATAHANDLE_HH
    \n
    6#define DUNE_GEOGRID_DATAHANDLE_HH
    \n
    7
    \n
    8#include <dune/common/typetraits.hh>
    \n
    9
    \n-\n+\n \n \n \n
    14
    \n
    15namespace Dune
    \n
    16{
    \n
    17
    \n@@ -156,15 +156,15 @@\n
    85 };
    \n
    86
    \n
    87 } // namespace GeoGrid
    \n
    88
    \n
    89} // namespace Dune
    \n
    90
    \n
    91#endif // #ifndef DUNE_GEOGRID_DATAHANDLE_HH
    \n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
    Definition: datahandleif.hh:78
    \n
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    Definition: geometrygrid/capabilities.hh:116
    \n
    Definition: geometrygrid/datahandle.hh:27
    \n
    bool fixedSize(int dim, int codim) const
    Definition: geometrygrid/datahandle.hh:44
    \n
    bool contains(int dim, int codim) const
    Definition: geometrygrid/datahandle.hh:36
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07223.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07223.html", "unified_diff": "@@ -74,15 +74,15 @@\n \n
    \n
    #include <config.h>
    \n #include <cstdio>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n #include <dune/grid/io/file/dgfparser/dgfparser.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
    \n
    \n \n \n \n

    \n Classes

    class  Dune::DGFPrintInfo
     
    \n \n \n \n \n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n-\n+\n \n \n \n \n \n \n \n@@ -111,25 +111,25 @@\n \n \n \n \n \n \n \n-\n+\n \n-\n+\n \n \n \n \n \n \n \n-\n+\n \n \n \n

    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07226.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07226.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    \n \n

    Go to the source code of this file.

    \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07226_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07226_source.html", "unified_diff": "@@ -81,15 +81,15 @@\n \n \n
    12
    \n \n \n
    15
    \n \n-\n+\n
    18
    \n
    19#if HAVE_ALBERTA
    \n
    20
    \n
    21namespace Dune
    \n
    22{
    \n
    23
    \n
    24 // External Forward Declarations
    \n@@ -257,15 +257,15 @@\n
    186
    \n
    187}
    \n
    188
    \n
    189#endif // #if HAVE_ALBERTA
    \n
    190
    \n
    191#endif // #ifndef DUNE_ALBERTA_DGFPARSER_HH
    \n \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    @ vertex
    Definition: common.hh:133
    \n
    Definition: dgfgridfactory.hh:38
    \n
    DGFGridFactory(const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator())
    Definition: dgfgridfactory.hh:50
    \n
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07229.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07229.html", "unified_diff": "@@ -67,19 +67,19 @@\n \n
    \n
    io/file/dgfparser.hh File Reference
    \n
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07229_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07229_source.html", "unified_diff": "@@ -75,25 +75,25 @@\n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_DGFPARSER_HH
    \n
    6#define DUNE_DGFPARSER_HH
    \n
    7// include dgf parser
    \n \n
    9/* include the implementations */
    \n \n-
    11#include "dgfparser/dgfug.hh"
    \n+
    11#include "dgfparser/dgfug.hh"
    \n
    12#include "dgfparser/dgfoned.hh"
    \n-
    13#include "dgfparser/dgfyasp.hh"
    \n-\n-\n+
    13#include "dgfparser/dgfyasp.hh"
    \n+\n+\n
    16#endif
    \n-\n-\n-\n-\n \n+\n+\n+\n+\n \n \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -25,17 +25,17 @@\n 10#include \n 11#include \"dgfparser/dgfug.hh\"\n 12#include \"dgfparser/dgfoned.hh\"\n 13#include \"dgfparser/dgfyasp.hh\"\n 14#include \"dgfparser/dgfgeogrid.hh\"\n 15#include \"dgfparser/dgfidentitygrid.hh\"\n 16#endif\n+dgfoned.hh\n+dgfgeogrid.hh\n dgfidentitygrid.hh\n dgfug.hh\n dgfyasp.hh\n-dgfgeogrid.hh\n-dgfoned.hh\n dgfparser.hh\n dgfparser.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07232.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07232.html", "unified_diff": "@@ -80,36 +80,36 @@\n #include <vector>
    \n #include <memory>
    \n #include <map>
    \n #include <assert.h>
    \n #include <cmath>
    \n #include <dune/common/parallel/mpihelper.hh>
    \n #include <dune/common/stdstreams.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n-#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n-#include <dune/grid/io/file/dgfparser/parser.hh>
    \n-#include <dune/grid/io/file/dgfparser/gridptr.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfexception.hh>
    \n+#include <dune/grid/io/file/dgfparser/entitykey.hh>
    \n+#include <dune/grid/io/file/dgfparser/parser.hh>
    \n+#include <dune/grid/io/file/dgfparser/gridptr.hh>
    \n #include <dune/grid/io/file/dgfparser/macrogrid.hh>
    \n-#include <dune/grid/io/file/dgfparser/dgfgridfactory.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/general.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/interval.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/polyhedron.hh>
    \n+#include <dune/grid/io/file/dgfparser/dgfgridfactory.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/basic.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/boundarydom.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/boundaryseg.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/cube.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/dim.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/general.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/gridparameter.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/interval.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/polygon.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/polyhedron.hh>
    \n #include <dune/grid/io/file/dgfparser/blocks/projection.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
    \n-#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/simplex.hh>
    \n+#include <dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh>
    \n #include <dune/grid/io/file/dgfparser/blocks/vertex.hh>
    \n \n

    Go to the source code of this file.

    \n

    \n Classes

    struct  Dune::DGFGridFactory< AlbertaGrid< dim, dimworld > >
     
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07232_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07232_source.html", "unified_diff": "@@ -87,39 +87,39 @@\n
    16#include <map>
    \n
    17#include <assert.h>
    \n
    18#include <cmath>
    \n
    19
    \n
    20//- Dune includes
    \n
    21#include <dune/common/parallel/mpihelper.hh>
    \n
    22#include <dune/common/stdstreams.hh>
    \n-\n-\n+\n+\n
    25
    \n-\n-\n+\n+\n
    28
    \n-\n-\n+\n+\n \n-\n+\n
    33
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n-\n+\n+\n \n
    49
    \n
    50namespace Dune {
    \n
    51
    \n
    54 template <class GridType>
    \n \n
    56 {
    \n@@ -133,36 +133,36 @@\n
    742 tetrahedral grid for Dune::Alberta then the bisection routine does
    \n
    743 not necessarily terminate. This problem does not occur
    \n
    744 if the grid is constructed using the \\b Interval block.
    \n
    745 */
    \n
    746
    \n
    747} // end namespace Dune
    \n
    748#endif
    \n-\n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n \n-\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n
    static double refineWeight()
    \n
    static int refineStepsForHalf()
    number of globalRefine steps needed to refuce h by 0.5
    \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -78,38 +78,38 @@\n 742 tetrahedral grid for Dune::Alberta then the bisection routine does\n 743 not necessarily terminate. This problem does not occur\n 744 if the grid is constructed using the \\b Interval block.\n 745 */\n 746\n 747} // end namespace Dune\n 748#endif\n-gridenums.hh\n datahandleif.hh\n Describes the parallel communication interface class for MessageBuffers and\n DataHandles.\n-dgfexception.hh\n-gridptr.hh\n-parser.hh\n-gridparameter.hh\n-periodicfacetrans.hh\n-boundaryseg.hh\n+gridenums.hh\n+dgfgridfactory.hh\n+basic.hh\n general.hh\n-boundarydom.hh\n-polyhedron.hh\n+dim.hh\n interval.hh\n+polyhedron.hh\n+simplex.hh\n+boundaryseg.hh\n+periodicfacetrans.hh\n cube.hh\n vertex.hh\n-simplex.hh\n-dim.hh\n+gridparameter.hh\n simplexgeneration.hh\n-basic.hh\n polygon.hh\n-dgfgridfactory.hh\n-macrogrid.hh\n+boundarydom.hh\n+gridptr.hh\n entitykey.hh\n+macrogrid.hh\n+dgfexception.hh\n+parser.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::DGFGridInfo\n Some simple static information for a given GridType.\n Definition: io/file/dgfparser/dgfparser.hh:56\n Dune::DGFGridInfo::refineWeight\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07235.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07235.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    albertagrid/entity.hh File Reference
    \n \n

    \n Classes

    struct  Dune::DGFGridInfo< GridType >
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07235_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07235_source.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_ENTITY_HH
    \n
    6#define DUNE_ALBERTA_ENTITY_HH
    \n
    7
    \n \n
    9
    \n-\n+\n \n \n
    13
    \n
    14#if HAVE_ALBERTA
    \n
    15
    \n
    16namespace Dune
    \n
    17{
    \n@@ -172,15 +172,15 @@\n
    120 return binomial;
    \n
    121 }
    \n
    122
    \n
    123 //***********************************************
    \n
    124 // end of interface methods
    \n
    125 //***********************************************
    \n
    126
    \n-
    128 ALBERTA EL_INFO *getElInfo () const;
    \n+
    128 ALBERTA EL_INFO *getElInfo () const;
    \n
    129
    \n
    130 const ElementInfo &elementInfo () const { return elementInfo_; }
    \n
    131
    \n
    133 bool equals ( const This &other ) const;
    \n
    134
    \n
    135 void clearElement ();
    \n
    136 void setElement ( const ElementInfo &elementInfo, int subEntity );
    \n@@ -332,15 +332,15 @@\n
    344 bool hasBoundaryIntersections () const ;
    \n
    345
    \n \n
    348
    \n
    350 bool equals ( const This &i ) const;
    \n
    351
    \n
    352 // needed for LevelIterator to compare
    \n-
    353 ALBERTA EL_INFO *getElInfo () const;
    \n+
    353 ALBERTA EL_INFO *getElInfo () const;
    \n
    354
    \n
    355 const ElementInfo &elementInfo () const
    \n
    356 {
    \n
    357 return elementInfo_;
    \n
    358 }
    \n
    359
    \n
    360 void clearElement ();
    \n@@ -380,16 +380,16 @@\n
    400 };
    \n
    401
    \n
    402} // namespace Dune
    \n
    403
    \n
    404#endif // #if HAVE_ALBERTA
    \n
    405
    \n
    406#endif // #ifndef DUNE_ALBERTA_ENTITY_HH
    \n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n \n
    Definition: treeiterator.hh:189
    \n
    Definition: hierarchiciterator.hh:29
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -333,19 +333,19 @@\n 400 };\n 401\n 402} // namespace Dune\n 403\n 404#endif // #if HAVE_ALBERTA\n 405\n 406#endif // #ifndef DUNE_ALBERTA_ENTITY_HH\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n ALBERTA\n #define ALBERTA\n Definition: albertaheader.hh:29\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n Dune::PartitionType\n PartitionType\n Attributes used in the generic overlap model.\n Definition: gridenums.hh:30\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07238.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07238.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    \n
    #include <type_traits>
    \n #include <dune/common/iteratorrange.hh>
    \n #include <dune/common/typetraits.hh>
    \n #include <dune/geometry/dimension.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n #include "grid.hh"
    \n-#include "rangegenerators.hh"
    \n+#include "rangegenerators.hh"
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07238_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07238_source.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    10#include <dune/common/iteratorrange.hh>
    \n
    11#include <dune/common/typetraits.hh>
    \n
    12
    \n
    13#include <dune/geometry/dimension.hh>
    \n
    14#include <dune/geometry/referenceelements.hh>
    \n
    15
    \n
    16#include "grid.hh"
    \n-
    17#include "rangegenerators.hh"
    \n+
    17#include "rangegenerators.hh"
    \n
    18
    \n
    19namespace Dune
    \n
    20{
    \n
    21
    \n
    64 template<int cd, int dim, class GridImp, template<int,int,class> class EntityImp>
    \n
    65 class Entity
    \n
    66 {
    \n@@ -410,15 +410,15 @@\n
    689 {
    \n
    690 typedef typename GridImp::template Codim<cd>::Geometry Geo;
    \n
    691 return referenceElement< typename Geo::ctype, Geo::mydimension >(entity.type());
    \n
    692 }
    \n
    693}
    \n
    694
    \n
    695#endif // DUNE_GRID_COMMON_ENTITY_HH
    \n-\n+\n
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n
    const Implementation & impl() const
    access to the underlying implementation
    Definition: common/entity.hh:86
    \n
    bool operator!=(const Entity &other) const
    Compares two entities for inequality.
    Definition: common/entity.hh:176
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07241.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07241.html", "unified_diff": "@@ -71,15 +71,15 @@\n Namespaces\n
    geometrygrid/entity.hh File Reference
    \n \n

    \n Classes

    class  Dune::Entity< cd, dim, GridImp, EntityImp >
     Wrapper class for entities. More...
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07241_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07241_source.html", "unified_diff": "@@ -76,15 +76,15 @@\n
    5#ifndef DUNE_GEOGRID_ENTITY_HH
    \n
    6#define DUNE_GEOGRID_ENTITY_HH
    \n
    7
    \n
    8#include <dune/geometry/referenceelements.hh>
    \n
    9
    \n \n \n-\n+\n
    13
    \n
    14namespace Dune
    \n
    15{
    \n
    16
    \n
    17 namespace GeoGrid
    \n
    18 {
    \n
    19
    \n@@ -687,15 +687,15 @@\n
    868 };
    \n
    869
    \n
    870 } // namespace GeoGrid
    \n
    871
    \n
    872} // namespace Dune
    \n
    873
    \n
    874#endif // #ifndef DUNE_GEOGRID_ENTITY_HH
    \n-\n+\n
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n
    @ FrontEntity
    on boundary between overlap and ghost
    Definition: gridenums.hh:34
    \n
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n
    @ OverlapEntity
    all entities lying in the overlap zone
    Definition: gridenums.hh:33
    \n
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07244.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07244.html", "unified_diff": "@@ -68,16 +68,16 @@\n
    \n \n
    albertagrid/entityseed.hh File Reference
    \n
    \n

    \n Classes

    class  Dune::GeoGrid::EntityBase< codim, Grid, false >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07244_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07244_source.html", "unified_diff": "@@ -72,16 +72,16 @@\n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_ENTITYSEED_HH
    \n
    6#define DUNE_ALBERTA_ENTITYSEED_HH
    \n
    7
    \n-\n-\n+\n+\n
    10
    \n
    11namespace Dune
    \n
    12{
    \n
    13
    \n
    14 // Internal Forward Declarations
    \n
    15 // -----------------------------
    \n
    16
    \n@@ -183,16 +183,16 @@\n
    112 };
    \n
    113
    \n
    114#endif // #if HAVE_ALBERTA
    \n
    115
    \n
    116} // end namespace Dune
    \n
    117
    \n
    118#endif // #ifndef DUNE_ALBERTA_ENTITYSEED_HH
    \n-
    provides a wrapper for ALBERTA's mesh structure
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's mesh structure
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n \n \n
    Definition: albertagrid/entityseed.hh:18
    \n
    ElementInfo elementInfo(const MeshPointer &mesh) const
    Definition: albertagrid/entityseed.hh:65
    \n
    AlbertaGridEntitySeed(const ElementInfo &elementInfo, int subEntity)
    Definition: albertagrid/entityseed.hh:55
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -128,18 +128,18 @@\n 112 };\n 113\n 114#endif // #if HAVE_ALBERTA\n 115\n 116} // end namespace Dune\n 117\n 118#endif // #ifndef DUNE_ALBERTA_ENTITYSEED_HH\n-meshpointer.hh\n-provides a wrapper for ALBERTA's mesh structure\n elementinfo.hh\n provides a wrapper for ALBERTA's el_info structure\n+meshpointer.hh\n+provides a wrapper for ALBERTA's mesh structure\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::AlbertaGrid\n [ provides Dune::Grid ]\n Definition: agrid.hh:109\n Dune::Alberta::MeshPointer<_dimension_>\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07253.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07253.html", "unified_diff": "@@ -69,16 +69,16 @@\n \n
    albertagrid/geometry.hh File Reference
    \n
    \n

    \n Classes

    class  Dune::AlbertaGridEntitySeed< codim, const AlbertaGrid< dim, dimworld > >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07253_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07253_source.html", "unified_diff": "@@ -73,16 +73,16 @@\n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_GEOMETRY_HH
    \n
    6#define DUNE_ALBERTA_GEOMETRY_HH
    \n
    7
    \n \n-\n-\n+\n+\n
    11
    \n
    12#if HAVE_ALBERTA
    \n
    13
    \n
    14namespace Dune
    \n
    15{
    \n
    16
    \n
    17 // Forward Declarations
    \n@@ -584,16 +584,16 @@\n
    588 };
    \n
    589
    \n
    590} // namespace Dune
    \n
    591
    \n
    592#endif // #if HAVE_ALBERTA
    \n
    593
    \n
    594#endif // #ifndef DUNE_ALBERTA_GEOMETRY_HH
    \n-\n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    provides a wrapper for ALBERTA's el_info structure
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n
    static K determinant(const FieldMatrix< K, 0, m > &matrix)
    Definition: algebra.hh:30
    \n
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -539,17 +539,17 @@\n 588 };\n 589\n 590} // namespace Dune\n 591\n 592#endif // #if HAVE_ALBERTA\n 593\n 594#endif // #ifndef DUNE_ALBERTA_GEOMETRY_HH\n-misc.hh\n elementinfo.hh\n provides a wrapper for ALBERTA's el_info structure\n+misc.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::Alberta::abs\n void abs(const DofVectorPointer< int > &dofVector)\n Definition: dofvector.hh:328\n Dune::Alberta::Real\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07259.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07259.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    \n
    #include <utility>
    \n #include <dune/common/typetraits.hh>
    \n #include <dune/geometry/multilineargeometry.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n #include <dune/geometry/type.hh>
    \n #include <dune/grid/common/capabilities.hh>
    \n-#include <dune/grid/geometrygrid/cornerstorage.hh>
    \n+#include <dune/grid/geometrygrid/cornerstorage.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    struct  Dune::AlbertaGridCoordinateReader< codim, GridImp >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07259_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07259_source.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    10#include <dune/common/typetraits.hh>
    \n
    11
    \n
    12#include <dune/geometry/multilineargeometry.hh>
    \n
    13#include <dune/geometry/referenceelements.hh>
    \n
    14#include <dune/geometry/type.hh>
    \n
    15
    \n \n-\n+\n
    18
    \n
    19namespace Dune
    \n
    20{
    \n
    21
    \n
    22 namespace GeoGrid
    \n
    23 {
    \n
    24
    \n@@ -291,15 +291,15 @@\n
    220 };
    \n
    221
    \n
    222 } // namespace GeoGrid
    \n
    223
    \n
    224} // namespace Dune
    \n
    225
    \n
    226#endif // #ifndef DUNE_GEOGRID_GEOMETRY_HH
    \n-\n+\n
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    Definition: cornerstorage.hh:22
    \n
    Definition: cornerstorage.hh:174
    \n
    Definition: geometrygrid/geometry.hh:30
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07262.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07262.html", "unified_diff": "@@ -78,15 +78,15 @@\n
    #include <algorithm>
    \n #include <array>
    \n #include <limits>
    \n #include <map>
    \n #include <memory>
    \n #include <dune/geometry/referenceelements.hh>
    \n #include <dune/grid/common/gridfactory.hh>
    \n-#include <dune/grid/albertagrid/agrid.hh>
    \n+#include <dune/grid/albertagrid/agrid.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    struct  Dune::GeoGrid::InferHasSingleGeometryType< hasSingleGeometryType, dim, mydim >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07262_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07262_source.html", "unified_diff": "@@ -83,15 +83,15 @@\n
    17#include <map>
    \n
    18#include <memory>
    \n
    19
    \n
    20#include <dune/geometry/referenceelements.hh>
    \n
    21
    \n \n
    23
    \n-\n+\n
    25
    \n
    26#if HAVE_ALBERTA
    \n
    27
    \n
    28namespace Dune
    \n
    29{
    \n
    30
    \n
    48 template< int dim, int dimworld >
    \n@@ -491,15 +491,15 @@\n
    541 };
    \n
    542
    \n
    543}
    \n
    544
    \n
    545#endif // #if HAVE_ALBERTA
    \n
    546
    \n
    547#endif // #ifndef DUNE_ALBERTA_GRIDFACTORY_HH
    \n-
    provides the AlbertaGrid class
    \n+
    provides the AlbertaGrid class
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n
    ALBERTA REAL_DD GlobalMatrix
    Definition: misc.hh:51
    \n
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07265.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07265.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    #include <memory>
    \n #include <vector>
    \n #include <dune/common/deprecated.hh>
    \n #include <dune/common/function.hh>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/common/parallel/mpihelper.hh>
    \n #include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/boundarysegment.hh>
    \n+#include <dune/grid/common/boundarysegment.hh>
    \n #include <dune/grid/common/grid.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GridFactory< AlbertaGrid< dim, dimworld > >
     specialization of the generic GridFactory for AlbertaGrid More...
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07265_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07265_source.html", "unified_diff": "@@ -83,15 +83,15 @@\n
    16#define DUNE_FUNCTION_HH_SILENCE_DEPRECATION
    \n
    17#include <dune/common/function.hh>
    \n
    18#include <dune/common/fvector.hh>
    \n
    19#include <dune/common/parallel/mpihelper.hh>
    \n
    20
    \n
    21#include <dune/geometry/type.hh>
    \n
    22
    \n-\n+\n \n
    25
    \n
    26namespace Dune
    \n
    27{
    \n
    28
    \n
    71 template <class GridType>
    \n \n@@ -237,15 +237,15 @@\n
    374 }
    \n
    375
    \n
    376 };
    \n
    377
    \n
    378}
    \n
    379
    \n
    380#endif
    \n-
    Base class for grid boundary segments of arbitrary geometry.
    \n+
    Base class for grid boundary segments of arbitrary geometry.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Base class for classes implementing geometries of boundary segments.
    Definition: boundarysegment.hh:94
    \n
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n
    Provide a generic factory class for unstructured grids.
    Definition: common/gridfactory.hh:73
    \n
    virtual void insertBoundarySegment(const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment)
    insert an arbitrarily shaped boundary segment
    Definition: common/gridfactory.hh:192
    \n
    virtual unsigned int insertionIndex(const typename Codim< 0 >::Entity &entity) const
    obtain an element's insertion index
    Definition: common/gridfactory.hh:220
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07268.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07268.html", "unified_diff": "@@ -76,18 +76,18 @@\n

    provides the GridFamily for AlbertaGrid \n More...

    \n \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GridFactoryInterface< GridType >
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07268_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07268_source.html", "unified_diff": "@@ -78,19 +78,19 @@\n
    7
    \n
    13#include <dune/common/parallel/communication.hh>
    \n
    14
    \n \n \n \n \n-\n+\n
    20
    \n-\n+\n \n-\n+\n
    24
    \n
    25#if HAVE_ALBERTA
    \n
    26
    \n
    27namespace Dune
    \n
    28{
    \n
    29
    \n
    30 // External Forward Declarations
    \n@@ -219,17 +219,17 @@\n
    156 };
    \n
    157
    \n
    158}
    \n
    159
    \n
    160#endif // #if HAVE_ALBERTA
    \n
    161
    \n
    162#endif // #ifndef DUNE_ALBERTAGRID_GRIDFAMILTY_HH
    \n-\n-\n-
    Wrapper and interface classes for element geometries.
    \n+\n+
    Wrapper and interface classes for element geometries.
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n \n
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n
    Definition: hierarchiciterator.hh:29
    \n
    Definition: albertagrid/intersection.hh:105
    \n
    Definition: albertagrid/intersectioniterator.hh:27
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -178,17 +178,17 @@\n 157\n 158}\n 159\n 160#endif // #if HAVE_ALBERTA\n 161\n 162#endif // #ifndef DUNE_ALBERTAGRID_GRIDFAMILTY_HH\n entityiterator.hh\n-misc.hh\n geometryreference.hh\n Wrapper and interface classes for element geometries.\n+misc.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::Alberta::Real\n ALBERTA REAL Real\n Definition: misc.hh:48\n Dune::AlbertaGrid<_dim,_dimworld_>\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07271.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07271.html", "unified_diff": "@@ -70,23 +70,23 @@\n Classes |\n Namespaces\n
    geometrygrid/gridfamily.hh File Reference
    \n \n

    \n Classes

    struct  Dune::AlbertaGridFamily< dim, dimworld >
     
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07271_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07271_source.html", "unified_diff": "@@ -74,23 +74,23 @@\n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GEOGRID_GRIDFAMILY_HH
    \n
    6#define DUNE_GEOGRID_GRIDFAMILY_HH
    \n
    7
    \n \n \n-\n+\n \n \n \n \n \n \n-\n-\n+\n+\n \n
    20
    \n
    21namespace Dune
    \n
    22{
    \n
    23
    \n
    27 namespace GeoGrid
    \n
    28 {
    \n@@ -187,17 +187,17 @@\n
    122 };
    \n
    123
    \n
    124 } // namespace GeoGrid
    \n
    125
    \n
    126} // namespace Dune
    \n
    127
    \n
    128#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH
    \n-\n-\n-\n+\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n
    interface class for an iterator over grid entities
    Definition: entityiterator.hh:32
    \n
    Store a reference to an entity with a minimal memory footprint.
    Definition: common/entityseed.hh:26
    \n
    Wrapper class for geometries.
    Definition: common/geometry.hh:71
    \n
    Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
    Definition: common/intersectioniterator.hh:83
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -153,17 +153,17 @@\n 122 };\n 123\n 124 } // namespace GeoGrid\n 125\n 126} // namespace Dune\n 127\n 128#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH\n+idset.hh\n declaration.hh\n iterator.hh\n-idset.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::Intersection\n Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n element or with the d...\n Definition: common/intersection.hh:164\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07277.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07277.html", "unified_diff": "@@ -73,16 +73,16 @@\n \n
    \n
    #include <typeinfo>
    \n #include <dune/common/std/type_traits.hh>
    \n #include <dune/common/iteratorrange.hh>
    \n #include <dune/common/parallel/future.hh>
    \n #include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n-#include <dune/grid/common/rangegenerators.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/grid/common/rangegenerators.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GeoGrid::ExportParams< HG, CF >
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07277_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07277_source.html", "unified_diff": "@@ -80,16 +80,16 @@\n
    9
    \n
    10#include <dune/common/std/type_traits.hh>
    \n
    11#include <dune/common/iteratorrange.hh>
    \n
    12#include <dune/common/parallel/future.hh>
    \n
    13
    \n
    14#include <dune/geometry/type.hh>
    \n
    15
    \n-\n-\n+\n+\n
    18
    \n
    19namespace Dune
    \n
    20{
    \n
    21
    \n
    22 template< int, int, class, class >
    \n
    23 class GridDefaultImplementation;
    \n
    24
    \n@@ -336,16 +336,16 @@\n
    376
    \n \n
    378 };
    \n
    379
    \n
    380} // namespace Dune
    \n
    381
    \n
    382#endif // #ifndef DUNE_GRID_COMMON_GRIDVIEW_HH
    \n-\n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+\n
    CommunicationDirection
    Define a type for communication direction parameter.
    Definition: gridenums.hh:170
    \n
    InterfaceType
    Parameter to be used for the communication functions.
    Definition: gridenums.hh:86
    \n
    const IndexSet & indexSet() const
    obtain the index set
    Definition: common/gridview.hh:191
    \n
    Traits::Grid Grid
    type of the grid
    Definition: common/gridview.hh:83
    \n
    ThisType & operator=(const ThisType &other)
    assignment operator
    Definition: common/gridview.hh:172
    \n
    Codim< cd >::Iterator begin() const
    obtain begin iterator for this view
    Definition: common/gridview.hh:237
    \n
    const Grid & grid() const
    obtain a const reference to the underlying hierarchic grid
    Definition: common/gridview.hh:180
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -288,18 +288,18 @@\n 376\n 377 Implementation impl_;\n 378 };\n 379\n 380} // namespace Dune\n 381\n 382#endif // #ifndef DUNE_GRID_COMMON_GRIDVIEW_HH\n-rangegenerators.hh\n datahandleif.hh\n Describes the parallel communication interface class for MessageBuffers and\n DataHandles.\n+rangegenerators.hh\n Dune::CommunicationDirection\n CommunicationDirection\n Define a type for communication direction parameter.\n Definition: gridenums.hh:170\n Dune::InterfaceType\n InterfaceType\n Parameter to be used for the communication functions.\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07280.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07280.html", "unified_diff": "@@ -76,15 +76,15 @@\n #include <dune/common/exceptions.hh>
    \n #include <dune/grid/common/capabilities.hh>
    \n #include <dune/grid/common/gridview.hh>
    \n #include <dune/grid/geometrygrid/datahandle.hh>
    \n #include <dune/grid/geometrygrid/indexsets.hh>
    \n #include <dune/grid/geometrygrid/intersection.hh>
    \n #include <dune/grid/geometrygrid/intersectioniterator.hh>
    \n-#include <dune/grid/geometrygrid/iterator.hh>
    \n+#include <dune/grid/geometrygrid/iterator.hh>
    \n \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GridView< ViewTraits >
     Grid view abstract base class. More...
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07280_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07280_source.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    10
    \n \n \n \n \n \n \n-\n+\n
    18
    \n
    19namespace Dune
    \n
    20{
    \n
    21
    \n
    22 namespace GeoGrid
    \n
    23 {
    \n
    24
    \n@@ -316,15 +316,15 @@\n
    251 };
    \n
    252
    \n
    253 } // namespace GeoGrid
    \n
    254
    \n
    255} // namespace Dune
    \n
    256
    \n
    257#endif // #ifndef DUNE_GEOGRID_GRIDVIEW_HH
    \n-\n+\n
    CommunicationDirection
    Define a type for communication direction parameter.
    Definition: gridenums.hh:170
    \n
    InterfaceType
    Parameter to be used for the communication functions.
    Definition: gridenums.hh:86
    \n
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    @ conforming
    Output conforming data.
    Definition: common.hh:73
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07283.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07283.html", "unified_diff": "@@ -74,20 +74,20 @@\n \n
    \n
    #include <array>
    \n #include <utility>
    \n #include <dune/common/hybridutilities.hh>
    \n #include <dune/common/stdstreams.hh>
    \n #include <dune/grid/common/grid.hh>
    \n-#include <dune/grid/common/indexidset.hh>
    \n-#include <dune/grid/albertagrid/indexstack.hh>
    \n-#include <dune/grid/albertagrid/misc.hh>
    \n-#include <dune/grid/albertagrid/dofadmin.hh>
    \n-#include <dune/grid/albertagrid/dofvector.hh>
    \n-#include <dune/grid/albertagrid/elementinfo.hh>
    \n+#include <dune/grid/common/indexidset.hh>
    \n+#include <dune/grid/albertagrid/indexstack.hh>
    \n+#include <dune/grid/albertagrid/misc.hh>
    \n+#include <dune/grid/albertagrid/dofadmin.hh>
    \n+#include <dune/grid/albertagrid/dofvector.hh>
    \n+#include <dune/grid/albertagrid/elementinfo.hh>
    \n #include <dune/grid/albertagrid/gridfamily.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GeoGrid::GridViewTraits< HGV, CoordFunction, Allocator >
     
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07283_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07283_source.html", "unified_diff": "@@ -79,21 +79,21 @@\n
    8#include <array>
    \n
    9#include <utility>
    \n
    10
    \n
    11#include <dune/common/hybridutilities.hh>
    \n
    12#include <dune/common/stdstreams.hh>
    \n
    13
    \n \n-\n+\n
    16
    \n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n \n
    23
    \n
    24#if HAVE_ALBERTA
    \n
    25
    \n
    26namespace Dune
    \n
    27{
    \n
    28
    \n@@ -647,20 +647,20 @@\n
    601 };
    \n
    602
    \n
    603} // namespace Dune
    \n
    604
    \n
    605#endif // #if HAVE_ALBERTA
    \n
    606
    \n
    607#endif // #ifndef DUNE_ALBERTAGRIDINDEXSETS_HH
    \n-
    Provides base classes for index and id sets.
    \n-\n-\n-\n-
    Provides an index stack that supplies indices for element numbering for a grid (i....
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+
    Provides base classes for index and id sets.
    \n+\n+
    provides a wrapper for ALBERTA's el_info structure
    \n+\n+
    Provides an index stack that supplies indices for element numbering for a grid (i....
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Dune::IndexStack< int, 100000 > IndexStack
    Definition: albertagrid/indexsets.hh:31
    \n
    ALBERTA EL Element
    Definition: misc.hh:54
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n
    static const int dimension
    Definition: agrid.hh:145
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -619,21 +619,21 @@\n 604\n 605#endif // #if HAVE_ALBERTA\n 606\n 607#endif // #ifndef DUNE_ALBERTAGRIDINDEXSETS_HH\n indexidset.hh\n Provides base classes for index and id sets.\n dofadmin.hh\n-misc.hh\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n dofvector.hh\n indexstack.hh\n Provides an index stack that supplies indices for element numbering for a grid\n (i....\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n+misc.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::Alberta::IndexStack\n Dune::IndexStack< int, 100000 > IndexStack\n Definition: albertagrid/indexsets.hh:31\n Dune::Alberta::Element\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07286.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07286.html", "unified_diff": "@@ -70,17 +70,17 @@\n Classes |\n Namespaces\n
    geometrygrid/indexsets.hh File Reference
    \n \n
    \n
    #include <vector>
    \n #include <dune/common/typetraits.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n-#include <dune/grid/common/indexidset.hh>
    \n-#include <dune/grid/geometrygrid/declaration.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/indexidset.hh>
    \n+#include <dune/grid/geometrygrid/declaration.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::AlbertaGridHierarchicIndexSet< dim, dimworld >
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07286_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07286_source.html", "unified_diff": "@@ -76,18 +76,18 @@\n
    5#ifndef DUNE_GEOGRID_INDEXSETS_HH
    \n
    6#define DUNE_GEOGRID_INDEXSETS_HH
    \n
    7
    \n
    8#include <vector>
    \n
    9
    \n
    10#include <dune/common/typetraits.hh>
    \n
    11
    \n-\n-\n+\n+\n
    14
    \n-\n+\n
    16
    \n
    17namespace Dune
    \n
    18{
    \n
    19
    \n
    20 namespace GeoGrid
    \n
    21 {
    \n
    22
    \n@@ -179,17 +179,17 @@\n
    108 };
    \n
    109
    \n
    110 } // namespace GeoGrid
    \n
    111
    \n
    112} // namespace Dune
    \n
    113
    \n
    114#endif // #ifndef DUNE_GEOGRID_INDEXSETS_HH
    \n-\n-
    Provides base classes for index and id sets.
    \n-\n+
    Provides base classes for index and id sets.
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Index Set Interface base class.
    Definition: indexidset.hh:78
    \n
    IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
    Map a subentity to an index.
    Definition: indexidset.hh:153
    \n
    TypesImp Types
    iterator range for geometry types in domain
    Definition: indexidset.hh:95
    \n
    IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
    Map entity to index. The result of calling this method with an entity that is not in the index set is...
    Definition: indexidset.hh:113
    \n
    IndexTypeImp IndexType
    The type used for the indices.
    Definition: indexidset.hh:92
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -128,17 +128,17 @@\n 108 };\n 109\n 110 } // namespace GeoGrid\n 111\n 112} // namespace Dune\n 113\n 114#endif // #ifndef DUNE_GEOGRID_INDEXSETS_HH\n-gridenums.hh\n indexidset.hh\n Provides base classes for index and id sets.\n+gridenums.hh\n declaration.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::VTK::GeometryType\n GeometryType\n Type representing VTK's entity geometry types.\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07289.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07289.html", "unified_diff": "@@ -69,16 +69,16 @@\n \n
    albertagrid/intersection.hh File Reference
    \n \n

    \n Classes

    class  Dune::GeoGrid::IndexSet< Grid, HostIndexSet >
     
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07289_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07289_source.html", "unified_diff": "@@ -74,16 +74,16 @@\n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_INTERSECTION_HH
    \n
    6#define DUNE_ALBERTA_INTERSECTION_HH
    \n
    7
    \n \n
    9
    \n-\n-\n+\n+\n \n
    13
    \n
    14#if HAVE_ALBERTA
    \n
    15
    \n
    16namespace Dune
    \n
    17{
    \n
    18
    \n@@ -255,16 +255,16 @@\n
    184 };
    \n
    185
    \n
    186} // namespace Dune
    \n
    187
    \n
    188#endif // #if HAVE_ALBERTA
    \n
    189
    \n
    190#endif // #ifndef DUNE_ALBERTA_INTERSECTION_HH
    \n-\n-
    provides a wrapper for ALBERTA's el_info structure
    \n+\n+
    provides a wrapper for ALBERTA's el_info structure
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n \n
    int twistInNeighbor(int face) const
    Definition: elementinfo.hh:612
    \n
    Definition: albertagrid/intersection.hh:105
    \n
    LocalGeometry geometryInOutside() const
    Definition: intersection.cc:402
    \n
    GridImp::template Codim< 0 >::Entity outside() const
    Definition: intersection.cc:365
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07295.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07295.html", "unified_diff": "@@ -68,16 +68,16 @@\n
    \n \n
    geometrygrid/intersection.hh File Reference
    \n
    \n

    \n Classes

    class  Dune::AlbertaGridIntersectionBase< Grid >
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07295_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07295_source.html", "unified_diff": "@@ -72,16 +72,16 @@\n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GEOGRID_INTERSECTION_HH
    \n
    6#define DUNE_GEOGRID_INTERSECTION_HH
    \n
    7
    \n-\n-\n+\n+\n
    10
    \n
    11namespace Dune
    \n
    12{
    \n
    13
    \n
    14 namespace GeoGrid
    \n
    15 {
    \n
    16
    \n@@ -256,16 +256,16 @@\n
    185 };
    \n
    186
    \n
    187 } // namespace GeoGrid
    \n
    188
    \n
    189} // namespace Dune
    \n
    190
    \n
    191#endif // #ifndef DUNE_GEOGRID_INTERSECTION_HH
    \n-\n-\n+\n+\n
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
    Definition: common/geometry.hh:558
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    Definition: cornerstorage.hh:123
    \n
    Definition: geometrygrid/intersection.hh:22
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -210,16 +210,16 @@\n 185 };\n 186\n 187 } // namespace GeoGrid\n 188\n 189} // namespace Dune\n 190\n 191#endif // #ifndef DUNE_GEOGRID_INTERSECTION_HH\n-declaration.hh\n cornerstorage.hh\n+declaration.hh\n std\n STL namespace.\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::referenceElement\n auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo)\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07307.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07307.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    albertagrid/persistentcontainer.hh File Reference
    \n
    \n

    \n Classes

    class  Dune::GeoGrid::Intersection< Grid, HostIntersection >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07307_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07307_source.html", "unified_diff": "@@ -75,15 +75,15 @@\n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_PERSISTENTCONTAINER_HH
    \n
    6#define DUNE_ALBERTA_PERSISTENTCONTAINER_HH
    \n
    7
    \n \n
    9
    \n
    10#if HAVE_ALBERTA
    \n-\n+\n
    12
    \n
    13namespace Dune
    \n
    14{
    \n
    15
    \n
    16 // PersistentContainer for AlbertaGrid
    \n
    17 // -----------------------------------
    \n
    18
    \n@@ -103,15 +103,15 @@\n
    32 };
    \n
    33
    \n
    34} // end namespace Dune
    \n
    35
    \n
    36#endif // #if HAVE_ALBERTA
    \n
    37
    \n
    38#endif // #ifndef DUNE_ALU_PERSISTENTCONTAINER_HH
    \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n
    PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
    Definition: albertagrid/persistentcontainer.hh:29
    \n
    Base::Grid Grid
    Definition: albertagrid/persistentcontainer.hh:26
    \n
    Base::Value Value
    Definition: albertagrid/persistentcontainer.hh:27
    \n
    A class for storing data during an adaptation cycle.
    Definition: utility/persistentcontainer.hh:22
    \n
    Base::Value Value
    Definition: utility/persistentcontainer.hh:27
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07310.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07310.html", "unified_diff": "@@ -68,17 +68,17 @@\n
    \n \n
    geometrygrid/persistentcontainer.hh File Reference
    \n
    \n

    \n Classes

    class  Dune::PersistentContainer< AlbertaGrid< dim, dimworld >, T >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07310_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07310_source.html", "unified_diff": "@@ -72,17 +72,17 @@\n Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GEOGRID_PERSISTENTCONTAINER_HH
    \n
    6#define DUNE_GEOGRID_PERSISTENTCONTAINER_HH
    \n
    7
    \n-\n+\n \n-\n+\n
    11
    \n
    12namespace Dune
    \n
    13{
    \n
    14
    \n
    15 // PersistentContainer for GeometryGrid
    \n
    16 // ------------------------------------
    \n
    17
    \n@@ -100,16 +100,16 @@\n
    29 : Base( grid, codim, value )
    \n
    30 {}
    \n
    31 };
    \n
    32
    \n
    33} // namespace Dune
    \n
    34
    \n
    35#endif // #ifndef DUNE_GEOGRID_PERSISTENTCONTAINER_HH
    \n-\n-\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    grid wrapper replacing the geometries
    Definition: geometrygrid/grid.hh:86
    \n
    Base::Value Value
    Definition: geometrygrid/persistentcontainer.hh:26
    \n
    Base::Grid Grid
    Definition: geometrygrid/persistentcontainer.hh:25
    \n
    PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
    Definition: geometrygrid/persistentcontainer.hh:28
    \n
    A class for storing data during an adaptation cycle.
    Definition: utility/persistentcontainer.hh:22
    \n
    Base::Value Value
    Definition: utility/persistentcontainer.hh:27
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07313.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07313.html", "unified_diff": "@@ -70,15 +70,15 @@\n Classes |\n Namespaces |\n Functions
    \n
    utility/persistentcontainer.hh File Reference
    \n \n

    \n Classes

    class  Dune::PersistentContainer< GeometryGrid< HostGrid, CoordFunction, Allocator >, T >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07313_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07313_source.html", "unified_diff": "@@ -74,15 +74,15 @@\n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_PERSISTENTCONTAINER_HH
    \n
    6#define DUNE_PERSISTENTCONTAINER_HH
    \n
    7
    \n
    8#include <map>
    \n
    9
    \n-\n+\n
    11
    \n
    12namespace Dune
    \n
    13{
    \n
    14
    \n
    19 template< class G, class T >
    \n \n
    21 : public PersistentContainerMap< G, typename G::LocalIdSet, std::map< typename G::LocalIdSet::IdType, T > >
    \n@@ -150,15 +150,15 @@\n
    84 {
    \n
    85 a.swap( b );
    \n
    86 }
    \n
    87
    \n
    88} // namespace std
    \n
    89
    \n
    90#endif // #ifndef DUNE_PERSISTENTCONTAINER_HH
    \n-\n+\n
    STL namespace.
    \n
    void swap(Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)
    Definition: utility/persistentcontainer.hh:83
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    A class for storing data during an adaptation cycle.
    Definition: utility/persistentcontainer.hh:22
    \n
    Base::Value Value
    Definition: utility/persistentcontainer.hh:27
    \n
    Base::Grid Grid
    Definition: utility/persistentcontainer.hh:26
    \n
    PersistentContainer(const Grid &grid, int codim, const Value &value=Value())
    Definition: utility/persistentcontainer.hh:29
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07316.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07316.html", "unified_diff": "@@ -69,17 +69,17 @@\n \n
    albertagrid/projection.hh File Reference
    \n \n

    \n Classes

    class  Dune::PersistentContainer< G, T >
     A class for storing data during an adaptation cycle. More...
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07316_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07316_source.html", "unified_diff": "@@ -74,18 +74,18 @@\n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_NODEPROJECTION_HH
    \n
    6#define DUNE_ALBERTA_NODEPROJECTION_HH
    \n
    7
    \n
    8#include <memory>
    \n
    9
    \n-\n+\n
    11
    \n-\n-\n+\n+\n
    14
    \n
    15#if HAVE_ALBERTA
    \n
    16
    \n
    17namespace Dune
    \n
    18{
    \n
    19
    \n
    20 namespace Alberta
    \n@@ -271,15 +271,15 @@\n
    200
    \n
    201
    \n
    202
    \n
    203 // BasicNodeProjection
    \n
    204 // -------------------
    \n
    205
    \n \n-
    207 : public ALBERTA NODE_PROJECTION
    \n+
    207 : public ALBERTA NODE_PROJECTION
    \n
    208 {
    \n
    209 explicit BasicNodeProjection ( unsigned int boundaryIndex )
    \n
    210 : boundaryIndex_( boundaryIndex )
    \n
    211 {
    \n
    212 func = 0;
    \n
    213 }
    \n
    214
    \n@@ -341,18 +341,18 @@\n
    270 }
    \n
    271
    \n
    272}
    \n
    273
    \n
    274#endif // #if HAVE_ALBERTA
    \n
    275
    \n
    276#endif // #ifndef DUNE_ALBERTA_NODEPROJECTION_HH
    \n-\n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-
    provides a wrapper for ALBERTA's el_info structure
    \n+\n+
    provides a wrapper for ALBERTA's el_info structure
    \n+\n+
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    ALBERTA REAL_B LocalVector
    Definition: misc.hh:49
    \n
    static const int dimWorld
    Definition: misc.hh:46
    \n
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n \n
    static ElementInfo createFake(const MeshPointer &mesh, const Element *element, int level, int type=0)
    Definition: elementinfo.hh:752
    \n
    Definition: misc.hh:231
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -293,20 +293,20 @@\n 271\n 272}\n 273\n 274#endif // #if HAVE_ALBERTA\n 275\n 276#endif // #ifndef DUNE_ALBERTA_NODEPROJECTION_HH\n boundaryprojection.hh\n+elementinfo.hh\n+provides a wrapper for ALBERTA's el_info structure\n misc.hh\n ALBERTA\n #define ALBERTA\n Definition: albertaheader.hh:29\n-elementinfo.hh\n-provides a wrapper for ALBERTA's el_info structure\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::Alberta::LocalVector\n ALBERTA REAL_B LocalVector\n Definition: misc.hh:49\n Dune::Alberta::dimWorld\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07319.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07319.html", "unified_diff": "@@ -70,16 +70,16 @@\n Classes |\n Namespaces |\n Functions\n
    io/file/dgfparser/blocks/projection.hh File Reference
    \n \n

    \n Classes

    class  Dune::Alberta::DuneBoundaryProjection< dim >
     
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07319_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07319_source.html", "unified_diff": "@@ -74,16 +74,16 @@\n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_DGF_PROJECTIONBLOCK_HH
    \n
    6#define DUNE_DGF_PROJECTIONBLOCK_HH
    \n
    7
    \n
    8#include <map>
    \n
    9
    \n-\n-\n+\n+\n
    12
    \n
    13namespace Dune
    \n
    14{
    \n
    15
    \n
    16 namespace dgf
    \n
    17 {
    \n
    18
    \n@@ -321,16 +321,16 @@\n
    250 }
    \n
    251
    \n
    252 }
    \n
    253
    \n
    254}
    \n
    255
    \n
    256#endif // #ifndef DUNE_DGF_PROJECTIONBLOCK_HH
    \n-\n-\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
    Definition: interval.hh:123
    \n
    Interface class for vertex projection at the boundary.
    Definition: boundaryprojection.hh:33
    \n
    BaseType::ObjectStreamType ObjectStreamType
    Definition: boundaryprojection.hh:36
    \n
    FieldVector< double, dimworld > CoordinateType
    type of coordinate vector
    Definition: boundaryprojection.hh:42
    \n
    Definition: basic.hh:31
    \n
    std::stringstream line
    Definition: basic.hh:47
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07322.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07322.html", "unified_diff": "@@ -78,15 +78,15 @@\n
    #include <array>
    \n #include <memory>
    \n #include <vector>
    \n #include <tuple>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/grid/common/gridfactory.hh>
    \n-#include <dune/grid/utility/multiindex.hh>
    \n+#include <dune/grid/utility/multiindex.hh>
    \n #include <dune/grid/utility/structuredgridfactory.hh>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::dgf::ProjectionBlock
     
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07322_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07322_source.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    15#include <memory>
    \n
    16#include <vector>
    \n
    17#include <tuple>
    \n
    18
    \n
    19#include <dune/common/exceptions.hh>
    \n
    20#include <dune/common/fvector.hh>
    \n \n-\n+\n \n
    24
    \n
    25#if HAVE_ALBERTA
    \n
    26
    \n
    27namespace Dune
    \n
    28{
    \n
    29 // Forward Declarations
    \n@@ -258,15 +258,15 @@\n
    224 };
    \n
    225
    \n
    226} // end namespace Dune
    \n
    227
    \n
    228#endif // HAVE_ALBERTA
    \n
    229
    \n
    230#endif // DUNE_ALBERTA_STRUCTUREDGRIDFACTORY_HH
    \n-
    Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
    \n+
    Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    [ provides Dune::Grid ]
    Definition: agrid.hh:109
    \n
    GridFamily::ctype ctype
    Definition: agrid.hh:143
    \n
    Construct structured cube and simplex grids in unstructured grid managers.
    Definition: utility/structuredgridfactory.hh:31
    \n
    static void createSimplexGrid(GridFactory< GridType > &factory, const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    insert structured simplex grid into grid factory
    Definition: utility/structuredgridfactory.hh:181
    \n
    static std::array< unsigned int, dim > computeUnitOffsets(const std::array< unsigned int, dim > &vertices)
    Definition: albertagrid/structuredgridfactory.hh:110
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07325.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07325.html", "unified_diff": "@@ -80,15 +80,15 @@\n #include <cstddef>
    \n #include <cstdlib>
    \n #include <memory>
    \n #include <dune/common/classname.hh>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/grid/common/gridfactory.hh>
    \n-#include <dune/grid/utility/multiindex.hh>
    \n+#include <dune/grid/utility/multiindex.hh>
    \n \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::StructuredGridFactory< AlbertaGrid< dim, dimworld > >
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07325_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07325_source.html", "unified_diff": "@@ -83,15 +83,15 @@\n
    16#include <memory>
    \n
    17
    \n
    18#include <dune/common/classname.hh>
    \n
    19#include <dune/common/exceptions.hh>
    \n
    20#include <dune/common/fvector.hh>
    \n
    21
    \n \n-\n+\n
    24
    \n
    25namespace Dune {
    \n
    26
    \n
    29 template <class GridType>
    \n \n
    31 {
    \n
    32 typedef typename GridType::ctype ctype;
    \n@@ -277,15 +277,15 @@\n
    259 }
    \n
    260
    \n
    261 };
    \n
    262
    \n
    263} // namespace Dune
    \n
    264
    \n
    265#endif
    \n-
    Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
    \n+
    Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various facto...
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Construct structured cube and simplex grids in unstructured grid managers.
    Definition: utility/structuredgridfactory.hh:31
    \n
    static std::unique_ptr< GridType > createCubeGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    Create a structured cube grid.
    Definition: utility/structuredgridfactory.hh:157
    \n
    static void createSimplexGrid(GridFactory< GridType > &factory, const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    insert structured simplex grid into grid factory
    Definition: utility/structuredgridfactory.hh:181
    \n
    static std::unique_ptr< GridType > createSimplexGrid(const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    Create a structured simplex grid.
    Definition: utility/structuredgridfactory.hh:251
    \n
    static void createCubeGrid(GridFactory< GridType > &factory, const FieldVector< ctype, dimworld > &lowerLeft, const FieldVector< ctype, dimworld > &upperRight, const std::array< unsigned int, dim > &elements)
    insert structured cube grid into grid factory
    Definition: utility/structuredgridfactory.hh:91
    \n
    Communication comm() const
    Return the Communication used by the grid factory.
    Definition: common/gridfactory.hh:297
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07328.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07328.html", "unified_diff": "@@ -79,28 +79,28 @@\n
    #include <iostream>
    \n #include <string>
    \n #include <vector>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/common/typetraits.hh>
    \n #include <dune/common/typeutilities.hh>
    \n #include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n-#include <dune/grid/common/exceptions.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/exceptions.hh>
    \n #include <dune/grid/common/capabilities.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n #include <dune/grid/common/gridview.hh>
    \n-#include <dune/grid/common/defaultgridview.hh>
    \n+#include <dune/grid/common/defaultgridview.hh>
    \n #include <dune/grid/common/entityseed.hh>
    \n #include <dune/common/bartonnackmanifcheck.hh>
    \n #include "geometry.hh"
    \n #include "entity.hh"
    \n #include "intersection.hh"
    \n #include "intersectioniterator.hh"
    \n-#include "entityiterator.hh"
    \n-#include "indexidset.hh"
    \n+#include "entityiterator.hh"
    \n+#include "indexidset.hh"
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::StructuredGridFactory< GridType >
     Construct structured cube and simplex grids in unstructured grid managers. More...
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07328_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07328_source.html", "unified_diff": "@@ -86,20 +86,20 @@\n
    18#include <dune/common/typetraits.hh>
    \n
    19#include <dune/common/typeutilities.hh>
    \n
    20
    \n
    21// dune-geometry includes
    \n
    22#include <dune/geometry/type.hh>
    \n
    23
    \n
    24// local includes
    \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n
    32
    \n
    33// include this file after all other, because other files might undef the
    \n
    34// macros that are defined in that file
    \n
    35#include <dune/common/bartonnackmanifcheck.hh>
    \n
    36
    \n
    37namespace Dune {
    \n@@ -535,24 +535,24 @@\n
    1113 };
    \n
    1114}
    \n
    1115
    \n
    1116#include "geometry.hh"
    \n
    1117#include "entity.hh"
    \n
    1118#include "intersection.hh"
    \n
    1119#include "intersectioniterator.hh"
    \n-
    1120#include "entityiterator.hh"
    \n-
    1121#include "indexidset.hh"
    \n+
    1120#include "entityiterator.hh"
    \n+
    1121#include "indexidset.hh"
    \n
    1122
    \n
    1123#endif // #ifndef DUNE_GRID_COMMON_GRID_HH
    \n-\n-\n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n-\n-\n-
    Provides base classes for index and id sets.
    \n+
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+\n+
    Provides base classes for index and id sets.
    \n+\n+\n+\n
    InterfaceType
    Parameter to be used for the communication functions.
    Definition: gridenums.hh:86
    \n
    Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
    leaf grid view for the given grid
    Definition: common/grid.hh:819
    \n
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n
    Definition: geometryreference.hh:139
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -522,23 +522,23 @@\n 1117#include \"entity.hh\"\n 1118#include \"intersection.hh\"\n 1119#include \"intersectioniterator.hh\"\n 1120#include \"entityiterator.hh\"\n 1121#include \"indexidset.hh\"\n 1122\n 1123#endif // #ifndef DUNE_GRID_COMMON_GRID_HH\n-exceptions.hh\n-gridenums.hh\n datahandleif.hh\n Describes the parallel communication interface class for MessageBuffers and\n DataHandles.\n entityiterator.hh\n-defaultgridview.hh\n indexidset.hh\n Provides base classes for index and id sets.\n+defaultgridview.hh\n+exceptions.hh\n+gridenums.hh\n Dune::InterfaceType\n InterfaceType\n Parameter to be used for the communication functions.\n Definition: gridenums.hh:86\n Dune::leafGridView\n Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid<\n dim, dimworld, ct, GridFamily > &grid)\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07331.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07331.html", "unified_diff": "@@ -75,15 +75,15 @@\n \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::Grid< dim, dimworld, ct, GridFamily >
     Grid abstract base class. More...
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07331_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07331_source.html", "unified_diff": "@@ -82,15 +82,15 @@\n
    11
    \n \n
    13
    \n \n \n \n \n-\n+\n \n
    20
    \n
    21namespace Dune
    \n
    22{
    \n
    23
    \n
    24 // DefaultCoordFunction
    \n
    25 // --------------------
    \n@@ -420,15 +420,15 @@\n \n
    679
    \n
    681 };
    \n
    682
    \n
    683} // namespace Dune
    \n
    684
    \n
    685#endif // #ifndef DUNE_GEOGRID_GRID_HH
    \n-\n+\n
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Implementation & impl()
    access to the underlying implementation
    Definition: common/entity.hh:80
    \n
    Store a reference to an entity with a minimal memory footprint.
    Definition: common/entityseed.hh:26
    \n
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n
    Definition: common/grid.hh:862
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07337.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07337.html", "unified_diff": "@@ -84,15 +84,15 @@\n #include <dune/common/classname.hh>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/common/hybridutilities.hh>
    \n #include <dune/geometry/multilineargeometry.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n #include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n+#include <dune/grid/common/mcmgmapper.hh>
    \n \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::DefaultCoordFunction< HostGrid >
    \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a07337_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a07337_source.html", "unified_diff": "@@ -91,15 +91,15 @@\n
    20#include <dune/common/fvector.hh>
    \n
    21#include <dune/common/hybridutilities.hh>
    \n
    22
    \n
    23#include <dune/geometry/multilineargeometry.hh>
    \n
    24#include <dune/geometry/referenceelements.hh>
    \n
    25#include <dune/geometry/type.hh>
    \n
    26
    \n-\n+\n
    28
    \n
    29namespace Dune {
    \n
    30
    \n
    32 template<class ctype>
    \n
    33 struct EntityInfo {
    \n
    35 std::size_t count;
    \n
    37
    \n@@ -285,15 +285,15 @@\n
    276
    \n
    277 }
    \n
    278
    \n
    279} // namespace Dune
    \n
    280
    \n
    281
    \n
    282#endif // DUNE_GRID_UTILITY_GRIDINFO_HH
    \n-
    Mapper for multiple codim and multiple geometry types.
    \n+
    Mapper for multiple codim and multiple geometry types.
    \n
    STL namespace.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    void fillGridViewInfoSerial(const GV &gv, GridViewInfo< typename GV::ctype > &gridViewInfo)
    fill a GridViewInfo structure from a serial grid
    Definition: utility/gridinfo.hh:214
    \n
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n
    \n-

    albertagrid → common Relation

    \n Classes

    struct  Dune::EntityInfo< ctype >
     Structure to hold statistical information about one type of entity. More...
    File in dune/grid/albertagridIncludes file in dune/grid/common
    agrid.hhadaptcallback.hh
    agrid.hhcommon/grid.hh
    agrid.hhcommon/gridfactory.hh
    agrid.hhsizecache.hh
    albertagrid/backuprestore.hhcommon/backuprestore.hh
    albertagrid/capabilities.hhcommon/capabilities.hh
    albertagrid/datahandle.hhcommon/grid.hh
    albertagrid/dgfparser.hhcommon/intersection.hh
    albertagrid/entity.hhcommon/entity.hh
    albertagrid/geometry.hhcommon/geometry.hh
    albertagrid/gridfactory.hhcommon/gridfactory.hh
    albertagrid/gridfamily.hhcommon/entity.hh
    albertagrid/gridfamily.hhcommon/geometry.hh
    albertagrid/gridfamily.hhcommon/intersection.hh
    albertagrid/gridfamily.hhcommon/intersectioniterator.hh
    albertagrid/gridfamily.hhentityiterator.hh
    albertagrid/gridview.hhcommon/capabilities.hh
    albertagrid/gridview.hhcommon/gridview.hh
    albertagrid/indexsets.hhcommon/grid.hh
    albertagrid/indexsets.hhindexidset.hh
    albertagrid/intersection.hhcommon/intersection.hh
    albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
    albertagrid/projection.hhboundaryprojection.hh
    albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
    albertareader.hhcommon/grid.hh
    albertareader.hhcommon/gridfactory.hh
    geometryreference.hhcommon/geometry.hh
    hierarchiciterator.hhentityiterator.hh
    leafiterator.hhentityiterator.hh
    leveliterator.hhentityiterator.hh
    macrodata.ccexceptions.hh
    \n+

    albertagrid → common Relation

    File in dune/grid/albertagridIncludes file in dune/grid/common
    agrid.hhadaptcallback.hh
    agrid.hhcommon/grid.hh
    agrid.hhcommon/gridfactory.hh
    agrid.hhsizecache.hh
    albertagrid/backuprestore.hhcommon/backuprestore.hh
    albertagrid/capabilities.hhcommon/capabilities.hh
    albertagrid/datahandle.hhcommon/grid.hh
    albertagrid/dgfparser.hhcommon/intersection.hh
    albertagrid/entity.hhcommon/entity.hh
    albertagrid/geometry.hhcommon/geometry.hh
    albertagrid/gridfactory.hhcommon/gridfactory.hh
    albertagrid/gridfamily.hhcommon/entity.hh
    albertagrid/gridfamily.hhcommon/geometry.hh
    albertagrid/gridfamily.hhcommon/intersection.hh
    albertagrid/gridfamily.hhcommon/intersectioniterator.hh
    albertagrid/gridfamily.hhentityiterator.hh
    albertagrid/gridview.hhcommon/capabilities.hh
    albertagrid/gridview.hhcommon/gridview.hh
    albertagrid/indexsets.hhcommon/grid.hh
    albertagrid/indexsets.hhindexidset.hh
    albertagrid/intersection.hhcommon/intersection.hh
    albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
    albertagrid/projection.hhboundaryprojection.hh
    albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
    albertareader.hhcommon/grid.hh
    albertareader.hhcommon/gridfactory.hh
    geometryreference.hhcommon/geometry.hh
    hierarchiciterator.hhentityiterator.hh
    leafiterator.hhentityiterator.hh
    leveliterator.hhentityiterator.hh
    macrodata.ccexceptions.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000012.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000012.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    albertagrid → io Relation

    File in dune/grid/albertagridIncludes file in dune/grid/io
    albertagrid/dgfparser.hhfile / dgfparser / blocks / io/file/dgfparser/blocks/projection.hh
    albertagrid/dgfparser.hhfile / dgfparser / io/file/dgfparser/dgfparser.hh
    albertagrid/dgfparser.hhfile / dgfparser / parser.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000015.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000000_000015.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    albertagrid → utility Relation

    File in dune/grid/albertagridIncludes file in dune/grid/utility
    albertagrid/persistentcontainer.hhpersistentcontainervector.hh
    albertagrid/persistentcontainer.hhutility/persistentcontainer.hh
    albertagrid/structuredgridfactory.hhmultiindex.hh
    albertagrid/structuredgridfactory.hhutility/structuredgridfactory.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000001_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000001_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n
    \n-

    blocks → common Relation

    File in dune/grid/io/file/dgfparser/blocksIncludes file in dune/grid/common
    io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
    \n+

    blocks → common Relation

    File in dune/grid/io/file/dgfparser/blocksIncludes file in dune/grid/common
    io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000002_000012.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000002_000012.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    common → io Relation

    File in dune/grid/commonIncludes file in dune/grid/io
    boundaryprojection.hhfile / gmshreader.hh
    \n+

    common → io Relation

    File in dune/grid/commonIncludes file in dune/grid/io
    boundaryprojection.hhfile / gmshreader.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000001.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000001.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    dgfparser → blocks Relation

    File in dune/grid/io/file/dgfparserIncludes file in dune/grid/io/file/dgfparser/blocks
    dgfgeogrid.hhio/file/dgfparser/blocks/projection.hh
    dgfug.hhgridparameter.hh
    io/file/dgfparser/dgfparser.ccboundarydom.hh
    io/file/dgfparser/dgfparser.hhbasic.hh
    io/file/dgfparser/dgfparser.hhboundarydom.hh
    io/file/dgfparser/dgfparser.hhboundaryseg.hh
    io/file/dgfparser/dgfparser.hhcube.hh
    io/file/dgfparser/dgfparser.hhdim.hh
    io/file/dgfparser/dgfparser.hhgeneral.hh
    io/file/dgfparser/dgfparser.hhgridparameter.hh
    io/file/dgfparser/dgfparser.hhinterval.hh
    io/file/dgfparser/dgfparser.hhio/file/dgfparser/blocks/projection.hh
    io/file/dgfparser/dgfparser.hhperiodicfacetrans.hh
    io/file/dgfparser/dgfparser.hhpolygon.hh
    io/file/dgfparser/dgfparser.hhpolyhedron.hh
    io/file/dgfparser/dgfparser.hhsimplex.hh
    io/file/dgfparser/dgfparser.hhsimplexgeneration.hh
    io/file/dgfparser/dgfparser.hhvertex.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    dgfparser → common Relation

    File in dune/grid/io/file/dgfparserIncludes file in dune/grid/common
    dgfgeogrid.hhcommon/intersection.hh
    dgfgridfactory.hhcommon/intersection.hh
    dgfoned.hhcommon/intersection.hh
    dgfug.hhcommon/intersection.hh
    dgfwriter.hhcommon/grid.hh
    dgfwriter.hhrangegenerators.hh
    dgfyasp.hhcommon/intersection.hh
    gridptr.hhcommon/intersection.hh
    gridptr.hhdatahandleif.hh
    gridptr.hhgridenums.hh
    gridptr.hhpartitionset.hh
    gridptr.hhrangegenerators.hh
    blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
    io/file/dgfparser/dgfparser.hhdatahandleif.hh
    io/file/dgfparser/dgfparser.hhgridenums.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000015.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000003_000015.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n
    \n-

    dgfparser → utility Relation

    File in dune/grid/io/file/dgfparserIncludes file in dune/grid/utility
    dgfgeogrid.hhhostgridaccess.hh
    dgfidentitygrid.hhhostgridaccess.hh
    \n+

    dgfparser → utility Relation

    File in dune/grid/io/file/dgfparserIncludes file in dune/grid/utility
    dgfgeogrid.hhhostgridaccess.hh
    dgfidentitygrid.hhhostgridaccess.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n \n+

    file → common Relation

    File in dune/grid/io/fileIncludes file in dune/grid/common
    dgfparser / dgfgeogrid.hhcommon/intersection.hh
    dgfparser / dgfgridfactory.hhcommon/intersection.hh
    dgfparser / dgfoned.hhcommon/intersection.hh
    dgfparser / dgfug.hhcommon/intersection.hh
    dgfparser / dgfwriter.hhcommon/grid.hh
    dgfparser / dgfwriter.hhrangegenerators.hh
    dgfparser / dgfyasp.hhcommon/intersection.hh
    gmshreader.hhboundarysegment.hh
    gmshreader.hhcommon/gridfactory.hh
    gmshwriter.hhcommon/grid.hh
    gmshwriter.hhmcmgmapper.hh
    gnuplot.hhcommon/grid.hh
    dgfparser / gridptr.hhcommon/intersection.hh
    dgfparser / gridptr.hhdatahandleif.hh
    dgfparser / gridptr.hhgridenums.hh
    dgfparser / gridptr.hhpartitionset.hh
    dgfparser / gridptr.hhrangegenerators.hh
    dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
    dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
    dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
    printgrid.hhmcmgmapper.hh
    starcdreader.hhcommon/gridfactory.hh
    vtk / function.hhmcmgmapper.hh
    vtk / volumeiterators.hhgridenums.hh
    vtk / vtkwriter.hhmcmgmapper.hh
    vtk / vtkwriter.hhgridenums.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000003.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000003.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    file → dgfparser Relation

    File in dune/grid/io/fileIncludes file in dune/grid/io/file/dgfparser
    dgfparser / dgfgeogrid.hhblocks / io/file/dgfparser/blocks/projection.hh
    dgfparser / dgfug.hhblocks / gridparameter.hh
    io/file/dgfparser.hhdgfgeogrid.hh
    io/file/dgfparser.hhdgfidentitygrid.hh
    io/file/dgfparser.hhdgfoned.hh
    io/file/dgfparser.hhdgfug.hh
    io/file/dgfparser.hhdgfyasp.hh
    io/file/dgfparser.hhio/file/dgfparser/dgfparser.hh
    dgfparser / io/file/dgfparser/dgfparser.ccblocks / boundarydom.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / basic.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundarydom.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundaryseg.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / cube.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / dim.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / general.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / gridparameter.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / interval.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / io/file/dgfparser/blocks/projection.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / periodicfacetrans.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / polygon.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / polyhedron.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplex.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplexgeneration.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / vertex.hh
    \n+

    file → dgfparser Relation

    File in dune/grid/io/fileIncludes file in dune/grid/io/file/dgfparser
    dgfparser / dgfgeogrid.hhblocks / io/file/dgfparser/blocks/projection.hh
    dgfparser / dgfug.hhblocks / gridparameter.hh
    io/file/dgfparser.hhdgfgeogrid.hh
    io/file/dgfparser.hhdgfidentitygrid.hh
    io/file/dgfparser.hhdgfoned.hh
    io/file/dgfparser.hhdgfug.hh
    io/file/dgfparser.hhdgfyasp.hh
    io/file/dgfparser.hhio/file/dgfparser/dgfparser.hh
    dgfparser / io/file/dgfparser/dgfparser.ccblocks / boundarydom.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / basic.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundarydom.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / boundaryseg.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / cube.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / dim.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / general.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / gridparameter.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / interval.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / io/file/dgfparser/blocks/projection.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / periodicfacetrans.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / polygon.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / polyhedron.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplex.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / simplexgeneration.hh
    dgfparser / io/file/dgfparser/dgfparser.hhblocks / vertex.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000009.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000009.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    file → gnuplot Relation

    File in dune/grid/io/fileIncludes file in dune/grid/io/file/gnuplot
    gnuplot.hhgnuplot.cc
    \n+

    file → gnuplot Relation

    File in dune/grid/io/fileIncludes file in dune/grid/io/file/gnuplot
    gnuplot.hhgnuplot.cc
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000015.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000015.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    file → utility Relation

    File in dune/grid/io/fileIncludes file in dune/grid/utility
    dgfparser / dgfgeogrid.hhhostgridaccess.hh
    dgfparser / dgfidentitygrid.hhhostgridaccess.hh
    \n+

    file → utility Relation

    File in dune/grid/io/fileIncludes file in dune/grid/utility
    dgfparser / dgfgeogrid.hhhostgridaccess.hh
    dgfparser / dgfidentitygrid.hhhostgridaccess.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000017.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000007_000017.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    file → vtk Relation

    File in dune/grid/io/fileIncludes file in dune/grid/io/file/vtk
    vtk.hhboundarywriter.hh
    vtk.hhsubsamplingvtkwriter.hh
    vtk.hhvolumewriter.hh
    vtk.hhvtksequencewriter.hh
    vtk.hhvtkwriter.hh
    \n+

    file → vtk Relation

    File in dune/grid/io/fileIncludes file in dune/grid/io/file/vtk
    vtk.hhboundarywriter.hh
    vtk.hhsubsamplingvtkwriter.hh
    vtk.hhvolumewriter.hh
    vtk.hhvtksequencewriter.hh
    vtk.hhvtkwriter.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000008_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000008_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    geometrygrid → common Relation

    File in dune/grid/geometrygridIncludes file in dune/grid/common
    cachedcoordfunction.hhgridenums.hh
    geometrygrid/backuprestore.hhcommon/backuprestore.hh
    geometrygrid/capabilities.hhcommon/capabilities.hh
    geometrygrid/datahandle.hhcommon/grid.hh
    geometrygrid/datahandle.hhdatahandleif.hh
    geometrygrid/entity.hhcommon/grid.hh
    geometrygrid/entityseed.hhcommon/entityseed.hh
    geometrygrid/geometry.hhcommon/capabilities.hh
    geometrygrid/grid.hhcommon/grid.hh
    geometrygrid/gridfamily.hhcommon/grid.hh
    geometrygrid/gridview.hhcommon/capabilities.hh
    geometrygrid/gridview.hhcommon/gridview.hh
    geometrygrid/indexsets.hhgridenums.hh
    geometrygrid/indexsets.hhindexidset.hh
    hostcorners.hhcommon/entity.hh
    idset.hhindexidset.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000008_000015.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000008_000015.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    geometrygrid → utility Relation

    File in dune/grid/geometrygridIncludes file in dune/grid/utility
    cachedcoordfunction.hhutility/persistentcontainer.hh
    geometrygrid/persistentcontainer.hhpersistentcontainerwrapper.hh
    geometrygrid/persistentcontainer.hhutility/persistentcontainer.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000000.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000000.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n \n+

    grid → albertagrid Relation

    File in dune/gridIncludes file in dune/grid/albertagrid
    albertagrid.hhagrid.hh
    albertagrid.hhalbertagrid/gridfactory.hh
    albertagrid.hhalbertagrid/persistentcontainer.hh
    albertagrid.hhalbertagrid/structuredgridfactory.hh
    io / file / io/file/dgfparser.hhalbertagrid/dgfparser.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    grid → common Relation

    File in dune/gridIncludes file in dune/grid/common
    albertagrid / agrid.hhadaptcallback.hh
    albertagrid / agrid.hhcommon/grid.hh
    albertagrid / agrid.hhcommon/gridfactory.hh
    albertagrid / agrid.hhsizecache.hh
    albertagrid / albertagrid/backuprestore.hhcommon/backuprestore.hh
    albertagrid / albertagrid/capabilities.hhcommon/capabilities.hh
    albertagrid / albertagrid/datahandle.hhcommon/grid.hh
    albertagrid / albertagrid/dgfparser.hhcommon/intersection.hh
    albertagrid / albertagrid/entity.hhcommon/entity.hh
    albertagrid / albertagrid/geometry.hhcommon/geometry.hh
    albertagrid / albertagrid/gridfactory.hhcommon/gridfactory.hh
    albertagrid / albertagrid/gridfamily.hhcommon/entity.hh
    albertagrid / albertagrid/gridfamily.hhcommon/geometry.hh
    albertagrid / albertagrid/gridfamily.hhcommon/intersection.hh
    albertagrid / albertagrid/gridfamily.hhcommon/intersectioniterator.hh
    albertagrid / albertagrid/gridfamily.hhentityiterator.hh
    albertagrid / albertagrid/gridview.hhcommon/capabilities.hh
    albertagrid / albertagrid/gridview.hhcommon/gridview.hh
    albertagrid / albertagrid/indexsets.hhcommon/grid.hh
    albertagrid / albertagrid/indexsets.hhindexidset.hh
    albertagrid / albertagrid/intersection.hhcommon/intersection.hh
    albertagrid / albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
    albertagrid / albertagrid/projection.hhboundaryprojection.hh
    albertagrid / albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
    albertagrid / albertareader.hhcommon/grid.hh
    albertagrid / albertareader.hhcommon/gridfactory.hh
    geometrygrid / cachedcoordfunction.hhgridenums.hh
    io / file / dgfparser / dgfgeogrid.hhcommon/intersection.hh
    io / file / dgfparser / dgfgridfactory.hhcommon/intersection.hh
    io / file / dgfparser / dgfoned.hhcommon/intersection.hh
    io / file / dgfparser / dgfug.hhcommon/intersection.hh
    io / file / dgfparser / dgfwriter.hhcommon/grid.hh
    io / file / dgfparser / dgfwriter.hhrangegenerators.hh
    io / file / dgfparser / dgfyasp.hhcommon/intersection.hh
    geometrygrid / geometrygrid/backuprestore.hhcommon/backuprestore.hh
    geometrygrid / geometrygrid/capabilities.hhcommon/capabilities.hh
    geometrygrid / geometrygrid/datahandle.hhcommon/grid.hh
    geometrygrid / geometrygrid/datahandle.hhdatahandleif.hh
    geometrygrid / geometrygrid/entity.hhcommon/grid.hh
    geometrygrid / geometrygrid/entityseed.hhcommon/entityseed.hh
    geometrygrid / geometrygrid/geometry.hhcommon/capabilities.hh
    geometrygrid / geometrygrid/grid.hhcommon/grid.hh
    geometrygrid / geometrygrid/gridfamily.hhcommon/grid.hh
    geometrygrid / geometrygrid/gridview.hhcommon/capabilities.hh
    geometrygrid / geometrygrid/gridview.hhcommon/gridview.hh
    geometrygrid / geometrygrid/indexsets.hhgridenums.hh
    geometrygrid / geometrygrid/indexsets.hhindexidset.hh
    albertagrid / geometryreference.hhcommon/geometry.hh
    io / file / gmshreader.hhboundarysegment.hh
    io / file / gmshreader.hhcommon/gridfactory.hh
    io / file / gmshwriter.hhcommon/grid.hh
    io / file / gmshwriter.hhmcmgmapper.hh
    io / file / gnuplot.hhcommon/grid.hh
    io / file / dgfparser / gridptr.hhcommon/intersection.hh
    io / file / dgfparser / gridptr.hhdatahandleif.hh
    io / file / dgfparser / gridptr.hhgridenums.hh
    io / file / dgfparser / gridptr.hhpartitionset.hh
    io / file / dgfparser / gridptr.hhrangegenerators.hh
    albertagrid / hierarchiciterator.hhentityiterator.hh
    geometrygrid / hostcorners.hhcommon/entity.hh
    identitygrid.hhcommon/capabilities.hh
    identitygrid.hhcommon/grid.hh
    geometrygrid / idset.hhindexidset.hh
    io / file / dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
    io / file / dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
    io / file / dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
    albertagrid / leafiterator.hhentityiterator.hh
    albertagrid / leveliterator.hhentityiterator.hh
    albertagrid / macrodata.ccexceptions.hh
    onedgrid.hhcommon/capabilities.hh
    onedgrid.hhcommon/grid.hh
    onedgrid.hhcommon/gridfactory.hh
    io / file / printgrid.hhmcmgmapper.hh
    io / file / starcdreader.hhcommon/gridfactory.hh
    uggrid.hhboundarysegment.hh
    uggrid.hhcommon/capabilities.hh
    uggrid.hhcommon/grid.hh
    yaspgrid.hhcommon/backuprestore.hh
    yaspgrid.hhcommon/capabilities.hh
    yaspgrid.hhcommon/grid.hh
    yaspgrid.hhdatahandleif.hh
    yaspgrid.hhindexidset.hh
    identitygrid / identitygridentity.hhcommon/grid.hh
    identitygrid / identitygridgeometry.hhcommon/geometry.hh
    identitygrid / identitygridindexsets.hhindexidset.hh
    identitygrid / identitygridintersectioniterator.hhcommon/intersection.hh
    identitygrid / identitygridleafiterator.hhgridenums.hh
    identitygrid / identitygridleveliterator.hhgridenums.hh
    uggrid / uggridfactory.hhboundarysegment.hh
    uggrid / uggridfactory.hhcommon/gridfactory.hh
    utility / entitycommhelper.hhgridenums.hh
    utility / globalindexset.hhgridenums.hh
    utility / globalindexset.hhdatahandleif.hh
    utility / utility/gridinfo.hhmcmgmapper.hh
    utility / hierarchicsearch.hhcommon/grid.hh
    utility / hierarchicsearch.hhgridenums.hh
    utility / parmetisgridpartitioner.hhmcmgmapper.hh
    utility / parmetisgridpartitioner.hhrangegenerators.hh
    utility / persistentcontainermap.hhcommon/capabilities.hh
    utility / utility/structuredgridfactory.hhcommon/gridfactory.hh
    utility / tensorgridfactory.hhcommon/gridfactory.hh
    io / file / vtk / function.hhmcmgmapper.hh
    io / file / vtk / volumeiterators.hhgridenums.hh
    io / file / vtk / vtkwriter.hhmcmgmapper.hh
    io / file / vtk / vtkwriter.hhgridenums.hh
    yaspgrid / yaspgrid/backuprestore.hhcommon/backuprestore.hh
    yaspgrid / torus.hhexceptions.hh
    \n+

    grid → common Relation

    File in dune/gridIncludes file in dune/grid/common
    albertagrid / agrid.hhadaptcallback.hh
    albertagrid / agrid.hhcommon/grid.hh
    albertagrid / agrid.hhcommon/gridfactory.hh
    albertagrid / agrid.hhsizecache.hh
    albertagrid / albertagrid/backuprestore.hhcommon/backuprestore.hh
    albertagrid / albertagrid/capabilities.hhcommon/capabilities.hh
    albertagrid / albertagrid/datahandle.hhcommon/grid.hh
    albertagrid / albertagrid/dgfparser.hhcommon/intersection.hh
    albertagrid / albertagrid/entity.hhcommon/entity.hh
    albertagrid / albertagrid/geometry.hhcommon/geometry.hh
    albertagrid / albertagrid/gridfactory.hhcommon/gridfactory.hh
    albertagrid / albertagrid/gridfamily.hhcommon/entity.hh
    albertagrid / albertagrid/gridfamily.hhcommon/geometry.hh
    albertagrid / albertagrid/gridfamily.hhcommon/intersection.hh
    albertagrid / albertagrid/gridfamily.hhcommon/intersectioniterator.hh
    albertagrid / albertagrid/gridfamily.hhentityiterator.hh
    albertagrid / albertagrid/gridview.hhcommon/capabilities.hh
    albertagrid / albertagrid/gridview.hhcommon/gridview.hh
    albertagrid / albertagrid/indexsets.hhcommon/grid.hh
    albertagrid / albertagrid/indexsets.hhindexidset.hh
    albertagrid / albertagrid/intersection.hhcommon/intersection.hh
    albertagrid / albertagrid/intersectioniterator.hhcommon/intersectioniterator.hh
    albertagrid / albertagrid/projection.hhboundaryprojection.hh
    albertagrid / albertagrid/structuredgridfactory.hhcommon/gridfactory.hh
    albertagrid / albertareader.hhcommon/grid.hh
    albertagrid / albertareader.hhcommon/gridfactory.hh
    geometrygrid / cachedcoordfunction.hhgridenums.hh
    io / file / dgfparser / dgfgeogrid.hhcommon/intersection.hh
    io / file / dgfparser / dgfgridfactory.hhcommon/intersection.hh
    io / file / dgfparser / dgfoned.hhcommon/intersection.hh
    io / file / dgfparser / dgfug.hhcommon/intersection.hh
    io / file / dgfparser / dgfwriter.hhcommon/grid.hh
    io / file / dgfparser / dgfwriter.hhrangegenerators.hh
    io / file / dgfparser / dgfyasp.hhcommon/intersection.hh
    geometrygrid / geometrygrid/backuprestore.hhcommon/backuprestore.hh
    geometrygrid / geometrygrid/capabilities.hhcommon/capabilities.hh
    geometrygrid / geometrygrid/datahandle.hhcommon/grid.hh
    geometrygrid / geometrygrid/datahandle.hhdatahandleif.hh
    geometrygrid / geometrygrid/entity.hhcommon/grid.hh
    geometrygrid / geometrygrid/entityseed.hhcommon/entityseed.hh
    geometrygrid / geometrygrid/geometry.hhcommon/capabilities.hh
    geometrygrid / geometrygrid/grid.hhcommon/grid.hh
    geometrygrid / geometrygrid/gridfamily.hhcommon/grid.hh
    geometrygrid / geometrygrid/gridview.hhcommon/capabilities.hh
    geometrygrid / geometrygrid/gridview.hhcommon/gridview.hh
    geometrygrid / geometrygrid/indexsets.hhgridenums.hh
    geometrygrid / geometrygrid/indexsets.hhindexidset.hh
    albertagrid / geometryreference.hhcommon/geometry.hh
    io / file / gmshreader.hhboundarysegment.hh
    io / file / gmshreader.hhcommon/gridfactory.hh
    io / file / gmshwriter.hhcommon/grid.hh
    io / file / gmshwriter.hhmcmgmapper.hh
    io / file / gnuplot.hhcommon/grid.hh
    io / file / dgfparser / gridptr.hhcommon/intersection.hh
    io / file / dgfparser / gridptr.hhdatahandleif.hh
    io / file / dgfparser / gridptr.hhgridenums.hh
    io / file / dgfparser / gridptr.hhpartitionset.hh
    io / file / dgfparser / gridptr.hhrangegenerators.hh
    albertagrid / hierarchiciterator.hhentityiterator.hh
    geometrygrid / hostcorners.hhcommon/entity.hh
    identitygrid.hhcommon/capabilities.hh
    identitygrid.hhcommon/grid.hh
    geometrygrid / idset.hhindexidset.hh
    io / file / dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
    io / file / dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
    io / file / dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
    albertagrid / leafiterator.hhentityiterator.hh
    albertagrid / leveliterator.hhentityiterator.hh
    albertagrid / macrodata.ccexceptions.hh
    onedgrid.hhcommon/capabilities.hh
    onedgrid.hhcommon/grid.hh
    onedgrid.hhcommon/gridfactory.hh
    io / file / printgrid.hhmcmgmapper.hh
    io / file / starcdreader.hhcommon/gridfactory.hh
    uggrid.hhboundarysegment.hh
    uggrid.hhcommon/capabilities.hh
    uggrid.hhcommon/grid.hh
    yaspgrid.hhcommon/backuprestore.hh
    yaspgrid.hhcommon/capabilities.hh
    yaspgrid.hhcommon/grid.hh
    yaspgrid.hhdatahandleif.hh
    yaspgrid.hhindexidset.hh
    identitygrid / identitygridentity.hhcommon/grid.hh
    identitygrid / identitygridgeometry.hhcommon/geometry.hh
    identitygrid / identitygridindexsets.hhindexidset.hh
    identitygrid / identitygridintersectioniterator.hhcommon/intersection.hh
    identitygrid / identitygridleafiterator.hhgridenums.hh
    identitygrid / identitygridleveliterator.hhgridenums.hh
    uggrid / uggridfactory.hhboundarysegment.hh
    uggrid / uggridfactory.hhcommon/gridfactory.hh
    utility / entitycommhelper.hhgridenums.hh
    utility / globalindexset.hhgridenums.hh
    utility / globalindexset.hhdatahandleif.hh
    utility / utility/gridinfo.hhmcmgmapper.hh
    utility / hierarchicsearch.hhcommon/grid.hh
    utility / hierarchicsearch.hhgridenums.hh
    utility / parmetisgridpartitioner.hhmcmgmapper.hh
    utility / parmetisgridpartitioner.hhrangegenerators.hh
    utility / persistentcontainermap.hhcommon/capabilities.hh
    utility / utility/structuredgridfactory.hhcommon/gridfactory.hh
    utility / tensorgridfactory.hhcommon/gridfactory.hh
    io / file / vtk / function.hhmcmgmapper.hh
    io / file / vtk / volumeiterators.hhgridenums.hh
    io / file / vtk / vtkwriter.hhmcmgmapper.hh
    io / file / vtk / vtkwriter.hhgridenums.hh
    yaspgrid / yaspgrid/backuprestore.hhcommon/backuprestore.hh
    yaspgrid / torus.hhexceptions.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000008.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000008.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    grid → geometrygrid Relation

    File in dune/gridIncludes file in dune/grid/geometrygrid
    geometrygrid.hhgeometrygrid/grid.hh
    geometrygrid.hhgeometrygrid/persistentcontainer.hh
    utility / hostgridaccess.hhgeometrygrid/intersection.hh
    \n+

    grid → geometrygrid Relation

    File in dune/gridIncludes file in dune/grid/geometrygrid
    geometrygrid.hhgeometrygrid/grid.hh
    geometrygrid.hhgeometrygrid/persistentcontainer.hh
    utility / hostgridaccess.hhgeometrygrid/intersection.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000011.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000011.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n \n+

    grid → identitygrid Relation

    File in dune/gridIncludes file in dune/grid/identitygrid
    identitygrid.hhidentitygridentity.hh
    identitygrid.hhidentitygridentityseed.hh
    identitygrid.hhidentitygridgeometry.hh
    identitygrid.hhidentitygridhierarchiciterator.hh
    identitygrid.hhidentitygridindexsets.hh
    identitygrid.hhidentitygridintersectioniterator.hh
    identitygrid.hhidentitygridleafiterator.hh
    identitygrid.hhidentitygridleveliterator.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000018.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000010_000018.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n \n+

    grid → yaspgrid Relation

    File in dune/gridIncludes file in dune/grid/yaspgrid
    yaspgrid.hhcoordinates.hh
    yaspgrid.hhstructuredyaspgridfactory.hh
    yaspgrid.hhtorus.hh
    yaspgrid.hhyaspgrid/backuprestore.hh
    yaspgrid.hhyaspgridentity.hh
    yaspgrid.hhyaspgridentityseed.hh
    yaspgrid.hhyaspgridgeometry.hh
    yaspgrid.hhyaspgridhierarchiciterator.hh
    yaspgrid.hhyaspgrididset.hh
    yaspgrid.hhyaspgridindexsets.hh
    yaspgrid.hhyaspgridintersection.hh
    yaspgrid.hhyaspgridintersectioniterator.hh
    yaspgrid.hhyaspgridleveliterator.hh
    yaspgrid.hhyaspgridpersistentcontainer.hh
    yaspgrid.hhygrid.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000011_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000011_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    identitygrid → common Relation

    File in dune/grid/identitygridIncludes file in dune/grid/common
    identitygridentity.hhcommon/grid.hh
    identitygridgeometry.hhcommon/geometry.hh
    identitygridindexsets.hhindexidset.hh
    identitygridintersectioniterator.hhcommon/intersection.hh
    identitygridleafiterator.hhgridenums.hh
    identitygridleveliterator.hhgridenums.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000012_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000012_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n \n+

    io → common Relation

    File in dune/grid/ioIncludes file in dune/grid/common
    file / dgfparser / dgfgeogrid.hhcommon/intersection.hh
    file / dgfparser / dgfgridfactory.hhcommon/intersection.hh
    file / dgfparser / dgfoned.hhcommon/intersection.hh
    file / dgfparser / dgfug.hhcommon/intersection.hh
    file / dgfparser / dgfwriter.hhcommon/grid.hh
    file / dgfparser / dgfwriter.hhrangegenerators.hh
    file / dgfparser / dgfyasp.hhcommon/intersection.hh
    file / gmshreader.hhboundarysegment.hh
    file / gmshreader.hhcommon/gridfactory.hh
    file / gmshwriter.hhcommon/grid.hh
    file / gmshwriter.hhmcmgmapper.hh
    file / gnuplot.hhcommon/grid.hh
    file / dgfparser / gridptr.hhcommon/intersection.hh
    file / dgfparser / gridptr.hhdatahandleif.hh
    file / dgfparser / gridptr.hhgridenums.hh
    file / dgfparser / gridptr.hhpartitionset.hh
    file / dgfparser / gridptr.hhrangegenerators.hh
    file / dgfparser / blocks / io/file/dgfparser/blocks/projection.hhboundaryprojection.hh
    file / dgfparser / io/file/dgfparser/dgfparser.hhdatahandleif.hh
    file / dgfparser / io/file/dgfparser/dgfparser.hhgridenums.hh
    file / printgrid.hhmcmgmapper.hh
    file / starcdreader.hhcommon/gridfactory.hh
    file / vtk / function.hhmcmgmapper.hh
    file / vtk / volumeiterators.hhgridenums.hh
    file / vtk / vtkwriter.hhmcmgmapper.hh
    file / vtk / vtkwriter.hhgridenums.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000012_000015.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000012_000015.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    io → utility Relation

    File in dune/grid/ioIncludes file in dune/grid/utility
    file / dgfparser / dgfgeogrid.hhhostgridaccess.hh
    file / dgfparser / dgfidentitygrid.hhhostgridaccess.hh
    \n+

    io → utility Relation

    File in dune/grid/ioIncludes file in dune/grid/utility
    file / dgfparser / dgfgeogrid.hhhostgridaccess.hh
    file / dgfparser / dgfidentitygrid.hhhostgridaccess.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000013_000006.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000013_000006.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    recipes → dune Relation

    File in doc/recipesIncludes file in dune
    recipe-integration.ccgrid / yaspgrid.hh
    recipe-iterate-over-grid.ccgrid / yaspgrid.hh
    \n+

    recipes → dune Relation

    File in doc/recipesIncludes file in dune
    recipe-integration.ccgrid / yaspgrid.hh
    recipe-iterate-over-grid.ccgrid / yaspgrid.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000014_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000014_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    uggrid → common Relation

    File in dune/grid/uggridIncludes file in dune/grid/common
    uggridfactory.hhboundarysegment.hh
    uggridfactory.hhcommon/gridfactory.hh
    \n+

    uggrid → common Relation

    File in dune/grid/uggridIncludes file in dune/grid/common
    uggridfactory.hhboundarysegment.hh
    uggridfactory.hhcommon/gridfactory.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n \n+

    utility → common Relation

    File in dune/grid/utilityIncludes file in dune/grid/common
    entitycommhelper.hhgridenums.hh
    globalindexset.hhdatahandleif.hh
    globalindexset.hhgridenums.hh
    hierarchicsearch.hhcommon/grid.hh
    hierarchicsearch.hhgridenums.hh
    parmetisgridpartitioner.hhmcmgmapper.hh
    parmetisgridpartitioner.hhrangegenerators.hh
    persistentcontainermap.hhcommon/capabilities.hh
    tensorgridfactory.hhcommon/gridfactory.hh
    utility/gridinfo.hhmcmgmapper.hh
    utility/structuredgridfactory.hhcommon/gridfactory.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000008.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000008.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    utility → geometrygrid Relation

    File in dune/grid/utilityIncludes file in dune/grid/geometrygrid
    hostgridaccess.hhgeometrygrid/intersection.hh
    \n+

    utility → geometrygrid Relation

    File in dune/grid/utilityIncludes file in dune/grid/geometrygrid
    hostgridaccess.hhgeometrygrid/intersection.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000012.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000015_000012.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n
    \n \n
    \n \n
    \n-

    utility → io Relation

    File in dune/grid/utilityIncludes file in dune/grid/io
    gridinfo-gmsh-main.hhfile / gmshreader.hh
    \n+

    utility → io Relation

    File in dune/grid/utilityIncludes file in dune/grid/io
    gridinfo-gmsh-main.hhfile / gmshreader.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000017_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000017_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n
    \n-

    vtk → common Relation

    File in dune/grid/io/file/vtkIncludes file in dune/grid/common
    function.hhmcmgmapper.hh
    volumeiterators.hhgridenums.hh
    vtkwriter.hhgridenums.hh
    vtkwriter.hhmcmgmapper.hh
    \n+

    vtk → common Relation

    File in dune/grid/io/file/vtkIncludes file in dune/grid/common
    function.hhmcmgmapper.hh
    volumeiterators.hhgridenums.hh
    vtkwriter.hhgridenums.hh
    vtkwriter.hhmcmgmapper.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000018_000002.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000018_000002.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n
    \n-

    yaspgrid → common Relation

    File in dune/grid/yaspgridIncludes file in dune/grid/common
    torus.hhexceptions.hh
    yaspgrid/backuprestore.hhcommon/backuprestore.hh
    \n+

    yaspgrid → common Relation

    File in dune/grid/yaspgridIncludes file in dune/grid/common
    torus.hhexceptions.hh
    yaspgrid/backuprestore.hhcommon/backuprestore.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000018_000015.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_000018_000015.html", "unified_diff": "@@ -62,14 +62,14 @@\n \n \n \n \n+

    yaspgrid → utility Relation

    File in dune/grid/yaspgridIncludes file in dune/grid/utility
    structuredyaspgridfactory.hhutility/structuredgridfactory.hh
    yaspgridpersistentcontainer.hhpersistentcontainervector.hh
    yaspgridpersistentcontainer.hhutility/persistentcontainer.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_0009240fada98b921d3b7adcfc3fe68b.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_0009240fada98b921d3b7adcfc3fe68b.html", "unified_diff": "@@ -83,126 +83,126 @@\n \"\"\n \"\"\n \n \n \n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n \n \n-\n+\n \n \n \n \n \n \n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n+\n \n \n \n \n \n-\n+\n \n \n \n-\n+\n \n-\n-\n+\n+\n \n \n \n \n \n \n \n \n \n-\n+\n \n-\n+\n \n \n \n-\n-\n+\n+\n \n-\n+\n \n \n \n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n \n \n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n \n \n \n \n-\n-\n+\n+\n \n \n \n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n

    \n Files

    file  agrid.hh [code]
     provides the AlbertaGrid class
    file  agrid.hh [code]
     provides the AlbertaGrid class
     
    file  albertagrid.cc
    file  albertagrid.cc
     
    file  albertaheader.hh [code]
    file  albertaheader.hh [code]
     
    file  albertareader.hh [code]
    file  albertareader.hh [code]
     
    file  algebra.hh [code]
    file  algebra.hh [code]
     
    file  albertagrid/backuprestore.hh [code]
     
    file  albertagrid/capabilities.hh [code]
     
    file  coordcache.hh [code]
    file  coordcache.hh [code]
     
    file  albertagrid/datahandle.hh [code]
     
    file  albertagrid/dgfparser.cc
     
    file  albertagrid/dgfparser.hh [code]
     
    file  dofadmin.hh [code]
    file  dofadmin.hh [code]
     
    file  dofvector.hh [code]
    file  dofvector.hh [code]
     
    file  elementinfo.cc
     provides a wrapper for ALBERTA's el_info structure
    file  elementinfo.cc
     provides a wrapper for ALBERTA's el_info structure
     
    file  elementinfo.hh [code]
     provides a wrapper for ALBERTA's el_info structure
    file  elementinfo.hh [code]
     provides a wrapper for ALBERTA's el_info structure
     
    file  entity.cc
    file  entity.cc
     
    file  albertagrid/entity.hh [code]
     
    file  albertagrid/entityseed.hh [code]
     
    file  geometry.cc
    file  geometry.cc
     
    file  albertagrid/geometry.hh [code]
     
    file  geometrycache.hh [code]
    file  geometrycache.hh [code]
     
    file  geometryreference.hh [code]
     Wrapper and interface classes for element geometries.
    file  geometryreference.hh [code]
     Wrapper and interface classes for element geometries.
     
    file  albertagrid/gridfactory.hh [code]
     specialization of the generic GridFactory for AlbertaGrid
     
    file  albertagrid/gridfamily.hh [code]
     provides the GridFamily for AlbertaGrid
     
    file  albertagrid/gridview.hh [code]
     
    file  hierarchiciterator.hh [code]
    file  hierarchiciterator.hh [code]
     
    file  indexsets.cc
    file  indexsets.cc
     
    file  albertagrid/indexsets.hh [code]
     
    file  indexstack.hh [code]
     Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)
    file  indexstack.hh [code]
     Provides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)
     
    file  intersection.cc
    file  intersection.cc
     
    file  albertagrid/intersection.hh [code]
     
    file  albertagrid/intersectioniterator.hh [code]
     Implementation of the IntersectionIterator for AlbertaGrid.
     
    file  leafiterator.hh [code]
    file  leafiterator.hh [code]
     
    file  level.hh [code]
    file  level.hh [code]
     
    file  leveliterator.hh [code]
    file  leveliterator.hh [code]
     
    file  macrodata.cc
     provides a wrapper for ALBERTA's macro_data structure
    file  macrodata.cc
     provides a wrapper for ALBERTA's macro_data structure
     
    file  macrodata.hh [code]
     provides a wrapper for ALBERTA's macro_data structure
     
    file  macroelement.hh [code]
    file  macroelement.hh [code]
     
    file  meshpointer.cc
    file  meshpointer.cc
     
    file  meshpointer.hh [code]
     provides a wrapper for ALBERTA's mesh structure
    file  meshpointer.hh [code]
     provides a wrapper for ALBERTA's mesh structure
     
    file  misc.hh [code]
    file  misc.hh [code]
     
    file  albertagrid/persistentcontainer.hh [code]
     
    file  albertagrid/projection.hh [code]
     
    file  refinement.hh [code]
     provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
    file  refinement.hh [code]
     provides a wrapper for ALBERTA's refinement patches and the corners for geometryInFather
     
    file  albertagrid/structuredgridfactory.hh [code]
     specialization of the generic StructuredGridFactory for AlbertaGrid
     
    file  transformation.hh [code]
    file  transformation.hh [code]
     
    file  treeiterator.hh [code]
    file  treeiterator.hh [code]
     
    file  undefine-2.0.hh [code]
     Contains #undefs for all preprocessor macros defined by alberta.
    file  undefine-2.0.hh [code]
     Contains #undefs for all preprocessor macros defined by alberta.
     
    file  undefine-3.0.hh [code]
     Contains #undefs for all preprocessor macros defined by alberta.
    file  undefine-3.0.hh [code]
     Contains #undefs for all preprocessor macros defined by alberta.
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_3101a3055293843fecabc3e467bfc546.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_3101a3055293843fecabc3e467bfc546.html", "unified_diff": "@@ -79,67 +79,67 @@\n \"\"\n \"\"\n \n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n

    \n Files

    file  basic.cc
    file  basic.cc
     
    file  basic.hh [code]
    file  basic.hh [code]
     
    file  boundarydom.cc
    file  boundarydom.cc
     
    file  boundarydom.hh [code]
    file  boundarydom.hh [code]
     
    file  boundaryseg.cc
    file  boundaryseg.cc
     
    file  boundaryseg.hh [code]
    file  boundaryseg.hh [code]
     
    file  cube.cc
    file  cube.cc
     
    file  cube.hh [code]
    file  cube.hh [code]
     
    file  dim.cc
    file  dim.cc
     
    file  dim.hh [code]
    file  dim.hh [code]
     
    file  general.cc
    file  general.cc
     
    file  general.hh [code]
    file  general.hh [code]
     
    file  gridparameter.cc
    file  gridparameter.cc
     
    file  gridparameter.hh [code]
    file  gridparameter.hh [code]
     
    file  interval.cc
    file  interval.cc
     
    file  interval.hh [code]
    file  interval.hh [code]
     
    file  periodicfacetrans.cc
    file  periodicfacetrans.cc
     
    file  periodicfacetrans.hh [code]
    file  periodicfacetrans.hh [code]
     
    file  polygon.hh [code]
    file  polygon.hh [code]
     
    file  polyhedron.hh [code]
    file  polyhedron.hh [code]
     
    file  projection.cc
    file  projection.cc
     
    file  io/file/dgfparser/blocks/projection.hh [code]
     
    file  simplex.cc
    file  simplex.cc
     
    file  simplex.hh [code]
    file  simplex.hh [code]
     
    file  simplexgeneration.cc
    file  simplexgeneration.cc
     
    file  simplexgeneration.hh [code]
    file  simplexgeneration.hh [code]
     
    file  vertex.cc
    file  vertex.cc
     
    file  vertex.hh [code]
     
    \n \n \n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_51efcf388a7f62d4a2fa1c6b4b0f3d93.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_51efcf388a7f62d4a2fa1c6b4b0f3d93.html", "unified_diff": "@@ -87,23 +87,23 @@\n Files
    file  geometrygrid/backuprestore.hh [code]
     
    file  cachedcoordfunction.hh [code]
     
    file  geometrygrid/capabilities.hh [code]
     
    file  coordfunction.hh [code]
    file  coordfunction.hh [code]
     
    file  coordfunctioncaller.hh [code]
    file  coordfunctioncaller.hh [code]
     
    file  cornerstorage.hh [code]
    file  cornerstorage.hh [code]
     
    file  geometrygrid/datahandle.hh [code]
     
    file  declaration.hh [code]
    file  declaration.hh [code]
     
    file  geometrygrid/entity.hh [code]
     
    file  geometrygrid/entityseed.hh [code]
     
    file  geometrygrid/geometry.hh [code]
     
     
    file  geometrygrid/gridfamily.hh [code]
     
    file  geometrygrid/gridview.hh [code]
     
    file  hostcorners.hh [code]
     
    file  identity.hh [code]
    file  identity.hh [code]
     
    file  idset.hh [code]
    file  idset.hh [code]
     
    file  geometrygrid/indexsets.hh [code]
     
    file  geometrygrid/intersection.hh [code]
     
    file  geometrygrid/intersectioniterator.hh [code]
     
    file  iterator.hh [code]
    file  iterator.hh [code]
     
    file  geometrygrid/persistentcontainer.hh [code]
     
    \n
    \n \n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_63e32640819d3744ac1cd322c9d6003e.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_63e32640819d3744ac1cd322c9d6003e.html", "unified_diff": "@@ -83,56 +83,56 @@\n \n \n \n \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n

    \n Files

    file  yaspgrid/backuprestore.hh [code]
     
    file  coordinates.hh [code]
     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.
    file  coordinates.hh [code]
     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.
     
    file  partitioning.hh [code]
     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.
    file  partitioning.hh [code]
     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.
     
    file  structuredyaspgridfactory.hh [code]
     Specialization of the StructuredGridFactory class for YaspGrid.
    file  structuredyaspgridfactory.hh [code]
     Specialization of the StructuredGridFactory class for YaspGrid.
     
    file  torus.hh [code]
     This file provides the infrastructure for toroidal communication in YaspGrid.
    file  torus.hh [code]
     This file provides the infrastructure for toroidal communication in YaspGrid.
     
    file  yaspgridentity.hh [code]
     the YaspEntity class and its specializations
    file  yaspgridentity.hh [code]
     the YaspEntity class and its specializations
     
    file  yaspgridentityseed.hh [code]
     The YaspEntitySeed class.
    file  yaspgridentityseed.hh [code]
     The YaspEntitySeed class.
     
    file  yaspgridgeometry.hh [code]
     The YaspGeometry class and its specializations.
    file  yaspgridgeometry.hh [code]
     The YaspGeometry class and its specializations.
     
    file  yaspgridhierarchiciterator.hh [code]
    file  yaspgridhierarchiciterator.hh [code]
     
    file  yaspgrididset.hh [code]
    file  yaspgrididset.hh [code]
     
    file  yaspgridindexsets.hh [code]
     level-wise, non-persistent, consecutive indices for YaspGrid
    file  yaspgridindexsets.hh [code]
     level-wise, non-persistent, consecutive indices for YaspGrid
     
    file  yaspgridintersection.hh [code]
     The YaspIntersection class.
    file  yaspgridintersection.hh [code]
     The YaspIntersection class.
     
    file  yaspgridintersectioniterator.hh [code]
     The YaspIntersectionIterator class.
    file  yaspgridintersectioniterator.hh [code]
     The YaspIntersectionIterator class.
     
    file  yaspgridleveliterator.hh [code]
     The YaspLevelIterator class.
    file  yaspgridleveliterator.hh [code]
     The YaspLevelIterator class.
     
    file  yaspgridpersistentcontainer.hh [code]
     Specialization of the PersistentContainer for YaspGrid.
    file  yaspgridpersistentcontainer.hh [code]
     Specialization of the PersistentContainer for YaspGrid.
     
    file  ygrid.hh [code]
     This provides a YGrid, the elemental component of the yaspgrid implementation.
    file  ygrid.hh [code]
     This provides a YGrid, the elemental component of the yaspgrid implementation.
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_6b8c365152847b3387fb5004eec7d3cc.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_6b8c365152847b3387fb5004eec7d3cc.html", "unified_diff": "@@ -79,40 +79,40 @@\n \"\"\n \"\"\n \n \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n \n \n \n-\n-\n+\n+\n \n

    \n Files

    file  identitygridentity.hh [code]
     The IdentityGridEntity class.
    file  identitygridentity.hh [code]
     The IdentityGridEntity class.
     
    file  identitygridentityseed.hh [code]
     The IdentityGridEntitySeed class.
    file  identitygridentityseed.hh [code]
     The IdentityGridEntitySeed class.
     
    file  identitygridgeometry.hh [code]
     The IdentityGridGeometry class and its specializations.
     
    file  identitygridhierarchiciterator.hh [code]
     The IdentityGridHierarchicIterator class.
    file  identitygridhierarchiciterator.hh [code]
     The IdentityGridHierarchicIterator class.
     
    file  identitygridindexsets.hh [code]
     The index and id sets for the IdentityGrid class.
    file  identitygridindexsets.hh [code]
     The index and id sets for the IdentityGrid class.
     
    file  identitygridintersectioniterator.hh [code]
     The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.
    file  identitygridintersectioniterator.hh [code]
     The IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes.
     
    file  identitygridintersections.hh [code]
     The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
    file  identitygridintersections.hh [code]
     The IdentityGridLeafIntersection and IdentityGridLevelIntersection classes.
     
    file  identitygridleafiterator.hh [code]
     The IdentityGridLeafIterator class.
     
    file  identitygridleveliterator.hh [code]
     The IdentityGridLevelIterator class.
    file  identitygridleveliterator.hh [code]
     The IdentityGridLevelIterator class.
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_8a7c3b45c9645f41c3ea2c94b08d5fa1.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_8a7c3b45c9645f41c3ea2c94b08d5fa1.html", "unified_diff": "@@ -77,19 +77,19 @@\n \"\"\n \"\"\n \n \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n

    \n Files

    file  dgf2dgf.cc
     a small program converting a DGF file into a DGF file
    file  dgf2dgf.cc
     a small program converting a DGF file into a DGF file
     
    file  gmsh2dgf.cc
     a small program converting a gmsh file into a DGF file
    file  gmsh2dgf.cc
     a small program converting a gmsh file into a DGF file
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_8d29adac9322a6a2ee0cd26fd57d5299.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_8d29adac9322a6a2ee0cd26fd57d5299.html", "unified_diff": "@@ -77,16 +77,16 @@\n \"\"\n \"\"\n \n \n \n \n-\n-\n+\n+\n \n

    \n Files

    file  gnuplot.cc
     Implementation of gnuplot output for 1D and 2D grids.
    file  gnuplot.cc
     Implementation of gnuplot output for 1D and 2D grids.
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_9cbaec8e9232e242a682ff9656a6bc7e.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_9cbaec8e9232e242a682ff9656a6bc7e.html", "unified_diff": "@@ -81,15 +81,15 @@\n \n \n \n \n \n \n-\n+\n \n

    \n Files

    file  recipe-integration.cc
     
    file  recipe-iterate-over-grid.cc
    file  recipe-iterate-over-grid.cc
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_afe722c9aeb4f33ba80bf13de411ce03.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_afe722c9aeb4f33ba80bf13de411ce03.html", "unified_diff": "@@ -83,55 +83,55 @@\n \"\"\n \"\"\n \n \n \n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n \n-\n-\n+\n+\n \n-\n+\n \n

    \n Files

    file  entitycommhelper.hh [code]
    file  entitycommhelper.hh [code]
     
    file  globalindexset.hh [code]
     Provides a globally unique index for all entities of a distributed Dune grid.
    file  globalindexset.hh [code]
     Provides a globally unique index for all entities of a distributed Dune grid.
     
    file  gridinfo-gmsh-main.hh [code]
     Generic main() function for printing information about a mesh read from a .msh-file.
    file  gridinfo-gmsh-main.hh [code]
     Generic main() function for printing information about a mesh read from a .msh-file.
     
    file  utility/gridinfo.hh [code]
     
    file  gridtype.hh [code]
     This file can be included directly following config.h to test if a grid type was correctly selected.
    file  gridtype.hh [code]
     This file can be included directly following config.h to test if a grid type was correctly selected.
     
    file  hierarchicsearch.hh [code]
     Utility class for hierarchically searching for an Entity containing a given point.
    file  hierarchicsearch.hh [code]
     Utility class for hierarchically searching for an Entity containing a given point.
     
    file  hostgridaccess.hh [code]
    file  hostgridaccess.hh [code]
     
    file  multiindex.hh [code]
     Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes.
    file  multiindex.hh [code]
     Implements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes.
     
    file  parmetisgridpartitioner.hh [code]
     Compute a repartitioning of a Dune grid using ParMetis.
    file  parmetisgridpartitioner.hh [code]
     Compute a repartitioning of a Dune grid using ParMetis.
     
    file  utility/persistentcontainer.hh [code]
     
    file  persistentcontainerinterface.hh [code]
    file  persistentcontainerinterface.hh [code]
     
    file  persistentcontainermap.hh [code]
    file  persistentcontainermap.hh [code]
     
    file  persistentcontainervector.hh [code]
    file  persistentcontainervector.hh [code]
     
    file  persistentcontainerwrapper.hh [code]
    file  persistentcontainerwrapper.hh [code]
     
    file  utility/structuredgridfactory.hh [code]
     A class to construct structured cube and simplex grids using the grid factory.
     
    file  tensorgridfactory.hh [code]
     This file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series.
    file  tensorgridfactory.hh [code]
     This file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series.
     
    file  vertexorderfactory.hh [code]
    file  vertexorderfactory.hh [code]
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_b770a3c3155c345f795a6741b9d3499a.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_b770a3c3155c345f795a6741b9d3499a.html", "unified_diff": "@@ -79,63 +79,63 @@\n \"\"\n \"\"\n \n \n \n \n-\n-\n+\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n

    \n Files

    file  b64enc.hh [code]
     Simple base64 encode.
    file  b64enc.hh [code]
     Simple base64 encode.
     
    file  basicwriter.hh [code]
    file  basicwriter.hh [code]
     
    file  boundaryiterators.hh [code]
     Functions for VTK output on the skeleton.
    file  boundaryiterators.hh [code]
     Functions for VTK output on the skeleton.
     
    file  boundarywriter.hh [code]
    file  boundarywriter.hh [code]
     
    file  common.hh [code]
     Common stuff for the VTKWriter.
    file  common.hh [code]
     Common stuff for the VTKWriter.
     
    file  corner.hh [code]
    file  corner.hh [code]
     
    file  corneriterator.hh [code]
    file  corneriterator.hh [code]
     
    file  dataarraywriter.hh [code]
     Data array writers for the VTKWriter.
    file  dataarraywriter.hh [code]
     Data array writers for the VTKWriter.
     
    file  function.hh [code]
     Functions for VTK output.
    file  function.hh [code]
     Functions for VTK output.
     
    file  functionwriter.hh [code]
    file  functionwriter.hh [code]
     
    file  pointiterator.hh [code]
    file  pointiterator.hh [code]
     
    file  pvtuwriter.hh [code]
    file  pvtuwriter.hh [code]
     
    file  skeletonfunction.hh [code]
     Functions for VTK output on the skeleton.
    file  skeletonfunction.hh [code]
     Functions for VTK output on the skeleton.
     
    file  streams.hh [code]
    file  streams.hh [code]
     
    file  subsamplingvtkwriter.hh [code]
     Provides subsampled file i/o for the visualization toolkit.
    file  subsamplingvtkwriter.hh [code]
     Provides subsampled file i/o for the visualization toolkit.
     
    file  volumeiterators.hh [code]
    file  volumeiterators.hh [code]
     
    file  volumewriter.hh [code]
    file  volumewriter.hh [code]
     
    file  vtksequencewriter.hh [code]
    file  vtksequencewriter.hh [code]
     
    file  vtksequencewriterbase.hh [code]
    file  vtksequencewriterbase.hh [code]
     
    file  vtkwriter.hh [code]
     Provides file i/o for the visualization toolkit.
    file  vtkwriter.hh [code]
     Provides file i/o for the visualization toolkit.
     
    file  vtuwriter.hh [code]
    file  vtuwriter.hh [code]
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_c7946cd8c64c74ddbfaba08069596fbe.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_c7946cd8c64c74ddbfaba08069596fbe.html", "unified_diff": "@@ -92,46 +92,46 @@\n

    directory  blocks
     
    directory  utils
     
    \n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n \n \n \n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n-\n+\n \n \n \n-\n+\n \n

    \n Files

    file  dgfexception.hh [code]
    file  dgfexception.hh [code]
     
    file  dgfgeogrid.hh [code]
    file  dgfgeogrid.hh [code]
     
    file  dgfgridfactory.hh [code]
    file  dgfgridfactory.hh [code]
     
    file  dgfidentitygrid.hh [code]
    file  dgfidentitygrid.hh [code]
     
    file  dgfoned.hh [code]
     
    file  io/file/dgfparser/dgfparser.cc
     
    file  io/file/dgfparser/dgfparser.hh [code]
     
    file  dgfug.cc
    file  dgfug.cc
     
    file  dgfug.hh [code]
    file  dgfug.hh [code]
     
    file  dgfwriter.hh [code]
     write a GridView to a DGF file
    file  dgfwriter.hh [code]
     write a GridView to a DGF file
     
    file  dgfyasp.hh [code]
    file  dgfyasp.hh [code]
     
    file  entitykey.hh [code]
    file  entitykey.hh [code]
     
    file  entitykey_inline.hh [code]
    file  entitykey_inline.hh [code]
     
    file  gridptr.hh [code]
    file  gridptr.hh [code]
     
    file  macrogrid.hh [code]
     
    file  parser.hh [code]
    file  parser.hh [code]
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_e5ae0335e78259a61f16e105bf289391.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_e5ae0335e78259a61f16e105bf289391.html", "unified_diff": "@@ -102,27 +102,27 @@\n directory  vtk\n  \n \n \n \n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n

    \n Files

    file  io/file/dgfparser.hh [code]
     
    file  gmshreader.hh [code]
    file  gmshreader.hh [code]
     
    file  gmshwriter.hh [code]
    file  gmshwriter.hh [code]
     
    file  gnuplot.hh [code]
     Provides gnuplot output for 1D Grids.
    file  gnuplot.hh [code]
     Provides gnuplot output for 1D Grids.
     
    file  printgrid.hh [code]
    file  printgrid.hh [code]
     
    file  starcdreader.hh [code]
    file  starcdreader.hh [code]
     
    file  vtk.hh [code]
     Convenience header which includes all available VTK writers.
    file  vtk.hh [code]
     Convenience header which includes all available VTK writers.
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dir_e674d52c20e1458e445f655f7f65f7ce.html", "unified_diff": "@@ -79,79 +79,79 @@\n \"\"\n \"\"\n
    \n \n \n \n-\n-\n+\n+\n \n \n \n-\n+\n \n-\n-\n+\n+\n \n \n \n \n-\n-\n+\n+\n \n-\n+\n \n \n \n-\n+\n \n \n \n \n-\n+\n \n \n \n \n \n \n \n-\n+\n \n \n \n \n \n \n \n \n \n-\n-\n+\n+\n \n \n \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n

    \n Files

    file  adaptcallback.hh [code]
     interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
    file  adaptcallback.hh [code]
     interfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
     
    file  common/backuprestore.hh [code]
     
    file  boundaryprojection.hh [code]
    file  boundaryprojection.hh [code]
     
    file  boundarysegment.hh [code]
     Base class for grid boundary segments of arbitrary geometry.
    file  boundarysegment.hh [code]
     Base class for grid boundary segments of arbitrary geometry.
     
    file  common/capabilities.hh [code]
     A set of traits classes to store static information about grid implementation.
     
    file  datahandleif.hh [code]
     Describes the parallel communication interface class for MessageBuffers and DataHandles.
    file  datahandleif.hh [code]
     Describes the parallel communication interface class for MessageBuffers and DataHandles.
     
    file  defaultgridview.hh [code]
    file  defaultgridview.hh [code]
     
    file  common/entity.hh [code]
     
    file  entityiterator.hh [code]
    file  entityiterator.hh [code]
     
    file  common/entityseed.hh [code]
     Interface class EntitySeed.
     
    file  exceptions.hh [code]
    file  exceptions.hh [code]
     
    file  common/geometry.hh [code]
     Wrapper and interface classes for element geometries.
     
    file  common/grid.hh [code]
     Different resources needed by all grid implementations.
     
    file  gridenums.hh [code]
    file  gridenums.hh [code]
     
    file  common/gridfactory.hh [code]
     Provide a generic factory class for unstructured grids.
     
    file  common/gridinfo.hh [code]
     Some functions to list information about a grid.
     
    file  common/gridview.hh [code]
     
    file  indexidset.hh [code]
     Provides base classes for index and id sets.
    file  indexidset.hh [code]
     Provides base classes for index and id sets.
     
    file  common/intersection.hh [code]
     
    file  common/intersectioniterator.hh [code]
     
    file  mapper.hh [code]
     Provides classes with basic mappers which are used to attach data to a grid.
    file  mapper.hh [code]
     Provides classes with basic mappers which are used to attach data to a grid.
     
    file  mcmgmapper.hh [code]
     Mapper for multiple codim and multiple geometry types.
    file  mcmgmapper.hh [code]
     Mapper for multiple codim and multiple geometry types.
     
    file  partitionset.hh [code]
    file  partitionset.hh [code]
     
    file  rangegenerators.hh [code]
    file  rangegenerators.hh [code]
     
    file  scsgmapper.hh [code]
     Mapper classes are used to attach data to a grid.
    file  scsgmapper.hh [code]
     Mapper classes are used to attach data to a grid.
     
    file  sizecache.hh [code]
     Provides size cache classes to implement the grids size method efficiently.
    file  sizecache.hh [code]
     Provides size cache classes to implement the grids size method efficiently.
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/dune-grid.tag.gz", "unified_diff": null, "details": [{"source1": "dune-grid.tag", "source2": "dune-grid.tag", "unified_diff": null, "details": [{"source1": "dune-grid.tag", "source2": "dune-grid.tag", "unified_diff": "@@ -32,84 +32,84 @@\n a3c04138a5bfe5d72780bb7e82a18e627\n (int argc, char **argv)\n \n \n \n recipe-iterate-over-grid.cc\n /build/reproducible-path/dune-grid-2.9.0/doc/recipes/\n- a00149.html\n+ a00143.html\n dune/grid/yaspgrid.hh\n \n int\n main\n- a00149.html\n+ a00143.html\n a3c04138a5bfe5d72780bb7e82a18e627\n (int argc, char **argv)\n \n \n \n albertagrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/\n a00722.html\n- albertagrid/agrid.hh\n+ albertagrid/agrid.hh\n albertagrid/gridfactory.hh\n albertagrid/structuredgridfactory.hh\n albertagrid/persistentcontainer.hh\n \n \n agrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00698.html\n+ a00629.html\n dune/grid/common/grid.hh\n dune/grid/common/gridfactory.hh\n- dune/grid/common/adaptcallback.hh\n- dune/grid/common/sizecache.hh\n- albertaheader.hh\n- dune/grid/albertagrid/misc.hh\n+ dune/grid/common/adaptcallback.hh\n+ dune/grid/common/sizecache.hh\n+ albertaheader.hh\n+ dune/grid/albertagrid/misc.hh\n dune/grid/albertagrid/capabilities.hh\n dune/grid/albertagrid/backuprestore.hh\n- dune/grid/albertagrid/coordcache.hh\n+ dune/grid/albertagrid/coordcache.hh\n dune/grid/albertagrid/gridfamily.hh\n- dune/grid/albertagrid/level.hh\n+ dune/grid/albertagrid/level.hh\n dune/grid/albertagrid/intersection.hh\n dune/grid/albertagrid/intersectioniterator.hh\n dune/grid/albertagrid/datahandle.hh\n dune/grid/albertagrid/entityseed.hh\n indexsets.hh\n geometry.hh\n entity.hh\n- hierarchiciterator.hh\n- treeiterator.hh\n- leveliterator.hh\n- leafiterator.hh\n- albertagrid.cc\n- dune/grid/albertagrid/undefine-3.0.hh\n+ hierarchiciterator.hh\n+ treeiterator.hh\n+ leveliterator.hh\n+ leafiterator.hh\n+ albertagrid.cc\n+ dune/grid/albertagrid/undefine-3.0.hh\n Dune::AlbertaGrid\n Dune\n \n #define\n _ALBERTA_H_\n- a00698.html\n+ a00629.html\n a1067446415cacb23802d0f38ff2017d7\n \n \n \n \n albertagrid.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00620.html\n- geometry.cc\n- entity.cc\n- intersection.cc\n+ a00680.html\n+ geometry.cc\n+ entity.cc\n+ intersection.cc\n Dune\n Dune::Alberta\n \n #define\n DUNE_ALBERTAGRID_CC\n- a00620.html\n+ a00680.html\n a53133f6d063b9eb2237193ae58eef706\n \n \n \n static void\n checkAlbertaDimensions\n a01063.html\n@@ -123,72 +123,72 @@\n ae8607628dd0ee8dfb96046221b374752\n \n \n \n \n albertaheader.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00650.html\n+ a00704.html\n \n #define\n DIM_OF_WORLD\n- a00650.html\n+ a00704.html\n a362e6794dc8da37bca88774ed43b8e54\n \n \n \n #define\n ALBERTA\n- a00650.html\n+ a00704.html\n a4cbe74d935d2e31c4b35398e93623f70\n \n \n \n #define\n ALBERTA_DEBUG\n- a00650.html\n+ a00704.html\n a8b7e159f2d6cd4970d240f9748cd2d2a\n \n \n \n #define\n _MAX_NOT_DEFINED_\n- a00650.html\n+ a00704.html\n a4b7aa45c1743bf41ef31a987fcd0f372\n \n \n \n #define\n _MIN_NOT_DEFINED_\n- a00650.html\n+ a00704.html\n a7d0dab8defd85e01c2f14a68a40b4f32\n \n \n \n #define\n _ABS_NOT_DEFINED_\n- a00650.html\n+ a00704.html\n a0c6debd1ce74543115f35b5661f4f48b\n \n \n \n \n albertareader.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00674.html\n+ a00698.html\n dune/grid/common/grid.hh\n dune/grid/common/gridfactory.hh\n dune/grid/albertagrid/macrodata.hh\n Dune::AlbertaReader\n Dune\n \n \n algebra.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00719.html\n+ a00695.html\n Dune\n Dune::Alberta\n \n static FieldVector< K, 3 >\n vectorProduct\n a01064.html\n ac9ec1689c4568d01644db2bfee5947f6\n@@ -303,15 +303,15 @@\n Dune\n \n \n geometrygrid/backuprestore.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07199.html\n dune/grid/common/backuprestore.hh\n- dune/grid/geometrygrid/declaration.hh\n+ dune/grid/geometrygrid/declaration.hh\n dune/grid/geometrygrid/capabilities.hh\n Dune::GeoGrid::BackupRestoreFacilities\n Dune::GeoGrid::BackupRestoreFacilities< Grid, true >\n Dune::BackupRestoreFacility< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n Dune\n Dune::GeoGrid\n \n@@ -378,15 +378,15 @@\n Dune::Capabilities\n \n \n geometrygrid/capabilities.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07211.html\n dune/grid/common/capabilities.hh\n- dune/grid/geometrygrid/declaration.hh\n+ dune/grid/geometrygrid/declaration.hh\n Dune::Capabilities::hasSingleGeometryType< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n Dune::Capabilities::hasEntity< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >\n Dune::Capabilities::hasEntityIterator< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >\n Dune::Capabilities::canCommunicate< GeometryGrid< HostGrid, CoordFunction, Allocator >, codim >\n Dune::Capabilities::hasBackupRestoreFacilities< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n Dune::Capabilities::isLevelwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n Dune::Capabilities::isLeafwiseConforming< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n@@ -397,42 +397,42 @@\n Dune::Capabilities::CodimCache\n Dune\n Dune::Capabilities\n \n \n coordcache.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00695.html\n- dune/grid/albertagrid/meshpointer.hh\n- dune/grid/albertagrid/dofadmin.hh\n- dune/grid/albertagrid/dofvector.hh\n+ a00692.html\n+ dune/grid/albertagrid/meshpointer.hh\n+ dune/grid/albertagrid/dofadmin.hh\n+ dune/grid/albertagrid/dofvector.hh\n Dune::Alberta::CoordCache\n Dune::Alberta::CoordCache::LocalCaching\n Dune::Alberta::CoordCache::Interpolation\n Dune\n Dune::Alberta\n \n \n albertagrid/datahandle.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07214.html\n dune/grid/common/grid.hh\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/albertaheader.hh\n- dune/grid/albertagrid/elementinfo.hh\n- dune/grid/albertagrid/refinement.hh\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/albertaheader.hh\n+ dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/refinement.hh\n Dune::Alberta::AdaptRestrictProlongHandler\n Dune\n Dune::Alberta\n \n \n geometrygrid/datahandle.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07217.html\n- dune/grid/common/datahandleif.hh\n+ dune/grid/common/datahandleif.hh\n dune/grid/common/grid.hh\n dune/grid/geometrygrid/capabilities.hh\n dune/grid/geometrygrid/entity.hh\n Dune::GeoGrid::CommDataHandle\n Dune\n Dune::GeoGrid\n \n@@ -451,15 +451,15 @@\n \n \n \n io/file/dgfparser/dgfparser.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n a07223.html\n dune/grid/io/file/dgfparser/dgfparser.hh\n- dune/grid/io/file/dgfparser/blocks/boundarydom.hh\n+ dune/grid/io/file/dgfparser/blocks/boundarydom.hh\n Dune::DGFPrintInfo\n Dune\n \n static const std::string\n dgfid\n a01063.html\n a03a08fe7daf28835f1dbf203d777c47e\n@@ -471,79 +471,79 @@\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07226.html\n dune/grid/albertagrid.hh\n dune/grid/albertagrid/gridfactory.hh\n dune/grid/io/file/dgfparser/dgfparser.hh\n dune/grid/io/file/dgfparser/blocks/projection.hh\n dune/grid/common/intersection.hh\n- dune/grid/io/file/dgfparser/parser.hh\n+ dune/grid/io/file/dgfparser/parser.hh\n Dune::DGFGridFactory< AlbertaGrid< dim, dimworld > >\n Dune::DGFGridInfo< AlbertaGrid< dim, dimworld > >\n Dune\n \n \n io/file/dgfparser.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/\n a07229.html\n dgfparser/dgfparser.hh\n dune/grid/albertagrid/dgfparser.hh\n- dgfparser/dgfug.hh\n+ dgfparser/dgfug.hh\n dgfparser/dgfoned.hh\n- dgfparser/dgfyasp.hh\n- dgfparser/dgfgeogrid.hh\n- dgfparser/dgfidentitygrid.hh\n+ dgfparser/dgfyasp.hh\n+ dgfparser/dgfgeogrid.hh\n+ dgfparser/dgfidentitygrid.hh\n \n \n io/file/dgfparser/dgfparser.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n a07232.html\n- dune/grid/common/gridenums.hh\n- dune/grid/common/datahandleif.hh\n- dune/grid/io/file/dgfparser/dgfexception.hh\n- dune/grid/io/file/dgfparser/entitykey.hh\n- dune/grid/io/file/dgfparser/parser.hh\n- dune/grid/io/file/dgfparser/gridptr.hh\n+ dune/grid/common/gridenums.hh\n+ dune/grid/common/datahandleif.hh\n+ dune/grid/io/file/dgfparser/dgfexception.hh\n+ dune/grid/io/file/dgfparser/entitykey.hh\n+ dune/grid/io/file/dgfparser/parser.hh\n+ dune/grid/io/file/dgfparser/gridptr.hh\n dune/grid/io/file/dgfparser/macrogrid.hh\n- dune/grid/io/file/dgfparser/dgfgridfactory.hh\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n- dune/grid/io/file/dgfparser/blocks/boundarydom.hh\n- dune/grid/io/file/dgfparser/blocks/boundaryseg.hh\n- dune/grid/io/file/dgfparser/blocks/cube.hh\n- dune/grid/io/file/dgfparser/blocks/dim.hh\n- dune/grid/io/file/dgfparser/blocks/general.hh\n- dune/grid/io/file/dgfparser/blocks/gridparameter.hh\n- dune/grid/io/file/dgfparser/blocks/interval.hh\n- dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh\n- dune/grid/io/file/dgfparser/blocks/polygon.hh\n- dune/grid/io/file/dgfparser/blocks/polyhedron.hh\n+ dune/grid/io/file/dgfparser/dgfgridfactory.hh\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n+ dune/grid/io/file/dgfparser/blocks/boundarydom.hh\n+ dune/grid/io/file/dgfparser/blocks/boundaryseg.hh\n+ dune/grid/io/file/dgfparser/blocks/cube.hh\n+ dune/grid/io/file/dgfparser/blocks/dim.hh\n+ dune/grid/io/file/dgfparser/blocks/general.hh\n+ dune/grid/io/file/dgfparser/blocks/gridparameter.hh\n+ dune/grid/io/file/dgfparser/blocks/interval.hh\n+ dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh\n+ dune/grid/io/file/dgfparser/blocks/polygon.hh\n+ dune/grid/io/file/dgfparser/blocks/polyhedron.hh\n dune/grid/io/file/dgfparser/blocks/projection.hh\n- dune/grid/io/file/dgfparser/blocks/simplex.hh\n- dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh\n+ dune/grid/io/file/dgfparser/blocks/simplex.hh\n+ dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh\n dune/grid/io/file/dgfparser/blocks/vertex.hh\n Dune::DGFGridInfo\n Dune\n \n \n dofadmin.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00635.html\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ a00614.html\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/elementinfo.hh\n Dune::Alberta::DofAccess\n Dune::Alberta::HierarchyDofNumbering\n Dune\n Dune::Alberta\n \n \n dofvector.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00641.html\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/elementinfo.hh\n- dune/grid/albertagrid/refinement.hh\n+ a00653.html\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/refinement.hh\n Dune::Alberta::DofVectorProvider< int >\n Dune::Alberta::DofVectorProvider< signed char >\n Dune::Alberta::DofVectorProvider< unsigned char >\n Dune::Alberta::DofVectorProvider< Real >\n Dune::Alberta::DofVectorProvider< GlobalVector >\n Dune::Alberta::DofVectorPointer\n Dune\n@@ -569,93 +569,93 @@\n aca064a9bc66806f78ea771e804e5582d\n (const DofVectorPointer< int > &dofVector)\n \n \n \n elementinfo.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00626.html\n- dune/grid/albertagrid/elementinfo.hh\n- dune/grid/albertagrid/meshpointer.hh\n+ a00713.html\n+ dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/meshpointer.hh\n Dune\n Dune::Alberta\n \n \n elementinfo.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00716.html\n- dune/grid/albertagrid/geometrycache.hh\n- dune/grid/albertagrid/macroelement.hh\n+ a00638.html\n+ dune/grid/albertagrid/geometrycache.hh\n+ dune/grid/albertagrid/macroelement.hh\n Dune::Alberta::ElementInfo\n Dune::Alberta::ElementInfo::Instance\n Dune::Alberta::ElementInfo::Stack\n Dune::Alberta::ElementInfo::Seed\n Dune\n Dune::Alberta\n \n \n entity.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00614.html\n+ a00689.html\n Dune\n \n #define\n DUNE_ALBERTA_ENTITY_CC\n- a00614.html\n+ a00689.html\n a52a3d21da8af78e4568aaed1c24da792\n \n \n \n \n albertagrid/entity.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07235.html\n dune/grid/common/entity.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/elementinfo.hh\n dune/grid/albertagrid/entityseed.hh\n dune/grid/albertagrid/geometry.hh\n Dune::AlbertaGridEntity\n Dune::AlbertaGridEntity::Codim\n Dune::AlbertaGridEntity< 0, dim, Grid >\n Dune::AlbertaGridEntity< 0, dim, Grid >::Codim\n Dune\n \n \n common/entity.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n a07238.html\n grid.hh\n- rangegenerators.hh\n+ rangegenerators.hh\n Dune::Entity\n Dune::Entity< 0, dim, GridImp, EntityImp >\n Dune::Entity< 0, dim, GridImp, EntityImp >::Codim\n Dune::EntityDefaultImplementation\n Dune::EntityDefaultImplementation< 0, dim, GridImp, EntityImp >\n Dune\n \n \n geometrygrid/entity.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07241.html\n dune/grid/common/grid.hh\n dune/grid/geometrygrid/capabilities.hh\n- dune/grid/geometrygrid/cornerstorage.hh\n+ dune/grid/geometrygrid/cornerstorage.hh\n Dune::GeoGrid::EntityBase< codim, Grid, false >\n Dune::GeoGrid::EntityBase< codim, Grid, true >\n Dune::GeoGrid::Entity\n Dune::GeoGrid::Entity< 0, dim, Grid >\n Dune\n Dune::GeoGrid\n \n \n albertagrid/entityseed.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07244.html\n- dune/grid/albertagrid/elementinfo.hh\n- dune/grid/albertagrid/meshpointer.hh\n+ dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/meshpointer.hh\n Dune::AlbertaGridEntitySeed< codim, const AlbertaGrid< dim, dimworld > >\n Dune::AlbertaGridEntitySeed< 0, const AlbertaGrid< dim, dimworld > >\n Dune\n \n \n common/entityseed.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n@@ -674,36 +674,36 @@\n Dune::GeoGrid::EntitySeed< codim, Grd, true >\n Dune\n Dune::GeoGrid\n \n \n geometry.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00701.html\n- dune/grid/albertagrid/algebra.hh\n+ a00659.html\n+ dune/grid/albertagrid/algebra.hh\n dune/grid/albertagrid/geometry.hh\n- dune/grid/albertagrid/refinement.hh\n+ dune/grid/albertagrid/refinement.hh\n Dune::AlbertaGridLocalGeometryProvider::GeoInFatherCoordReader\n Dune::AlbertaGridLocalGeometryProvider::FaceCoordReader\n Dune\n \n #define\n DUNE_ALBERTA_GEOMETRY_CC\n- a00701.html\n+ a00659.html\n a085bbe8bddf730dd71a187dceae4e610\n \n \n \n \n albertagrid/geometry.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07253.html\n dune/grid/common/geometry.hh\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/elementinfo.hh\n Dune::AlbertaGridCoordinateReader\n Dune::AlbertaGridGeometry\n Dune::AlbertaGridGlobalGeometry\n Dune::AlbertaGridGlobalGeometry< dim, cdim, const AlbertaGrid< dim, cdim > >\n Dune::AlbertaGridLocalGeometryProvider\n Dune::AlbertaGridLocalGeometryProvider::Codim\n Dune\n@@ -725,62 +725,62 @@\n \n \n \n geometrygrid/geometry.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07259.html\n dune/grid/common/capabilities.hh\n- dune/grid/geometrygrid/cornerstorage.hh\n+ dune/grid/geometrygrid/cornerstorage.hh\n Dune::GeoGrid::InferHasSingleGeometryType\n Dune::GeoGrid::InferHasSingleGeometryType< hasSingleGeometryType, dim, 1 >\n Dune::GeoGrid::InferHasSingleGeometryType< hasSingleGeometryType, dim, 0 >\n Dune::GeoGrid::GeometryTraits\n Dune::GeoGrid::GeometryTraits::CornerStorage\n Dune::GeoGrid::GeometryTraits::hasSingleGeometryType\n Dune::GeoGrid::Geometry\n Dune::GeoGrid::Geometry::Mapping\n Dune\n Dune::GeoGrid\n \n \n geometrycache.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00680.html\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/algebra.hh\n+ a00671.html\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/algebra.hh\n Dune::Alberta::GeometryCache\n Dune::Alberta::GeometryCacheProxy\n Dune\n Dune::Alberta\n \n \n geometryreference.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00707.html\n+ a00626.html\n dune/grid/common/geometry.hh\n Dune::GeometryReference\n Dune::LocalGeometryReference\n Dune\n \n \n albertagrid/gridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07262.html\n dune/grid/common/gridfactory.hh\n- dune/grid/albertagrid/agrid.hh\n+ dune/grid/albertagrid/agrid.hh\n Dune::GridFactory< AlbertaGrid< dim, dimworld > >\n Dune::GridFactory< AlbertaGrid< dim, dimworld > >::Codim\n Dune::GridFactory< AlbertaGrid< dim, dimworld > >::ProjectionFactory\n Dune\n \n \n common/gridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n a07265.html\n- dune/grid/common/boundarysegment.hh\n+ dune/grid/common/boundarysegment.hh\n dune/grid/common/grid.hh\n Dune::GridFactoryInterface\n Dune::GridFactoryInterface::Codim\n Dune::GridFactory\n Dune\n \n #define\n@@ -794,39 +794,39 @@\n albertagrid/gridfamily.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07268.html\n dune/grid/common/entity.hh\n dune/grid/common/geometry.hh\n dune/grid/common/intersection.hh\n dune/grid/common/intersectioniterator.hh\n- dune/grid/common/entityiterator.hh\n- dune/grid/albertagrid/misc.hh\n+ dune/grid/common/entityiterator.hh\n+ dune/grid/albertagrid/misc.hh\n dune/grid/albertagrid/gridview.hh\n- dune/grid/albertagrid/geometryreference.hh\n+ dune/grid/albertagrid/geometryreference.hh\n Dune::AlbertaGridFamily\n Dune::AlbertaGridFamily::Traits\n Dune::AlbertaGridFamily::Traits::Codim\n Dune::AlbertaGridFamily::Traits::Codim::Partition\n Dune\n \n \n geometrygrid/gridfamily.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07271.html\n dune/grid/common/grid.hh\n dune/grid/geometrygrid/capabilities.hh\n- dune/grid/geometrygrid/declaration.hh\n+ dune/grid/geometrygrid/declaration.hh\n dune/grid/geometrygrid/entity.hh\n dune/grid/geometrygrid/entityseed.hh\n dune/grid/geometrygrid/geometry.hh\n dune/grid/geometrygrid/gridview.hh\n dune/grid/geometrygrid/intersection.hh\n dune/grid/geometrygrid/intersectioniterator.hh\n- dune/grid/geometrygrid/iterator.hh\n- dune/grid/geometrygrid/idset.hh\n+ dune/grid/geometrygrid/iterator.hh\n+ dune/grid/geometrygrid/idset.hh\n dune/grid/geometrygrid/indexsets.hh\n Dune::GeoGrid::ExportParams\n Dune::GeoGrid::GridFamily\n Dune::GeoGrid::GridFamily::Traits\n Dune::GeoGrid::GridFamily::Traits::Codim\n Dune::GeoGrid::GridFamily::Traits::Codim::Partition\n Dune\n@@ -851,16 +851,16 @@\n Dune::AlbertaLeafGridView::Codim\n Dune\n \n \n common/gridview.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n a07277.html\n- dune/grid/common/datahandleif.hh\n- dune/grid/common/rangegenerators.hh\n+ dune/grid/common/datahandleif.hh\n+ dune/grid/common/rangegenerators.hh\n Dune::GridView\n Dune::GridView::Codim\n Dune::GridView::Codim::Partition\n Dune::GridView::DeprecatedMethodEmptyFuture\n Dune::GridView::CheckIsConformingImpl\n Dune\n \n@@ -870,51 +870,51 @@\n a07280.html\n dune/grid/common/capabilities.hh\n dune/grid/common/gridview.hh\n dune/grid/geometrygrid/datahandle.hh\n dune/grid/geometrygrid/indexsets.hh\n dune/grid/geometrygrid/intersection.hh\n dune/grid/geometrygrid/intersectioniterator.hh\n- dune/grid/geometrygrid/iterator.hh\n+ dune/grid/geometrygrid/iterator.hh\n Dune::GeoGrid::GridViewTraits\n Dune::GeoGrid::GridViewTraits::Codim\n Dune::GeoGrid::GridViewTraits::Codim::Partition\n Dune::GeoGrid::GridView\n Dune::GeoGrid::GridView::Codim\n Dune\n Dune::GeoGrid\n \n \n hierarchiciterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00689.html\n- dune/grid/albertagrid/elementinfo.hh\n- dune/grid/common/entityiterator.hh\n+ a00620.html\n+ dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/common/entityiterator.hh\n Dune::AlbertaGridHierarchicIterator\n Dune\n \n \n indexsets.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00659.html\n+ a00710.html\n dune/grid/albertagrid/indexsets.hh\n- dune/grid/albertagrid/agrid.hh\n+ dune/grid/albertagrid/agrid.hh\n Dune\n \n \n albertagrid/indexsets.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07283.html\n dune/grid/common/grid.hh\n- dune/grid/common/indexidset.hh\n- dune/grid/albertagrid/indexstack.hh\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/dofadmin.hh\n- dune/grid/albertagrid/dofvector.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/common/indexidset.hh\n+ dune/grid/albertagrid/indexstack.hh\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/dofadmin.hh\n+ dune/grid/albertagrid/dofvector.hh\n+ dune/grid/albertagrid/elementinfo.hh\n dune/grid/albertagrid/gridfamily.hh\n Dune::AlbertaGridHierarchicIndexSet\n Dune::AlbertaGridHierarchicIndexSet::InitEntityNumber\n Dune::AlbertaGridIndexSet\n Dune::AlbertaGridIdSet\n Dune\n Dune::Alberta\n@@ -926,51 +926,51 @@\n \n \n \n \n geometrygrid/indexsets.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07286.html\n- dune/grid/common/gridenums.hh\n- dune/grid/common/indexidset.hh\n- dune/grid/geometrygrid/declaration.hh\n+ dune/grid/common/gridenums.hh\n+ dune/grid/common/indexidset.hh\n+ dune/grid/geometrygrid/declaration.hh\n Dune::GeoGrid::IndexSet\n Dune\n Dune::GeoGrid\n \n \n indexstack.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00677.html\n+ a00683.html\n Dune::IndexStack\n Dune\n \n \n intersection.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00656.html\n+ a00677.html\n dune/grid/albertagrid/intersection.hh\n Dune::AlbertaGridIntersectionBase::GlobalCoordReader\n Dune::AlbertaGridIntersectionBase::LocalCoordReader\n Dune\n \n #define\n DUNE_ALBERTA_INTERSECTION_CC\n- a00656.html\n+ a00677.html\n a8d4a192c9f43ac0db61703b46cb6a297\n \n \n \n \n albertagrid/intersection.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07289.html\n dune/grid/common/intersection.hh\n- dune/grid/albertagrid/transformation.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/transformation.hh\n+ dune/grid/albertagrid/elementinfo.hh\n dune/grid/albertagrid/geometry.hh\n Dune::AlbertaGridIntersectionBase\n Dune::AlbertaGridLeafIntersection\n Dune\n \n \n common/intersection.hh\n@@ -981,16 +981,16 @@\n Dune::IntersectionDefaultNormalVectors\n Dune\n \n \n geometrygrid/intersection.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07295.html\n- dune/grid/geometrygrid/declaration.hh\n- dune/grid/geometrygrid/cornerstorage.hh\n+ dune/grid/geometrygrid/declaration.hh\n+ dune/grid/geometrygrid/cornerstorage.hh\n Dune::GeoGrid::Intersection\n Dune\n Dune::GeoGrid\n \n \n albertagrid/intersectioniterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n@@ -1020,100 +1020,100 @@\n Dune::GeoGrid::IntersectionIterator\n Dune\n Dune::GeoGrid\n \n \n leafiterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00671.html\n- dune/grid/common/entityiterator.hh\n- dune/grid/albertagrid/treeiterator.hh\n+ a00716.html\n+ dune/grid/common/entityiterator.hh\n+ dune/grid/albertagrid/treeiterator.hh\n Dune::AlbertaGridLeafIterator\n Dune::AlbertaGridLeafIterator< codim, Ghost_Partition, GridImp >\n Dune\n \n \n level.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00629.html\n- dune/grid/albertagrid/meshpointer.hh\n- dune/grid/albertagrid/dofadmin.hh\n- dune/grid/albertagrid/dofvector.hh\n+ a00656.html\n+ dune/grid/albertagrid/meshpointer.hh\n+ dune/grid/albertagrid/dofadmin.hh\n+ dune/grid/albertagrid/dofvector.hh\n Dune::AlbertaGridLevelProvider\n Dune::AlbertaGridLevelProvider::SetLocal\n Dune::AlbertaGridLevelProvider::CalcMaxLevel\n Dune::AlbertaGridLevelProvider::Interpolation\n Dune\n \n \n leveliterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00665.html\n- dune/grid/common/entityiterator.hh\n- dune/grid/albertagrid/treeiterator.hh\n+ a00644.html\n+ dune/grid/common/entityiterator.hh\n+ dune/grid/albertagrid/treeiterator.hh\n Dune::AlbertaGridLevelIterator\n Dune::AlbertaGridLevelIterator< codim, Ghost_Partition, GridImp >\n Dune\n \n \n macrodata.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00704.html\n- dune/grid/common/exceptions.hh\n+ a00701.html\n+ dune/grid/common/exceptions.hh\n dune/grid/albertagrid/macrodata.hh\n Dune\n Dune::Alberta\n \n \n macrodata.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a00662.html\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/algebra.hh\n- dune/grid/albertagrid/albertaheader.hh\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/algebra.hh\n+ dune/grid/albertagrid/albertaheader.hh\n Dune::Alberta::MacroData\n Dune::Alberta::MacroData::Library\n Dune\n Dune::Alberta\n \n \n macroelement.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00653.html\n- dune/grid/albertagrid/misc.hh\n+ a00674.html\n+ dune/grid/albertagrid/misc.hh\n Dune::Alberta::MacroElement\n Dune\n Dune::Alberta\n \n \n meshpointer.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00710.html\n- dune/grid/albertagrid/meshpointer.hh\n+ a00719.html\n+ dune/grid/albertagrid/meshpointer.hh\n Dune\n Dune::Alberta\n \n \n meshpointer.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00713.html\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ a00647.html\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/elementinfo.hh\n dune/grid/albertagrid/macrodata.hh\n dune/grid/albertagrid/projection.hh\n Dune::Alberta::MeshPointer\n Dune::Alberta::MeshPointer::MacroIterator\n Dune\n Dune::Alberta\n \n \n misc.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00638.html\n- dune/grid/albertagrid/albertaheader.hh\n+ a00686.html\n+ dune/grid/albertagrid/albertaheader.hh\n Dune::AlbertaError\n Dune::AlbertaIOError\n Dune::Alberta::GlobalSpace\n Dune::Alberta::NumSubEntities< dim, 0 >\n Dune::Alberta::NumSubEntities< dim, dim >\n Dune::Alberta::NumSubEntities< 0, 0 >\n Dune::Alberta::NumSubEntities< 2, 1 >\n@@ -1145,15 +1145,15 @@\n Dune::Alberta::Twist< dim, 2 >\n Dune::Alberta::Twist< 2, 2 >\n Dune\n Dune::Alberta\n \n #define\n DUNE_ALBERTA_CACHE_COORDINATES\n- a00638.html\n+ a00686.html\n ac7a758bde399b9ddaa1d7efc4d08c19a\n \n \n \n ALBERTA REAL\n Real\n a01064.html\n@@ -1302,33 +1302,33 @@\n \n \n \n albertagrid/persistentcontainer.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07307.html\n dune/grid/utility/persistentcontainer.hh\n- dune/grid/utility/persistentcontainervector.hh\n+ dune/grid/utility/persistentcontainervector.hh\n Dune::PersistentContainer< AlbertaGrid< dim, dimworld >, T >\n Dune\n \n \n geometrygrid/persistentcontainer.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07310.html\n- dune/grid/geometrygrid/declaration.hh\n+ dune/grid/geometrygrid/declaration.hh\n dune/grid/utility/persistentcontainer.hh\n- dune/grid/utility/persistentcontainerwrapper.hh\n+ dune/grid/utility/persistentcontainerwrapper.hh\n Dune::PersistentContainer< GeometryGrid< HostGrid, CoordFunction, Allocator >, T >\n Dune\n \n \n utility/persistentcontainer.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n a07313.html\n- dune/grid/utility/persistentcontainermap.hh\n+ dune/grid/utility/persistentcontainermap.hh\n Dune::PersistentContainer\n Dune::PersistentContainer< const Grid, T >\n Dune\n std\n \n void\n swap\n@@ -1337,32 +1337,32 @@\n (Dune::PersistentContainer< G, T > &a, Dune::PersistentContainer< G, T > &b)\n \n \n \n albertagrid/projection.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07316.html\n- dune/grid/common/boundaryprojection.hh\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/common/boundaryprojection.hh\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/elementinfo.hh\n Dune::Alberta::DuneBoundaryProjection\n Dune::Alberta::ProjectionFactoryInterface\n Dune::Alberta::ProjectionFactory\n Dune::Alberta::DuneGlobalBoundaryProjectionFactory\n Dune::Alberta::BasicNodeProjection\n Dune::Alberta::NodeProjection\n Dune\n Dune::Alberta\n \n \n io/file/dgfparser/blocks/projection.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n a07319.html\n- dune/grid/common/boundaryprojection.hh\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ dune/grid/common/boundaryprojection.hh\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::ProjectionBlock\n Dune::dgf::ProjectionBlock::Expression\n Dune\n Dune::dgf\n \n std::ostream &\n operator<<\n@@ -1370,17 +1370,17 @@\n a0404555c6f1763aa0e2c532e9c2a5c8e\n (std::ostream &out, const ProjectionBlock::Token &token)\n \n \n \n refinement.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00686.html\n- dune/grid/albertagrid/misc.hh\n- dune/grid/albertagrid/elementinfo.hh\n+ a00641.html\n+ dune/grid/albertagrid/misc.hh\n+ dune/grid/albertagrid/elementinfo.hh\n Dune::Alberta::Patch\n Dune::Alberta::ForEachInteriorSubChild< dim, 0 >\n Dune::Alberta::ForEachInteriorSubChild< dim, dim >\n Dune::Alberta::ForEachInteriorSubChild< 2, 1 >\n Dune::Alberta::ForEachInteriorSubChild< 3, 1 >\n Dune::Alberta::ForEachInteriorSubChild< 3, 2 >\n Dune::Alberta::GeometryInFather< 1 >\n@@ -1390,99 +1390,99 @@\n Dune::Alberta\n \n \n albertagrid/structuredgridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n a07322.html\n dune/grid/common/gridfactory.hh\n- dune/grid/utility/multiindex.hh\n+ dune/grid/utility/multiindex.hh\n dune/grid/utility/structuredgridfactory.hh\n Dune::StructuredGridFactory< AlbertaGrid< dim, dimworld > >\n Dune\n \n \n utility/structuredgridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n a07325.html\n dune/grid/common/gridfactory.hh\n- dune/grid/utility/multiindex.hh\n+ dune/grid/utility/multiindex.hh\n Dune::StructuredGridFactory\n Dune\n \n \n transformation.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00617.html\n- dune/grid/albertagrid/misc.hh\n+ a00635.html\n+ dune/grid/albertagrid/misc.hh\n Dune::AlbertaTransformation\n Dune\n \n \n treeiterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00644.html\n- dune/grid/albertagrid/elementinfo.hh\n- dune/grid/albertagrid/meshpointer.hh\n+ a00707.html\n+ dune/grid/albertagrid/elementinfo.hh\n+ dune/grid/albertagrid/meshpointer.hh\n Dune::AlbertaMarkerVector\n Dune::AlbertaMarkerVector::MarkSubEntities::Codim\n Dune::AlbertaGridTreeIterator\n Dune\n \n \n undefine-2.0.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00683.html\n+ a00668.html\n \n \n undefine-3.0.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/albertagrid/\n- a00647.html\n+ a00665.html\n \n \n adaptcallback.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00350.html\n+ a00323.html\n Dune::AdaptDataHandleInterface\n Dune::AdaptDataHandle\n Dune::CombinedAdaptProlongRestrict\n Dune\n \n \n boundaryprojection.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00269.html\n- dune/grid/common/boundarysegment.hh\n- dune/grid/common/datahandleif.hh\n- dune/grid/io/file/gmshreader.hh\n+ a00329.html\n+ dune/grid/common/boundarysegment.hh\n+ dune/grid/common/datahandleif.hh\n+ dune/grid/io/file/gmshreader.hh\n Dune::DuneBoundaryProjection\n Dune::BoundaryProjectionWrapper\n Dune::BoundarySegmentWrapper\n Dune::CircleBoundaryProjection\n Dune\n \n \n boundarysegment.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00305.html\n+ a00350.html\n Dune::BoundarySegmentBackupRestore\n Dune::BoundarySegment\n Dune\n \n \n datahandleif.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00293.html\n+ a00278.html\n Dune::MessageBufferIF\n Dune::CommDataHandleIF\n Dune\n \n \n defaultgridview.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00338.html\n+ a00317.html\n dune/grid/common/capabilities.hh\n dune/grid/common/gridview.hh\n Dune::DefaultLevelGridViewTraits\n Dune::DefaultLevelGridViewTraits::Codim\n Dune::DefaultLevelGridViewTraits::Codim::Partition\n Dune::DefaultLevelGridView\n Dune::DefaultLevelGridView::Codim\n@@ -1492,44 +1492,44 @@\n Dune::DefaultLeafGridView\n Dune::DefaultLeafGridView::Codim\n Dune\n \n \n entityiterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00320.html\n+ a00293.html\n Dune::EntityIterator\n std::iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >\n Dune\n std\n \n \n exceptions.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00242.html\n+ a00320.html\n Dune::GridError\n Dune\n \n \n common/grid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n a07328.html\n- dune/grid/common/gridenums.hh\n- dune/grid/common/exceptions.hh\n+ dune/grid/common/gridenums.hh\n+ dune/grid/common/exceptions.hh\n dune/grid/common/capabilities.hh\n- dune/grid/common/datahandleif.hh\n+ dune/grid/common/datahandleif.hh\n dune/grid/common/gridview.hh\n- dune/grid/common/defaultgridview.hh\n+ dune/grid/common/defaultgridview.hh\n dune/grid/common/entityseed.hh\n geometry.hh\n entity.hh\n intersection.hh\n intersectioniterator.hh\n- entityiterator.hh\n- indexidset.hh\n+ entityiterator.hh\n+ indexidset.hh\n Dune::Grid\n Dune::Grid::Codim\n Dune::Grid::Codim::Partition\n Dune::GridDefaultImplementation\n Dune::GridTraits\n Dune::GridTraits::Codim\n Dune::GridTraits::Codim::Partition\n@@ -1558,26 +1558,26 @@\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a07331.html\n dune/grid/common/grid.hh\n dune/grid/geometrygrid/backuprestore.hh\n dune/grid/geometrygrid/capabilities.hh\n dune/grid/geometrygrid/datahandle.hh\n dune/grid/geometrygrid/gridfamily.hh\n- dune/grid/geometrygrid/identity.hh\n+ dune/grid/geometrygrid/identity.hh\n dune/grid/geometrygrid/persistentcontainer.hh\n Dune::DefaultCoordFunction\n Dune::GeometryGrid\n Dune::GeometryGrid::Codim\n Dune::GeometryGrid::Codim::Partition\n Dune\n \n \n gridenums.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00260.html\n+ a00347.html\n Dune\n \n \n PartitionType\n a01031.html\n gabd89b77709db1d9e56bb17cd0aa44c3d\n \n@@ -1768,15 +1768,15 @@\n (const G &grid, std::string prefix)\n \n \n \n utility/gridinfo.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n a07337.html\n- dune/grid/common/mcmgmapper.hh\n+ dune/grid/common/mcmgmapper.hh\n Dune::EntityInfo\n Dune::GridViewInfoGTCompare\n Dune::GridViewInfo\n Dune\n \n void\n fillGridViewInfoSerial\n@@ -1784,35 +1784,35 @@\n a4217251cdcb94f8bf2db77f8eafe0323\n (const GV &gv, GridViewInfo< typename GV::ctype > &gridViewInfo)\n \n \n \n indexidset.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00359.html\n+ a00299.html\n dune/grid/common/grid.hh\n Dune::IndexSet\n Dune::IndexSet::Codim\n Dune::IndexSetDefaultImplementation\n Dune::IdSet\n Dune::IdSet::Codim\n Dune\n \n \n mapper.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00335.html\n+ a00245.html\n Dune::Mapper\n Dune\n \n \n mcmgmapper.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00272.html\n- mapper.hh\n+ a00296.html\n+ mapper.hh\n Dune::MultipleCodimMultipleGeomTypeMapper\n Dune::LeafMultipleCodimMultipleGeomTypeMapper\n Dune::LevelMultipleCodimMultipleGeomTypeMapper\n Dune\n \n std::function< size_t(GeometryType, int)>\n MCMGLayout\n@@ -1848,16 +1848,16 @@\n gae9caf92c46fedd5287c5e011dcbdd3b5\n ()\n \n \n \n partitionset.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00236.html\n- dune/grid/common/gridenums.hh\n+ a00356.html\n+ dune/grid/common/gridenums.hh\n Dune::PartitionSet\n Dune\n Dune::Partitions\n \n PartitionSet<... >\n Interior\n a01067.html\n@@ -1983,35 +1983,35 @@\n a1db4b787d5e75e6a56002e915d5a5c92\n \n \n \n \n rangegenerators.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00251.html\n- dune/grid/common/gridenums.hh\n- dune/grid/common/partitionset.hh\n+ a00335.html\n+ dune/grid/common/gridenums.hh\n+ dune/grid/common/partitionset.hh\n Dune\n \n \n scsgmapper.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00323.html\n- mapper.hh\n+ a00353.html\n+ mapper.hh\n dune/grid/common/grid.hh\n Dune::SingleCodimSingleGeomTypeMapper\n Dune::LeafSingleCodimSingleGeomTypeMapper\n Dune::LevelSingleCodimSingleGeomTypeMapper\n Dune\n \n \n sizecache.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/common/\n- a00347.html\n- dune/grid/common/gridenums.hh\n+ a00266.html\n+ dune/grid/common/gridenums.hh\n dune/grid/common/capabilities.hh\n Dune::SizeCache\n Dune\n \n \n geometrygrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/\n@@ -2019,96 +2019,96 @@\n dune/grid/geometrygrid/grid.hh\n dune/grid/geometrygrid/persistentcontainer.hh\n \n \n cachedcoordfunction.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a00596.html\n- dune/grid/common/gridenums.hh\n+ dune/grid/common/gridenums.hh\n dune/grid/geometrygrid/capabilities.hh\n- dune/grid/geometrygrid/coordfunctioncaller.hh\n+ dune/grid/geometrygrid/coordfunctioncaller.hh\n dune/grid/utility/persistentcontainer.hh\n Dune::GeoGrid::CoordCache\n Dune::CachedCoordFunction\n Dune\n Dune::GeoGrid\n \n \n coordfunction.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n- a00575.html\n+ a00599.html\n Dune::AnalyticalCoordFunctionInterface\n Dune::AnalyticalCoordFunction\n Dune::DiscreteCoordFunctionInterface\n Dune::DiscreteCoordFunction\n Dune::GeoGrid::isCoordFunctionInterface\n Dune::GeoGrid::isDiscreteCoordFunctionInterface\n Dune::GeoGrid::AdaptCoordFunction\n Dune\n Dune::GeoGrid\n \n \n coordfunctioncaller.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n- a00581.html\n+ a00608.html\n dune/grid/geometrygrid/hostcorners.hh\n- dune/grid/geometrygrid/coordfunction.hh\n+ dune/grid/geometrygrid/coordfunction.hh\n Dune\n Dune::GeoGrid\n \n \n cornerstorage.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n- a00590.html\n- dune/grid/geometrygrid/coordfunctioncaller.hh\n+ a00569.html\n+ dune/grid/geometrygrid/coordfunctioncaller.hh\n Dune::GeoGrid::CoordVector< mydim, Grid, false >\n Dune::GeoGrid::CoordVector< mydim, Grid, true >\n Dune::GeoGrid::IntersectionCoordVector\n Dune::GeoGrid::CornerStorage\n Dune\n Dune::GeoGrid\n \n \n declaration.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n- a00572.html\n+ a00581.html\n Dune\n \n \n hostcorners.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n a00584.html\n dune/grid/common/entity.hh\n Dune::GeoGrid::HostCorners\n Dune\n Dune::GeoGrid\n \n \n identity.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n- a00605.html\n- dune/grid/geometrygrid/coordfunction.hh\n+ a00566.html\n+ dune/grid/geometrygrid/coordfunction.hh\n Dune::IdenticalCoordFunction\n Dune\n \n \n idset.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n- a00602.html\n- dune/grid/common/indexidset.hh\n+ a00578.html\n+ dune/grid/common/indexidset.hh\n Dune::GeoGrid::IdSet\n Dune\n Dune::GeoGrid\n \n \n iterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/geometrygrid/\n- a00587.html\n+ a00605.html\n dune/grid/geometrygrid/capabilities.hh\n- dune/grid/geometrygrid/declaration.hh\n+ dune/grid/geometrygrid/declaration.hh\n dune/grid/geometrygrid/entity.hh\n Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid >\n Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid >\n Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid >\n Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid >\n Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid >\n Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid >\n@@ -2121,254 +2121,254 @@\n \n identitygrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/\n a00728.html\n dune/grid/common/capabilities.hh\n dune/grid/common/grid.hh\n identitygrid/identitygridgeometry.hh\n- identitygrid/identitygridentity.hh\n- identitygrid/identitygridentityseed.hh\n- identitygrid/identitygridintersectioniterator.hh\n- identitygrid/identitygridleveliterator.hh\n+ identitygrid/identitygridentity.hh\n+ identitygrid/identitygridentityseed.hh\n+ identitygrid/identitygridintersectioniterator.hh\n+ identitygrid/identitygridleveliterator.hh\n identitygrid/identitygridleafiterator.hh\n- identitygrid/identitygridhierarchiciterator.hh\n- identitygrid/identitygridindexsets.hh\n+ identitygrid/identitygridhierarchiciterator.hh\n+ identitygrid/identitygridindexsets.hh\n Dune::IdentityGridFamily\n Dune::IdentityGrid\n Dune::Capabilities::hasEntity< IdentityGrid< HostGrid >, codim >\n Dune::Capabilities::hasEntityIterator< IdentityGrid< HostGrid >, codim >\n Dune::Capabilities::canCommunicate< IdentityGrid< HostGrid >, codim >\n Dune::Capabilities::isLevelwiseConforming< IdentityGrid< HostGrid > >\n Dune::Capabilities::isLeafwiseConforming< IdentityGrid< HostGrid > >\n Dune\n Dune::Capabilities\n \n \n identitygridentity.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n- a00734.html\n+ a00731.html\n dune/grid/common/grid.hh\n Dune::IdentityGridEntity\n Dune::IdentityGridEntity< 0, dim, GridImp >\n Dune\n \n \n identitygridentityseed.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n- a00755.html\n+ a00752.html\n Dune::IdentityGridEntitySeed\n Dune\n \n \n identitygridgeometry.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n a00746.html\n dune/grid/common/geometry.hh\n Dune::IdentityGridGeometry\n Dune\n \n \n identitygridhierarchiciterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n- a00752.html\n+ a00740.html\n Dune::IdentityGridHierarchicIterator\n Dune\n \n \n identitygridindexsets.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n- a00740.html\n- dune/grid/common/indexidset.hh\n+ a00737.html\n+ dune/grid/common/indexidset.hh\n Dune::IdentityGridLevelIndexSet\n Dune::IdentityGridLeafIndexSet\n Dune::IdentityGridGlobalIdSet\n Dune::IdentityGridLocalIdSet\n Dune\n \n \n identitygridintersectioniterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n- a00737.html\n- identitygridintersections.hh\n- identitygridentity.hh\n+ a00743.html\n+ identitygridintersections.hh\n+ identitygridentity.hh\n dune/grid/common/intersection.hh\n Dune::IdentityGridLeafIntersectionIterator\n Dune::IdentityGridLevelIntersectionIterator\n Dune\n \n \n identitygridintersections.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n- a00743.html\n+ a00755.html\n identitygridleafiterator.hh\n- dune/grid/identitygrid/identitygridentity.hh\n+ dune/grid/identitygrid/identitygridentity.hh\n Dune::IdentityGridLeafIntersection\n Dune::IdentityGridLevelIntersection\n Dune\n \n \n identitygridleafiterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n a00749.html\n- dune/grid/common/gridenums.hh\n+ dune/grid/common/gridenums.hh\n Dune::IdentityGridLeafIterator\n Dune\n \n \n identitygridleveliterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/identitygrid/\n- a00731.html\n- dune/grid/common/gridenums.hh\n+ a00734.html\n+ dune/grid/common/gridenums.hh\n Dune::IdentityGridLevelIterator\n Dune\n \n \n basic.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00878.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00908.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune\n Dune::dgf\n \n \n basic.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00923.html\n- dune/grid/io/file/dgfparser/entitykey.hh\n- dune/grid/io/file/dgfparser/dgfexception.hh\n+ a00848.html\n+ dune/grid/io/file/dgfparser/entitykey.hh\n+ dune/grid/io/file/dgfparser/dgfexception.hh\n Dune::dgf::BasicBlock\n Dune\n Dune::dgf\n \n void\n makeupcase\n a01069.html\n abb5725b92483f9a9581a95eba48de26b\n (std ::string &s)\n \n \n \n boundarydom.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00902.html\n- dune/grid/io/file/dgfparser/blocks/boundarydom.hh\n+ a00863.html\n+ dune/grid/io/file/dgfparser/blocks/boundarydom.hh\n Dune\n Dune::dgf\n \n \n boundarydom.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00884.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n- dune/grid/io/file/dgfparser/parser.hh\n+ a00923.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n+ dune/grid/io/file/dgfparser/parser.hh\n Dune::dgf::DomainData\n Dune::dgf::Domain\n Dune::dgf::BoundaryDomBlock\n Dune\n Dune::dgf\n \n \n boundaryseg.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00854.html\n- dune/grid/io/file/dgfparser/blocks/boundaryseg.hh\n+ a00878.html\n+ dune/grid/io/file/dgfparser/blocks/boundaryseg.hh\n Dune\n Dune::dgf\n \n \n boundaryseg.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00872.html\n- dune/grid/io/file/dgfparser/parser.hh\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00875.html\n+ dune/grid/io/file/dgfparser/parser.hh\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::BoundarySegBlock\n Dune\n Dune::dgf\n \n \n cube.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00905.html\n- dune/grid/io/file/dgfparser/blocks/cube.hh\n+ a00887.html\n+ dune/grid/io/file/dgfparser/blocks/cube.hh\n Dune\n Dune::dgf\n \n \n cube.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00893.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00890.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::CubeBlock\n Dune\n Dune::dgf\n \n \n dim.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00860.html\n- dune/grid/io/file/dgfparser/blocks/dim.hh\n+ a00893.html\n+ dune/grid/io/file/dgfparser/blocks/dim.hh\n Dune\n Dune::dgf\n \n \n dim.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00917.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00854.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::DimBlock\n Dune\n Dune::dgf\n \n \n general.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00857.html\n- dune/grid/io/file/dgfparser/blocks/general.hh\n+ a00917.html\n+ dune/grid/io/file/dgfparser/blocks/general.hh\n Dune\n Dune::dgf\n \n \n general.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00881.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00851.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::GeneralBlock\n Dune\n Dune::dgf\n \n \n gridparameter.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00926.html\n- dune/grid/io/file/dgfparser/blocks/gridparameter.hh\n+ a00914.html\n+ dune/grid/io/file/dgfparser/blocks/gridparameter.hh\n Dune\n Dune::dgf\n \n \n gridparameter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00851.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00905.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::GridParameterBlock\n Dune\n Dune::dgf\n \n \n interval.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00914.html\n- dune/grid/io/file/dgfparser/blocks/interval.hh\n+ a00881.html\n+ dune/grid/io/file/dgfparser/blocks/interval.hh\n Dune\n Dune::dgf\n \n \n interval.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00890.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00857.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::IntervalBlock\n Dune::dgf::IntervalBlock::Interval\n Dune\n Dune::dgf\n \n std::ostream &\n operator<<\n@@ -2376,24 +2376,24 @@\n a7ab9ff07ce7d4d5dae0f78519a384ccb\n (std::ostream &out, const IntervalBlock::Interval &interval)\n \n \n \n periodicfacetrans.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00863.html\n- dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh\n+ a00926.html\n+ dune/grid/io/file/dgfparser/blocks/periodicfacetrans.hh\n Dune\n Dune::dgf\n \n \n periodicfacetrans.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00869.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00884.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::PeriodicFaceTransformationBlock\n Dune::dgf::PeriodicFaceTransformationBlock::Matrix\n Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation\n Dune\n Dune::dgf\n \n std::ostream &\n@@ -2402,33 +2402,33 @@\n a7b300c2da0453af4c4ca0af25bcd67e7\n (std::ostream &out, const PeriodicFaceTransformationBlock::AffineTransformation &trafo)\n \n \n \n polygon.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00929.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00920.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::PolygonBlock\n Dune\n Dune::dgf\n \n \n polyhedron.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00887.html\n- dune/grid/io/file/dgfparser/blocks/polygon.hh\n+ a00860.html\n+ dune/grid/io/file/dgfparser/blocks/polygon.hh\n Dune::dgf::PolyhedronBlock\n Dune\n Dune::dgf\n \n \n projection.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00866.html\n+ a00899.html\n dune/grid/io/file/dgfparser/blocks/projection.hh\n Dune::dgf::Expr::ConstantExpression\n Dune::dgf::Expr::VariableExpression\n Dune::dgf::Expr::FunctionCallExpression\n Dune::dgf::Expr::VectorExpression\n Dune::dgf::Expr::BracketExpression\n Dune::dgf::Expr::MinusExpression\n@@ -2451,105 +2451,105 @@\n a0404555c6f1763aa0e2c532e9c2a5c8e\n (std::ostream &out, const ProjectionBlock::Token &token)\n \n \n \n simplex.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00875.html\n- dune/grid/io/file/dgfparser/blocks/simplex.hh\n+ a00866.html\n+ dune/grid/io/file/dgfparser/blocks/simplex.hh\n Dune\n Dune::dgf\n \n \n simplex.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00899.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00872.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::SimplexBlock\n Dune\n Dune::dgf\n \n \n simplexgeneration.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00911.html\n- dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh\n+ a00869.html\n+ dune/grid/io/file/dgfparser/blocks/simplexgeneration.hh\n Dune\n Dune::dgf\n \n \n simplexgeneration.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00920.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ a00911.html\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::SimplexGenerationBlock\n Dune\n Dune::dgf\n \n \n vertex.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n- a00908.html\n+ a00902.html\n dune/grid/io/file/dgfparser/blocks/vertex.hh\n Dune\n Dune::dgf\n \n \n vertex.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/blocks/\n a00896.html\n- dune/grid/io/file/dgfparser/blocks/basic.hh\n+ dune/grid/io/file/dgfparser/blocks/basic.hh\n Dune::dgf::VertexBlock\n Dune\n Dune::dgf\n \n \n dgfexception.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00836.html\n+ a00947.html\n Dune::DGFException\n Dune\n \n \n dgfgeogrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00842.html\n+ a00938.html\n dune/grid/geometrygrid.hh\n dune/grid/io/file/dgfparser/dgfparser.hh\n dune/grid/io/file/dgfparser/blocks/projection.hh\n- dune/grid/utility/hostgridaccess.hh\n+ dune/grid/utility/hostgridaccess.hh\n dune/grid/common/intersection.hh\n- dune/grid/io/file/dgfparser/parser.hh\n+ dune/grid/io/file/dgfparser/parser.hh\n Dune::DGFCoordFunction\n Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, false >\n Dune::DGFCoordFunctionFactory< HostGrid, CoordFunction, true >\n Dune::DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >\n Dune::DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n Dune::DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n Dune\n \n \n dgfgridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00941.html\n- dune/grid/io/file/dgfparser/dgfexception.hh\n+ a00842.html\n+ dune/grid/io/file/dgfparser/dgfexception.hh\n dune/grid/io/file/dgfparser/macrogrid.hh\n- dune/grid/io/file/dgfparser/parser.hh\n+ dune/grid/io/file/dgfparser/parser.hh\n dune/grid/common/intersection.hh\n Dune::DGFGridFactory\n Dune\n \n \n dgfidentitygrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00821.html\n+ a00941.html\n dune/grid/identitygrid.hh\n dune/grid/io/file/dgfparser/dgfparser.hh\n- dune/grid/utility/hostgridaccess.hh\n+ dune/grid/utility/hostgridaccess.hh\n Dune::DGFGridFactory< IdentityGrid< HostGrid > >\n Dune::DGFGridInfo< IdentityGrid< HostGrid > >\n Dune\n \n \n dgfoned.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n@@ -2560,141 +2560,141 @@\n Dune::DGFGridInfo< OneDGrid >\n Dune::DGFGridFactory< OneDGrid >\n Dune\n \n \n dgfug.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00827.html\n- dune/grid/io/file/dgfparser/dgfug.hh\n+ a00845.html\n+ dune/grid/io/file/dgfparser/dgfug.hh\n Dune\n Dune::dgf\n \n \n dgfug.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00824.html\n+ a00956.html\n dune/grid/common/intersection.hh\n dune/grid/uggrid.hh\n dgfparser.hh\n- blocks/gridparameter.hh\n+ blocks/gridparameter.hh\n Dune::dgf::UGGridParameterBlock\n Dune::DGFGridInfo< UGGrid< dim > >\n Dune::DGFGridFactory< UGGrid< dim > >\n Dune\n Dune::dgf\n \n \n dgfwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00848.html\n+ a00959.html\n dune/grid/common/grid.hh\n- dune/grid/common/rangegenerators.hh\n+ dune/grid/common/rangegenerators.hh\n Dune::DGFWriter\n Dune\n \n \n dgfyasp.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00830.html\n+ a00968.html\n dune/grid/common/intersection.hh\n dune/grid/yaspgrid.hh\n dgfparser.hh\n Dune::dgf::YaspGridParameterBlock\n Dune::DGFGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >\n Dune::DGFGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >\n Dune::DGFGridFactory< Dune::YaspGrid< dim, Dune::TensorProductCoordinates< ctype, dim > > >\n Dune::DGFGridInfo< YaspGrid< dim, Coordinates > >\n Dune\n Dune::dgf\n \n \n entitykey.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00947.html\n- dune/grid/io/file/dgfparser/dgfexception.hh\n- entitykey_inline.hh\n+ a00935.html\n+ dune/grid/io/file/dgfparser/dgfexception.hh\n+ entitykey_inline.hh\n Dune::DGFEntityKey\n Dune::ElementFaceUtil\n Dune\n \n \n entitykey_inline.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00833.html\n- dune/grid/io/file/dgfparser/entitykey.hh\n+ a00962.html\n+ dune/grid/io/file/dgfparser/entitykey.hh\n Dune\n \n \n gridptr.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00839.html\n- dune/grid/common/gridenums.hh\n- dune/grid/common/datahandleif.hh\n+ a00929.html\n+ dune/grid/common/gridenums.hh\n+ dune/grid/common/datahandleif.hh\n dune/grid/common/intersection.hh\n- dune/grid/common/partitionset.hh\n- dune/grid/common/rangegenerators.hh\n- dune/grid/io/file/dgfparser/dgfexception.hh\n- dune/grid/io/file/dgfparser/entitykey.hh\n- dune/grid/io/file/dgfparser/parser.hh\n- dune/grid/io/file/gmshreader.hh\n+ dune/grid/common/partitionset.hh\n+ dune/grid/common/rangegenerators.hh\n+ dune/grid/io/file/dgfparser/dgfexception.hh\n+ dune/grid/io/file/dgfparser/entitykey.hh\n+ dune/grid/io/file/dgfparser/parser.hh\n+ dune/grid/io/file/gmshreader.hh\n Dune::GridPtr\n Dune::GridPtr::mygrid_ptr\n Dune::GridPtr::DataHandle\n Dune\n \n \n macrogrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n a00944.html\n- dune/grid/io/file/dgfparser/parser.hh\n+ dune/grid/io/file/dgfparser/parser.hh\n Dune::MacroGrid\n Dune\n \n \n parser.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/\n- a00845.html\n- dune/grid/io/file/dgfparser/entitykey.hh\n+ a00965.html\n+ dune/grid/io/file/dgfparser/entitykey.hh\n Dune::DGFBoundaryParameter\n Dune::DuneGridFormatParser\n Dune\n \n \n dgf2dgf.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/utils/\n- a00938.html\n- dune/grid/io/file/dgfparser/dgfwriter.hh\n+ a00953.html\n+ dune/grid/io/file/dgfparser/dgfwriter.hh\n \n int\n main\n- a00938.html\n+ a00953.html\n a0ddf1224851353fc92bfbff6f499fa97\n (int argc, char *argv[])\n \n \n \n gmsh2dgf.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/dgfparser/utils/\n- a00935.html\n- dune/grid/io/file/gmshreader.hh\n- dune/grid/io/file/dgfparser/dgfwriter.hh\n+ a00950.html\n+ dune/grid/io/file/gmshreader.hh\n+ dune/grid/io/file/dgfparser/dgfwriter.hh\n \n int\n main\n- a00935.html\n+ a00950.html\n a0ddf1224851353fc92bfbff6f499fa97\n (int argc, char *argv[])\n \n \n \n gmshreader.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/\n- a00956.html\n- dune/grid/common/boundarysegment.hh\n+ a00770.html\n+ dune/grid/common/boundarysegment.hh\n dune/grid/common/gridfactory.hh\n Dune::GmshReaderOptions\n Dune::GmshReaderParser\n Dune::GmshReader\n Dune\n Dune::Gmsh\n \n@@ -2722,74 +2722,74 @@\n a566d5ca5137acb12e02228baed7d394a\n (ReaderOptions a, ReaderOptions b)\n \n \n \n gmshwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/\n- a00953.html\n+ a00767.html\n dune/grid/common/grid.hh\n- dune/grid/common/mcmgmapper.hh\n+ dune/grid/common/mcmgmapper.hh\n Dune::GmshWriter\n Dune\n \n \n gnuplot.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/\n- a00959.html\n+ a00773.html\n dune/grid/common/grid.hh\n- gnuplot/gnuplot.cc\n+ gnuplot/gnuplot.cc\n Dune::GnuplotWriter\n Dune::LeafGnuplotWriter\n Dune::LevelGnuplotWriter\n Dune\n \n \n gnuplot.cc\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/gnuplot/\n- a00950.html\n- ../gnuplot.hh\n+ a00764.html\n+ ../gnuplot.hh\n Dune\n \n \n printgrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/\n- a00962.html\n- dune/grid/common/mcmgmapper.hh\n+ a00839.html\n+ dune/grid/common/mcmgmapper.hh\n Dune\n \n void\n printGrid\n a01063.html\n a404bf57dcdbc6881d6d7bd4258a05416\n (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)\n \n \n \n starcdreader.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/\n- a00968.html\n+ a00758.html\n dune/grid/common/gridfactory.hh\n Dune::StarCDReader\n Dune\n \n \n vtk.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/\n- a00965.html\n- vtk/boundarywriter.hh\n- vtk/subsamplingvtkwriter.hh\n- vtk/vtksequencewriter.hh\n- vtk/vtkwriter.hh\n- vtk/volumewriter.hh\n+ a00761.html\n+ vtk/boundarywriter.hh\n+ vtk/subsamplingvtkwriter.hh\n+ vtk/vtksequencewriter.hh\n+ vtk/vtkwriter.hh\n+ vtk/volumewriter.hh\n \n \n b64enc.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00767.html\n+ a00812.html\n Dune::b64chunk\n Dune\n \n const char\n base64table\n a01063.html\n a0f8eaefa183de6150378561ac93d210a\n@@ -2802,51 +2802,51 @@\n a0f8eaefa183de6150378561ac93d210a\n []\n \n \n \n basicwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00770.html\n- dune/grid/io/file/vtk/common.hh\n- dune/grid/io/file/vtk/functionwriter.hh\n- dune/grid/io/file/vtk/pvtuwriter.hh\n- dune/grid/io/file/vtk/vtuwriter.hh\n+ a00800.html\n+ dune/grid/io/file/vtk/common.hh\n+ dune/grid/io/file/vtk/functionwriter.hh\n+ dune/grid/io/file/vtk/pvtuwriter.hh\n+ dune/grid/io/file/vtk/vtuwriter.hh\n Dune::VTK::BasicWriter\n Dune\n Dune::VTK\n \n \n boundaryiterators.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00791.html\n- dune/grid/io/file/vtk/corner.hh\n- dune/grid/io/file/vtk/corneriterator.hh\n- dune/grid/io/file/vtk/functionwriter.hh\n+ a00809.html\n+ dune/grid/io/file/vtk/corner.hh\n+ dune/grid/io/file/vtk/corneriterator.hh\n+ dune/grid/io/file/vtk/functionwriter.hh\n Dune::VTK::BoundaryIterator\n Dune::VTK::IntersectionIndexSet\n Dune::VTK::NonConformingBoundaryIteratorFactory\n Dune\n Dune::VTK\n \n \n boundarywriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00797.html\n- dune/grid/io/file/vtk/basicwriter.hh\n- dune/grid/io/file/vtk/boundaryiterators.hh\n- dune/grid/io/file/vtk/skeletonfunction.hh\n+ a00776.html\n+ dune/grid/io/file/vtk/basicwriter.hh\n+ dune/grid/io/file/vtk/boundaryiterators.hh\n+ dune/grid/io/file/vtk/skeletonfunction.hh\n Dune::VTK::NonConformingBoundaryWriter\n Dune\n Dune::VTK\n \n \n common.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00815.html\n+ a00797.html\n Dune::VTK::PrintType\n Dune::VTK::PrintType< unsigned char >\n Dune::VTK::PrintType< signed char >\n Dune::VTK::PrintType< char >\n Dune::VTK::FieldInfo\n Dune\n Dune::VTK\n@@ -3040,199 +3040,199 @@\n a559af2a4ab217c95a0b9738920cf9391\n (Precision p)\n \n \n \n corner.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00764.html\n- dune/grid/io/file/vtk/common.hh\n+ a00788.html\n+ dune/grid/io/file/vtk/common.hh\n Dune::VTK::Corner\n Dune\n Dune::VTK\n \n \n corneriterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00761.html\n- dune/grid/io/file/vtk/corner.hh\n+ a00791.html\n+ dune/grid/io/file/vtk/corner.hh\n Dune::VTK::CornerIterator\n Dune\n Dune::VTK\n \n \n dataarraywriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00806.html\n- dune/grid/io/file/vtk/streams.hh\n- dune/grid/io/file/vtk/common.hh\n+ a00785.html\n+ dune/grid/io/file/vtk/streams.hh\n+ dune/grid/io/file/vtk/common.hh\n Dune::VTK::DataArrayWriter\n Dune::VTK::AsciiDataArrayWriter\n Dune::VTK::BinaryDataArrayWriter\n Dune::VTK::AppendedRawDataArrayWriter\n Dune::VTK::AppendedBase64DataArrayWriter\n Dune::VTK::NakedBase64DataArrayWriter\n Dune::VTK::NakedRawDataArrayWriter\n Dune::VTK::DataArrayWriterFactory\n Dune\n Dune::VTK\n \n \n function.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00800.html\n- dune/grid/common/mcmgmapper.hh\n- dune/grid/io/file/vtk/common.hh\n+ a00806.html\n+ dune/grid/common/mcmgmapper.hh\n+ dune/grid/io/file/vtk/common.hh\n Dune::VTKFunction\n Dune::P0VTKFunction\n Dune::P1VTKFunction\n Dune\n \n \n functionwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00794.html\n- dune/grid/io/file/vtk/common.hh\n- dune/grid/io/file/vtk/dataarraywriter.hh\n- dune/grid/io/file/vtk/pvtuwriter.hh\n- dune/grid/io/file/vtk/vtuwriter.hh\n+ a00827.html\n+ dune/grid/io/file/vtk/common.hh\n+ dune/grid/io/file/vtk/dataarraywriter.hh\n+ dune/grid/io/file/vtk/pvtuwriter.hh\n+ dune/grid/io/file/vtk/vtuwriter.hh\n Dune::VTK::FunctionWriterBase\n Dune::VTK::VTKFunctionWriter\n Dune::VTK::CoordinatesWriter\n Dune::VTK::ConformingConnectivityWriter\n Dune::VTK::NonConformingConnectivityWriter\n Dune::VTK::OffsetsWriter\n Dune::VTK::TypesWriter\n Dune\n Dune::VTK\n \n \n pointiterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00809.html\n- dune/grid/io/file/vtk/corner.hh\n- dune/grid/io/file/vtk/corneriterator.hh\n+ a00779.html\n+ dune/grid/io/file/vtk/corner.hh\n+ dune/grid/io/file/vtk/corneriterator.hh\n Dune::VTK::PointIterator\n Dune\n Dune::VTK\n \n \n pvtuwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00785.html\n- dune/grid/io/file/vtk/common.hh\n+ a00830.html\n+ dune/grid/io/file/vtk/common.hh\n Dune::VTK::PVTUWriter\n Dune\n Dune::VTK\n \n \n skeletonfunction.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00782.html\n- dune/grid/io/file/vtk/functionwriter.hh\n- dune/grid/io/file/vtk/pvtuwriter.hh\n- dune/grid/io/file/vtk/vtuwriter.hh\n+ a00794.html\n+ dune/grid/io/file/vtk/functionwriter.hh\n+ dune/grid/io/file/vtk/pvtuwriter.hh\n+ dune/grid/io/file/vtk/vtuwriter.hh\n Dune::VTK::SkeletonFunctionTraits\n Dune::VTK::SkeletonFunctionInterface\n Dune::VTK::SkeletonFunctionWriter\n Dune\n Dune::VTK\n \n \n streams.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00788.html\n- dune/grid/io/file/vtk/b64enc.hh\n+ a00782.html\n+ dune/grid/io/file/vtk/b64enc.hh\n Dune::Base64Stream\n Dune::RawStream\n Dune\n \n \n subsamplingvtkwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00779.html\n- dune/grid/io/file/vtk/vtkwriter.hh\n- dune/grid/io/file/vtk/vtuwriter.hh\n+ a00803.html\n+ dune/grid/io/file/vtk/vtkwriter.hh\n+ dune/grid/io/file/vtk/vtuwriter.hh\n Dune::SubsamplingVTKWriter\n Dune\n \n \n volumeiterators.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00776.html\n- dune/grid/common/gridenums.hh\n- dune/grid/io/file/vtk/corner.hh\n- dune/grid/io/file/vtk/corneriterator.hh\n- dune/grid/io/file/vtk/functionwriter.hh\n- dune/grid/io/file/vtk/pointiterator.hh\n+ a00833.html\n+ dune/grid/common/gridenums.hh\n+ dune/grid/io/file/vtk/corner.hh\n+ dune/grid/io/file/vtk/corneriterator.hh\n+ dune/grid/io/file/vtk/functionwriter.hh\n+ dune/grid/io/file/vtk/pointiterator.hh\n Dune::VTK::ConformingVolumeIteratorFactory\n Dune::VTK::NonConformingVolumeIteratorFactory\n Dune\n Dune::VTK\n \n \n volumewriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00818.html\n- dune/grid/io/file/vtk/basicwriter.hh\n- dune/grid/io/file/vtk/function.hh\n- dune/grid/io/file/vtk/functionwriter.hh\n- dune/grid/io/file/vtk/volumeiterators.hh\n+ a00836.html\n+ dune/grid/io/file/vtk/basicwriter.hh\n+ dune/grid/io/file/vtk/function.hh\n+ dune/grid/io/file/vtk/functionwriter.hh\n+ dune/grid/io/file/vtk/volumeiterators.hh\n Dune::VTK::ConformingVolumeWriter\n Dune\n Dune::VTK\n \n \n vtksequencewriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00758.html\n- dune/grid/io/file/vtk/vtksequencewriterbase.hh\n- dune/grid/io/file/vtk/vtkwriter.hh\n- dune/grid/io/file/vtk/subsamplingvtkwriter.hh\n+ a00824.html\n+ dune/grid/io/file/vtk/vtksequencewriterbase.hh\n+ dune/grid/io/file/vtk/vtkwriter.hh\n+ dune/grid/io/file/vtk/subsamplingvtkwriter.hh\n Dune::VTKSequenceWriter\n Dune\n \n \n vtksequencewriterbase.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00773.html\n- dune/grid/io/file/vtk/common.hh\n- dune/grid/io/file/vtk/vtkwriter.hh\n+ a00815.html\n+ dune/grid/io/file/vtk/common.hh\n+ dune/grid/io/file/vtk/vtkwriter.hh\n Dune::VTKSequenceWriterBase\n Dune\n \n \n vtkwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00803.html\n- dune/grid/common/mcmgmapper.hh\n- dune/grid/common/gridenums.hh\n- dune/grid/io/file/vtk/common.hh\n- dune/grid/io/file/vtk/dataarraywriter.hh\n- dune/grid/io/file/vtk/function.hh\n- dune/grid/io/file/vtk/pvtuwriter.hh\n- dune/grid/io/file/vtk/streams.hh\n- dune/grid/io/file/vtk/vtuwriter.hh\n+ a00821.html\n+ dune/grid/common/mcmgmapper.hh\n+ dune/grid/common/gridenums.hh\n+ dune/grid/io/file/vtk/common.hh\n+ dune/grid/io/file/vtk/dataarraywriter.hh\n+ dune/grid/io/file/vtk/function.hh\n+ dune/grid/io/file/vtk/pvtuwriter.hh\n+ dune/grid/io/file/vtk/streams.hh\n+ dune/grid/io/file/vtk/vtuwriter.hh\n Dune::VTKWriter\n Dune::VTKWriter::VTKLocalFunction\n Dune::VTKWriter::VTKLocalFunction::FunctionWrapperBase\n Dune::VTKWriter::VTKLocalFunction::FunctionWrapper\n Dune::VTKWriter::VTKLocalFunction::GlobalFunctionWrapper\n Dune::VTKWriter::VTKLocalFunction::VTKFunctionWrapper\n Dune::VTKWriter::CellIterator\n Dune::VTKWriter::VertexIterator\n Dune::VTKWriter::CornerIterator\n Dune\n \n \n vtuwriter.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/io/file/vtk/\n- a00812.html\n- dune/grid/io/file/vtk/common.hh\n- dune/grid/io/file/vtk/dataarraywriter.hh\n+ a00818.html\n+ dune/grid/io/file/vtk/common.hh\n+ dune/grid/io/file/vtk/dataarraywriter.hh\n Dune::VTK::VTUWriter\n Dune\n Dune::VTK\n \n \n onedgrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/\n@@ -3257,15 +3257,15 @@\n \n \n \n \n uggrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/\n a00974.html\n- dune/grid/common/boundarysegment.hh\n+ dune/grid/common/boundarysegment.hh\n dune/grid/common/capabilities.hh\n dune/grid/common/grid.hh\n uggrid/uggridfactory.hh\n Dune::UGGridFamily\n Dune::UGGrid\n Dune::Capabilities::hasEntity< UGGrid< dim >, codim >\n Dune::Capabilities::hasEntityIterator< UGGrid< dim >, codim >\n@@ -3347,167 +3347,167 @@\n \n \n \n \n uggridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/uggrid/\n a00977.html\n- dune/grid/common/boundarysegment.hh\n+ dune/grid/common/boundarysegment.hh\n dune/grid/common/gridfactory.hh\n dune/grid/uggrid.hh\n Dune::GridFactory< UGGrid< dimworld > >\n Dune::GridFactory< UGGrid< dimworld > >::Codim\n Dune\n \n \n entitycommhelper.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a01007.html\n- dune/grid/common/gridenums.hh\n+ a01013.html\n+ dune/grid/common/gridenums.hh\n Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface >\n Dune::EntityCommHelper< InteriorBorder_All_Interface >\n Dune::EntityCommHelper< Overlap_OverlapFront_Interface >\n Dune::EntityCommHelper< Overlap_All_Interface >\n Dune::EntityCommHelper< All_All_Interface >\n Dune\n \n \n globalindexset.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a00989.html\n- dune/grid/common/gridenums.hh\n- dune/grid/common/datahandleif.hh\n+ a01016.html\n+ dune/grid/common/gridenums.hh\n+ dune/grid/common/datahandleif.hh\n Dune::GlobalIndexSet\n Dune::GlobalIndexSet::SubPartitionTypeProvider\n Dune::GlobalIndexSet::SubPartitionTypeProvider< Entity, 0 >\n Dune\n \n \n gridinfo-gmsh-main.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a00986.html\n- dune/grid/io/file/gmshreader.hh\n+ a00998.html\n+ dune/grid/io/file/gmshreader.hh\n dune/grid/utility/gridinfo.hh\n \n \n gridtype.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a01001.html\n+ a00983.html\n \n \n hierarchicsearch.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a01013.html\n+ a01007.html\n dune/grid/common/grid.hh\n- dune/grid/common/gridenums.hh\n+ dune/grid/common/gridenums.hh\n Dune::HierarchicSearch\n Dune\n \n \n hostgridaccess.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a01016.html\n+ a01010.html\n dune/grid/geometrygrid/intersection.hh\n Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >\n Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::Codim\n Dune::HostGridAccess< IdentityGrid< HG > >\n Dune::HostGridAccess< IdentityGrid< HG > >::Codim\n Dune\n \n \n multiindex.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a01019.html\n+ a00992.html\n Dune::FactoryUtilities::MultiIndex\n Dune\n Dune::FactoryUtilities\n \n \n parmetisgridpartitioner.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a00995.html\n- dune/grid/utility/globalindexset.hh\n- dune/grid/common/mcmgmapper.hh\n- dune/grid/common/rangegenerators.hh\n+ a00980.html\n+ dune/grid/utility/globalindexset.hh\n+ dune/grid/common/mcmgmapper.hh\n+ dune/grid/common/rangegenerators.hh\n \n \n persistentcontainerinterface.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a00992.html\n+ a01004.html\n Dune::PersistentContainerInterface\n Dune\n \n \n persistentcontainermap.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a01004.html\n+ a01001.html\n dune/grid/common/capabilities.hh\n Dune::PersistentContainerMap\n Dune::PersistentContainerMap::IteratorWrapper\n Dune\n \n \n persistentcontainervector.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a01010.html\n+ a00989.html\n Dune::PersistentContainerVector\n Dune\n \n \n persistentcontainerwrapper.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a00980.html\n- dune/grid/utility/hostgridaccess.hh\n+ a00986.html\n+ dune/grid/utility/hostgridaccess.hh\n dune/grid/utility/persistentcontainer.hh\n Dune::PersistentContainerWrapper\n Dune\n \n \n tensorgridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a00998.html\n+ a01019.html\n dune/grid/common/gridfactory.hh\n dune/grid/yaspgrid.hh\n- dune/grid/utility/multiindex.hh\n+ dune/grid/utility/multiindex.hh\n Dune::TensorGridFactory\n Dune::TensorGridFactoryCreator\n Dune::TensorGridFactoryCreator< YaspGrid< dim, TensorProductCoordinates< ctype, dim > > >\n Dune\n \n \n vertexorderfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/utility/\n- a00983.html\n+ a00995.html\n Dune::VertexOrderByIdFactory\n Dune::VertexOrderByIdFactory::VertexOrder\n Dune\n \n \n yaspgrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/\n a01022.html\n dune/grid/common/backuprestore.hh\n dune/grid/common/grid.hh\n dune/grid/common/capabilities.hh\n- dune/grid/common/indexidset.hh\n- dune/grid/common/datahandleif.hh\n- dune/grid/yaspgrid/coordinates.hh\n- dune/grid/yaspgrid/torus.hh\n- dune/grid/yaspgrid/ygrid.hh\n- dune/grid/yaspgrid/yaspgridgeometry.hh\n- dune/grid/yaspgrid/yaspgridentity.hh\n- dune/grid/yaspgrid/yaspgridintersection.hh\n- dune/grid/yaspgrid/yaspgridintersectioniterator.hh\n- dune/grid/yaspgrid/yaspgridhierarchiciterator.hh\n- dune/grid/yaspgrid/yaspgridentityseed.hh\n- dune/grid/yaspgrid/yaspgridleveliterator.hh\n- dune/grid/yaspgrid/yaspgridindexsets.hh\n- dune/grid/yaspgrid/yaspgrididset.hh\n- dune/grid/yaspgrid/yaspgridpersistentcontainer.hh\n- dune/grid/yaspgrid/structuredyaspgridfactory.hh\n+ dune/grid/common/indexidset.hh\n+ dune/grid/common/datahandleif.hh\n+ dune/grid/yaspgrid/coordinates.hh\n+ dune/grid/yaspgrid/torus.hh\n+ dune/grid/yaspgrid/ygrid.hh\n+ dune/grid/yaspgrid/yaspgridgeometry.hh\n+ dune/grid/yaspgrid/yaspgridentity.hh\n+ dune/grid/yaspgrid/yaspgridintersection.hh\n+ dune/grid/yaspgrid/yaspgridintersectioniterator.hh\n+ dune/grid/yaspgrid/yaspgridhierarchiciterator.hh\n+ dune/grid/yaspgrid/yaspgridentityseed.hh\n+ dune/grid/yaspgrid/yaspgridleveliterator.hh\n+ dune/grid/yaspgrid/yaspgridindexsets.hh\n+ dune/grid/yaspgrid/yaspgrididset.hh\n+ dune/grid/yaspgrid/yaspgridpersistentcontainer.hh\n+ dune/grid/yaspgrid/structuredyaspgridfactory.hh\n dune/grid/yaspgrid/backuprestore.hh\n Dune::YaspGridFamily\n Dune::YaspGrid\n Dune::Capabilities::hasBackupRestoreFacilities< YaspGrid< dim, Coordinates > >\n Dune::Capabilities::hasSingleGeometryType< YaspGrid< dim, Coordinates > >\n Dune::Capabilities::isCartesian< YaspGrid< dim, Coordinates > >\n Dune::Capabilities::hasEntity< YaspGrid< dim, Coordinates >, codim >\n@@ -3546,15 +3546,15 @@\n a2ddc8e6630dbaa4fb81725387d035e7c\n \n \n \n \n coordinates.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00182.html\n+ a00206.html\n Dune::EquidistantCoordinates\n Dune::EquidistantOffsetCoordinates\n Dune::TensorProductCoordinates\n Dune\n Dune::Yasp\n \n std::ostream &\n@@ -3584,15 +3584,15 @@\n a33c1f696f7736c183ec2af79ab5e0ce8\n (const std::array< std::vector< ctype >, dim > &coords)\n \n \n \n partitioning.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00206.html\n+ a00179.html\n Dune::Yasp::Partitioning\n Dune::Yasp::DefaultPartitioning\n Dune::Yasp::PowerDPartitioning\n Dune::Yasp::FixedSizePartitioning\n Dune::YLoadBalance\n Dune::YLoadBalanceForward\n Dune::YLoadBalanceDefault\n@@ -3600,121 +3600,121 @@\n Dune::YaspFixedSizePartitioner\n Dune\n Dune::Yasp\n \n \n structuredyaspgridfactory.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00200.html\n+ a00185.html\n dune/grid/utility/structuredgridfactory.hh\n Dune::StructuredGridFactory< YaspGrid< dim, EquidistantCoordinates< ctype, dim > > >\n Dune::StructuredGridFactory< YaspGrid< dim, EquidistantOffsetCoordinates< ctype, dim > > >\n Dune\n \n \n torus.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00191.html\n- dune/grid/common/exceptions.hh\n- partitioning.hh\n+ a00182.html\n+ dune/grid/common/exceptions.hh\n+ partitioning.hh\n Dune::Torus\n Dune::Torus::ProcListIterator\n Dune\n \n std::ostream &\n operator<<\n a01063.html\n a22c685a22331ef7695c4af7b9b511537\n (std::ostream &s, const Torus< Communication, d > &t)\n \n \n \n yaspgridentity.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00176.html\n+ a00152.html\n Dune::YaspEntity\n Dune::YaspEntity< 0, dim, GridImp >\n Dune::YaspEntity< 0, dim, GridImp >::Codim\n Dune::YaspEntity< dim, dim, GridImp >\n Dune\n Dune::Yasp\n \n \n yaspgridentityseed.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00212.html\n+ a00155.html\n Dune::YaspEntitySeed\n Dune\n \n \n yaspgridgeometry.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00194.html\n+ a00158.html\n Dune::YaspGeometry\n Dune::YaspGeometry< mydim, mydim, GridImp >\n Dune::YaspGeometry< 0, cdim, GridImp >\n Dune\n \n \n yaspgridhierarchiciterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00218.html\n+ a00230.html\n Dune::YaspHierarchicIterator\n Dune\n \n \n yaspgrididset.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00155.html\n+ a00203.html\n Dune::YaspGlobalIdSet\n Dune\n \n \n yaspgridindexsets.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00203.html\n+ a00212.html\n Dune::YaspIndexSet\n Dune\n \n \n yaspgridintersection.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00158.html\n+ a00200.html\n Dune::YaspIntersection\n Dune\n \n \n yaspgridintersectioniterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00224.html\n+ a00164.html\n Dune::YaspIntersectionIterator\n Dune\n \n \n yaspgridleveliterator.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00185.html\n+ a00170.html\n Dune::YaspLevelIterator\n Dune\n \n \n yaspgridpersistentcontainer.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00173.html\n+ a00233.html\n dune/grid/utility/persistentcontainer.hh\n- dune/grid/utility/persistentcontainervector.hh\n+ dune/grid/utility/persistentcontainervector.hh\n ../yaspgrid.hh\n Dune::YaspPersistentContainerIndex\n Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >\n Dune\n \n \n ygrid.hh\n /build/reproducible-path/dune-grid-2.9.0/dune/grid/yaspgrid/\n- a00209.html\n+ a00188.html\n Dune::YGridComponent\n Dune::YGridComponent::Iterator\n Dune::YGrid\n Dune::YGrid::Iterator\n Dune::YGridList\n Dune::YGridList::Intersection\n Dune::YGridList::Iterator\n"}]}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/files.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/files.html", "unified_diff": "@@ -67,246 +67,246 @@\n
    \n
    Here is a list of all files with brief descriptions:
    \n
    [detail level 1234567]
    \n \n \n \n \n-\n+\n \n \n \n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n \n \n-\n+\n \n \n \n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n \n \n-\n+\n \n-\n-\n+\n+\n \n \n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n \n-\n-\n-\n-\n+\n+\n+\n+\n \n-\n-\n-\n-\n+\n+\n+\n+\n \n \n-\n+\n \n-\n-\n-\n-\n+\n+\n+\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n+\n \n \n-\n+\n \n \n \n-\n+\n \n \n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n \n \n \n \n-\n-\n-\n+\n+\n+\n \n-\n+\n \n \n \n \n \n \n \n-\n-\n+\n+\n \n \n \n-\n+\n \n \n-\n-\n+\n+\n \n-\n-\n-\n-\n+\n+\n+\n+\n \n-\n+\n \n \n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n \n \n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n \n \n \n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n \n-\n+\n \n-\n+\n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n \n \n \n-\n-\n-\n+\n+\n+\n \n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n \n-\n-\n-\n-\n+\n+\n+\n+\n \n-\n-\n+\n+\n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n \n \n \n \n \n
      doc
     doxygen
      recipes
     recipe-integration.cc
     recipe-iterate-over-grid.cc
     recipe-iterate-over-grid.cc
      dune
      grid
      albertagrid
     agrid.hhAlbertaGrid class
     albertagrid.cc
     albertaheader.hh
     albertareader.hh
     algebra.hh
     agrid.hhAlbertaGrid class
     albertagrid.cc
     albertaheader.hh
     albertareader.hh
     algebra.hh
     albertagrid/backuprestore.hh
     albertagrid/capabilities.hh
     coordcache.hh
     coordcache.hh
     albertagrid/datahandle.hh
     albertagrid/dgfparser.cc
     albertagrid/dgfparser.hh
     dofadmin.hh
     dofvector.hh
     elementinfo.ccWrapper for ALBERTA's el_info structure
     elementinfo.hhWrapper for ALBERTA's el_info structure
     entity.cc
     dofadmin.hh
     dofvector.hh
     elementinfo.ccWrapper for ALBERTA's el_info structure
     elementinfo.hhWrapper for ALBERTA's el_info structure
     entity.cc
     albertagrid/entity.hh
     albertagrid/entityseed.hh
     geometry.cc
     geometry.cc
     albertagrid/geometry.hh
     geometrycache.hh
     geometryreference.hhWrapper and interface classes for element geometries
     geometrycache.hh
     geometryreference.hhWrapper and interface classes for element geometries
     albertagrid/gridfactory.hhSpecialization of the generic GridFactory for AlbertaGrid
     albertagrid/gridfamily.hhGridFamily for AlbertaGrid
     albertagrid/gridview.hh
     hierarchiciterator.hh
     indexsets.cc
     hierarchiciterator.hh
     indexsets.cc
     albertagrid/indexsets.hh
     indexstack.hhProvides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)
     intersection.cc
     indexstack.hhProvides an index stack that supplies indices for element numbering for a grid (i.e. AlbertaGrid and ALUGrid)
     intersection.cc
     albertagrid/intersection.hh
     albertagrid/intersectioniterator.hhImplementation of the IntersectionIterator for AlbertaGrid
     leafiterator.hh
     level.hh
     leveliterator.hh
     macrodata.ccWrapper for ALBERTA's macro_data structure
     leafiterator.hh
     level.hh
     leveliterator.hh
     macrodata.ccWrapper for ALBERTA's macro_data structure
     macrodata.hhWrapper for ALBERTA's macro_data structure
     macroelement.hh
     meshpointer.cc
     meshpointer.hhWrapper for ALBERTA's mesh structure
     misc.hh
     macroelement.hh
     meshpointer.cc
     meshpointer.hhWrapper for ALBERTA's mesh structure
     misc.hh
     albertagrid/persistentcontainer.hh
     albertagrid/projection.hh
     refinement.hhWrapper for ALBERTA's refinement patches and the corners for geometryInFather
     refinement.hhWrapper for ALBERTA's refinement patches and the corners for geometryInFather
     albertagrid/structuredgridfactory.hhSpecialization of the generic StructuredGridFactory for AlbertaGrid
     transformation.hh
     treeiterator.hh
     undefine-2.0.hhContains #undefs for all preprocessor macros defined by alberta
     undefine-3.0.hhContains #undefs for all preprocessor macros defined by alberta
     transformation.hh
     treeiterator.hh
     undefine-2.0.hhContains #undefs for all preprocessor macros defined by alberta
     undefine-3.0.hhContains #undefs for all preprocessor macros defined by alberta
      common
     adaptcallback.hhInterfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
     adaptcallback.hhInterfaces and wrappers needed for the callback adaptation provided by AlbertaGrid and dune-ALUGrid
     common/backuprestore.hh
     boundaryprojection.hh
     boundarysegment.hhBase class for grid boundary segments of arbitrary geometry
     boundaryprojection.hh
     boundarysegment.hhBase class for grid boundary segments of arbitrary geometry
     common/capabilities.hhA set of traits classes to store static information about grid implementation
     datahandleif.hhDescribes the parallel communication interface class for MessageBuffers and DataHandles
     defaultgridview.hh
     datahandleif.hhDescribes the parallel communication interface class for MessageBuffers and DataHandles
     defaultgridview.hh
     common/entity.hh
     entityiterator.hh
     entityiterator.hh
     common/entityseed.hhInterface class EntitySeed
     exceptions.hh
     exceptions.hh
     common/geometry.hhWrapper and interface classes for element geometries
     common/grid.hhDifferent resources needed by all grid implementations
     gridenums.hh
     gridenums.hh
     common/gridfactory.hhProvide a generic factory class for unstructured grids
     common/gridinfo.hhSome functions to list information about a grid
     common/gridview.hh
     indexidset.hhProvides base classes for index and id sets
     indexidset.hhProvides base classes for index and id sets
     common/intersection.hh
     common/intersectioniterator.hh
     mapper.hhProvides classes with basic mappers which are used to attach data to a grid
     mcmgmapper.hhMapper for multiple codim and multiple geometry types
     partitionset.hh
     rangegenerators.hh
     scsgmapper.hhMapper classes are used to attach data to a grid
     sizecache.hhProvides size cache classes to implement the grids size method efficiently
     mapper.hhProvides classes with basic mappers which are used to attach data to a grid
     mcmgmapper.hhMapper for multiple codim and multiple geometry types
     partitionset.hh
     rangegenerators.hh
     scsgmapper.hhMapper classes are used to attach data to a grid
     sizecache.hhProvides size cache classes to implement the grids size method efficiently
      geometrygrid
     geometrygrid/backuprestore.hh
     cachedcoordfunction.hh
     geometrygrid/capabilities.hh
     coordfunction.hh
     coordfunctioncaller.hh
     cornerstorage.hh
     coordfunction.hh
     coordfunctioncaller.hh
     cornerstorage.hh
     geometrygrid/datahandle.hh
     declaration.hh
     declaration.hh
     geometrygrid/entity.hh
     geometrygrid/entityseed.hh
     geometrygrid/geometry.hh
     geometrygrid/grid.hh
     geometrygrid/gridfamily.hh
     geometrygrid/gridview.hh
     hostcorners.hh
     identity.hh
     idset.hh
     identity.hh
     idset.hh
     geometrygrid/indexsets.hh
     geometrygrid/intersection.hh
     geometrygrid/intersectioniterator.hh
     iterator.hh
     iterator.hh
     geometrygrid/persistentcontainer.hh
      identitygrid
     identitygridentity.hhThe IdentityGridEntity class
     identitygridentityseed.hhThe IdentityGridEntitySeed class
     identitygridentity.hhThe IdentityGridEntity class
     identitygridentityseed.hhThe IdentityGridEntitySeed class
     identitygridgeometry.hhThe IdentityGridGeometry class and its specializations
     identitygridhierarchiciterator.hhThe IdentityGridHierarchicIterator class
     identitygridindexsets.hhThe index and id sets for the IdentityGrid class
     identitygridintersectioniterator.hhThe IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes
     identitygridintersections.hhThe IdentityGridLeafIntersection and IdentityGridLevelIntersection classes
     identitygridhierarchiciterator.hhThe IdentityGridHierarchicIterator class
     identitygridindexsets.hhThe index and id sets for the IdentityGrid class
     identitygridintersectioniterator.hhThe IdentityGridLeafIntersectionIterator and IdentityGridLevelIntersectionIterator classes
     identitygridintersections.hhThe IdentityGridLeafIntersection and IdentityGridLevelIntersection classes
     identitygridleafiterator.hhThe IdentityGridLeafIterator class
     identitygridleveliterator.hhThe IdentityGridLevelIterator class
     identitygridleveliterator.hhThe IdentityGridLevelIterator class
      io
      file
      dgfparser
      blocks
     basic.cc
     basic.hh
     boundarydom.cc
     boundarydom.hh
     boundaryseg.cc
     boundaryseg.hh
     cube.cc
     cube.hh
     dim.cc
     dim.hh
     general.cc
     general.hh
     gridparameter.cc
     gridparameter.hh
     interval.cc
     interval.hh
     periodicfacetrans.cc
     periodicfacetrans.hh
     polygon.hh
     polyhedron.hh
     projection.cc
     basic.cc
     basic.hh
     boundarydom.cc
     boundarydom.hh
     boundaryseg.cc
     boundaryseg.hh
     cube.cc
     cube.hh
     dim.cc
     dim.hh
     general.cc
     general.hh
     gridparameter.cc
     gridparameter.hh
     interval.cc
     interval.hh
     periodicfacetrans.cc
     periodicfacetrans.hh
     polygon.hh
     polyhedron.hh
     projection.cc
     io/file/dgfparser/blocks/projection.hh
     simplex.cc
     simplex.hh
     simplexgeneration.cc
     simplexgeneration.hh
     vertex.cc
     simplex.cc
     simplex.hh
     simplexgeneration.cc
     simplexgeneration.hh
     vertex.cc
     vertex.hh
      utils
     dgf2dgf.ccSmall program converting a DGF file into a DGF file
     gmsh2dgf.ccSmall program converting a gmsh file into a DGF file
     dgfexception.hh
     dgfgeogrid.hh
     dgfgridfactory.hh
     dgfidentitygrid.hh
     dgf2dgf.ccSmall program converting a DGF file into a DGF file
     gmsh2dgf.ccSmall program converting a gmsh file into a DGF file
     dgfexception.hh
     dgfgeogrid.hh
     dgfgridfactory.hh
     dgfidentitygrid.hh
     dgfoned.hh
     io/file/dgfparser/dgfparser.cc
     io/file/dgfparser/dgfparser.hh
     dgfug.cc
     dgfug.hh
     dgfwriter.hhWrite a GridView to a DGF file
     dgfyasp.hh
     entitykey.hh
     entitykey_inline.hh
     gridptr.hh
     dgfug.cc
     dgfug.hh
     dgfwriter.hhWrite a GridView to a DGF file
     dgfyasp.hh
     entitykey.hh
     entitykey_inline.hh
     gridptr.hh
     macrogrid.hh
     parser.hh
     parser.hh
      gnuplot
     gnuplot.ccImplementation of gnuplot output for 1D and 2D grids
     gnuplot.ccImplementation of gnuplot output for 1D and 2D grids
      vtk
     b64enc.hhSimple base64 encode
     basicwriter.hh
     boundaryiterators.hhFunctions for VTK output on the skeleton
     boundarywriter.hh
     common.hhCommon stuff for the VTKWriter
     corner.hh
     corneriterator.hh
     dataarraywriter.hhData array writers for the VTKWriter
     function.hhFunctions for VTK output
     functionwriter.hh
     pointiterator.hh
     pvtuwriter.hh
     skeletonfunction.hhFunctions for VTK output on the skeleton
     streams.hh
     subsamplingvtkwriter.hhProvides subsampled file i/o for the visualization toolkit
     volumeiterators.hh
     volumewriter.hh
     vtksequencewriter.hh
     vtksequencewriterbase.hh
     vtkwriter.hhProvides file i/o for the visualization toolkit
     vtuwriter.hh
     b64enc.hhSimple base64 encode
     basicwriter.hh
     boundaryiterators.hhFunctions for VTK output on the skeleton
     boundarywriter.hh
     common.hhCommon stuff for the VTKWriter
     corner.hh
     corneriterator.hh
     dataarraywriter.hhData array writers for the VTKWriter
     function.hhFunctions for VTK output
     functionwriter.hh
     pointiterator.hh
     pvtuwriter.hh
     skeletonfunction.hhFunctions for VTK output on the skeleton
     streams.hh
     subsamplingvtkwriter.hhProvides subsampled file i/o for the visualization toolkit
     volumeiterators.hh
     volumewriter.hh
     vtksequencewriter.hh
     vtksequencewriterbase.hh
     vtkwriter.hhProvides file i/o for the visualization toolkit
     vtuwriter.hh
     io/file/dgfparser.hh
     gmshreader.hh
     gmshwriter.hh
     gnuplot.hhProvides gnuplot output for 1D Grids
     printgrid.hh
     starcdreader.hh
     vtk.hhConvenience header which includes all available VTK writers
     gmshreader.hh
     gmshwriter.hh
     gnuplot.hhProvides gnuplot output for 1D Grids
     printgrid.hh
     starcdreader.hh
     vtk.hhConvenience header which includes all available VTK writers
      uggrid
     uggridfactory.hhThe specialization of the generic GridFactory for UGGrid
      utility
     entitycommhelper.hh
     globalindexset.hhProvides a globally unique index for all entities of a distributed Dune grid
     gridinfo-gmsh-main.hhGeneric main() function for printing information about a mesh read from a .msh-file
     entitycommhelper.hh
     globalindexset.hhProvides a globally unique index for all entities of a distributed Dune grid
     gridinfo-gmsh-main.hhGeneric main() function for printing information about a mesh read from a .msh-file
     utility/gridinfo.hh
     gridtype.hhThis file can be included directly following config.h to test if a grid type was correctly selected
     hierarchicsearch.hhUtility class for hierarchically searching for an Entity containing a given point
     hostgridaccess.hh
     multiindex.hhImplements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes
     parmetisgridpartitioner.hhCompute a repartitioning of a Dune grid using ParMetis
     gridtype.hhThis file can be included directly following config.h to test if a grid type was correctly selected
     hierarchicsearch.hhUtility class for hierarchically searching for an Entity containing a given point
     hostgridaccess.hh
     multiindex.hhImplements a multiindex with arbitrary dimension and fixed index ranges This is used by various factory classes
     parmetisgridpartitioner.hhCompute a repartitioning of a Dune grid using ParMetis
     utility/persistentcontainer.hh
     persistentcontainerinterface.hh
     persistentcontainermap.hh
     persistentcontainervector.hh
     persistentcontainerwrapper.hh
     persistentcontainerinterface.hh
     persistentcontainermap.hh
     persistentcontainervector.hh
     persistentcontainerwrapper.hh
     utility/structuredgridfactory.hhA class to construct structured cube and simplex grids using the grid factory
     tensorgridfactory.hhThis file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series
     vertexorderfactory.hh
     tensorgridfactory.hhThis file provides a factory class for tensorproduct grids. This is a collection of methods to generate monotonous sequences as needed for a tensorproduct grid. Apart from easy ones for locally equidistant grids, there are also more involved methods like splitting a range according to a geometric series
     vertexorderfactory.hh
      yaspgrid
     yaspgrid/backuprestore.hh
     coordinates.hhThis 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
     partitioning.hhThis 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
     structuredyaspgridfactory.hhSpecialization of the StructuredGridFactory class for YaspGrid
     torus.hhThis file provides the infrastructure for toroidal communication in YaspGrid
     yaspgridentity.hhYaspEntity class and its specializations
     yaspgridentityseed.hhThe YaspEntitySeed class
     yaspgridgeometry.hhThe YaspGeometry class and its specializations
     yaspgridhierarchiciterator.hh
     yaspgrididset.hh
     yaspgridindexsets.hhLevel-wise, non-persistent, consecutive indices for YaspGrid
     yaspgridintersection.hhThe YaspIntersection class
     yaspgridintersectioniterator.hhThe YaspIntersectionIterator class
     yaspgridleveliterator.hhThe YaspLevelIterator class
     yaspgridpersistentcontainer.hhSpecialization of the PersistentContainer for YaspGrid
     ygrid.hhThis provides a YGrid, the elemental component of the yaspgrid implementation
     coordinates.hhThis 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
     partitioning.hhThis 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
     structuredyaspgridfactory.hhSpecialization of the StructuredGridFactory class for YaspGrid
     torus.hhThis file provides the infrastructure for toroidal communication in YaspGrid
     yaspgridentity.hhYaspEntity class and its specializations
     yaspgridentityseed.hhThe YaspEntitySeed class
     yaspgridgeometry.hhThe YaspGeometry class and its specializations
     yaspgridhierarchiciterator.hh
     yaspgrididset.hh
     yaspgridindexsets.hhLevel-wise, non-persistent, consecutive indices for YaspGrid
     yaspgridintersection.hhThe YaspIntersection class
     yaspgridintersectioniterator.hhThe YaspIntersectionIterator class
     yaspgridleveliterator.hhThe YaspLevelIterator class
     yaspgridpersistentcontainer.hhSpecialization of the PersistentContainer for YaspGrid
     ygrid.hhThis provides a YGrid, the elemental component of the yaspgrid implementation
     albertagrid.hh
     geometrygrid.hh
     identitygrid.hhThe IdentityGrid class
     onedgrid.hhThe OneDGrid class
     uggrid.hhThe UGGrid class
     yaspgrid.hh
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/globals.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/globals.html", "unified_diff": "@@ -62,30 +62,30 @@\n
    \n \n
    \n
    Here is a list of all file members with links to the files they belong to:
    \n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/globals_defs.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/globals_defs.html", "unified_diff": "@@ -62,27 +62,27 @@\n
    \n \n
    \n  
    \n \n \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00149.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00143.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -76,15 +76,15 @@\n #include <dune/common/parallel/mpihelper.hh>
    \n #include <dune/common/parametertreeparser.hh>
    \n #include <dune/common/timer.hh>
    \n #include <dune/grid/yaspgrid.hh>
    \n \n \n-\n+\n \n

    \n Functions

    int main (int argc, char **argv)
    int main (int argc, char **argv)
     
    \n

    Function Documentation

    \n \n

    ◆ main()

    \n \n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00173.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00233.html", "comments": ["Files 1% similar despite different names"], "unified_diff": "@@ -74,18 +74,18 @@\n
    \n \n

    Specialization of the PersistentContainer for YaspGrid. \n More...

    \n \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00173_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00233_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,26 +65,26 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n
    yaspgridpersistentcontainer.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
    \n
    6#define DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
    \n
    7
    \n
    12#include <cassert>
    \n
    13#include <vector>
    \n
    14
    \n \n-\n+\n
    17#include "../yaspgrid.hh"
    \n
    18
    \n
    19namespace Dune
    \n
    20{
    \n
    21
    \n
    33 template<typename Grid>
    \n \n@@ -162,15 +162,15 @@\n
    116 Base(*this, codim, value)
    \n
    117 {}
    \n
    118 };
    \n
    119
    \n
    120} // end namespace Dune
    \n
    121
    \n
    122#endif // end DUNE_GRID_YASPGRIDPERSISTENTCONTAINER_HH
    \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n
    int level() const
    The level of this entity.
    Definition: common/entity.hh:124
    \n
    static constexpr int codimension
    Know your own codimension.
    Definition: common/entity.hh:106
    \n
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    int size(int level, int codim) const
    Return number of grid entities of a given codim on a given level in this process.
    Definition: common/grid.hh:552
    \n
    A class for storing data during an adaptation cycle.
    Definition: utility/persistentcontainer.hh:22
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00176.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00152.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -74,15 +74,15 @@\n
    \n \n

    the YaspEntity class and its specializations \n More...

    \n
    #include <dune/common/math.hh>
    \n #include <dune/geometry/type.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::YaspPersistentContainerIndex< Grid >
     
    class  Dune::PersistentContainer< YaspGrid< dim, CoordCont >, T >
     Specialization of the PersistentContainer for YaspGrid. More...
    \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00176_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00152_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n
    yaspgridentity.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_YASPGRIDENTITY_HH
    \n
    6#define DUNE_GRID_YASPGRIDENTITY_HH
    \n
    7
    \n
    8#include <dune/common/math.hh>
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00191.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00266.html", "comments": ["Files 15% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: torus.hh File Reference\n+dune-grid: sizecache.hh File Reference\n \n \n \n \n \n \n \n@@ -58,64 +58,55 @@\n \n
    \n \n \n
    \n
    \n \n-
    torus.hh File Reference
    \n+Namespaces
    \n+
    sizecache.hh File Reference
    \n
    \n
    \n \n-

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

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

    \n-
    #include <array>
    \n-#include <bitset>
    \n-#include <cmath>
    \n-#include <deque>
    \n-#include <iostream>
    \n+
    #include <cassert>
    \n #include <vector>
    \n-#include <mpi.h>
    \n-#include <dune/common/binaryfunctions.hh>
    \n-#include <dune/common/streamoperators.hh>
    \n-#include <dune/grid/common/exceptions.hh>
    \n-#include "partitioning.hh"
    \n+#include <set>
    \n+#include <utility>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/hybridutilities.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/capabilities.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::YaspEntity< codim, dim, GridImp >
     
    class  Dune::YaspEntity< 0, dim, GridImp >
     
    \n \n-\n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::Torus< Communication, d >
     
    class  Dune::Torus< Communication, d >::ProcListIterator
    class  Dune::SizeCache< GridImp >
     organizes the caching of sizes for one grid and one GeometryType More...
     
    \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n-\n-\n-\n-\n

    \n-Functions

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

    Detailed Description

    \n-

    This file provides the infrastructure for toroidal communication in YaspGrid.

    \n+

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

    \n+
    Author
    Robert Kloefkorn
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,44 +4,39 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * yaspgrid\n-Classes | Namespaces | Functions\n-torus.hh File Reference\n-This file provides the infrastructure for toroidal communication in YaspGrid.\n+ * common\n+Classes | Namespaces\n+sizecache.hh File Reference\n+Provides size cache classes to implement the grids size method efficiently.\n More...\n-#include \n-#include \n-#include \n-#include \n-#include \n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include \"partitioning.hh\"\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::Torus<_Communication,_d_>\n-\u00a0\n-class \u00a0Dune::Torus<_Communication,_d_>::ProcListIterator\n+class \u00a0Dune::SizeCache<_GridImp_>\n+\u00a0 organizes the caching of sizes for one grid and one GeometryType\n+ More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n- Functions\n-template\n-std::ostream &\u00a0Dune::operator<< (std::ostream &s, const Torus< Communication,\n- d > &t)\n-\u00a0 Output operator for Torus. More...\n-\u00a0\n ***** Detailed Description *****\n-This file provides the infrastructure for toroidal communication in YaspGrid.\n+Provides size cache classes to implement the grids size method efficiently.\n+ Author\n+ Robert Kloefkorn\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00191_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00827_source.html", "comments": ["Files 8% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: torus.hh Source File\n+dune-grid: functionwriter.hh Source File\n \n \n \n \n \n \n \n@@ -58,549 +58,405 @@\n \n
    \n \n \n
    \n
    \n-
    torus.hh
    \n+
    functionwriter.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRID_TORUS_HH
    \n-
    6#define DUNE_GRID_YASPGRID_TORUS_HH
    \n-
    7
    \n-
    8#include <array>
    \n-
    9#include <bitset>
    \n-
    10#include <cmath>
    \n-
    11#include <deque>
    \n-
    12#include <iostream>
    \n+
    5
    \n+
    6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
    \n+
    7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
    \n+
    8
    \n+
    9#include <cstddef>
    \n+
    10#include <memory>
    \n+
    11#include <string>
    \n+
    12#include <typeinfo>
    \n
    13#include <vector>
    \n
    14
    \n-
    15#if HAVE_MPI
    \n-
    16#include <mpi.h>
    \n-
    17#endif
    \n-
    18
    \n-
    19#include <dune/common/binaryfunctions.hh>
    \n-
    20#include <dune/common/streamoperators.hh>
    \n-\n-
    22
    \n-
    23#include "partitioning.hh"
    \n+
    15#include <dune/common/exceptions.hh>
    \n+
    16#include <dune/common/fvector.hh>
    \n+
    17
    \n+
    18#include <dune/geometry/referenceelements.hh>
    \n+
    19
    \n+\n+\n+\n+\n
    24
    \n-
    29namespace Dune
    \n-
    30{
    \n+
    25namespace Dune
    \n+
    26{
    \n+
    29
    \n+
    30 namespace VTK {
    \n
    31
    \n-
    45 template<class Communication, int d>
    \n-
    46 class Torus {
    \n-
    47 public:
    \n-
    49 typedef std::array<int, d> iTupel;
    \n-
    50
    \n-
    51
    \n-
    52 private:
    \n-
    53 struct CommPartner {
    \n-
    54 int rank;
    \n-
    55 iTupel delta;
    \n-
    56 int index;
    \n-
    57 };
    \n-
    58
    \n-
    59 struct CommTask {
    \n-
    60 int rank; // process to send to / receive from
    \n-
    61 int size; // size of buffer
    \n-
    62 void *buffer; // buffer to send / receive
    \n-
    63 };
    \n-
    64
    \n-
    65 public:
    \n-\n-
    68 {}
    \n-
    69
    \n-
    71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning<d>* partitioner)
    \n-
    72 : _comm(comm), _tag(tag)
    \n-
    73 {
    \n-
    74 // determine dimensions
    \n-
    75 partitioner->partition(size, _comm.size(), _dims, overlap);
    \n-
    76
    \n-
    77 // compute increments for lexicographic ordering
    \n-
    78 int inc = 1;
    \n-
    79 for (int i=0; i<d; i++)
    \n-
    80 {
    \n-
    81 _increment[i] = inc;
    \n-
    82 inc *= _dims[i];
    \n-
    83 }
    \n-
    84
    \n-
    85 // check whether the load balancing matches the size of the communicator
    \n-
    86 if (inc != _comm.size())
    \n-
    87 DUNE_THROW(Dune::Exception, "Communicator size and result of the given load balancer do not match!");
    \n-
    88
    \n-
    89 // make full schedule
    \n-
    90 proclists();
    \n-
    91 }
    \n-
    92
    \n-
    94 int rank () const
    \n-
    95 {
    \n-
    96 return _comm.rank();
    \n-
    97 }
    \n-
    98
    \n-
    100 iTupel coord () const
    \n-
    101 {
    \n-
    102 return rank_to_coord(_comm.rank());
    \n-
    103 }
    \n+
    33 template<typename Cell_>
    \n+\n+
    35 typedef typename Cell_::Geometry::ctype DF;
    \n+
    36 static const unsigned mydim = Cell_::mydimension;
    \n+
    37 typedef ReferenceElements<DF, mydim> Refelems;
    \n+
    38
    \n+
    39 public:
    \n+
    40 typedef FieldVector<DF, mydim> Domain;
    \n+
    41 typedef Cell_ Cell;
    \n+
    42
    \n+
    44 virtual std::string name() const = 0;
    \n+
    45
    \n+
    47 virtual unsigned ncomps() const = 0;
    \n+
    48
    \n+
    50 virtual void addArray(PVTUWriter& writer) = 0;
    \n+
    52 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) = 0;
    \n+
    54
    \n+
    59 virtual void write(const Cell& /* cell */, const Domain& /* xl */) {
    \n+
    60 DUNE_THROW(NotImplemented, "FunctionWriterBase::write(const Cell&, "
    \n+
    61 "const Domain&): Either the derived class " <<
    \n+
    62 typeid(*this).name() << " failed to implement this method "
    \n+
    63 "or this method is not meant to be called on the derived "
    \n+
    64 "class and was called in error.");
    \n+
    65 }
    \n+
    67
    \n+
    71 virtual void write(const Cell& cell, unsigned cornerIndex) {
    \n+
    72 write(cell,
    \n+
    73 Refelems::general(cell.type()).position(cornerIndex, mydim));
    \n+
    74 }
    \n+
    76 virtual void endWrite() = 0;
    \n+\n+
    79 };
    \n+
    80
    \n+
    82 //
    \n+
    83 // A Generic Function writer for VTKFunctions
    \n+
    84 //
    \n+
    85
    \n+
    87 template<typename Func>
    \n+\n+
    89 : public FunctionWriterBase<typename Func::Entity>
    \n+
    90 {
    \n+\n+
    92 std::shared_ptr<const Func> func;
    \n+
    93 VTK::Precision precision_;
    \n+
    94 std::shared_ptr<DataArrayWriter> arraywriter;
    \n+
    95
    \n+
    96 public:
    \n+
    97 VTKFunctionWriter(const std::shared_ptr<const Func>& func_,
    \n+\n+
    99 : func(func_), precision_(prec)
    \n+
    100 { }
    \n+
    101
    \n+
    103 virtual std::string name() const { return func->name(); }
    \n
    104
    \n-
    106 int procs () const
    \n-
    107 {
    \n-
    108 return _comm.size();
    \n-
    109 }
    \n+
    106 virtual unsigned ncomps() const {
    \n+
    107 if(func->ncomps() == 2) return 3;
    \n+
    108 else return func->ncomps();
    \n+
    109 }
    \n
    110
    \n-
    112 const iTupel & dims () const
    \n-
    113 {
    \n-
    114 return _dims;
    \n-
    115 }
    \n-
    116
    \n-
    118 int dims (int i) const
    \n-
    119 {
    \n-
    120 return _dims[i];
    \n-
    121 }
    \n+
    112 virtual void addArray(PVTUWriter& writer) {
    \n+
    113 writer.addArray(name(), ncomps(), precision_);
    \n+
    114 }
    \n+
    115
    \n+
    117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n+
    118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n+
    119 nitems, precision_));
    \n+
    120 return !arraywriter->writeIsNoop();
    \n+
    121 }
    \n
    122
    \n-
    124 Communication comm () const
    \n-
    125 {
    \n-
    126 return _comm;
    \n-
    127 }
    \n-
    128
    \n-
    130 int tag () const
    \n-
    131 {
    \n-
    132 return _tag;
    \n-
    133 }
    \n-
    134
    \n-
    136 bool inside (iTupel c) const
    \n-
    137 {
    \n-
    138 for (int i=d-1; i>=0; i--)
    \n-
    139 if (c[i]<0 || c[i]>=_dims[i]) return false;
    \n-
    140 return true;
    \n-
    141 }
    \n+
    124 virtual void write(const typename Base::Cell& cell,
    \n+
    125 const typename Base::Domain& xl) {
    \n+
    126 for(int d = 0; d < func->ncomps(); ++d)
    \n+
    127 arraywriter->write(func->evaluate(d, cell, xl));
    \n+
    128 for(unsigned d = func->ncomps(); d < ncomps(); ++d)
    \n+
    129 arraywriter->write(0);
    \n+
    130 }
    \n+
    131
    \n+
    133 virtual void endWrite() {
    \n+
    134 arraywriter.reset();
    \n+
    135 }
    \n+
    136 };
    \n+
    137
    \n+
    139 //
    \n+
    140 // Writers for the grid information
    \n+
    141 //
    \n
    142
    \n-\n-
    145 {
    \n-\n-
    147 rank = rank%_comm.size();
    \n-
    148 for (int i=d-1; i>=0; i--)
    \n-
    149 {
    \n-
    150 coord[i] = rank/_increment[i];
    \n-
    151 rank = rank%_increment[i];
    \n-
    152 }
    \n-
    153 return coord;
    \n-
    154 }
    \n-
    155
    \n-\n-
    158 {
    \n-
    159 for (int i=0; i<d; i++) coord[i] = coord[i]%_dims[i];
    \n-
    160 int rank = 0;
    \n-
    161 for (int i=0; i<d; i++) rank += coord[i]*_increment[i];
    \n-
    162 return rank;
    \n-
    163 }
    \n-
    164
    \n-
    166 int rank_relative (int rank, int dir, int cnt) const
    \n-
    167 {
    \n-\n-
    169 coord[dir] = (coord[dir]+_dims[dir]+cnt)%_dims[dir];
    \n-
    170 return coord_to_rank(coord);
    \n-
    171 }
    \n-
    172
    \n-
    174 int color (const iTupel & coord) const
    \n-
    175 {
    \n-
    176 int c = 0;
    \n-
    177 int power = 1;
    \n-
    178
    \n-
    179 // interior coloring
    \n-
    180 for (int i=0; i<d; i++)
    \n-
    181 {
    \n-
    182 if (coord[i]%2==1) c += power;
    \n-
    183 power *= 2;
    \n+
    144 template<typename Cell>
    \n+\n+
    146 : public FunctionWriterBase<Cell>
    \n+
    147 {
    \n+\n+
    149
    \n+
    150 VTK::Precision precision_;
    \n+
    151 std::shared_ptr<DataArrayWriter> arraywriter;
    \n+
    152
    \n+
    153 public:
    \n+\n+
    155 : precision_(prec)
    \n+
    156 {}
    \n+
    157
    \n+
    159 virtual std::string name() const { return "Coordinates"; }
    \n+
    160
    \n+
    162 virtual unsigned ncomps() const { return 3; }
    \n+
    163
    \n+
    165 virtual void addArray(PVTUWriter& writer) {
    \n+
    166 writer.addArray(name(), ncomps(), precision_);
    \n+
    167 }
    \n+
    168
    \n+
    170 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n+
    171 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n+
    172 nitems, precision_));
    \n+
    173 return !arraywriter->writeIsNoop();
    \n+
    174 }
    \n+
    176 virtual void write(const typename Base::Cell& cell,
    \n+
    177 const typename Base::Domain& xl) {
    \n+
    178 FieldVector<typename Base::Cell::Geometry::ctype, Base::Cell::Geometry::coorddimension> xg
    \n+
    179 = cell.geometry().global(xl);
    \n+
    180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension; ++d)
    \n+
    181 arraywriter->write(xg[d]);
    \n+
    182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d)
    \n+
    183 arraywriter->write(0);
    \n
    184 }
    \n-
    185
    \n-
    186 // extra colors for boundary processes
    \n-
    187 for (int i=0; i<d; i++)
    \n-
    188 {
    \n-
    189 if (_dims[i]>1 && coord[i]==_dims[i]-1) c += power;
    \n-
    190 power *= 2;
    \n-
    191 }
    \n-
    192
    \n-
    193 return c;
    \n-
    194 }
    \n-
    195
    \n-
    197 int color (int rank) const
    \n-
    198 {
    \n-
    199 return color(rank_to_coord(rank));
    \n-
    200 }
    \n-
    201
    \n-
    203 int neighbors () const
    \n-
    204 {
    \n-
    205 int n=1;
    \n-
    206 for (int i=0; i<d; ++i)
    \n-
    207 n *= 3;
    \n-
    208 return n-1;
    \n-
    209 }
    \n-
    210
    \n-
    212 bool is_neighbor (iTupel delta, std::bitset<d> periodic) const
    \n-
    213 {
    \n-
    214 iTupel coord = rank_to_coord(_comm.rank()); // my own coordinate with 0 <= c_i < dims_i
    \n-
    215
    \n-
    216 for (int i=0; i<d; i++)
    \n-
    217 {
    \n-
    218 if (delta[i]<0)
    \n-
    219 {
    \n-
    220 // if I am on the boundary and domain is not periodic => no neighbor
    \n-
    221 if (coord[i]==0 && periodic[i]==false) return false;
    \n-
    222 }
    \n-
    223 if (delta[i]>0)
    \n-
    224 {
    \n-
    225 // if I am on the boundary and domain is not periodic => no neighbor
    \n-
    226 if (coord[i]==_dims[i]-1 && periodic[i]==false) return false;
    \n-
    227 }
    \n-
    228 }
    \n-
    229 return true;
    \n-
    230 }
    \n-
    231
    \n-
    239 double partition (int rank, iTupel origin_in, iTupel size_in, iTupel& origin_out, iTupel& size_out) const
    \n-
    240 {
    \n-\n-
    242 double maxsize = 1;
    \n-
    243 double sz = 1;
    \n-
    244
    \n-
    245 // make a tensor product partition
    \n-
    246 for (int i=0; i<d; i++)
    \n-
    247 {
    \n-
    248 // determine
    \n-
    249 int m = size_in[i]/_dims[i];
    \n-
    250 int r = size_in[i]%_dims[i];
    \n-
    251
    \n-
    252 sz *= size_in[i];
    \n-
    253
    \n-
    254 if (coord[i]<_dims[i]-r)
    \n-
    255 {
    \n-
    256 origin_out[i] = origin_in[i] + coord[i]*m;
    \n-
    257 size_out[i] = m;
    \n-
    258 maxsize *= m;
    \n-
    259 }
    \n-
    260 else
    \n-
    261 {
    \n-
    262 origin_out[i] = origin_in[i] + (_dims[i]-r)*m + (coord[i]-(_dims[i]-r))*(m+1);
    \n-
    263 size_out[i] = m+1;
    \n-
    264 maxsize *= m+1;
    \n-
    265 }
    \n-
    266 }
    \n-
    267 return maxsize/(sz/_comm.size());
    \n-
    268 }
    \n-
    269
    \n-\n-
    277 public:
    \n-
    279 ProcListIterator (typename std::deque<CommPartner>::const_iterator iter)
    \n-
    280 {
    \n-
    281 i = iter;
    \n-
    282 }
    \n-
    283
    \n-
    285 int rank () const
    \n-
    286 {
    \n-
    287 return i->rank;
    \n-
    288 }
    \n-
    289
    \n-
    291 iTupel delta () const
    \n-
    292 {
    \n-
    293 return i->delta;
    \n-
    294 }
    \n+
    186 virtual void endWrite() {
    \n+
    187 arraywriter.reset();
    \n+
    188 }
    \n+
    189 };
    \n+
    190
    \n+
    192 template<typename IteratorFactory>
    \n+\n+
    194 : public FunctionWriterBase<typename IteratorFactory::Cell>
    \n+
    195 {
    \n+\n+
    197 static const unsigned mydim = Base::Cell::mydimension;
    \n+
    198
    \n+
    199 const IteratorFactory& factory;
    \n+
    200 std::shared_ptr<DataArrayWriter> arraywriter;
    \n+
    201 std::vector<unsigned> pointIndices;
    \n+
    202
    \n+
    203 public:
    \n+
    205 ConformingConnectivityWriter(const IteratorFactory& factory_)
    \n+
    206 : factory(factory_)
    \n+
    207 { }
    \n+
    208
    \n+
    210 virtual std::string name() const { return "connectivity"; }
    \n+
    211
    \n+
    213 virtual unsigned ncomps() const { return 1; }
    \n+
    214
    \n+
    216 virtual void addArray(PVTUWriter& writer) {
    \n+
    217 writer.addArray(name(), ncomps(), Precision::int32);
    \n+
    218 }
    \n+
    219
    \n+
    221 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n+
    222 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n+
    223 nitems, Precision::int32));
    \n+
    224 if(arraywriter->writeIsNoop())
    \n+
    225 return false;
    \n+
    226
    \n+
    228 pointIndices.resize(factory.indexSet().size(mydim));
    \n+
    229 const typename IteratorFactory::PointIterator& pend =
    \n+
    230 factory.endPoints();
    \n+
    231 typename IteratorFactory::PointIterator pit = factory.beginPoints();
    \n+
    232 unsigned counter = 0;
    \n+
    233 while(pit != pend) {
    \n+
    234 pointIndices[factory.indexSet().subIndex
    \n+
    235 (pit->cell(), pit->duneIndex(), mydim)] = counter;
    \n+
    236 ++counter;
    \n+
    237 ++pit;
    \n+
    238 }
    \n+
    239 return true;
    \n+
    240 }
    \n+
    242 virtual void write(const typename Base::Cell& cell, unsigned cornerIndex)
    \n+
    243 {
    \n+
    244 // if pointIndices is empty, we're in writeIsNoop mode
    \n+
    245 if(pointIndices.size() == 0)
    \n+
    246 return;
    \n+
    247 arraywriter->write(pointIndices[factory.indexSet().subIndex
    \n+
    248 (cell, cornerIndex, mydim)]);
    \n+
    249 }
    \n+
    251 virtual void endWrite() {
    \n+
    252 arraywriter.reset();
    \n+
    253 pointIndices.clear();
    \n+
    254 }
    \n+
    255 };
    \n+
    256
    \n+
    258 template<typename Cell>
    \n+\n+
    260 : public FunctionWriterBase<Cell>
    \n+
    261 {
    \n+
    262 std::shared_ptr<DataArrayWriter> arraywriter;
    \n+
    263 unsigned counter;
    \n+
    264
    \n+
    265 public:
    \n+
    267 virtual std::string name() const { return "connectivity"; }
    \n+
    268
    \n+
    270 virtual unsigned ncomps() const { return 1; }
    \n+
    271
    \n+
    273 virtual void addArray(PVTUWriter& writer) {
    \n+
    274 writer.addArray(name(), ncomps(), Precision::int32);
    \n+
    275 }
    \n+
    276
    \n+
    278 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n+
    279 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n+
    280 nitems, Precision::int32));
    \n+
    281 counter = 0;
    \n+
    282 return !arraywriter->writeIsNoop();
    \n+
    283 }
    \n+
    285 virtual void write(const Cell& /* cell */, unsigned /* cornerIndex */)
    \n+
    286 {
    \n+
    287 arraywriter->write(counter);
    \n+
    288 ++counter;
    \n+
    289 }
    \n+
    291 virtual void endWrite() {
    \n+
    292 arraywriter.reset();
    \n+
    293 }
    \n+
    294 };
    \n
    295
    \n-
    297 int index () const
    \n-
    298 {
    \n-
    299 return i->index;
    \n-
    300 }
    \n-
    301
    \n-
    303 int distance () const
    \n-
    304 {
    \n-
    305 int dist = 0;
    \n-
    306 iTupel delta=i->delta;
    \n-
    307 for (int j=0; j<d; ++j)
    \n-
    308 dist += std::abs(delta[j]);
    \n-
    309 return dist;
    \n-
    310 }
    \n-
    311
    \n-
    313 bool operator== (const ProcListIterator& iter) const
    \n-
    314 {
    \n-
    315 return i == iter.i;
    \n+
    297 template<typename Cell>
    \n+\n+
    299 : public FunctionWriterBase<Cell>
    \n+
    300 {
    \n+\n+
    302
    \n+
    303 std::shared_ptr<DataArrayWriter> arraywriter;
    \n+
    304 unsigned offset;
    \n+
    305
    \n+
    306 public:
    \n+
    308 virtual std::string name() const { return "offsets"; }
    \n+
    309
    \n+
    311 virtual unsigned ncomps() const { return 1; }
    \n+
    312
    \n+
    314 virtual void addArray(PVTUWriter& writer) {
    \n+
    315 writer.addArray(name(), ncomps(), Precision::int32);
    \n
    316 }
    \n
    317
    \n-
    318
    \n-
    320 bool operator!= (const ProcListIterator& iter) const
    \n-
    321 {
    \n-
    322 return i != iter.i;
    \n-
    323 }
    \n-
    324
    \n-\n-
    327 {
    \n-
    328 ++i;
    \n-
    329 return *this;
    \n-
    330 }
    \n-
    331
    \n-
    332 private:
    \n-
    333 typename std::deque<CommPartner>::const_iterator i;
    \n+
    319 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n+
    320 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),
    \n+
    321 nitems, Precision::int32));
    \n+
    322 offset = 0;
    \n+
    323 return !arraywriter->writeIsNoop();
    \n+
    324 }
    \n+
    326 virtual void write(const Cell& cell, const typename Base::Domain&) {
    \n+
    327 offset += cell.geometry().corners();
    \n+
    328 arraywriter->write(offset);
    \n+
    329 }
    \n+
    331 virtual void endWrite() {
    \n+
    332 arraywriter.reset();
    \n+
    333 }
    \n
    334 };
    \n
    335
    \n-\n-
    338 {
    \n-
    339 return ProcListIterator(_sendlist.begin());
    \n-
    340 }
    \n-
    341
    \n-\n-
    344 {
    \n-
    345 return ProcListIterator(_sendlist.end());
    \n-
    346 }
    \n-
    347
    \n-\n-
    350 {
    \n-
    351 return ProcListIterator(_recvlist.begin());
    \n-
    352 }
    \n-
    353
    \n-\n-
    356 {
    \n-
    357 return ProcListIterator(_recvlist.end());
    \n-
    358 }
    \n-
    359
    \n-
    361 void send (int rank, void* buffer, int size) const
    \n-
    362 {
    \n-
    363 CommTask task;
    \n-
    364 task.rank = rank;
    \n-
    365 task.buffer = buffer;
    \n-
    366 task.size = size;
    \n-
    367 if (rank!=_comm.rank())
    \n-
    368 _sendrequests.push_back(task);
    \n-
    369 else
    \n-
    370 _localsendrequests.push_back(task);
    \n-
    371 }
    \n+
    337 template<typename Cell>
    \n+\n+
    339 : public FunctionWriterBase<Cell>
    \n+
    340 {
    \n+\n+
    342
    \n+
    343 std::shared_ptr<DataArrayWriter> arraywriter;
    \n+
    344
    \n+
    345 public:
    \n+
    347 virtual std::string name() const { return "types"; }
    \n+
    348
    \n+
    350 virtual unsigned ncomps() const { return 1; }
    \n+
    351
    \n+
    353 virtual void addArray(PVTUWriter& writer) {
    \n+
    354 writer.addArray(name(), ncomps(), Precision::uint8);
    \n+
    355 }
    \n+
    356
    \n+
    358 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {
    \n+
    359 arraywriter.reset(writer.makeArrayWriter
    \n+
    360 ( name(), ncomps(), nitems, Precision::uint8));
    \n+
    361 return !arraywriter->writeIsNoop();
    \n+
    362 }
    \n+
    364 virtual void write(const Cell& cell, const typename Base::Domain&) {
    \n+
    365 arraywriter->write(geometryType(cell.type()));
    \n+
    366 }
    \n+
    368 virtual void endWrite() {
    \n+
    369 arraywriter.reset();
    \n+
    370 }
    \n+
    371 };
    \n
    372
    \n-
    374 void recv (int rank, void* buffer, int size) const
    \n-
    375 {
    \n-
    376 CommTask task;
    \n-
    377 task.rank = rank;
    \n-
    378 task.buffer = buffer;
    \n-
    379 task.size = size;
    \n-
    380 if (rank!=_comm.rank())
    \n-
    381 _recvrequests.push_back(task);
    \n-
    382 else
    \n-
    383 _localrecvrequests.push_back(task);
    \n-
    384 }
    \n-
    385
    \n-
    387 void exchange () const
    \n-
    388 {
    \n-
    389 // handle local requests first
    \n-
    390 if (_localsendrequests.size()!=_localrecvrequests.size())
    \n-
    391 {
    \n-
    392 std::cout << "[" << rank() << "]: ERROR: local sends/receives do not match in exchange!" << std::endl;
    \n-
    393 return;
    \n-
    394 }
    \n-
    395 for (unsigned int i=0; i<_localsendrequests.size(); i++)
    \n-
    396 {
    \n-
    397 if (_localsendrequests[i].size!=_localrecvrequests[i].size)
    \n-
    398 {
    \n-
    399 std::cout << "[" << rank() << "]: ERROR: size in local sends/receive does not match in exchange!" << std::endl;
    \n-
    400 return;
    \n-
    401 }
    \n-
    402 memcpy(_localrecvrequests[i].buffer,_localsendrequests[i].buffer,_localsendrequests[i].size);
    \n-
    403 }
    \n-
    404 _localsendrequests.clear();
    \n-
    405 _localrecvrequests.clear();
    \n-
    406
    \n-
    407#if HAVE_MPI
    \n-
    408 // handle foreign requests
    \n-
    409
    \n-
    410 std::vector<MPI_Request> requests(_sendrequests.size() + _recvrequests.size());
    \n-
    411 MPI_Request* req = requests.data();
    \n-
    412
    \n-
    413 // issue sends to foreign processes
    \n-
    414 for (unsigned int i=0; i<_sendrequests.size(); i++)
    \n-
    415 if (_sendrequests[i].rank!=rank())
    \n-
    416 {
    \n-
    417 // std::cout << "[" << rank() << "]" << " send " << _sendrequests[i].size << " bytes "
    \n-
    418 // << "to " << _sendrequests[i].rank << " p=" << _sendrequests[i].buffer << std::endl;
    \n-
    419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE,
    \n-
    420 _sendrequests[i].rank, _tag, _comm, req++);
    \n-
    421 }
    \n-
    422
    \n-
    423 // issue receives from foreign processes
    \n-
    424 for (unsigned int i=0; i<_recvrequests.size(); i++)
    \n-
    425 if (_recvrequests[i].rank!=rank())
    \n-
    426 {
    \n-
    427 // std::cout << "[" << rank() << "]" << " recv " << _recvrequests[i].size << " bytes "
    \n-
    428 // << "fm " << _recvrequests[i].rank << " p=" << _recvrequests[i].buffer << std::endl;
    \n-
    429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE,
    \n-
    430 _recvrequests[i].rank, _tag, _comm, req++);
    \n-
    431 }
    \n-
    432
    \n-
    433 // Wait for communication to complete
    \n-
    434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);
    \n-
    435
    \n-
    436 // clear request buffers
    \n-
    437 _sendrequests.clear();
    \n-
    438 _recvrequests.clear();
    \n-
    439#endif
    \n-
    440 }
    \n-
    441
    \n-
    443 double global_max (double x) const
    \n-
    444 {
    \n-
    445 double res = 0.0;
    \n-
    446 _comm.template allreduce<Dune::Max<double>,double>(&x, &res, 1);
    \n-
    447 return res;
    \n-
    448 }
    \n-
    449
    \n-
    451 void print (std::ostream& s) const
    \n-
    452 {
    \n-
    453 s << "[" << rank() << "]: Torus " << procs() << " processor(s) arranged as " << dims() << std::endl;
    \n-
    454 for (ProcListIterator i=sendbegin(); i!=sendend(); ++i)
    \n-
    455 {
    \n-
    456 s << "[" << rank() << "]: send to "
    \n-
    457 << "rank=" << i.rank()
    \n-
    458 << " index=" << i.index()
    \n-
    459 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
    \n-
    460 }
    \n-
    461 for (ProcListIterator i=recvbegin(); i!=recvend(); ++i)
    \n-
    462 {
    \n-
    463 s << "[" << rank() << "]: recv from "
    \n-
    464 << "rank=" << i.rank()
    \n-
    465 << " index=" << i.index()
    \n-
    466 << " delta=" << i.delta() << " dist=" << i.distance() << std::endl;
    \n-
    467 }
    \n-
    468 }
    \n-
    469
    \n-
    470 private:
    \n-
    471
    \n-
    472 void proclists ()
    \n-
    473 {
    \n-
    474 // compile the full neighbor list
    \n-
    475 CommPartner cp;
    \n-
    476 iTupel delta;
    \n-
    477
    \n-
    478 std::fill(delta.begin(), delta.end(), -1);
    \n-
    479 bool ready = false;
    \n-
    480 iTupel me, nb;
    \n-
    481 me = rank_to_coord(_comm.rank());
    \n-
    482 int index = 0;
    \n-
    483 int last = neighbors()-1;
    \n-
    484 while (!ready)
    \n-
    485 {
    \n-
    486 // find neighbors coordinates
    \n-
    487 for (int i=0; i<d; i++)
    \n-
    488 nb[i] = ( me[i]+_dims[i]+delta[i] ) % _dims[i];
    \n-
    489
    \n-
    490 // find neighbors rank
    \n-
    491 int nbrank = coord_to_rank(nb);
    \n-
    492
    \n-
    493 // check if delta is not zero
    \n-
    494 for (int i=0; i<d; i++)
    \n-
    495 if (delta[i]!=0)
    \n-
    496 {
    \n-
    497 cp.rank = nbrank;
    \n-
    498 cp.delta = delta;
    \n-
    499 cp.index = index;
    \n-
    500 _recvlist.push_back(cp);
    \n-
    501 cp.index = last-index;
    \n-
    502 _sendlist.push_front(cp);
    \n-
    503 index++;
    \n-
    504 break;
    \n-
    505 }
    \n-
    506
    \n-
    507 // next neighbor
    \n-
    508 ready = true;
    \n-
    509 for (int i=0; i<d; i++)
    \n-
    510 if (delta[i]<1)
    \n-
    511 {
    \n-
    512 (delta[i])++;
    \n-
    513 ready=false;
    \n-
    514 break;
    \n-
    515 }
    \n-
    516 else
    \n-
    517 {
    \n-
    518 delta[i] = -1;
    \n-
    519 }
    \n-
    520 }
    \n-
    521
    \n-
    522 }
    \n-
    523
    \n-
    524 Communication _comm;
    \n-
    525
    \n-
    526 iTupel _dims;
    \n-
    527 iTupel _increment;
    \n-
    528 int _tag;
    \n-
    529 std::deque<CommPartner> _sendlist;
    \n-
    530 std::deque<CommPartner> _recvlist;
    \n-
    531
    \n-
    532 mutable std::vector<CommTask> _sendrequests;
    \n-
    533 mutable std::vector<CommTask> _recvrequests;
    \n-
    534 mutable std::vector<CommTask> _localsendrequests;
    \n-
    535 mutable std::vector<CommTask> _localrecvrequests;
    \n-
    536
    \n-
    537 };
    \n-
    538
    \n-
    540 template <class Communication, int d>
    \n-
    541 inline std::ostream& operator<< (std::ostream& s, const Torus<Communication, d> & t)
    \n-
    542 {
    \n-
    543 t.print(s);
    \n-
    544 return s;
    \n-
    545 }
    \n-
    546}
    \n-
    547
    \n-
    548#endif
    \n-
    This file provides tools to partition YaspGrids. If you want to write your own partitioner,...
    \n-\n-
    std::ostream & operator<<(std::ostream &out, const PartitionType &type)
    write a PartitionType to a stream
    Definition: gridenums.hh:72
    \n+
    373 } // namespace VTK
    \n+
    374
    \n+
    376
    \n+
    377} // namespace Dune
    \n+
    378
    \n+
    379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH
    \n+
    Data array writers for the VTKWriter.
    \n+
    Common stuff for the VTKWriter.
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n-
    constexpr Overlap overlap
    PartitionSet for the overlap partition.
    Definition: partitionset.hh:278
    \n-
    a base class for the yaspgrid partitioning strategy
    Definition: partitioning.hh:39
    \n-
    virtual void partition(const iTupel &, int, iTupel &, int) const =0
    \n-
    Definition: torus.hh:46
    \n-
    Torus()
    constructor making uninitialized object
    Definition: torus.hh:67
    \n-
    int color(int rank) const
    assign color to given rank
    Definition: torus.hh:197
    \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 ...
    Definition: torus.hh:239
    \n-
    int dims(int i) const
    return dimensions of torus in direction i
    Definition: torus.hh:118
    \n-
    iTupel coord() const
    return own coordinates
    Definition: torus.hh:100
    \n-
    int rank() const
    return own rank
    Definition: torus.hh:94
    \n-
    const iTupel & dims() const
    return dimensions of torus
    Definition: torus.hh:112
    \n-
    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
    \n-
    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
    \n-
    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
    \n-
    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
    \n-
    int neighbors() const
    return the number of neighbors, which is
    Definition: torus.hh:203
    \n-
    void print(std::ostream &s) const
    print contents of torus object
    Definition: torus.hh:451
    \n-
    double global_max(double x) const
    global max
    Definition: torus.hh:443
    \n-
    Communication comm() const
    return communicator
    Definition: torus.hh:124
    \n-
    int color(const iTupel &coord) const
    assign color to given coordinate
    Definition: torus.hh:174
    \n-
    ProcListIterator recvend() const
    last process in receive list
    Definition: torus.hh:355
    \n-
    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
    \n-
    ProcListIterator sendend() const
    end of send list
    Definition: torus.hh:343
    \n-
    int procs() const
    return number of processes
    Definition: torus.hh:106
    \n-
    iTupel rank_to_coord(int rank) const
    map rank to coordinate in torus using lexicographic ordering
    Definition: torus.hh:144
    \n-
    std::array< int, d > iTupel
    type used to pass tupels in and out
    Definition: torus.hh:49
    \n-
    ProcListIterator sendbegin() const
    first process in send list
    Definition: torus.hh:337
    \n-
    void exchange() const
    exchange messages stored in request buffers; clear request buffers afterwards
    Definition: torus.hh:387
    \n-
    ProcListIterator recvbegin() const
    first process in receive list
    Definition: torus.hh:349
    \n-
    int coord_to_rank(iTupel coord) const
    map coordinate in torus to rank using lexicographic ordering
    Definition: torus.hh:157
    \n-
    bool inside(iTupel c) const
    return true if coordinate is inside torus
    Definition: torus.hh:136
    \n-
    int tag() const
    return tag used by torus
    Definition: torus.hh:130
    \n-
    Definition: torus.hh:276
    \n-
    iTupel delta() const
    return distance vector
    Definition: torus.hh:291
    \n-
    bool operator==(const ProcListIterator &iter) const
    Return true when two iterators point to same member.
    Definition: torus.hh:313
    \n-
    bool operator!=(const ProcListIterator &iter) const
    Return true when two iterators do not point to same member.
    Definition: torus.hh:320
    \n-
    int rank() const
    return rank of neighboring process
    Definition: torus.hh:285
    \n-
    ProcListIterator(typename std::deque< CommPartner >::const_iterator iter)
    make an iterator
    Definition: torus.hh:279
    \n-
    ProcListIterator & operator++()
    Increment iterator to next cell.
    Definition: torus.hh:326
    \n-
    int index() const
    return index in proclist
    Definition: torus.hh:297
    \n-
    int distance() const
    return 1-norm of distance vector
    Definition: torus.hh:303
    \n+
    Precision
    which precision to use when writing out data to vtk files
    Definition: common.hh:271
    \n+\n+\n+\n+
    GeometryType geometryType(const Dune::GeometryType &t)
    mapping from GeometryType to VTKGeometryType
    Definition: common.hh:151
    \n+
    Base class for function writers.
    Definition: functionwriter.hh:34
    \n+
    virtual std::string name() const =0
    return name
    \n+
    virtual unsigned ncomps() const =0
    return number of components of the vector
    \n+
    virtual void write(const Cell &, const Domain &)
    write at the given position
    Definition: functionwriter.hh:59
    \n+
    Cell_ Cell
    Definition: functionwriter.hh:41
    \n+
    virtual void addArray(PVTUWriter &writer)=0
    add this field to the given parallel writer
    \n+
    virtual void endWrite()=0
    signal end of writing
    \n+
    FieldVector< DF, mydim > Domain
    Definition: functionwriter.hh:40
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0
    start writing with the given writer
    \n+
    virtual ~FunctionWriterBase()
    destructor
    Definition: functionwriter.hh:78
    \n+
    virtual void write(const Cell &cell, unsigned cornerIndex)
    write at the given corner
    Definition: functionwriter.hh:71
    \n+
    Base class for function writers.
    Definition: functionwriter.hh:90
    \n+
    VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision prec=VTK::Precision::float32)
    Definition: functionwriter.hh:97
    \n+
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:103
    \n+
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:106
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:117
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:112
    \n+
    virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
    write at the given position
    Definition: functionwriter.hh:124
    \n+
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:133
    \n+
    writer for the Coordinates array
    Definition: functionwriter.hh:147
    \n+
    virtual void write(const typename Base::Cell &cell, const typename Base::Domain &xl)
    write at the given position
    Definition: functionwriter.hh:176
    \n+
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:159
    \n+
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:186
    \n+
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:162
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:165
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:170
    \n+
    CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32)
    Definition: functionwriter.hh:154
    \n+
    writer for the connectivity array in conforming mode
    Definition: functionwriter.hh:195
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:216
    \n+
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:210
    \n+
    virtual void write(const typename Base::Cell &cell, unsigned cornerIndex)
    write at the given corner
    Definition: functionwriter.hh:242
    \n+
    ConformingConnectivityWriter(const IteratorFactory &factory_)
    create a writer with the given iteratorfactory
    Definition: functionwriter.hh:205
    \n+
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:213
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:221
    \n+
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:251
    \n+
    writer for the connectivity array in nonconforming mode
    Definition: functionwriter.hh:261
    \n+
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:270
    \n+
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:267
    \n+
    virtual void write(const Cell &, unsigned)
    write at the given corner
    Definition: functionwriter.hh:285
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:273
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:278
    \n+
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:291
    \n+
    writer for the offsets array
    Definition: functionwriter.hh:300
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:314
    \n+
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:331
    \n+
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:308
    \n+
    virtual void write(const Cell &cell, const typename Base::Domain &)
    write at the given position
    Definition: functionwriter.hh:326
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:319
    \n+
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:311
    \n+
    writer for the types array
    Definition: functionwriter.hh:340
    \n+
    virtual unsigned ncomps() const
    return number of components of the vector
    Definition: functionwriter.hh:350
    \n+
    virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)
    start writing with the given writer
    Definition: functionwriter.hh:358
    \n+
    virtual std::string name() const
    return name
    Definition: functionwriter.hh:347
    \n+
    virtual void write(const Cell &cell, const typename Base::Domain &)
    write at the given position
    Definition: functionwriter.hh:364
    \n+
    virtual void addArray(PVTUWriter &writer)
    add this field to the given parallel writer
    Definition: functionwriter.hh:353
    \n+
    virtual void endWrite()
    signal end of writing
    Definition: functionwriter.hh:368
    \n+
    Dump a .vtu/.vtp files contents to a stream.
    Definition: pvtuwriter.hh:62
    \n+
    void addArray(const std::string &name, unsigned ncomps, Precision prec)
    Add an array to the output file.
    Definition: pvtuwriter.hh:207
    \n+
    Dump a .vtu/.vtp files contents to a stream.
    Definition: vtuwriter.hh:98
    \n+
    DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps, unsigned nitems, Precision prec)
    acquire a DataArrayWriter
    Definition: vtuwriter.hh:380
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,689 +4,581 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * yaspgrid\n-torus.hh\n+ * io\n+ * file\n+ * vtk\n+functionwriter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRID_TORUS_HH\n- 6#define DUNE_GRID_YASPGRID_TORUS_HH\n- 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12#include \n+ 5\n+ 6#ifndef DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH\n+ 7#define DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH\n+ 8\n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n 13#include \n 14\n- 15#if HAVE_MPI\n- 16#include \n- 17#endif\n- 18\n- 19#include \n- 20#include \n- 21#include \n- 22\n- 23#include \"partitioning.hh\"\n+ 15#include \n+ 16#include \n+ 17\n+ 18#include \n+ 19\n+ 20#include \n+ 21#include \n+ 22#include \n+ 23#include \n 24\n- 29namespace Dune\n- 30{\n+ 25namespace Dune\n+ 26{\n+ 29\n+ 30 namespace VTK {\n 31\n- 45 template\n-46 class Torus {\n- 47 public:\n-49 typedef std::array iTupel;\n- 50\n- 51\n- 52 private:\n- 53 struct CommPartner {\n- 54 int rank;\n- 55 iTupel delta;\n- 56 int index;\n- 57 };\n- 58\n- 59 struct CommTask {\n- 60 int rank; // process to send to / receive from\n- 61 int size; // size of buffer\n- 62 void *buffer; // buffer to send / receive\n- 63 };\n- 64\n- 65 public:\n-67 Torus ()\n- 68 {}\n- 69\n-71 Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::\n-Partitioning* partitioner)\n- 72 : _comm(comm), _tag(tag)\n- 73 {\n- 74 // determine dimensions\n- 75 partitioner->partition(size, _comm.size(), _dims, overlap);\n- 76\n- 77 // compute increments for lexicographic ordering\n- 78 int inc = 1;\n- 79 for (int i=0; i\n+34 class FunctionWriterBase {\n+ 35 typedef typename Cell_::Geometry::ctype DF;\n+ 36 static const unsigned mydim = Cell_::mydimension;\n+ 37 typedef ReferenceElements Refelems;\n+ 38\n+ 39 public:\n+40 typedef FieldVector Domain;\n+41 typedef Cell_ Cell;\n+ 42\n+44 virtual std::string name() const = 0;\n+ 45\n+47 virtual unsigned ncomps() const = 0;\n+ 48\n+50 virtual void addArray(PVTUWriter& writer) = 0;\n+52 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) = 0;\n+ 54\n+59 virtual void write(const Cell& /* cell */, const Domain& /* xl */) {\n+ 60 DUNE_THROW(NotImplemented, \"FunctionWriterBase::write(const Cell&, \"\n+ 61 \"const Domain&): Either the derived class \" <<\n+ 62 typeid(*this).name() << \" failed to implement this method \"\n+ 63 \"or this method is not meant to be called on the derived \"\n+ 64 \"class and was called in error.\");\n+ 65 }\n+ 67\n+71 virtual void write(const Cell& cell, unsigned cornerIndex) {\n+ 72 write(cell,\n+ 73 Refelems::general(cell.type()).position(cornerIndex, mydim));\n+ 74 }\n+76 virtual void endWrite() = 0;\n+78 virtual ~FunctionWriterBase() {}\n+ 79 };\n+ 80\n+ 82 //\n+ 83 // A Generic Function writer for VTKFunctions\n+ 84 //\n+ 85\n+ 87 template\n+88 class VTKFunctionWriter\n+ 89 : public FunctionWriterBase\n+ 90 {\n+ 91 typedef FunctionWriterBase Base;\n+ 92 std::shared_ptr func;\n+ 93 VTK::Precision precision_;\n+ 94 std::shared_ptr arraywriter;\n+ 95\n+ 96 public:\n+97 VTKFunctionWriter(const std::shared_ptr& func_,\n+ 98 VTK::Precision prec = VTK::Precision::float32)\n+ 99 : func(func_), precision_(prec)\n+ 100 { }\n+ 101\n+103 virtual std::string name() const { return func->name(); }\n 104\n-106 int procs () const\n- 107 {\n- 108 return _comm.size();\n+106 virtual unsigned ncomps() const {\n+ 107 if(func->ncomps() == 2) return 3;\n+ 108 else return func->ncomps();\n 109 }\n 110\n-112 const iTupel & dims () const\n- 113 {\n- 114 return _dims;\n- 115 }\n- 116\n-118 int dims (int i) const\n- 119 {\n- 120 return _dims[i];\n+112 virtual void addArray(PVTUWriter& writer) {\n+ 113 writer.addArray(name(), ncomps(), precision_);\n+ 114 }\n+ 115\n+117 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n+ 118 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n+ 119 nitems, precision_));\n+ 120 return !arraywriter->writeIsNoop();\n 121 }\n 122\n-124 Communication comm () const\n- 125 {\n- 126 return _comm;\n- 127 }\n- 128\n-130 int tag () const\n- 131 {\n- 132 return _tag;\n- 133 }\n- 134\n-136 bool inside (iTupel c) const\n- 137 {\n- 138 for (int i=d-1; i>=0; i--)\n- 139 if (c[i]<0 || c[i]>=_dims[i]) return false;\n- 140 return true;\n- 141 }\n+124 virtual void write(const typename Base::Cell& cell,\n+ 125 const typename Base::Domain& xl) {\n+ 126 for(int d = 0; d < func->ncomps(); ++d)\n+ 127 arraywriter->write(func->evaluate(d, cell, xl));\n+ 128 for(unsigned d = func->ncomps(); d < ncomps(); ++d)\n+ 129 arraywriter->write(0);\n+ 130 }\n+ 131\n+133 virtual void endWrite() {\n+ 134 arraywriter.reset();\n+ 135 }\n+ 136 };\n+ 137\n+ 139 //\n+ 140 // Writers for the grid information\n+ 141 //\n 142\n-144 iTupel rank_to_coord (int rank) const\n- 145 {\n- 146 iTupel coord;\n- 147 rank = rank%_comm.size();\n- 148 for (int i=d-1; i>=0; i--)\n- 149 {\n- 150 coord[i] = rank/_increment[i];\n- 151 rank = rank%_increment[i];\n- 152 }\n- 153 return coord;\n- 154 }\n- 155\n-157 int coord_to_rank (iTupel coord) const\n- 158 {\n- 159 for (int i=0; i\n+145 class CoordinatesWriter\n+ 146 : public FunctionWriterBase\n+ 147 {\n+ 148 typedef FunctionWriterBase Base;\n+ 149\n+ 150 VTK::Precision precision_;\n+ 151 std::shared_ptr arraywriter;\n+ 152\n+ 153 public:\n+154 explicit CoordinatesWriter(VTK::Precision prec = VTK::Precision::float32)\n+ 155 : precision_(prec)\n+ 156 {}\n+ 157\n+159 virtual std::string name() const { return \"Coordinates\"; }\n+ 160\n+162 virtual unsigned ncomps() const { return 3; }\n+ 163\n+165 virtual void addArray(PVTUWriter& writer) {\n+ 166 writer.addArray(name(), ncomps(), precision_);\n+ 167 }\n+ 168\n+170 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n+ 171 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n+ 172 nitems, precision_));\n+ 173 return !arraywriter->writeIsNoop();\n+ 174 }\n+176 virtual void write(const typename Base::Cell& cell,\n+ 177 const typename Base::Domain& xl) {\n+ 178 FieldVector xg\n+ 179 = cell.geometry().global(xl);\n+ 180 for(unsigned d = 0; d < 3 && d < Base::Cell::Geometry::coorddimension;\n+++d)\n+ 181 arraywriter->write(xg[d]);\n+ 182 for(unsigned d = Base::Cell::Geometry::coorddimension; d < 3; ++d)\n+ 183 arraywriter->write(0);\n 184 }\n- 185\n- 186 // extra colors for boundary processes\n- 187 for (int i=0; i1 && coord[i]==_dims[i]-1) c += power;\n- 190 power *= 2;\n- 191 }\n- 192\n- 193 return c;\n- 194 }\n- 195\n-197 int color (int rank) const\n- 198 {\n- 199 return color(rank_to_coord(rank));\n- 200 }\n- 201\n-203 int neighbors () const\n- 204 {\n- 205 int n=1;\n- 206 for (int i=0; i periodic) const\n- 213 {\n- 214 iTupel coord = rank_to_coord(_comm.rank()); // my own coordinate with 0 <=\n-c_i < dims_i\n- 215\n- 216 for (int i=0; i no neighbor\n- 221 if (coord[i]==0 && periodic[i]==false) return false;\n- 222 }\n- 223 if (delta[i]>0)\n- 224 {\n- 225 // if I am on the boundary and domain is not periodic => no neighbor\n- 226 if (coord[i]==_dims[i]-1 && periodic[i]==false) return false;\n- 227 }\n- 228 }\n- 229 return true;\n- 230 }\n- 231\n-239 double partition (int rank, iTupel origin_in, iTupel size_in, iTupel&\n-origin_out, iTupel& size_out) const\n- 240 {\n- 241 iTupel coord = rank_to_coord(rank);\n- 242 double maxsize = 1;\n- 243 double sz = 1;\n- 244\n- 245 // make a tensor product partition\n- 246 for (int i=0; i\n+193 class ConformingConnectivityWriter\n+ 194 : public FunctionWriterBase\n+ 195 {\n+ 196 typedef FunctionWriterBase Base;\n+ 197 static const unsigned mydim = Base::Cell::mydimension;\n+ 198\n+ 199 const IteratorFactory& factory;\n+ 200 std::shared_ptr arraywriter;\n+ 201 std::vector pointIndices;\n+ 202\n+ 203 public:\n+205 ConformingConnectivityWriter(const IteratorFactory& factory_)\n+ 206 : factory(factory_)\n+ 207 { }\n+ 208\n+210 virtual std::string name() const { return \"connectivity\"; }\n+ 211\n+213 virtual unsigned ncomps() const { return 1; }\n+ 214\n+216 virtual void addArray(PVTUWriter& writer) {\n+ 217 writer.addArray(name(), ncomps(), Precision::int32);\n+ 218 }\n+ 219\n+221 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n+ 222 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n+ 223 nitems, Precision::int32));\n+ 224 if(arraywriter->writeIsNoop())\n+ 225 return false;\n+ 226\n+ 228 pointIndices.resize(factory.indexSet().size(mydim));\n+ 229 const typename IteratorFactory::PointIterator& pend =\n+ 230 factory.endPoints();\n+ 231 typename IteratorFactory::PointIterator pit = factory.beginPoints();\n+ 232 unsigned counter = 0;\n+ 233 while(pit != pend) {\n+ 234 pointIndices[factory.indexSet().subIndex\n+ 235 (pit->cell(), pit->duneIndex(), mydim)] = counter;\n+ 236 ++counter;\n+ 237 ++pit;\n+ 238 }\n+ 239 return true;\n+ 240 }\n+242 virtual void write(const typename Base::Cell& cell, unsigned cornerIndex)\n+ 243 {\n+ 244 // if pointIndices is empty, we're in writeIsNoop mode\n+ 245 if(pointIndices.size() == 0)\n+ 246 return;\n+ 247 arraywriter->write(pointIndices[factory.indexSet().subIndex\n+ 248 (cell, cornerIndex, mydim)]);\n+ 249 }\n+251 virtual void endWrite() {\n+ 252 arraywriter.reset();\n+ 253 pointIndices.clear();\n+ 254 }\n+ 255 };\n+ 256\n+ 258 template\n+259 class NonConformingConnectivityWriter\n+ 260 : public FunctionWriterBase\n 261 {\n- 262 origin_out[i] = origin_in[i] + (_dims[i]-r)*m + (coord[i]-(_dims[i]-r))*\n-(m+1);\n- 263 size_out[i] = m+1;\n- 264 maxsize *= m+1;\n- 265 }\n- 266 }\n- 267 return maxsize/(sz/_comm.size());\n- 268 }\n- 269\n-276 class ProcListIterator {\n- 277 public:\n-279 ProcListIterator (typename std::deque::const_iterator iter)\n- 280 {\n- 281 i = iter;\n- 282 }\n- 283\n-285 int rank () const\n+ 262 std::shared_ptr arraywriter;\n+ 263 unsigned counter;\n+ 264\n+ 265 public:\n+267 virtual std::string name() const { return \"connectivity\"; }\n+ 268\n+270 virtual unsigned ncomps() const { return 1; }\n+ 271\n+273 virtual void addArray(PVTUWriter& writer) {\n+ 274 writer.addArray(name(), ncomps(), Precision::int32);\n+ 275 }\n+ 276\n+278 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n+ 279 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n+ 280 nitems, Precision::int32));\n+ 281 counter = 0;\n+ 282 return !arraywriter->writeIsNoop();\n+ 283 }\n+285 virtual void write(const Cell& /* cell */, unsigned /* cornerIndex */)\n 286 {\n- 287 return i->rank;\n- 288 }\n- 289\n-291 iTupel delta () const\n- 292 {\n- 293 return i->delta;\n- 294 }\n+ 287 arraywriter->write(counter);\n+ 288 ++counter;\n+ 289 }\n+291 virtual void endWrite() {\n+ 292 arraywriter.reset();\n+ 293 }\n+ 294 };\n 295\n-297 int index () const\n- 298 {\n- 299 return i->index;\n- 300 }\n- 301\n-303 int distance () const\n- 304 {\n- 305 int dist = 0;\n- 306 iTupel delta=i->delta;\n- 307 for (int j=0; j\n+298 class OffsetsWriter\n+ 299 : public FunctionWriterBase\n+ 300 {\n+ 301 typedef FunctionWriterBase Base;\n+ 302\n+ 303 std::shared_ptr arraywriter;\n+ 304 unsigned offset;\n+ 305\n+ 306 public:\n+308 virtual std::string name() const { return \"offsets\"; }\n+ 309\n+311 virtual unsigned ncomps() const { return 1; }\n+ 312\n+314 virtual void addArray(PVTUWriter& writer) {\n+ 315 writer.addArray(name(), ncomps(), Precision::int32);\n 316 }\n 317\n- 318\n-320 bool operator!=(const ProcListIterator& iter) const\n- 321 {\n- 322 return i != iter.i;\n- 323 }\n- 324\n-326 ProcListIterator& operator++()\n- 327 {\n- 328 ++i;\n- 329 return *this;\n- 330 }\n- 331\n- 332 private:\n- 333 typename std::deque::const_iterator i;\n+319 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n+ 320 arraywriter.reset(writer.makeArrayWriter(name(), ncomps(),\n+ 321 nitems, Precision::int32));\n+ 322 offset = 0;\n+ 323 return !arraywriter->writeIsNoop();\n+ 324 }\n+326 virtual void write(const Cell& cell, const typename Base::Domain&) {\n+ 327 offset += cell.geometry().corners();\n+ 328 arraywriter->write(offset);\n+ 329 }\n+331 virtual void endWrite() {\n+ 332 arraywriter.reset();\n+ 333 }\n 334 };\n 335\n-337 ProcListIterator sendbegin () const\n- 338 {\n- 339 return ProcListIterator(_sendlist.begin());\n- 340 }\n- 341\n-343 ProcListIterator sendend () const\n- 344 {\n- 345 return ProcListIterator(_sendlist.end());\n- 346 }\n- 347\n-349 ProcListIterator recvbegin () const\n- 350 {\n- 351 return ProcListIterator(_recvlist.begin());\n- 352 }\n- 353\n-355 ProcListIterator recvend () const\n- 356 {\n- 357 return ProcListIterator(_recvlist.end());\n- 358 }\n- 359\n-361 void send (int rank, void* buffer, int size) const\n- 362 {\n- 363 CommTask task;\n- 364 task.rank = rank;\n- 365 task.buffer = buffer;\n- 366 task.size = size;\n- 367 if (rank!=_comm.rank())\n- 368 _sendrequests.push_back(task);\n- 369 else\n- 370 _localsendrequests.push_back(task);\n- 371 }\n+ 337 template\n+338 class TypesWriter\n+ 339 : public FunctionWriterBase\n+ 340 {\n+ 341 typedef FunctionWriterBase Base;\n+ 342\n+ 343 std::shared_ptr arraywriter;\n+ 344\n+ 345 public:\n+347 virtual std::string name() const { return \"types\"; }\n+ 348\n+350 virtual unsigned ncomps() const { return 1; }\n+ 351\n+353 virtual void addArray(PVTUWriter& writer) {\n+ 354 writer.addArray(name(), ncomps(), Precision::uint8);\n+ 355 }\n+ 356\n+358 virtual bool beginWrite(VTUWriter& writer, std::size_t nitems) {\n+ 359 arraywriter.reset(writer.makeArrayWriter\n+ 360 ( name(), ncomps(), nitems, Precision::uint8));\n+ 361 return !arraywriter->writeIsNoop();\n+ 362 }\n+364 virtual void write(const Cell& cell, const typename Base::Domain&) {\n+ 365 arraywriter->write(geometryType(cell.type()));\n+ 366 }\n+368 virtual void endWrite() {\n+ 369 arraywriter.reset();\n+ 370 }\n+ 371 };\n 372\n-374 void recv (int rank, void* buffer, int size) const\n- 375 {\n- 376 CommTask task;\n- 377 task.rank = rank;\n- 378 task.buffer = buffer;\n- 379 task.size = size;\n- 380 if (rank!=_comm.rank())\n- 381 _recvrequests.push_back(task);\n- 382 else\n- 383 _localrecvrequests.push_back(task);\n- 384 }\n- 385\n-387 void exchange () const\n- 388 {\n- 389 // handle local requests first\n- 390 if (_localsendrequests.size()!=_localrecvrequests.size())\n- 391 {\n- 392 std::cout << \"[\" << rank() << \"]: ERROR: local sends/receives do not match\n-in exchange!\" << std::endl;\n- 393 return;\n- 394 }\n- 395 for (unsigned int i=0; i<_localsendrequests.size(); i++)\n- 396 {\n- 397 if (_localsendrequests[i].size!=_localrecvrequests[i].size)\n- 398 {\n- 399 std::cout << \"[\" << rank() << \"]: ERROR: size in local sends/receive does\n-not match in exchange!\" << std::endl;\n- 400 return;\n- 401 }\n- 402 memcpy(_localrecvrequests[i].buffer,_localsendrequests\n-[i].buffer,_localsendrequests[i].size);\n- 403 }\n- 404 _localsendrequests.clear();\n- 405 _localrecvrequests.clear();\n- 406\n- 407#if HAVE_MPI\n- 408 // handle foreign requests\n- 409\n- 410 std::vector requests(_sendrequests.size() +\n-_recvrequests.size());\n- 411 MPI_Request* req = requests.data();\n- 412\n- 413 // issue sends to foreign processes\n- 414 for (unsigned int i=0; i<_sendrequests.size(); i++)\n- 415 if (_sendrequests[i].rank!=rank())\n- 416 {\n- 417 // std::cout << \"[\" << rank() << \"]\" << \" send \" << _sendrequests[i].size\n-<< \" bytes \"\n- 418 // << \"to \" << _sendrequests[i].rank << \" p=\" << _sendrequests[i].buffer\n-<< std::endl;\n- 419 MPI_Isend(_sendrequests[i].buffer, _sendrequests[i].size, MPI_BYTE,\n- 420 _sendrequests[i].rank, _tag, _comm, req++);\n- 421 }\n- 422\n- 423 // issue receives from foreign processes\n- 424 for (unsigned int i=0; i<_recvrequests.size(); i++)\n- 425 if (_recvrequests[i].rank!=rank())\n- 426 {\n- 427 // std::cout << \"[\" << rank() << \"]\" << \" recv \" << _recvrequests[i].size\n-<< \" bytes \"\n- 428 // << \"fm \" << _recvrequests[i].rank << \" p=\" << _recvrequests[i].buffer\n-<< std::endl;\n- 429 MPI_Irecv(_recvrequests[i].buffer, _recvrequests[i].size, MPI_BYTE,\n- 430 _recvrequests[i].rank, _tag, _comm, req++);\n- 431 }\n- 432\n- 433 // Wait for communication to complete\n- 434 MPI_Waitall(requests.size(), requests.data(), MPI_STATUSES_IGNORE);\n- 435\n- 436 // clear request buffers\n- 437 _sendrequests.clear();\n- 438 _recvrequests.clear();\n- 439#endif\n- 440 }\n- 441\n-443 double global_max (double x) const\n- 444 {\n- 445 double res = 0.0;\n- 446 _comm.template allreduce,double>(&x, &res, 1);\n- 447 return res;\n- 448 }\n- 449\n-451 void print (std::ostream& s) const\n- 452 {\n- 453 s << \"[\" << rank() << \"]: Torus \" << procs() << \" processor(s) arranged as\n-\" << dims() << std::endl;\n- 454 for (ProcListIterator i=sendbegin(); i!=sendend(); ++i)\n- 455 {\n- 456 s << \"[\" << rank() << \"]: send to \"\n- 457 << \"rank=\" << i.rank()\n- 458 << \" index=\" << i.index()\n- 459 << \" delta=\" << i.delta() << \" dist=\" << i.distance() << std::endl;\n- 460 }\n- 461 for (ProcListIterator i=recvbegin(); i!=recvend(); ++i)\n- 462 {\n- 463 s << \"[\" << rank() << \"]: recv from \"\n- 464 << \"rank=\" << i.rank()\n- 465 << \" index=\" << i.index()\n- 466 << \" delta=\" << i.delta() << \" dist=\" << i.distance() << std::endl;\n- 467 }\n- 468 }\n- 469\n- 470 private:\n- 471\n- 472 void proclists ()\n- 473 {\n- 474 // compile the full neighbor list\n- 475 CommPartner cp;\n- 476 iTupel delta;\n- 477\n- 478 std::fill(delta.begin(), delta.end(), -1);\n- 479 bool ready = false;\n- 480 iTupel me, nb;\n- 481 me = rank_to_coord(_comm.rank());\n- 482 int index = 0;\n- 483 int last = neighbors()-1;\n- 484 while (!ready)\n- 485 {\n- 486 // find neighbors coordinates\n- 487 for (int i=0; i _sendlist;\n- 530 std::deque _recvlist;\n- 531\n- 532 mutable std::vector _sendrequests;\n- 533 mutable std::vector _recvrequests;\n- 534 mutable std::vector _localsendrequests;\n- 535 mutable std::vector _localrecvrequests;\n- 536\n- 537 };\n- 538\n- 540 template \n-541 inline std::ostream& operator<<(std::ostream& s, const Torus & t)\n- 542 {\n- 543 t.print(s);\n- 544 return s;\n- 545 }\n- 546}\n- 547\n- 548#endif\n-partitioning.hh\n-This file provides tools to partition YaspGrids. If you want to write your own\n-partitioner,...\n-exceptions.hh\n-Dune::operator<<\n-std::ostream & operator<<(std::ostream &out, const PartitionType &type)\n-write a PartitionType to a stream\n-Definition: gridenums.hh:72\n+ 373 } // namespace VTK\n+ 374\n+ 376\n+ 377} // namespace Dune\n+ 378\n+ 379#endif // DUNE_GRID_IO_FILE_VTK_FUNCTIONWRITER_HH\n+dataarraywriter.hh\n+Data array writers for the VTKWriter.\n+common.hh\n+Common stuff for the VTKWriter.\n+vtuwriter.hh\n+pvtuwriter.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::abs\n-void abs(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:328\n-Dune::Partitions::overlap\n-constexpr Overlap overlap\n-PartitionSet for the overlap partition.\n-Definition: partitionset.hh:278\n-Dune::Yasp::Partitioning\n-a base class for the yaspgrid partitioning strategy\n-Definition: partitioning.hh:39\n-Dune::Yasp::Partitioning::partition\n-virtual void partition(const iTupel &, int, iTupel &, int) const =0\n-Dune::Torus\n-Definition: torus.hh:46\n-Dune::Torus::Torus\n-Torus()\n-constructor making uninitialized object\n-Definition: torus.hh:67\n-Dune::Torus::color\n-int color(int rank) const\n-assign color to given rank\n-Definition: torus.hh:197\n-Dune::Torus::partition\n-double partition(int rank, iTupel origin_in, iTupel size_in, iTupel\n-&origin_out, iTupel &size_out) const\n-partition the given grid onto the torus and return the piece of the process\n-with given rank; returns ...\n-Definition: torus.hh:239\n-Dune::Torus::dims\n-int dims(int i) const\n-return dimensions of torus in direction i\n-Definition: torus.hh:118\n-Dune::Torus::coord\n-iTupel coord() const\n-return own coordinates\n-Definition: torus.hh:100\n-Dune::Torus::rank\n-int rank() const\n-return own rank\n-Definition: torus.hh:94\n-Dune::Torus::dims\n-const iTupel & dims() const\n-return dimensions of torus\n-Definition: torus.hh:112\n-Dune::Torus::rank_relative\n-int rank_relative(int rank, int dir, int cnt) const\n-return rank of process where its coordinate in direction dir has offset cnt\n-(handles periodic case)\n-Definition: torus.hh:166\n-Dune::Torus::recv\n-void recv(int rank, void *buffer, int size) const\n-store a receive request; buffers are received in order; handles also local\n-requests with memcpy\n-Definition: torus.hh:374\n-Dune::Torus::send\n-void send(int rank, void *buffer, int size) const\n-store a send request; buffers are sent in order; handles also local requests\n-with memcpy\n-Definition: torus.hh:361\n-Dune::Torus::Torus\n-Torus(Communication comm, int tag, iTupel size, int overlap, const Yasp::\n-Partitioning< d > *partitioner)\n-make partitioner from communicator and coarse mesh size\n-Definition: torus.hh:71\n-Dune::Torus::neighbors\n-int neighbors() const\n-return the number of neighbors, which is\n-Definition: torus.hh:203\n-Dune::Torus::print\n-void print(std::ostream &s) const\n-print contents of torus object\n-Definition: torus.hh:451\n-Dune::Torus::global_max\n-double global_max(double x) const\n-global max\n-Definition: torus.hh:443\n-Dune::Torus::comm\n-Communication comm() const\n-return communicator\n-Definition: torus.hh:124\n-Dune::Torus::color\n-int color(const iTupel &coord) const\n-assign color to given coordinate\n-Definition: torus.hh:174\n-Dune::Torus::recvend\n-ProcListIterator recvend() const\n-last process in receive list\n-Definition: torus.hh:355\n-Dune::Torus::is_neighbor\n-bool is_neighbor(iTupel delta, std::bitset< d > periodic) const\n-return true if neighbor with given delta is a neighbor under the given\n-periodicity\n-Definition: torus.hh:212\n-Dune::Torus::sendend\n-ProcListIterator sendend() const\n-end of send list\n-Definition: torus.hh:343\n-Dune::Torus::procs\n-int procs() const\n-return number of processes\n-Definition: torus.hh:106\n-Dune::Torus::rank_to_coord\n-iTupel rank_to_coord(int rank) const\n-map rank to coordinate in torus using lexicographic ordering\n-Definition: torus.hh:144\n-Dune::Torus::iTupel\n-std::array< int, d > iTupel\n-type used to pass tupels in and out\n-Definition: torus.hh:49\n-Dune::Torus::sendbegin\n-ProcListIterator sendbegin() const\n-first process in send list\n-Definition: torus.hh:337\n-Dune::Torus::exchange\n-void exchange() const\n-exchange messages stored in request buffers; clear request buffers afterwards\n-Definition: torus.hh:387\n-Dune::Torus::recvbegin\n-ProcListIterator recvbegin() const\n-first process in receive list\n-Definition: torus.hh:349\n-Dune::Torus::coord_to_rank\n-int coord_to_rank(iTupel coord) const\n-map coordinate in torus to rank using lexicographic ordering\n-Definition: torus.hh:157\n-Dune::Torus::inside\n-bool inside(iTupel c) const\n-return true if coordinate is inside torus\n-Definition: torus.hh:136\n-Dune::Torus::tag\n-int tag() const\n-return tag used by torus\n-Definition: torus.hh:130\n-Dune::Torus::ProcListIterator\n-Definition: torus.hh:276\n-Dune::Torus::ProcListIterator::delta\n-iTupel delta() const\n-return distance vector\n-Definition: torus.hh:291\n-Dune::Torus::ProcListIterator::operator==\n-bool operator==(const ProcListIterator &iter) const\n-Return true when two iterators point to same member.\n-Definition: torus.hh:313\n-Dune::Torus::ProcListIterator::operator!=\n-bool operator!=(const ProcListIterator &iter) const\n-Return true when two iterators do not point to same member.\n-Definition: torus.hh:320\n-Dune::Torus::ProcListIterator::rank\n-int rank() const\n-return rank of neighboring process\n-Definition: torus.hh:285\n-Dune::Torus::ProcListIterator::ProcListIterator\n-ProcListIterator(typename std::deque< CommPartner >::const_iterator iter)\n-make an iterator\n-Definition: torus.hh:279\n-Dune::Torus::ProcListIterator::operator++\n-ProcListIterator & operator++()\n-Increment iterator to next cell.\n-Definition: torus.hh:326\n-Dune::Torus::ProcListIterator::index\n-int index() const\n-return index in proclist\n-Definition: torus.hh:297\n-Dune::Torus::ProcListIterator::distance\n-int distance() const\n-return 1-norm of distance vector\n-Definition: torus.hh:303\n+Dune::VTK::Precision\n+Precision\n+which precision to use when writing out data to vtk files\n+Definition: common.hh:271\n+Dune::VTK::Precision::int32\n+@ int32\n+Dune::VTK::Precision::uint8\n+@ uint8\n+Dune::VTK::Precision::float32\n+@ float32\n+Dune::VTK::geometryType\n+GeometryType geometryType(const Dune::GeometryType &t)\n+mapping from GeometryType to VTKGeometryType\n+Definition: common.hh:151\n+Dune::VTK::FunctionWriterBase\n+Base class for function writers.\n+Definition: functionwriter.hh:34\n+Dune::VTK::FunctionWriterBase::name\n+virtual std::string name() const =0\n+return name\n+Dune::VTK::FunctionWriterBase::ncomps\n+virtual unsigned ncomps() const =0\n+return number of components of the vector\n+Dune::VTK::FunctionWriterBase::write\n+virtual void write(const Cell &, const Domain &)\n+write at the given position\n+Definition: functionwriter.hh:59\n+Dune::VTK::FunctionWriterBase::Cell\n+Cell_ Cell\n+Definition: functionwriter.hh:41\n+Dune::VTK::FunctionWriterBase::addArray\n+virtual void addArray(PVTUWriter &writer)=0\n+add this field to the given parallel writer\n+Dune::VTK::FunctionWriterBase::endWrite\n+virtual void endWrite()=0\n+signal end of writing\n+Dune::VTK::FunctionWriterBase::Domain\n+FieldVector< DF, mydim > Domain\n+Definition: functionwriter.hh:40\n+Dune::VTK::FunctionWriterBase::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)=0\n+start writing with the given writer\n+Dune::VTK::FunctionWriterBase::~FunctionWriterBase\n+virtual ~FunctionWriterBase()\n+destructor\n+Definition: functionwriter.hh:78\n+Dune::VTK::FunctionWriterBase::write\n+virtual void write(const Cell &cell, unsigned cornerIndex)\n+write at the given corner\n+Definition: functionwriter.hh:71\n+Dune::VTK::VTKFunctionWriter\n+Base class for function writers.\n+Definition: functionwriter.hh:90\n+Dune::VTK::VTKFunctionWriter::VTKFunctionWriter\n+VTKFunctionWriter(const std::shared_ptr< const Func > &func_, VTK::Precision\n+prec=VTK::Precision::float32)\n+Definition: functionwriter.hh:97\n+Dune::VTK::VTKFunctionWriter::name\n+virtual std::string name() const\n+return name\n+Definition: functionwriter.hh:103\n+Dune::VTK::VTKFunctionWriter::ncomps\n+virtual unsigned ncomps() const\n+return number of components of the vector\n+Definition: functionwriter.hh:106\n+Dune::VTK::VTKFunctionWriter::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n+start writing with the given writer\n+Definition: functionwriter.hh:117\n+Dune::VTK::VTKFunctionWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: functionwriter.hh:112\n+Dune::VTK::VTKFunctionWriter::write\n+virtual void write(const typename Base::Cell &cell, const typename Base::Domain\n+&xl)\n+write at the given position\n+Definition: functionwriter.hh:124\n+Dune::VTK::VTKFunctionWriter::endWrite\n+virtual void endWrite()\n+signal end of writing\n+Definition: functionwriter.hh:133\n+Dune::VTK::CoordinatesWriter\n+writer for the Coordinates array\n+Definition: functionwriter.hh:147\n+Dune::VTK::CoordinatesWriter::write\n+virtual void write(const typename Base::Cell &cell, const typename Base::Domain\n+&xl)\n+write at the given position\n+Definition: functionwriter.hh:176\n+Dune::VTK::CoordinatesWriter::name\n+virtual std::string name() const\n+return name\n+Definition: functionwriter.hh:159\n+Dune::VTK::CoordinatesWriter::endWrite\n+virtual void endWrite()\n+signal end of writing\n+Definition: functionwriter.hh:186\n+Dune::VTK::CoordinatesWriter::ncomps\n+virtual unsigned ncomps() const\n+return number of components of the vector\n+Definition: functionwriter.hh:162\n+Dune::VTK::CoordinatesWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: functionwriter.hh:165\n+Dune::VTK::CoordinatesWriter::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n+start writing with the given writer\n+Definition: functionwriter.hh:170\n+Dune::VTK::CoordinatesWriter::CoordinatesWriter\n+CoordinatesWriter(VTK::Precision prec=VTK::Precision::float32)\n+Definition: functionwriter.hh:154\n+Dune::VTK::ConformingConnectivityWriter\n+writer for the connectivity array in conforming mode\n+Definition: functionwriter.hh:195\n+Dune::VTK::ConformingConnectivityWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: functionwriter.hh:216\n+Dune::VTK::ConformingConnectivityWriter::name\n+virtual std::string name() const\n+return name\n+Definition: functionwriter.hh:210\n+Dune::VTK::ConformingConnectivityWriter::write\n+virtual void write(const typename Base::Cell &cell, unsigned cornerIndex)\n+write at the given corner\n+Definition: functionwriter.hh:242\n+Dune::VTK::ConformingConnectivityWriter::ConformingConnectivityWriter\n+ConformingConnectivityWriter(const IteratorFactory &factory_)\n+create a writer with the given iteratorfactory\n+Definition: functionwriter.hh:205\n+Dune::VTK::ConformingConnectivityWriter::ncomps\n+virtual unsigned ncomps() const\n+return number of components of the vector\n+Definition: functionwriter.hh:213\n+Dune::VTK::ConformingConnectivityWriter::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n+start writing with the given writer\n+Definition: functionwriter.hh:221\n+Dune::VTK::ConformingConnectivityWriter::endWrite\n+virtual void endWrite()\n+signal end of writing\n+Definition: functionwriter.hh:251\n+Dune::VTK::NonConformingConnectivityWriter\n+writer for the connectivity array in nonconforming mode\n+Definition: functionwriter.hh:261\n+Dune::VTK::NonConformingConnectivityWriter::ncomps\n+virtual unsigned ncomps() const\n+return number of components of the vector\n+Definition: functionwriter.hh:270\n+Dune::VTK::NonConformingConnectivityWriter::name\n+virtual std::string name() const\n+return name\n+Definition: functionwriter.hh:267\n+Dune::VTK::NonConformingConnectivityWriter::write\n+virtual void write(const Cell &, unsigned)\n+write at the given corner\n+Definition: functionwriter.hh:285\n+Dune::VTK::NonConformingConnectivityWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: functionwriter.hh:273\n+Dune::VTK::NonConformingConnectivityWriter::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n+start writing with the given writer\n+Definition: functionwriter.hh:278\n+Dune::VTK::NonConformingConnectivityWriter::endWrite\n+virtual void endWrite()\n+signal end of writing\n+Definition: functionwriter.hh:291\n+Dune::VTK::OffsetsWriter\n+writer for the offsets array\n+Definition: functionwriter.hh:300\n+Dune::VTK::OffsetsWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: functionwriter.hh:314\n+Dune::VTK::OffsetsWriter::endWrite\n+virtual void endWrite()\n+signal end of writing\n+Definition: functionwriter.hh:331\n+Dune::VTK::OffsetsWriter::name\n+virtual std::string name() const\n+return name\n+Definition: functionwriter.hh:308\n+Dune::VTK::OffsetsWriter::write\n+virtual void write(const Cell &cell, const typename Base::Domain &)\n+write at the given position\n+Definition: functionwriter.hh:326\n+Dune::VTK::OffsetsWriter::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n+start writing with the given writer\n+Definition: functionwriter.hh:319\n+Dune::VTK::OffsetsWriter::ncomps\n+virtual unsigned ncomps() const\n+return number of components of the vector\n+Definition: functionwriter.hh:311\n+Dune::VTK::TypesWriter\n+writer for the types array\n+Definition: functionwriter.hh:340\n+Dune::VTK::TypesWriter::ncomps\n+virtual unsigned ncomps() const\n+return number of components of the vector\n+Definition: functionwriter.hh:350\n+Dune::VTK::TypesWriter::beginWrite\n+virtual bool beginWrite(VTUWriter &writer, std::size_t nitems)\n+start writing with the given writer\n+Definition: functionwriter.hh:358\n+Dune::VTK::TypesWriter::name\n+virtual std::string name() const\n+return name\n+Definition: functionwriter.hh:347\n+Dune::VTK::TypesWriter::write\n+virtual void write(const Cell &cell, const typename Base::Domain &)\n+write at the given position\n+Definition: functionwriter.hh:364\n+Dune::VTK::TypesWriter::addArray\n+virtual void addArray(PVTUWriter &writer)\n+add this field to the given parallel writer\n+Definition: functionwriter.hh:353\n+Dune::VTK::TypesWriter::endWrite\n+virtual void endWrite()\n+signal end of writing\n+Definition: functionwriter.hh:368\n+Dune::VTK::PVTUWriter\n+Dump a .vtu/.vtp files contents to a stream.\n+Definition: pvtuwriter.hh:62\n+Dune::VTK::PVTUWriter::addArray\n+void addArray(const std::string &name, unsigned ncomps, Precision prec)\n+Add an array to the output file.\n+Definition: pvtuwriter.hh:207\n+Dune::VTK::VTUWriter\n+Dump a .vtu/.vtp files contents to a stream.\n+Definition: vtuwriter.hh:98\n+Dune::VTK::VTUWriter::makeArrayWriter\n+DataArrayWriter * makeArrayWriter(const std::string &name, unsigned ncomps,\n+unsigned nitems, Precision prec)\n+acquire a DataArrayWriter\n+Definition: vtuwriter.hh:380\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00194.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00569.html", "comments": ["Files 8% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridgeometry.hh File Reference\n+dune-grid: cornerstorage.hh File Reference\n \n \n \n \n \n \n \n@@ -58,53 +58,49 @@\n \n
    \n \n \n \n
    \n \n-
    yaspgridgeometry.hh File Reference
    \n+
    cornerstorage.hh File Reference
    \n
    \n
    \n-\n-

    The YaspGeometry class and its specializations. \n-More...

    \n-\n-

    Go to the source code of this file.

    \n+
    #include <array>
    \n+#include <dune/grid/geometrygrid/coordfunctioncaller.hh>
    \n+
    \n+

    Go to the source code of this file.

    \n \n \n-\n-\n+\n \n-\n-\n+\n \n-\n-\n+\n+\n+\n \n

    \n Classes

    class  Dune::YaspGeometry< mydim, cdim, GridImp >
     The general version that handles all codimensions but 0 and dim. More...
    class  Dune::GeoGrid::CoordVector< mydim, Grid, false >
     
    class  Dune::YaspGeometry< mydim, mydim, GridImp >
     specialize for dim=dimworld, i.e. a volume element More...
    class  Dune::GeoGrid::CoordVector< mydim, Grid, true >
     
    class  Dune::YaspGeometry< 0, cdim, GridImp >
     specialization for dim=0, this is a vertex More...
    class  Dune::GeoGrid::IntersectionCoordVector< Grid >
     
    class  Dune::GeoGrid::CornerStorage< mydim, cdim, Grid >
     
    \n \n \n \n \n+\n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::GeoGrid
     namespace containing the implementations of GeometryGrid
     
    \n-

    Detailed Description

    \n-

    The YaspGeometry class and its specializations.

    \n-

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

    \n-

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

    \n-

    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.

    \n-
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,39 +4,32 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * yaspgrid\n+ * geometrygrid\n Classes | Namespaces\n-yaspgridgeometry.hh File Reference\n-The YaspGeometry class and its specializations. More...\n+cornerstorage.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::YaspGeometry<_mydim,_cdim,_GridImp_>\n-\u00a0 The general version that handles all codimensions but 0 and dim.\n- More...\n+class \u00a0Dune::GeoGrid::CoordVector<_mydim,_Grid,_false_>\n \u00a0\n-class \u00a0Dune::YaspGeometry<_mydim,_mydim,_GridImp_>\n-\u00a0 specialize for dim=dimworld, i.e. a volume element More...\n+class \u00a0Dune::GeoGrid::CoordVector<_mydim,_Grid,_true_>\n \u00a0\n-class \u00a0Dune::YaspGeometry<_0,_cdim,_GridImp_>\n-\u00a0 specialization for dim=0, this is a vertex More...\n+class \u00a0Dune::GeoGrid::IntersectionCoordVector<_Grid_>\n+\u00a0\n+class \u00a0Dune::GeoGrid::CornerStorage<_mydim,_cdim,_Grid_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-The YaspGeometry class and its specializations.\n-YaspGeometry realizes the concept of the geometric part of a mesh entity.\n-We have specializations for dim == dimworld (elements) and dim == 0 (vertices).\n-The general version implements all other codimensions.\n-As of September 2014, the functionality of YaspGeometry is identical to that of\n-AxisAlignedCubeGeometry. The latter cannot be used directly due to the grid\n-interface facade construction (it isn't templated to the GridImp). As soon as\n-template aliases are available, this header boils down to one line.\n+namespace \u00a0Dune::GeoGrid\n+\u00a0 namespace containing the implementations of GeometryGrid\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00194_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00170_source.html", "comments": ["Files 10% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: yaspgridgeometry.hh Source File\n+dune-grid: yaspgridleveliterator.hh Source File\n \n \n \n \n \n \n \n@@ -62,81 +62,79 @@\n \n \n \n
    \n-
    yaspgridgeometry.hh
    \n+
    yaspgridleveliterator.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH
    \n-
    6#define DUNE_GRID_YASPGRIDGEOMETRY_HH
    \n+
    5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH
    \n+
    6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH
    \n
    7
    \n-
    23namespace Dune {
    \n-
    24
    \n-
    29 template<int mydim,int cdim, class GridImp>
    \n-
    30 class YaspGeometry : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,cdim>
    \n-
    31 {
    \n-
    32 public:
    \n-
    34 typedef typename GridImp::ctype ctype;
    \n-
    35
    \n-
    37 YaspGeometry (const FieldVector<ctype, cdim>& ll, const FieldVector<ctype, cdim>& ur, const std::bitset<cdim>& shift)
    \n-
    38 : AxisAlignedCubeGeometry<ctype,mydim,cdim>(ll,ur,shift)
    \n-
    39 {
    \n-
    40 assert(mydim == shift.count());
    \n-
    41 }
    \n-
    42 };
    \n-
    43
    \n-
    45 template<int mydim, class GridImp>
    \n-
    46 class YaspGeometry<mydim,mydim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,mydim,mydim>
    \n-
    47 {
    \n-
    48 public:
    \n-
    49 typedef typename GridImp::ctype ctype;
    \n+
    12namespace Dune {
    \n+
    13
    \n+
    14
    \n+
    17 template<int codim, PartitionIteratorType pitype, class GridImp>
    \n+\n+
    19 {
    \n+
    21 constexpr static int dim = GridImp::dimension;
    \n+
    23 constexpr static int dimworld = GridImp::dimensionworld;
    \n+
    24 typedef typename GridImp::ctype ctype;
    \n+
    25 public:
    \n+
    26 typedef typename GridImp::template Codim<codim>::Entity Entity;
    \n+
    27 typedef typename GridImp::YGridLevelIterator YGLI;
    \n+
    28 typedef typename GridImp::YGrid::Iterator I;
    \n+
    29
    \n+\n+
    32 {}
    \n+
    33
    \n+
    35 YaspLevelIterator (const YGLI & g, const I& it)
    \n+
    36 : _entity(YaspEntity<codim, dim, GridImp>(g,it))
    \n+
    37 {}
    \n+
    38
    \n+
    40 void increment()
    \n+
    41 {
    \n+
    42 ++(_entity.impl()._it);
    \n+
    43 }
    \n+
    44
    \n+
    46 bool equals (const YaspLevelIterator& rhs) const
    \n+
    47 {
    \n+
    48 return (_entity == rhs._entity);
    \n+
    49 }
    \n
    50
    \n-
    52 YaspGeometry (const FieldVector<ctype, mydim>& ll, const FieldVector<ctype, mydim>& ur)
    \n-
    53 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(ll,ur)
    \n-
    54 {}
    \n-
    55
    \n-\n-
    58 : AxisAlignedCubeGeometry<ctype,mydim,mydim>(other)
    \n-
    59 {}
    \n-
    60 };
    \n-
    61
    \n-
    63 template<int cdim, class GridImp>
    \n-
    64 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>
    \n-
    65 {
    \n-
    66 public:
    \n-
    67 typedef typename GridImp::ctype ctype;
    \n-
    68
    \n-
    70 explicit YaspGeometry ( const FieldVector< ctype, cdim > &p )
    \n-
    71 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
    \n-
    72 {}
    \n-
    73
    \n-
    74 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset<cdim> &)
    \n-
    75 : AxisAlignedCubeGeometry<typename GridImp::ctype,0,cdim>( p )
    \n-
    76 {}
    \n-
    77 };
    \n-
    78} // namespace Dune
    \n-
    79
    \n-
    80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH
    \n+
    52 const Entity& dereference() const
    \n+
    53 {
    \n+
    54 return _entity;
    \n+
    55 }
    \n+
    56
    \n+
    57 protected:
    \n+\n+
    59 };
    \n+
    60
    \n+
    61}
    \n+
    62
    \n+
    63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    The general version that handles all codimensions but 0 and dim.
    Definition: yaspgridgeometry.hh:31
    \n-
    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
    \n-
    GridImp::ctype ctype
    define type used for coordinates in grid module
    Definition: yaspgridgeometry.hh:34
    \n-
    YaspGeometry(const YaspGeometry &other)
    copy constructor (skipping temporary variables)
    Definition: yaspgridgeometry.hh:57
    \n-
    GridImp::ctype ctype
    Definition: yaspgridgeometry.hh:49
    \n-
    YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype, mydim > &ur)
    constructor from midpoint and extension
    Definition: yaspgridgeometry.hh:52
    \n-
    YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype, cdim > &, const std::bitset< cdim > &)
    Definition: yaspgridgeometry.hh:74
    \n-
    YaspGeometry(const FieldVector< ctype, cdim > &p)
    constructor
    Definition: yaspgridgeometry.hh:70
    \n-
    GridImp::ctype ctype
    Definition: yaspgridgeometry.hh:67
    \n+
    Definition: yaspgridentity.hh:268
    \n+
    Iterates over entities of one grid level.
    Definition: yaspgridleveliterator.hh:19
    \n+
    Entity _entity
    entity
    Definition: yaspgridleveliterator.hh:58
    \n+
    GridImp::YGridLevelIterator YGLI
    Definition: yaspgridleveliterator.hh:27
    \n+
    GridImp::template Codim< codim >::Entity Entity
    Definition: yaspgridleveliterator.hh:26
    \n+
    void increment()
    increment
    Definition: yaspgridleveliterator.hh:40
    \n+
    GridImp::YGrid::Iterator I
    Definition: yaspgridleveliterator.hh:28
    \n+
    YaspLevelIterator(const YGLI &g, const I &it)
    constructor
    Definition: yaspgridleveliterator.hh:35
    \n+
    bool equals(const YaspLevelIterator &rhs) const
    equality
    Definition: yaspgridleveliterator.hh:46
    \n+
    YaspLevelIterator()
    default constructor
    Definition: yaspgridleveliterator.hh:31
    \n+
    const Entity & dereference() const
    dereferencing
    Definition: yaspgridleveliterator.hh:52
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,112 +5,104 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * yaspgrid\n-yaspgridgeometry.hh\n+yaspgridleveliterator.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_YASPGRIDGEOMETRY_HH\n- 6#define DUNE_GRID_YASPGRIDGEOMETRY_HH\n+ 5#ifndef DUNE_GRID_YASPGRIDLEVELITERATOR_HH\n+ 6#define DUNE_GRID_YASPGRIDLEVELITERATOR_HH\n 7\n- 23namespace Dune {\n- 24\n- 29 template\n-30 class YaspGeometry : public AxisAlignedCubeGeometry\n- 31 {\n- 32 public:\n-34 typedef typename GridImp::ctype ctype;\n- 35\n-37 YaspGeometry (const FieldVector& ll, const FieldVector& ur, const std::bitset& shift)\n- 38 : AxisAlignedCubeGeometry(ll,ur,shift)\n- 39 {\n- 40 assert(mydim == shift.count());\n- 41 }\n- 42 };\n- 43\n- 45 template\n-46 class YaspGeometry : public\n-AxisAlignedCubeGeometry\n+ 12namespace Dune {\n+ 13\n+ 14\n+ 17 template\n+18 class YaspLevelIterator\n+ 19 {\n+ 21 constexpr static int dim = GridImp::dimension;\n+ 23 constexpr static int dimworld = GridImp::dimensionworld;\n+ 24 typedef typename GridImp::ctype ctype;\n+ 25 public:\n+26 typedef typename GridImp::template Codim::Entity Entity;\n+27 typedef typename GridImp::YGridLevelIterator YGLI;\n+28 typedef typename GridImp::YGrid::Iterator I;\n+ 29\n+31 YaspLevelIterator ()\n+ 32 {}\n+ 33\n+35 YaspLevelIterator (const YGLI & g, const I& it)\n+ 36 : _entity(YaspEntity(g,it))\n+ 37 {}\n+ 38\n+40 void increment()\n+ 41 {\n+ 42 ++(_entity.impl()._it);\n+ 43 }\n+ 44\n+46 bool equals (const YaspLevelIterator& rhs) const\n 47 {\n- 48 public:\n-49 typedef typename GridImp::ctype ctype;\n+ 48 return (_entity == rhs._entity);\n+ 49 }\n 50\n-52 YaspGeometry (const FieldVector& ll, const FieldVector& ur)\n- 53 : AxisAlignedCubeGeometry(ll,ur)\n- 54 {}\n- 55\n-57 YaspGeometry (const YaspGeometry& other)\n- 58 : AxisAlignedCubeGeometry(other)\n- 59 {}\n- 60 };\n- 61\n- 63 template\n-64 class YaspGeometry<0,cdim,GridImp> : public AxisAlignedCubeGeometry\n- 65 {\n- 66 public:\n-67 typedef typename GridImp::ctype ctype;\n- 68\n-70 explicit YaspGeometry ( const FieldVector< ctype, cdim > &p )\n- 71 : AxisAlignedCubeGeometry( p )\n- 72 {}\n- 73\n-74 YaspGeometry ( const FieldVector< ctype, cdim > &p, const FieldVector<\n-ctype, cdim > &, const std::bitset &)\n- 75 : AxisAlignedCubeGeometry( p )\n- 76 {}\n- 77 };\n- 78} // namespace Dune\n- 79\n- 80#endif // DUNE_GRID_YASPGRIDGEOMETRY_HH\n+52 const Entity& dereference() const\n+ 53 {\n+ 54 return _entity;\n+ 55 }\n+ 56\n+ 57 protected:\n+58 Entity _entity;\n+ 59 };\n+ 60\n+ 61}\n+ 62\n+ 63#endif // DUNE_GRID_YASPGRIDLEVELITERATOR_HH\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::YaspGeometry\n-The general version that handles all codimensions but 0 and dim.\n-Definition: yaspgridgeometry.hh:31\n-Dune::YaspGeometry::YaspGeometry\n-YaspGeometry(const FieldVector< ctype, cdim > &ll, const FieldVector< ctype,\n-cdim > &ur, const std::bitset< cdim > &shift)\n-constructor from midpoint and extension and a bitset defining which unit\n-vectors span the entity\n-Definition: yaspgridgeometry.hh:37\n-Dune::YaspGeometry::ctype\n-GridImp::ctype ctype\n-define type used for coordinates in grid module\n-Definition: yaspgridgeometry.hh:34\n-Dune::YaspGeometry<_mydim,_mydim,_GridImp_>::YaspGeometry\n-YaspGeometry(const YaspGeometry &other)\n-copy constructor (skipping temporary variables)\n-Definition: yaspgridgeometry.hh:57\n-Dune::YaspGeometry<_mydim,_mydim,_GridImp_>::ctype\n-GridImp::ctype ctype\n-Definition: yaspgridgeometry.hh:49\n-Dune::YaspGeometry<_mydim,_mydim,_GridImp_>::YaspGeometry\n-YaspGeometry(const FieldVector< ctype, mydim > &ll, const FieldVector< ctype,\n-mydim > &ur)\n-constructor from midpoint and extension\n-Definition: yaspgridgeometry.hh:52\n-Dune::YaspGeometry<_0,_cdim,_GridImp_>::YaspGeometry\n-YaspGeometry(const FieldVector< ctype, cdim > &p, const FieldVector< ctype,\n-cdim > &, const std::bitset< cdim > &)\n-Definition: yaspgridgeometry.hh:74\n-Dune::YaspGeometry<_0,_cdim,_GridImp_>::YaspGeometry\n-YaspGeometry(const FieldVector< ctype, cdim > &p)\n+Dune::YaspEntity\n+Definition: yaspgridentity.hh:268\n+Dune::YaspLevelIterator\n+Iterates over entities of one grid level.\n+Definition: yaspgridleveliterator.hh:19\n+Dune::YaspLevelIterator::_entity\n+Entity _entity\n+entity\n+Definition: yaspgridleveliterator.hh:58\n+Dune::YaspLevelIterator::YGLI\n+GridImp::YGridLevelIterator YGLI\n+Definition: yaspgridleveliterator.hh:27\n+Dune::YaspLevelIterator::Entity\n+GridImp::template Codim< codim >::Entity Entity\n+Definition: yaspgridleveliterator.hh:26\n+Dune::YaspLevelIterator::increment\n+void increment()\n+increment\n+Definition: yaspgridleveliterator.hh:40\n+Dune::YaspLevelIterator::I\n+GridImp::YGrid::Iterator I\n+Definition: yaspgridleveliterator.hh:28\n+Dune::YaspLevelIterator::YaspLevelIterator\n+YaspLevelIterator(const YGLI &g, const I &it)\n constructor\n-Definition: yaspgridgeometry.hh:70\n-Dune::YaspGeometry<_0,_cdim,_GridImp_>::ctype\n-GridImp::ctype ctype\n-Definition: yaspgridgeometry.hh:67\n+Definition: yaspgridleveliterator.hh:35\n+Dune::YaspLevelIterator::equals\n+bool equals(const YaspLevelIterator &rhs) const\n+equality\n+Definition: yaspgridleveliterator.hh:46\n+Dune::YaspLevelIterator::YaspLevelIterator\n+YaspLevelIterator()\n+default constructor\n+Definition: yaspgridleveliterator.hh:31\n+Dune::YaspLevelIterator::dereference\n+const Entity & dereference() const\n+dereferencing\n+Definition: yaspgridleveliterator.hh:52\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00209.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00188.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -80,15 +80,15 @@\n #include <vector>
    \n #include <bitset>
    \n #include <deque>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/common/math.hh>
    \n #include <dune/common/streamoperators.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00209_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00188_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n
    ygrid.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_YASPGRID_YGRID_HH
    \n
    6#define DUNE_GRID_YASPGRID_YGRID_HH
    \n
    7
    \n
    8#include <array>
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00218.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00230.html", "comments": ["Files 1% similar despite different names"], "unified_diff": "@@ -69,15 +69,15 @@\n \n
    yaspgridhierarchiciterator.hh File Reference
    \n
    \n

    \n Classes

    class  Dune::YGridComponent< Coordinates >
     
    class  Dune::YGridComponent< Coordinates >::Iterator
     
    \n \n \n \n \n

    \n Classes

    class  Dune::YaspHierarchicIterator< GridImp >
     YaspHierarchicIterator enables iteration over son entities of codim 0. More...
     
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00218_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00230_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n
    yaspgridhierarchiciterator.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
    \n
    6#define DUNE_GRID_YASPGRIDHIERARCHICITERATOR_HH
    \n
    7
    \n
    14namespace Dune {
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00224.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00164.html", "comments": ["Files 2% similar despite different names"], "unified_diff": "@@ -72,15 +72,15 @@\n
    yaspgridintersectioniterator.hh File Reference
    \n
    \n
    \n \n

    The YaspIntersectionIterator class. \n More...

    \n \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n
    \n \n \n \n \n

    \n Classes

    class  Dune::YaspIntersectionIterator< GridImp >
     YaspIntersectionIterator enables iteration over intersections with neighboring codim 0 entities. More...
     
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00224_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00164_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • yaspgrid
  • \n \n \n
    \n
    yaspgridintersectioniterator.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
    \n
    6#define DUNE_GRID_YASPGRIDINTERSECTIONITERATOR_HH
    \n
    7
    \n
    15namespace Dune {
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00236.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00356.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -72,17 +72,17 @@\n Typedefs |\n Variables
    \n
    partitionset.hh File Reference
    \n
    \n
    \n
    #include <dune/common/keywords.hh>
    \n #include <dune/common/typetraits.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n+#include <dune/grid/common/gridenums.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n
    \n \n \n \n \n

    \n Classes

    struct  Dune::PartitionSet< partitions >
     A set of PartitionType values. More...
     
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00236_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00356_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,24 +65,24 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n
    partitionset.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_COMMON_PARTITIONSET_HH
    \n
    6#define DUNE_GRID_COMMON_PARTITIONSET_HH
    \n
    7
    \n
    8#include <dune/common/keywords.hh>
    \n
    9#include <dune/common/typetraits.hh>
    \n-\n+\n
    11
    \n
    12namespace Dune {
    \n
    13
    \n
    19 namespace {
    \n
    20
    \n
    21 // Simple TMP to deduce partition iterator type from set of partitions.
    \n
    22 template<unsigned int partitions>
    \n@@ -368,15 +368,15 @@\n
    348#endif // DOXYGEN
    \n
    349
    \n
    350 } // namespace Partitions
    \n
    351
    \n
    356} // namespace Dune
    \n
    357
    \n
    358#endif // DUNE_GRID_COMMON_PARTITIONSET_HH
    \n-\n+\n
    @ Interior_Partition
    only interior entities
    Definition: gridenums.hh:137
    \n
    @ FrontEntity
    on boundary between overlap and ghost
    Definition: gridenums.hh:34
    \n
    @ InteriorEntity
    all interior entities
    Definition: gridenums.hh:31
    \n
    @ GhostEntity
    ghost entities
    Definition: gridenums.hh:35
    \n
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n
    @ OverlapEntity
    all entities lying in the overlap zone
    Definition: gridenums.hh:33
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00242.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00245.html", "comments": ["Files 5% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: exceptions.hh File Reference\n+dune-grid: mapper.hh File Reference\n \n \n \n \n \n \n \n@@ -65,33 +65,40 @@\n
  • dune
  • grid
  • common
  • \n
    \n
    \n
    \n \n-
    exceptions.hh File Reference
    \n+
    mapper.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/exceptions.hh>
    \n+\n+

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

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

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n
    \n \n-\n-\n+\n+\n \n

    \n Classes

    class  Dune::GridError
     Base class for exceptions in Dune grid modules. More...
    class  Dune::Mapper< G, MapperImp, IndexType >
     Mapper interface. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-\n+

    Detailed Description

    \n+

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

    \n+
    Author
    Peter Bastian
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -6,21 +6,28 @@\n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * common\n Classes | Namespaces\n-exceptions.hh File Reference\n-#include \n+mapper.hh File Reference\n+Provides classes with basic mappers which are used to attach data to a grid.\n+More...\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::GridError\n-\u00a0 Base class for exceptions in Dune grid modules. More...\n+class \u00a0Dune::Mapper<_G,_MapperImp,_IndexType_>\n+\u00a0 Mapper interface. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+***** Detailed Description *****\n+Provides classes with basic mappers which are used to attach data to a grid.\n+ Author\n+ Peter Bastian\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00251.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00170.html", "comments": ["Files 11% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: rangegenerators.hh File Reference\n+dune-grid: yaspgridleveliterator.hh File Reference\n \n \n \n \n \n \n \n@@ -58,37 +58,44 @@\n \n \n \n \n \n
    \n \n-
    rangegenerators.hh File Reference
    \n+
    yaspgridleveliterator.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/iteratorrange.hh>
    \n-#include <dune/common/rangeutilities.hh>
    \n-#include <dune/geometry/dimension.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n-#include <dune/grid/common/partitionset.hh>
    \n-
    \n-

    Go to the source code of this file.

    \n+\n+

    The YaspLevelIterator class. \n+More...

    \n+\n+

    Go to the source code of this file.

    \n \n+\n+\n+\n+\n+

    \n+Classes

    class  Dune::YaspLevelIterator< codim, pitype, GridImp >
     Iterates over entities of one grid level. More...
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    The YaspLevelIterator class.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,23 +4,25 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * common\n-Namespaces\n-rangegenerators.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n+ * yaspgrid\n+Classes | Namespaces\n+yaspgridleveliterator.hh File Reference\n+The YaspLevelIterator class. More...\n Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::YaspLevelIterator<_codim,_pitype,_GridImp_>\n+\u00a0 Iterates over entities of one grid level. More...\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+***** Detailed Description *****\n+The YaspLevelIterator class.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00251_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00656_source.html", "comments": ["Files 16% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: rangegenerators.hh Source File\n+dune-grid: level.hh Source File\n \n \n \n \n \n \n \n@@ -58,306 +58,292 @@\n \n \n \n \n \n
    \n-
    rangegenerators.hh
    \n+
    level.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_RANGEGENERATORS_HH
    \n-
    6#define DUNE_GRID_COMMON_RANGEGENERATORS_HH
    \n+
    5#ifndef DUNE_ALBERTA_LEVEL_HH
    \n+
    6#define DUNE_ALBERTA_LEVEL_HH
    \n
    7
    \n-
    8#include <dune/common/iteratorrange.hh>
    \n-
    9#include <dune/common/rangeutilities.hh>
    \n-
    10#include <dune/geometry/dimension.hh>
    \n-\n-\n-
    13
    \n-
    14namespace Dune
    \n-
    15{
    \n+
    8#include <cassert>
    \n+
    9#include <cstdlib>
    \n+
    10
    \n+\n+\n+\n+
    14
    \n+
    15#if HAVE_ALBERTA
    \n
    16
    \n-
    17#ifdef DOXYGEN
    \n-
    18
    \n-
    206 // *****************************************************************************************
    \n-
    207 // Doxygen documentation
    \n-
    208 // *****************************************************************************************
    \n-
    209 //
    \n-
    210 // In the following, the range generating functions are documented for Doxygen; the actual
    \n-
    211 // implementations are further down in this file and hidden from Doxygen.
    \n-
    212 // The main reason for this split are the return types of those functions, which either contain
    \n-
    213 // long type listings to obtain the iterator type or (in the case of the forwarded functions
    \n-
    214 // use the new-style function syntax and calculate the return type using decltype. In both cases,
    \n-
    215 // Doxygen generates function signatures that are very confusing to the average user.
    \n-
    216 //
    \n-
    217 // *****************************************************************************************
    \n-
    218
    \n-
    219
    \n-
    220
    \n-
    224
    \n+
    17namespace Dune
    \n+
    18{
    \n+
    19
    \n+
    20 // AlbertaGridLevelProvider
    \n+
    21 // ------------------------
    \n+
    22
    \n+
    23 template< int dim >
    \n+\n+
    25 {
    \n+\n+
    27
    \n+
    28 typedef unsigned char Level;
    \n+
    29
    \n+\n+\n+
    32
    \n+\n+
    34
    \n+
    35 static const Level isNewFlag = (1 << 7);
    \n+
    36 static const Level levelMask = (1 << 7) - 1;
    \n+
    37
    \n+
    38 class SetLocal;
    \n+
    39 class CalcMaxLevel;
    \n+
    40
    \n+
    41 template< Level flags >
    \n+
    42 struct ClearFlags;
    \n+
    43
    \n+
    44 struct Interpolation;
    \n+
    45
    \n+
    46 public:
    \n+\n+\n+\n+
    50
    \n+
    51 Level operator() ( const Alberta::Element *element ) const
    \n+
    52 {
    \n+
    53 const Level *array = (Level *)level_;
    \n+
    54 return array[ dofAccess_( element, 0 ) ] & levelMask;
    \n+
    55 }
    \n+
    56
    \n+
    57 Level operator() ( const ElementInfo &elementInfo ) const
    \n+
    58 {
    \n+
    59 return (*this)( elementInfo.el() );
    \n+
    60 }
    \n+
    61
    \n+
    62 bool isNew ( const Alberta::Element *element ) const
    \n+
    63 {
    \n+
    64 const Level *array = (Level *)level_;
    \n+
    65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0);
    \n+
    66 }
    \n+
    67
    \n+
    68 bool isNew ( const ElementInfo &elementInfo ) const
    \n+
    69 {
    \n+
    70 return isNew( elementInfo.el() );
    \n+
    71 }
    \n+
    72
    \n+
    73 Level maxLevel () const
    \n+
    74 {
    \n+
    75 CalcMaxLevel calcFromCache;
    \n+
    76 level_.forEach( calcFromCache );
    \n+
    77#ifndef NDEBUG
    \n+
    78 CalcMaxLevel calcFromGrid;
    \n+
    79 mesh().leafTraverse( calcFromGrid, FillFlags::nothing );
    \n+
    80 assert( calcFromCache.maxLevel() == calcFromGrid.maxLevel() );
    \n+
    81#endif
    \n+
    82 return calcFromCache.maxLevel();;
    \n+
    83 }
    \n+
    84
    \n+\n+
    86 {
    \n+
    87 return MeshPointer( level_.dofSpace()->mesh );
    \n+
    88 }
    \n+
    89
    \n+
    90 void markAllOld ()
    \n+
    91 {
    \n+
    92 ClearFlags< isNewFlag > clearIsNew;
    \n+
    93 level_.forEach( clearIsNew );
    \n+
    94 }
    \n+
    95
    \n+
    96 void create ( const DofNumbering &dofNumbering )
    \n+
    97 {
    \n+
    98 const Alberta::DofSpace *const dofSpace = dofNumbering.dofSpace( 0 );
    \n+
    99 dofAccess_ = DofAccess( dofSpace );
    \n+
    100
    \n+
    101 level_.create( dofSpace, "Element level" );
    \n+
    102 assert( level_ );
    \n+
    103 level_.template setupInterpolation< Interpolation >();
    \n+
    104
    \n+
    105 SetLocal setLocal( level_ );
    \n+\n+
    107 }
    \n+
    108
    \n+
    109 void release ()
    \n+
    110 {
    \n+
    111 level_.release();
    \n+
    112 dofAccess_ = DofAccess();
    \n+
    113 }
    \n+
    114
    \n+
    115 private:
    \n+
    116 DofVectorPointer level_;
    \n+
    117 DofAccess dofAccess_;
    \n+
    118 };
    \n+
    119
    \n+
    120
    \n+
    121
    \n+
    122 // AlbertaGridLevelProvider::SetLocal
    \n+
    123 // ----------------------------------
    \n+
    124
    \n+
    125 template< int dim >
    \n+\n+
    127 {
    \n+
    128 DofVectorPointer level_;
    \n+
    129 DofAccess dofAccess_;
    \n+
    130
    \n+
    131 public:
    \n+
    132 explicit SetLocal ( const DofVectorPointer &level )
    \n+
    133 : level_( level ),
    \n+
    134 dofAccess_( level.dofSpace() )
    \n+
    135 {}
    \n+
    136
    \n+
    137 void operator() ( const Alberta::ElementInfo< dim > &elementInfo ) const
    \n+
    138 {
    \n+
    139 Level *const array = (Level *)level_;
    \n+
    140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo.level();
    \n+
    141 }
    \n+
    142 };
    \n+
    143
    \n+
    144
    \n+
    145
    \n+
    146 // AlbertaGridLevelProvider::CalcMaxLevel
    \n+
    147 // --------------------------------------
    \n+
    148
    \n+
    149 template< int dim >
    \n+\n+
    151 {
    \n+
    152 Level maxLevel_;
    \n+
    153
    \n+
    154 public:
    \n+\n+
    156 : maxLevel_( 0 )
    \n+
    157 {}
    \n+
    158
    \n+
    159 void operator() ( const Level &dof )
    \n+
    160 {
    \n+
    161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) );
    \n+
    162 }
    \n+
    163
    \n+
    164 void operator() ( const Alberta::ElementInfo< dim > &elementInfo )
    \n+
    165 {
    \n+
    166 maxLevel_ = std::max( maxLevel_, Level( elementInfo.level() ) );
    \n+
    167 }
    \n+
    168
    \n+
    169 Level maxLevel () const
    \n+
    170 {
    \n+
    171 return maxLevel_;
    \n+
    172 }
    \n+
    173 };
    \n+
    174
    \n+
    175
    \n+
    176
    \n+
    177 // AlbertaGridLevelProvider::ClearFlags
    \n+
    178 // ------------------------------------
    \n+
    179
    \n+
    180 template< int dim >
    \n+
    181 template< typename AlbertaGridLevelProvider< dim >::Level flags >
    \n+
    182 struct AlbertaGridLevelProvider< dim >::ClearFlags
    \n+
    183 {
    \n+
    184 void operator() ( Level &dof ) const
    \n+
    185 {
    \n+
    186 dof &= ~flags;
    \n+
    187 }
    \n+
    188 };
    \n+
    189
    \n+
    190
    \n+
    191
    \n+
    192 // AlbertaGridLevelProvider::Interpolation
    \n+
    193 // ---------------------------------------
    \n+
    194
    \n+
    195 template< int dim >
    \n+\n+
    197 {
    \n+
    198 static const int dimension = dim;
    \n+
    199
    \n+\n+
    201
    \n+
    202 static void interpolateVector ( const DofVectorPointer &dofVector,
    \n+
    203 const Patch &patch )
    \n+
    204 {
    \n+
    205 const DofAccess dofAccess( dofVector.dofSpace() );
    \n+
    206 Level *array = (Level *)dofVector;
    \n+
    207
    \n+
    208 for( int i = 0; i < patch.count(); ++i )
    \n+
    209 {
    \n+
    210 const Alberta::Element *const father = patch[ i ];
    \n+
    211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );
    \n+
    212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) | isNewFlag;
    \n+
    213 for( int i = 0; i < 2; ++i )
    \n+
    214 {
    \n+
    215 const Alberta::Element *child = father->child[ i ];
    \n+
    216 array[ dofAccess( child, 0 ) ] = childLevel;
    \n+
    217 }
    \n+
    218 }
    \n+
    219 }
    \n+
    220 };
    \n+
    221
    \n+
    222}
    \n+
    223
    \n+
    224#endif // #if HAVE_ALBERTA
    \n
    225
    \n-
    227
    \n-
    256 template<typename GV>
    \n-
    257 inline IteratorRange<...> elements(const GV& gv);
    \n-
    258
    \n-
    259
    \n-
    261
    \n-
    290 template<typename GV>
    \n-
    291 inline IteratorRange<...> facets(const GV& gv);
    \n-
    292
    \n-
    293
    \n-
    295
    \n-
    324 template<typename GV>
    \n-
    325 inline IteratorRange<...> edges(const GV& gv);
    \n-
    326
    \n-
    327
    \n-
    329
    \n-
    358 template<typename GV>
    \n-
    359 inline IteratorRange<...> vertices(const GV& gv);
    \n-
    360
    \n-
    361
    \n-
    363
    \n-
    364
    \n-
    365
    \n-
    369
    \n-
    371
    \n-
    394 template<typename GV, typename Entity>
    \n-
    395 inline IteratorRange<...> intersections(const GV& gv, const Entity& e);
    \n-
    396
    \n-
    397
    \n-
    399
    \n-
    400
    \n-
    401
    \n-
    405
    \n-
    406
    \n-
    408
    \n-
    434 template<typename Entity>
    \n-
    435 inline IteratorRange<...> descendantElements(const Entity& e, int maxLevel);
    \n-
    436 // Entity<int dim, class GridImp, template<int,int,class> class EntityImp>
    \n-
    437
    \n-
    439
    \n-
    440
    \n-
    441
    \n-
    445
    \n-
    446
    \n-
    448
    \n-
    486 template<typename GV, int codim>
    \n-
    487 inline IteratorRange<...> entities(const GV& gv, Codim<codim> cd);
    \n-
    488
    \n-
    489
    \n-
    491
    \n-
    531 template<typename GV, int dim>
    \n-
    532 inline IteratorRange<...> entities(const GV& gv, Dim<dim> d);
    \n-
    533
    \n-
    535
    \n-
    536
    \n-
    537
    \n-
    541
    \n-
    542
    \n-
    544
    \n-
    570 template<typename GV, unsigned int partitions>
    \n-
    571 inline IteratorRange<...> elements(const GV& gv, PartitionSet<partitions> ps);
    \n-
    572
    \n-
    573
    \n-
    575
    \n-
    604 template<typename GV, unsigned int partitions>
    \n-
    605 inline IteratorRange<...> facets(const GV& gv, PartitionSet<partitions> ps);
    \n-
    606
    \n-
    607
    \n-
    609
    \n-
    635 template<typename GV, unsigned int partitions>
    \n-
    636 inline IteratorRange<...> edges(const GV& gv, PartitionSet<partitions> ps);
    \n-
    637
    \n-
    638
    \n-
    640
    \n-
    666 template<typename GV, unsigned int partitions>
    \n-
    667 inline IteratorRange<...> vertices(const GV& gv, PartitionSet<partitions> ps);
    \n-
    668
    \n-
    670
    \n-
    671
    \n-
    672
    \n-
    676
    \n-
    677
    \n-
    679
    \n-
    715 template<typename GV, int codim, unsigned int partitions>
    \n-
    716 inline IteratorRange<...> entities(const GV& gv, Codim<codim> cd, PartitionSet<partitions> ps);
    \n-
    717
    \n-
    718
    \n-
    720
    \n-
    756 template<typename GV, int dim, unsigned int partitions>
    \n-
    757 inline IteratorRange<...> entities(const GV& gv, Dim<dim> d, PartitionSet<partitions> ps);
    \n-
    758
    \n-
    759
    \n-
    761
    \n-
    782 template<typename E, int codim>
    \n-
    783 inline IteratorRange<...> subEntities(const E& e, Codim<codim> c);
    \n-
    784
    \n-
    785
    \n-
    787
    \n-
    788
    \n-
    789#else // DOXYGEN
    \n-
    790
    \n-
    791 // ******************************************************************************************
    \n-
    792 // Implementations
    \n-
    793 // ******************************************************************************************
    \n-
    794
    \n-
    795
    \n-
    805 template<typename GV, int codim, unsigned int partitions>
    \n-
    806 inline auto entities(const GV& gv, Codim<codim>, PartitionSet<partitions>)
    \n-
    807 -> IteratorRange<decltype(gv.template begin<codim,derive_partition_iterator_type<partitions>::value>())>
    \n-
    808 {
    \n-
    809 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension for given GridView");
    \n-
    810 const PartitionIteratorType pit = derive_partition_iterator_type<partitions>::value;
    \n-
    811 typedef IteratorRange<decltype(gv.template begin<codim,pit>())> return_type;
    \n-
    812 return return_type(gv.template begin<codim,pit>(),gv.template end<codim,pit>());
    \n-
    813 }
    \n-
    814
    \n-
    822 template<typename GV, int codim>
    \n-
    823 inline auto entities(const GV& gv, Codim<codim>)
    \n-
    824 -> IteratorRange<decltype(gv.template begin<codim>())>
    \n-
    825 {
    \n-
    826 static_assert(0 <= codim && codim <= GV::dimension, "invalid codimension for given GridView");
    \n-
    827 typedef IteratorRange<decltype(gv.template begin<codim>())> return_type;
    \n-
    828 return return_type(gv.template begin<codim>(),gv.template end<codim>());
    \n-
    829 }
    \n-
    830
    \n-
    834 template<typename Entity>
    \n-
    835 inline IteratorRange<typename Entity::HierarchicIterator> descendantElements(const Entity& e, int maxLevel)
    \n-
    836 {
    \n-
    837 typedef IteratorRange<typename Entity::HierarchicIterator> return_type;
    \n-
    838 return return_type(e.hbegin(maxLevel),e.hend(maxLevel));
    \n-
    839 }
    \n-
    840
    \n-
    844 template<typename GV, typename Entity>
    \n-
    845 inline auto intersections(const GV& gv, const Entity& e)
    \n-
    846 -> IteratorRange<decltype(gv.ibegin(e))>
    \n-
    847 {
    \n-
    848 return IteratorRange<decltype(gv.ibegin(e))>(gv.ibegin(e),gv.iend(e));
    \n-
    849 }
    \n-
    850
    \n-
    851
    \n-
    857 template<typename GV, int dim, unsigned int partitions>
    \n-
    858 inline auto entities(const GV& gv, Dim<dim>, PartitionSet<partitions>)
    \n-
    859 -> decltype(entities(gv,Codim<GV::dimension - dim>(),PartitionSet<partitions>()))
    \n-
    860 {
    \n-
    861 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for given GridView");
    \n-
    862 return entities(gv,Codim<GV::dimension - dim>(),PartitionSet<partitions>());
    \n-
    863 }
    \n-
    864
    \n-
    865 template<typename GV, int dim>
    \n-
    866 inline auto entities(const GV& gv, Dim<dim>)
    \n-
    867 -> decltype(entities(gv,Codim<GV::dimension - dim>()))
    \n-
    868 {
    \n-
    869 static_assert(0 <= dim && dim <= GV::dimension, "invalid dimension for given GridView");
    \n-
    870 return entities(gv,Codim<GV::dimension - dim>());
    \n-
    871 }
    \n-
    872
    \n-
    873 template<typename GV, unsigned int partitions>
    \n-
    874 inline auto elements(const GV& gv, PartitionSet<partitions>)
    \n-
    875 -> decltype(entities(gv,Codim<0>(),PartitionSet<partitions>()))
    \n-
    876 {
    \n-
    877 return entities(gv,Codim<0>(),PartitionSet<partitions>());
    \n-
    878 }
    \n-
    879
    \n-
    880 template<typename GV>
    \n-
    881 inline auto elements(const GV& gv)
    \n-
    882 -> decltype(entities(gv,Codim<0>()))
    \n-
    883 {
    \n-
    884 return entities(gv,Codim<0>());
    \n-
    885 }
    \n-
    886
    \n-
    887 template<typename GV, unsigned int partitions>
    \n-
    888 inline auto facets(const GV& gv, PartitionSet<partitions>)
    \n-
    889 -> decltype(entities(gv,Codim<1>(),PartitionSet<partitions>()))
    \n-
    890 {
    \n-
    891 return entities(gv,Codim<1>(),PartitionSet<partitions>());
    \n-
    892 }
    \n-
    893
    \n-
    894 template<typename GV>
    \n-
    895 inline auto facets(const GV& gv)
    \n-
    896 -> decltype(entities(gv,Codim<1>()))
    \n-
    897 {
    \n-
    898 return entities(gv,Codim<1>());
    \n-
    899 }
    \n-
    900
    \n-
    901 template<typename GV, unsigned int partitions>
    \n-
    902 inline auto edges(const GV& gv, PartitionSet<partitions>)
    \n-
    903 -> decltype(entities(gv,Dim<1>(),PartitionSet<partitions>()))
    \n-
    904 {
    \n-
    905 return entities(gv,Dim<1>(),PartitionSet<partitions>());
    \n-
    906 }
    \n-
    907
    \n-
    908 template<typename GV>
    \n-
    909 inline auto edges(const GV& gv)
    \n-
    910 -> decltype(entities(gv,Dim<1>()))
    \n-
    911 {
    \n-
    912 return entities(gv,Dim<1>());
    \n-
    913 }
    \n-
    914
    \n-
    915 template<typename GV, unsigned int partitions>
    \n-
    916 inline auto vertices(const GV& gv, PartitionSet<partitions>)
    \n-
    917 -> decltype(entities(gv,Dim<0>(),PartitionSet<partitions>()))
    \n-
    918 {
    \n-
    919 return entities(gv,Dim<0>(),PartitionSet<partitions>());
    \n-
    920 }
    \n-
    921
    \n-
    922 template<typename GV>
    \n-
    923 inline auto vertices(const GV& gv)
    \n-
    924 -> decltype(entities(gv,Dim<0>()))
    \n-
    925 {
    \n-
    926 return entities(gv,Dim<0>());
    \n-
    927 }
    \n-
    928
    \n-
    929 template<typename E, int codim>
    \n-
    930 inline auto subEntities(const E& e, Codim<codim> c)
    \n-
    931 {
    \n-
    932 static_assert(E::codimension <= codim,
    \n-
    933 "Can only iterate over sub-entities with equal or larger codimension");
    \n-
    934 return transformedRangeView(
    \n-
    935 range(static_cast<int>(e.subEntities(c))),
    \n-
    936 [&](const int i){ return e.template subEntity<codim>(i); }
    \n-
    937 );
    \n-
    938 }
    \n-
    939
    \n-
    940#endif // DOXYGEN
    \n-
    941
    \n-
    946} // namespace Dune
    \n-
    947
    \n-
    948#endif // DUNE_GRID_COMMON_RANGEGENERATORS_HH
    \n-\n-\n-
    PartitionIteratorType
    Parameter to be used for the parallel level- and leaf iterators.
    Definition: gridenums.hh:136
    \n-
    IteratorRange<... > intersections(const GV &gv, const Entity &e)
    Iterates over all Intersections of an Entity with respect to the given GridView.
    \n-
    IteratorRange<... > vertices(const GV &gv)
    Iterates over all vertices (entities with dimension 0) of a GridView.
    \n-
    IteratorRange<... > elements(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all elements / cells (entities with codimension 0) of a GridView that belong to the giv...
    \n-
    IteratorRange<... > entities(const GV &gv, Codim< codim > cd, PartitionSet< partitions > ps)
    Iterates over all entities of a GridView with the given codimension that belong to the given Partitio...
    \n-
    IteratorRange<... > edges(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all edges (entities with dimension 1) of a GridView that belong to the given PartitionS...
    \n-
    IteratorRange<... > entities(const GV &gv, Dim< dim > d, PartitionSet< partitions > ps)
    Iterates over all entities of a GridView with the given dimension that belong to the given PartitionS...
    \n-
    IteratorRange<... > entities(const GV &gv, Dim< dim > d)
    Iterates over all entities of a GridView with the given dimension.
    \n-
    IteratorRange<... > subEntities(const E &e, Codim< codim > c)
    Iterates over all sub-entities of an entity given the codimension of the sub-entities.
    \n-
    IteratorRange<... > vertices(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all vertices (entities with dimension 0) of a GridView that belong to the given Partiti...
    \n-
    IteratorRange<... > elements(const GV &gv)
    Iterates over all elements / cells (entities with codimension 0) of a GridView.
    \n-
    IteratorRange<... > entities(const GV &gv, Codim< codim > cd)
    Iterates over all entities of a GridView with the given codimension.
    \n-
    IteratorRange<... > facets(const GV &gv, PartitionSet< partitions > ps)
    Iterates over all facets (entities with codimension 1) of a GridView that belong to the given Partiti...
    \n-
    IteratorRange<... > facets(const GV &gv)
    Iterates over all facets (entities with codimension 1) of a GridView.
    \n-
    IteratorRange<... > edges(const GV &gv)
    Iterates over all edges (entities with dimension 1) of a GridView.
    \n-
    IteratorRange<... > descendantElements(const Entity &e, int maxLevel)
    Iterates over all descendant elements of the given element up to a maximum level.
    \n+
    226#endif
    \n+\n+
    provides a wrapper for ALBERTA's mesh structure
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    A struct that collects all associated types of one implementation from the Traits class.
    Definition: common/gridview.hh:118
    \n-
    A set of PartitionType values.
    Definition: partitionset.hh:138
    \n+
    ALBERTA EL Element
    Definition: misc.hh:54
    \n+
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n+
    int max(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:337
    \n+
    Definition: meshpointer.hh:40
    \n+
    void leafTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:385
    \n+
    void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:370
    \n+\n+
    Definition: dofadmin.hh:93
    \n+
    const DofSpace * dofSpace(int codim) const
    Definition: dofadmin.hh:145
    \n+\n+
    void create(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:236
    \n+
    void release()
    Definition: dofvector.hh:254
    \n+
    const DofSpace * dofSpace() const
    Definition: dofvector.hh:223
    \n+
    void forEach(Functor &functor) const
    Definition: dofvector.hh:264
    \n+
    Definition: elementinfo.hh:43
    \n+
    int level() const
    Definition: elementinfo.hh:533
    \n+
    Element * el() const
    Definition: elementinfo.hh:737
    \n+
    Definition: level.hh:25
    \n+
    bool isNew(const Alberta::Element *element) const
    Definition: level.hh:62
    \n+
    bool isNew(const ElementInfo &elementInfo) const
    Definition: level.hh:68
    \n+
    Alberta::MeshPointer< dim > MeshPointer
    Definition: level.hh:48
    \n+
    MeshPointer mesh() const
    Definition: level.hh:85
    \n+
    void create(const DofNumbering &dofNumbering)
    Definition: level.hh:96
    \n+
    Level maxLevel() const
    Definition: level.hh:73
    \n+
    Alberta::HierarchyDofNumbering< dim > DofNumbering
    Definition: level.hh:49
    \n+
    void release()
    Definition: level.hh:109
    \n+
    Level operator()(const Alberta::Element *element) const
    Definition: level.hh:51
    \n+
    void markAllOld()
    Definition: level.hh:90
    \n+
    Alberta::ElementInfo< dim > ElementInfo
    Definition: level.hh:47
    \n+\n+
    SetLocal(const DofVectorPointer &level)
    Definition: level.hh:132
    \n+\n+\n+
    Level maxLevel() const
    Definition: level.hh:169
    \n+\n+
    Alberta::Patch< dimension > Patch
    Definition: level.hh:200
    \n+
    static void interpolateVector(const DofVectorPointer &dofVector, const Patch &patch)
    Definition: level.hh:202
    \n+
    Definition: misc.hh:231
    \n+
    static const Flags nothing
    Definition: misc.hh:234
    \n+
    Definition: refinement.hh:40
    \n+
    int count() const
    Definition: refinement.hh:67
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,384 +4,361 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * common\n-rangegenerators.hh\n+ * albertagrid\n+level.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_RANGEGENERATORS_HH\n- 6#define DUNE_GRID_COMMON_RANGEGENERATORS_HH\n+ 5#ifndef DUNE_ALBERTA_LEVEL_HH\n+ 6#define DUNE_ALBERTA_LEVEL_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13\n- 14namespace Dune\n- 15{\n+ 8#include \n+ 9#include \n+ 10\n+ 11#include \n+ 12#include \n+ 13#include \n+ 14\n+ 15#if HAVE_ALBERTA\n 16\n- 17#ifdef DOXYGEN\n- 18\n- 206 /\n-/\n-*****************************************************************************************\n- 207 // Doxygen documentation\n- 208 /\n-/\n-*****************************************************************************************\n- 209 //\n- 210 // In the following, the range generating functions are documented for\n-Doxygen; the actual\n- 211 // implementations are further down in this file and hidden from Doxygen.\n- 212 // The main reason for this split are the return types of those functions,\n-which either contain\n- 213 // long type listings to obtain the iterator type or (in the case of the\n-forwarded functions\n- 214 // use the new-style function syntax and calculate the return type using\n-decltype. In both cases,\n- 215 // Doxygen generates function signatures that are very confusing to the\n-average user.\n- 216 //\n- 217 /\n-/\n-*****************************************************************************************\n- 218\n- 219\n- 220\n- 224\n+ 17namespace Dune\n+ 18{\n+ 19\n+ 20 // AlbertaGridLevelProvider\n+ 21 // ------------------------\n+ 22\n+ 23 template< int dim >\n+24 class AlbertaGridLevelProvider\n+ 25 {\n+ 26 typedef AlbertaGridLevelProvider<_dim_> This;\n+ 27\n+ 28 typedef unsigned char Level;\n+ 29\n+ 30 typedef Alberta::DofVectorPointer<_Level_> DofVectorPointer;\n+ 31 typedef Alberta::DofAccess<_dim,_0_> DofAccess;\n+ 32\n+ 33 typedef Alberta::FillFlags<_dim_> FillFlags;\n+ 34\n+ 35 static const Level isNewFlag = (1 << 7);\n+ 36 static const Level levelMask = (1 << 7) - 1;\n+ 37\n+ 38 class SetLocal;\n+ 39 class CalcMaxLevel;\n+ 40\n+ 41 template< Level flags >\n+ 42 struct ClearFlags;\n+ 43\n+ 44 struct Interpolation;\n+ 45\n+ 46 public:\n+47 typedef Alberta::ElementInfo<_dim_> ElementInfo;\n+48 typedef Alberta::MeshPointer<_dim_> MeshPointer;\n+49 typedef Alberta::HierarchyDofNumbering<_dim_> DofNumbering;\n+ 50\n+51 Level operator()( const Alberta::Element *element ) const\n+ 52 {\n+ 53 const Level *array = (Level *)level_;\n+ 54 return array[ dofAccess_( element, 0 ) ] & levelMask;\n+ 55 }\n+ 56\n+57 Level operator()( const ElementInfo &elementInfo ) const\n+ 58 {\n+ 59 return (*this)( elementInfo.el() );\n+ 60 }\n+ 61\n+62 bool isNew ( const Alberta::Element *element ) const\n+ 63 {\n+ 64 const Level *array = (Level *)level_;\n+ 65 return ((array[ dofAccess_( element, 0 ) ] & isNewFlag) != 0);\n+ 66 }\n+ 67\n+68 bool isNew ( const ElementInfo &elementInfo ) const\n+ 69 {\n+ 70 return isNew( elementInfo.el() );\n+ 71 }\n+ 72\n+73 Level maxLevel () const\n+ 74 {\n+ 75 CalcMaxLevel calcFromCache;\n+ 76 level_.forEach( calcFromCache );\n+ 77#ifndef NDEBUG\n+ 78 CalcMaxLevel calcFromGrid;\n+ 79 mesh().leafTraverse( calcFromGrid, FillFlags::nothing );\n+ 80 assert( calcFromCache.maxLevel() == calcFromGrid.maxLevel() );\n+ 81#endif\n+ 82 return calcFromCache.maxLevel();;\n+ 83 }\n+ 84\n+85 MeshPointer mesh () const\n+ 86 {\n+ 87 return MeshPointer( level_.dofSpace()->mesh );\n+ 88 }\n+ 89\n+90 void markAllOld ()\n+ 91 {\n+ 92 ClearFlags< isNewFlag > clearIsNew;\n+ 93 level_.forEach( clearIsNew );\n+ 94 }\n+ 95\n+96 void create ( const DofNumbering &dofNumbering )\n+ 97 {\n+ 98 const Alberta::DofSpace *const dofSpace = dofNumbering.dofSpace( 0 );\n+ 99 dofAccess_ = DofAccess( dofSpace );\n+ 100\n+ 101 level_.create( dofSpace, \"Element level\" );\n+ 102 assert( level_ );\n+ 103 level_.template setupInterpolation< Interpolation >();\n+ 104\n+ 105 SetLocal setLocal( level_ );\n+ 106 mesh().hierarchicTraverse( setLocal, FillFlags::nothing );\n+ 107 }\n+ 108\n+109 void release ()\n+ 110 {\n+ 111 level_.release();\n+ 112 dofAccess_ = DofAccess();\n+ 113 }\n+ 114\n+ 115 private:\n+ 116 DofVectorPointer level_;\n+ 117 DofAccess dofAccess_;\n+ 118 };\n+ 119\n+ 120\n+ 121\n+ 122 // AlbertaGridLevelProvider::SetLocal\n+ 123 // ----------------------------------\n+ 124\n+ 125 template< int dim >\n+126 class AlbertaGridLevelProvider< dim >::SetLocal\n+ 127 {\n+ 128 DofVectorPointer level_;\n+ 129 DofAccess dofAccess_;\n+ 130\n+ 131 public:\n+132 explicit SetLocal ( const DofVectorPointer &level )\n+ 133 : level_( level ),\n+ 134 dofAccess_( level.dofSpace() )\n+ 135 {}\n+ 136\n+137 void operator()( const Alberta::ElementInfo<_dim_> &elementInfo ) const\n+ 138 {\n+ 139 Level *const array = (Level *)level_;\n+ 140 array[ dofAccess_( elementInfo, 0 ) ] = elementInfo.level();\n+ 141 }\n+ 142 };\n+ 143\n+ 144\n+ 145\n+ 146 // AlbertaGridLevelProvider::CalcMaxLevel\n+ 147 // --------------------------------------\n+ 148\n+ 149 template< int dim >\n+150 class AlbertaGridLevelProvider< dim >::CalcMaxLevel\n+ 151 {\n+ 152 Level maxLevel_;\n+ 153\n+ 154 public:\n+155 CalcMaxLevel ()\n+ 156 : maxLevel_( 0 )\n+ 157 {}\n+ 158\n+159 void operator()( const Level &dof )\n+ 160 {\n+ 161 maxLevel_ = std::max( maxLevel_, Level( dof & levelMask ) );\n+ 162 }\n+ 163\n+164 void operator()( const Alberta::ElementInfo<_dim_> &elementInfo )\n+ 165 {\n+ 166 maxLevel_ = std::max( maxLevel_, Level( elementInfo.level() ) );\n+ 167 }\n+ 168\n+169 Level maxLevel () const\n+ 170 {\n+ 171 return maxLevel_;\n+ 172 }\n+ 173 };\n+ 174\n+ 175\n+ 176\n+ 177 // AlbertaGridLevelProvider::ClearFlags\n+ 178 // ------------------------------------\n+ 179\n+ 180 template< int dim >\n+ 181 template< typename AlbertaGridLevelProvider< dim >::Level flags >\n+ 182 struct AlbertaGridLevelProvider< dim >::ClearFlags\n+ 183 {\n+ 184 void operator()( Level &dof ) const\n+ 185 {\n+ 186 dof &= ~flags;\n+ 187 }\n+ 188 };\n+ 189\n+ 190\n+ 191\n+ 192 // AlbertaGridLevelProvider::Interpolation\n+ 193 // ---------------------------------------\n+ 194\n+ 195 template< int dim >\n+196 struct AlbertaGridLevelProvider< dim >::Interpolation\n+ 197 {\n+198 static const int dimension = dim;\n+ 199\n+200 typedef Alberta::Patch<_dimension_> Patch;\n+ 201\n+202 static void interpolateVector ( const DofVectorPointer &dofVector,\n+ 203 const Patch &patch )\n+ 204 {\n+ 205 const DofAccess dofAccess( dofVector.dofSpace() );\n+ 206 Level *array = (Level *)dofVector;\n+ 207\n+ 208 for( int i = 0; i < patch.count(); ++i )\n+ 209 {\n+ 210 const Alberta::Element *const father = patch[ i ];\n+ 211 assert( (array[ dofAccess( father, 0 ) ] & levelMask) < levelMask );\n+ 212 const Level childLevel = (array[ dofAccess( father, 0 ) ] + 1) |\n+isNewFlag;\n+ 213 for( int i = 0; i < 2; ++i )\n+ 214 {\n+ 215 const Alberta::Element *child = father->child[ i ];\n+ 216 array[ dofAccess( child, 0 ) ] = childLevel;\n+ 217 }\n+ 218 }\n+ 219 }\n+ 220 };\n+ 221\n+ 222}\n+ 223\n+ 224#endif // #if HAVE_ALBERTA\n 225\n- 227\n- 256 template\n-257 inline IteratorRange<...> elements(const GV& gv);\n- 258\n- 259\n- 261\n- 290 template\n-291 inline IteratorRange<...> facets(const GV& gv);\n- 292\n- 293\n- 295\n- 324 template\n-325 inline IteratorRange<...> edges(const GV& gv);\n- 326\n- 327\n- 329\n- 358 template\n-359 inline IteratorRange<...> vertices(const GV& gv);\n- 360\n- 361\n- 363\n- 364\n- 365\n- 369\n- 371\n- 394 template\n-395 inline IteratorRange<...> intersections(const GV& gv, const Entity& e);\n- 396\n- 397\n- 399\n- 400\n- 401\n- 405\n- 406\n- 408\n- 434 template\n-435 inline IteratorRange<...> descendantElements(const Entity& e, int\n-maxLevel);\n- 436 // Entity class EntityImp>\n- 437\n- 439\n- 440\n- 441\n- 445\n- 446\n- 448\n- 486 template\n-487 inline IteratorRange<...> entities(const GV& gv, Codim cd);\n- 488\n- 489\n- 491\n- 531 template\n-532 inline IteratorRange<...> entities(const GV& gv, Dim d);\n- 533\n- 535\n- 536\n- 537\n- 541\n- 542\n- 544\n- 570 template\n-571 inline IteratorRange<...> elements(const GV& gv, PartitionSet\n-ps);\n- 572\n- 573\n- 575\n- 604 template\n-605 inline IteratorRange<...> facets(const GV& gv, PartitionSet\n-ps);\n- 606\n- 607\n- 609\n- 635 template\n-636 inline IteratorRange<...> edges(const GV& gv, PartitionSet ps);\n- 637\n- 638\n- 640\n- 666 template\n-667 inline IteratorRange<...> vertices(const GV& gv, PartitionSet\n-ps);\n- 668\n- 670\n- 671\n- 672\n- 676\n- 677\n- 679\n- 715 template\n-716 inline IteratorRange<...> entities(const GV& gv, Codim cd,\n-PartitionSet ps);\n- 717\n- 718\n- 720\n- 756 template\n-757 inline IteratorRange<...> entities(const GV& gv, Dim d,\n-PartitionSet ps);\n- 758\n- 759\n- 761\n- 782 template\n-783 inline IteratorRange<...> subEntities(const E& e, Codim c);\n- 784\n- 785\n- 787\n- 788\n- 789#else // DOXYGEN\n- 790\n- 791 /\n-/\n-******************************************************************************************\n- 792 // Implementations\n- 793 /\n-/\n-******************************************************************************************\n- 794\n- 795\n- 805 template\n- 806 inline auto entities(const GV& gv, Codim, PartitionSet)\n- 807 -> IteratorRange::value>())>\n- 808 {\n- 809 static_assert(0 <= codim && codim <= GV::dimension, \"invalid codimension\n-for given GridView\");\n- 810 const PartitionIteratorType pit =\n-derive_partition_iterator_type::value;\n- 811 typedef IteratorRange())>\n-return_type;\n- 812 return return_type(gv.template begin(),gv.template\n-end());\n- 813 }\n- 814\n- 822 template\n- 823 inline auto entities(const GV& gv, Codim)\n- 824 -> IteratorRange())>\n- 825 {\n- 826 static_assert(0 <= codim && codim <= GV::dimension, \"invalid codimension\n-for given GridView\");\n- 827 typedef IteratorRange())> return_type;\n- 828 return return_type(gv.template begin(),gv.template end());\n- 829 }\n- 830\n- 834 template\n- 835 inline IteratorRange\n-descendantElements(const Entity& e, int maxLevel)\n- 836 {\n- 837 typedef IteratorRange return_type;\n- 838 return return_type(e.hbegin(maxLevel),e.hend(maxLevel));\n- 839 }\n- 840\n- 844 template\n- 845 inline auto intersections(const GV& gv, const Entity& e)\n- 846 -> IteratorRange\n- 847 {\n- 848 return IteratorRange(gv.ibegin(e),gv.iend(e));\n- 849 }\n- 850\n- 851\n- 857 template\n- 858 inline auto entities(const GV& gv, Dim, PartitionSet)\n- 859 -> decltype(entities(gv,Codim\n-(),PartitionSet()))\n- 860 {\n- 861 static_assert(0 <= dim && dim <= GV::dimension, \"invalid dimension for\n-given GridView\");\n- 862 return entities(gv,Codim(),PartitionSet\n-());\n- 863 }\n- 864\n- 865 template\n- 866 inline auto entities(const GV& gv, Dim)\n- 867 -> decltype(entities(gv,Codim()))\n- 868 {\n- 869 static_assert(0 <= dim && dim <= GV::dimension, \"invalid dimension for\n-given GridView\");\n- 870 return entities(gv,Codim());\n- 871 }\n- 872\n- 873 template\n- 874 inline auto elements(const GV& gv, PartitionSet)\n- 875 -> decltype(entities(gv,Codim<0>(),PartitionSet()))\n- 876 {\n- 877 return entities(gv,Codim<0>(),PartitionSet());\n- 878 }\n- 879\n- 880 template\n- 881 inline auto elements(const GV& gv)\n- 882 -> decltype(entities(gv,Codim<0>()))\n- 883 {\n- 884 return entities(gv,Codim<0>());\n- 885 }\n- 886\n- 887 template\n- 888 inline auto facets(const GV& gv, PartitionSet)\n- 889 -> decltype(entities(gv,Codim<1>(),PartitionSet()))\n- 890 {\n- 891 return entities(gv,Codim<1>(),PartitionSet());\n- 892 }\n- 893\n- 894 template\n- 895 inline auto facets(const GV& gv)\n- 896 -> decltype(entities(gv,Codim<1>()))\n- 897 {\n- 898 return entities(gv,Codim<1>());\n- 899 }\n- 900\n- 901 template\n- 902 inline auto edges(const GV& gv, PartitionSet)\n- 903 -> decltype(entities(gv,Dim<1>(),PartitionSet()))\n- 904 {\n- 905 return entities(gv,Dim<1>(),PartitionSet());\n- 906 }\n- 907\n- 908 template\n- 909 inline auto edges(const GV& gv)\n- 910 -> decltype(entities(gv,Dim<1>()))\n- 911 {\n- 912 return entities(gv,Dim<1>());\n- 913 }\n- 914\n- 915 template\n- 916 inline auto vertices(const GV& gv, PartitionSet)\n- 917 -> decltype(entities(gv,Dim<0>(),PartitionSet()))\n- 918 {\n- 919 return entities(gv,Dim<0>(),PartitionSet());\n- 920 }\n- 921\n- 922 template\n- 923 inline auto vertices(const GV& gv)\n- 924 -> decltype(entities(gv,Dim<0>()))\n- 925 {\n- 926 return entities(gv,Dim<0>());\n- 927 }\n- 928\n- 929 template\n- 930 inline auto subEntities(const E& e, Codim c)\n- 931 {\n- 932 static_assert(E::codimension <= codim,\n- 933 \"Can only iterate over sub-entities with equal or larger codimension\");\n- 934 return transformedRangeView(\n- 935 range(static_cast(e.subEntities(c))),\n- 936 [&](const int i){ return e.template subEntity(i); }\n- 937 );\n- 938 }\n- 939\n- 940#endif // DOXYGEN\n- 941\n- 946} // namespace Dune\n- 947\n- 948#endif // DUNE_GRID_COMMON_RANGEGENERATORS_HH\n-partitionset.hh\n-gridenums.hh\n-Dune::PartitionIteratorType\n-PartitionIteratorType\n-Parameter to be used for the parallel level- and leaf iterators.\n-Definition: gridenums.hh:136\n-Dune::Entity::intersections\n-IteratorRange<... > intersections(const GV &gv, const Entity &e)\n-Iterates over all Intersections of an Entity with respect to the given\n-GridView.\n-Dune::GridView::vertices\n-IteratorRange<... > vertices(const GV &gv)\n-Iterates over all vertices (entities with dimension 0) of a GridView.\n-Dune::GridView::elements\n-IteratorRange<... > elements(const GV &gv, PartitionSet< partitions > ps)\n-Iterates over all elements / cells (entities with codimension 0) of a GridView\n-that belong to the giv...\n-Dune::GridView::entities\n-IteratorRange<... > entities(const GV &gv, Codim< codim > cd, PartitionSet<\n-partitions > ps)\n-Iterates over all entities of a GridView with the given codimension that belong\n-to the given Partitio...\n-Dune::GridView::edges\n-IteratorRange<... > edges(const GV &gv, PartitionSet< partitions > ps)\n-Iterates over all edges (entities with dimension 1) of a GridView that belong\n-to the given PartitionS...\n-Dune::GridView::entities\n-IteratorRange<... > entities(const GV &gv, Dim< dim > d, PartitionSet<\n-partitions > ps)\n-Iterates over all entities of a GridView with the given dimension that belong\n-to the given PartitionS...\n-Dune::GridView::entities\n-IteratorRange<... > entities(const GV &gv, Dim< dim > d)\n-Iterates over all entities of a GridView with the given dimension.\n-Dune::Entity::subEntities\n-IteratorRange<... > subEntities(const E &e, Codim< codim > c)\n-Iterates over all sub-entities of an entity given the codimension of the sub-\n-entities.\n-Dune::GridView::vertices\n-IteratorRange<... > vertices(const GV &gv, PartitionSet< partitions > ps)\n-Iterates over all vertices (entities with dimension 0) of a GridView that\n-belong to the given Partiti...\n-Dune::GridView::elements\n-IteratorRange<... > elements(const GV &gv)\n-Iterates over all elements / cells (entities with codimension 0) of a GridView.\n-Dune::GridView::entities\n-IteratorRange<... > entities(const GV &gv, Codim< codim > cd)\n-Iterates over all entities of a GridView with the given codimension.\n-Dune::GridView::facets\n-IteratorRange<... > facets(const GV &gv, PartitionSet< partitions > ps)\n-Iterates over all facets (entities with codimension 1) of a GridView that\n-belong to the given Partiti...\n-Dune::GridView::facets\n-IteratorRange<... > facets(const GV &gv)\n-Iterates over all facets (entities with codimension 1) of a GridView.\n-Dune::GridView::edges\n-IteratorRange<... > edges(const GV &gv)\n-Iterates over all edges (entities with dimension 1) of a GridView.\n-Dune::Entity::descendantElements\n-IteratorRange<... > descendantElements(const Entity &e, int maxLevel)\n-Iterates over all descendant elements of the given element up to a maximum\n-level.\n+ 226#endif\n+dofadmin.hh\n+meshpointer.hh\n+provides a wrapper for ALBERTA's mesh structure\n+dofvector.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::GridView::Codim\n-A struct that collects all associated types of one implementation from the\n-Traits class.\n-Definition: common/gridview.hh:118\n-Dune::PartitionSet\n-A set of PartitionType values.\n-Definition: partitionset.hh:138\n+Dune::Alberta::Element\n+ALBERTA EL Element\n+Definition: misc.hh:54\n+Dune::Alberta::DofSpace\n+ALBERTA FE_SPACE DofSpace\n+Definition: misc.hh:65\n+Dune::Alberta::max\n+int max(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:337\n+Dune::Alberta::MeshPointer\n+Definition: meshpointer.hh:40\n+Dune::Alberta::MeshPointer::leafTraverse\n+void leafTraverse(Functor &functor, typename FillFlags::Flags\n+fillFlags=FillFlags::standard) const\n+Definition: meshpointer.hh:385\n+Dune::Alberta::MeshPointer::hierarchicTraverse\n+void hierarchicTraverse(Functor &functor, typename FillFlags::Flags\n+fillFlags=FillFlags::standard) const\n+Definition: meshpointer.hh:370\n+Dune::Alberta::DofAccess<_dim,_0_>\n+Dune::Alberta::HierarchyDofNumbering\n+Definition: dofadmin.hh:93\n+Dune::Alberta::HierarchyDofNumbering::dofSpace\n+const DofSpace * dofSpace(int codim) const\n+Definition: dofadmin.hh:145\n+Dune::Alberta::DofVectorPointer<_Level_>\n+Dune::Alberta::DofVectorPointer::create\n+void create(const DofSpace *dofSpace, const std::string &name=\"\")\n+Definition: dofvector.hh:236\n+Dune::Alberta::DofVectorPointer::release\n+void release()\n+Definition: dofvector.hh:254\n+Dune::Alberta::DofVectorPointer::dofSpace\n+const DofSpace * dofSpace() const\n+Definition: dofvector.hh:223\n+Dune::Alberta::DofVectorPointer::forEach\n+void forEach(Functor &functor) const\n+Definition: dofvector.hh:264\n+Dune::Alberta::ElementInfo\n+Definition: elementinfo.hh:43\n+Dune::Alberta::ElementInfo::level\n+int level() const\n+Definition: elementinfo.hh:533\n+Dune::Alberta::ElementInfo::el\n+Element * el() const\n+Definition: elementinfo.hh:737\n+Dune::AlbertaGridLevelProvider\n+Definition: level.hh:25\n+Dune::AlbertaGridLevelProvider::isNew\n+bool isNew(const Alberta::Element *element) const\n+Definition: level.hh:62\n+Dune::AlbertaGridLevelProvider::isNew\n+bool isNew(const ElementInfo &elementInfo) const\n+Definition: level.hh:68\n+Dune::AlbertaGridLevelProvider::MeshPointer\n+Alberta::MeshPointer< dim > MeshPointer\n+Definition: level.hh:48\n+Dune::AlbertaGridLevelProvider::mesh\n+MeshPointer mesh() const\n+Definition: level.hh:85\n+Dune::AlbertaGridLevelProvider::create\n+void create(const DofNumbering &dofNumbering)\n+Definition: level.hh:96\n+Dune::AlbertaGridLevelProvider::maxLevel\n+Level maxLevel() const\n+Definition: level.hh:73\n+Dune::AlbertaGridLevelProvider::DofNumbering\n+Alberta::HierarchyDofNumbering< dim > DofNumbering\n+Definition: level.hh:49\n+Dune::AlbertaGridLevelProvider::release\n+void release()\n+Definition: level.hh:109\n+Dune::AlbertaGridLevelProvider::operator()\n+Level operator()(const Alberta::Element *element) const\n+Definition: level.hh:51\n+Dune::AlbertaGridLevelProvider::markAllOld\n+void markAllOld()\n+Definition: level.hh:90\n+Dune::AlbertaGridLevelProvider::ElementInfo\n+Alberta::ElementInfo< dim > ElementInfo\n+Definition: level.hh:47\n+Dune::AlbertaGridLevelProvider::SetLocal\n+Definition: level.hh:127\n+Dune::AlbertaGridLevelProvider::SetLocal::SetLocal\n+SetLocal(const DofVectorPointer &level)\n+Definition: level.hh:132\n+Dune::AlbertaGridLevelProvider::CalcMaxLevel\n+Definition: level.hh:151\n+Dune::AlbertaGridLevelProvider::CalcMaxLevel::CalcMaxLevel\n+CalcMaxLevel()\n+Definition: level.hh:155\n+Dune::AlbertaGridLevelProvider::CalcMaxLevel::maxLevel\n+Level maxLevel() const\n+Definition: level.hh:169\n+Dune::AlbertaGridLevelProvider::Interpolation\n+Definition: level.hh:197\n+Dune::AlbertaGridLevelProvider::Interpolation::Patch\n+Alberta::Patch< dimension > Patch\n+Definition: level.hh:200\n+Dune::AlbertaGridLevelProvider::Interpolation::interpolateVector\n+static void interpolateVector(const DofVectorPointer &dofVector, const Patch\n+&patch)\n+Definition: level.hh:202\n+Dune::Alberta::FillFlags\n+Definition: misc.hh:231\n+Dune::Alberta::FillFlags::nothing\n+static const Flags nothing\n+Definition: misc.hh:234\n+Dune::Alberta::Patch\n+Definition: refinement.hh:40\n+Dune::Alberta::Patch::count\n+int count() const\n+Definition: refinement.hh:67\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00260_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00935_source.html", "comments": ["Files 26% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gridenums.hh Source File\n+dune-grid: entitykey.hh Source File\n \n \n \n \n \n \n \n@@ -58,153 +58,194 @@\n \n
    \n \n \n \n
    \n-
    gridenums.hh
    \n+
    entitykey.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_GRIDENUMS_HH
    \n-
    6#define DUNE_GRID_COMMON_GRIDENUMS_HH
    \n+
    5#ifndef DUNE_DGFEnTITYKEY_HH
    \n+
    6#define DUNE_DGFEnTITYKEY_HH
    \n
    7
    \n
    8#include <iostream>
    \n-
    9
    \n-
    10#include <dune/common/exceptions.hh>
    \n-
    11
    \n-
    12namespace Dune {
    \n-
    13
    \n-\n-\n-\n-\n-\n-\n-
    36 };
    \n-
    37
    \n-
    46 inline std::string PartitionName(PartitionType type)
    \n-
    47 {
    \n-
    48 switch(type) {
    \n-
    49 case InteriorEntity :
    \n-
    50 return "interior";
    \n-
    51 case BorderEntity :
    \n-
    52 return "border";
    \n-
    53 case OverlapEntity :
    \n-
    54 return "overlap";
    \n-
    55 case FrontEntity :
    \n-
    56 return "front";
    \n-
    57 case GhostEntity :
    \n-
    58 return "ghost";
    \n-
    59 default :
    \n-
    60 DUNE_THROW(NotImplemented, "name of unknown partition type requested");
    \n-
    61 }
    \n-
    62 }
    \n-
    63
    \n+
    9#include <vector>
    \n+
    10
    \n+\n+
    12
    \n+
    13namespace Dune
    \n+
    14{
    \n+
    15
    \n+
    16 // DGFEntityKey
    \n+
    17 // ------------
    \n+
    18
    \n+
    19 template< class A >
    \n+\n+
    21 {
    \n+
    22 DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey = true );
    \n+
    23 DGFEntityKey ( const std::vector< A > &key,
    \n+
    24 int N, int offset, bool setOrigKey = true );
    \n+\n+
    26
    \n+\n+
    28
    \n+
    29 inline const A &operator[] ( int i ) const;
    \n+
    30 inline bool operator < ( const DGFEntityKey< A > &k ) const;
    \n+
    31
    \n+
    32 void orientation ( int base, std :: vector< std :: vector< double > > &vtx );
    \n+
    33 void print( std :: ostream &out = std :: cerr ) const;
    \n+
    34
    \n+
    35 inline bool origKeySet () const;
    \n+
    36 inline const A &origKey ( int i ) const;
    \n+
    37 inline int size () const;
    \n+
    38
    \n+
    39 private:
    \n+
    40 std :: vector< A > key_, origKey_;
    \n+
    41 bool origKeySet_;
    \n+
    42 };
    \n+
    43
    \n+
    44
    \n+
    45 template< class A >
    \n+
    46 inline const A &DGFEntityKey< A > :: operator[] ( int i ) const
    \n+
    47 {
    \n+
    48 return key_[ i ];
    \n+
    49 }
    \n+
    50
    \n+
    51
    \n+
    52 template< class A >
    \n+\n+
    54 {
    \n+
    55 // assert(k.key_.size()==key_.size());
    \n+
    56 return key_ < k.key_;
    \n+
    57 }
    \n+
    58
    \n+
    59
    \n+
    60 template< class A >
    \n+\n+
    62 {
    \n+
    63 return origKeySet_;
    \n+
    64 }
    \n
    65
    \n-
    72 inline std::ostream &operator<< ( std::ostream &out, const PartitionType &type )
    \n-
    73 {
    \n-
    74 return out << PartitionName( type );
    \n-
    75 }
    \n-
    76
    \n-
    77
    \n-\n-\n-\n-\n-\n-\n-
    92 };
    \n-
    93
    \n-
    94
    \n-
    96
    \n-
    103 inline std::ostream &operator<< ( std::ostream &out, const InterfaceType &type )
    \n-
    104 {
    \n-
    105 switch( type )
    \n-
    106 {
    \n-\n-
    108 return out << "interior-border / interior-border interface";
    \n-
    109
    \n-\n-
    111 return out << "interior-border / all interface";
    \n-
    112
    \n-\n-
    114 return out << "overlap / overlap-front interface";
    \n-
    115
    \n-\n-
    117 return out << "overlap / all interface";
    \n-
    118
    \n-
    119 case All_All_Interface :
    \n-
    120 return out << "all / all interface";
    \n-
    121
    \n-
    122 default :
    \n-
    123 return out << "unknown interface";
    \n-
    124 }
    \n-
    125 }
    \n-
    126
    \n-
    127
    \n-\n-\n-\n-\n-\n-\n-\n-
    143 };
    \n-
    144
    \n-
    145
    \n-
    147
    \n-
    154 inline std::ostream &operator<< ( std::ostream &out, const PartitionIteratorType &type )
    \n-
    155 {
    \n-
    156 static std::string name[ 6 ] = { "interior partition", "interior-border partition", "overlap partition",
    \n-
    157 "overlap-front partition", "all partition", "ghost partition" };
    \n-
    158 return out << name[ type ];
    \n-
    159 }
    \n-
    160
    \n-
    161
    \n-\n-\n-\n-
    173 };
    \n-
    174
    \n-
    180}
    \n-
    181#endif
    \n-
    std::string PartitionName(PartitionType type)
    Provide names for the partition types.
    Definition: gridenums.hh:46
    \n-
    PartitionIteratorType
    Parameter to be used for the parallel level- and leaf iterators.
    Definition: gridenums.hh:136
    \n-
    std::ostream & operator<<(std::ostream &out, const PartitionType &type)
    write a PartitionType to a stream
    Definition: gridenums.hh:72
    \n-
    PartitionType
    Attributes used in the generic overlap model.
    Definition: gridenums.hh:30
    \n-
    CommunicationDirection
    Define a type for communication direction parameter.
    Definition: gridenums.hh:170
    \n-
    InterfaceType
    Parameter to be used for the communication functions.
    Definition: gridenums.hh:86
    \n-
    @ All_Partition
    all entities
    Definition: gridenums.hh:141
    \n-
    @ OverlapFront_Partition
    interior, border, overlap and front entities
    Definition: gridenums.hh:140
    \n-
    @ Interior_Partition
    only interior entities
    Definition: gridenums.hh:137
    \n-
    @ InteriorBorder_Partition
    interior and border entities
    Definition: gridenums.hh:138
    \n-
    @ Overlap_Partition
    interior, border, and overlap entities
    Definition: gridenums.hh:139
    \n-
    @ Ghost_Partition
    only ghost entities
    Definition: gridenums.hh:142
    \n-
    @ FrontEntity
    on boundary between overlap and ghost
    Definition: gridenums.hh:34
    \n-
    @ InteriorEntity
    all interior entities
    Definition: gridenums.hh:31
    \n-
    @ GhostEntity
    ghost entities
    Definition: gridenums.hh:35
    \n-
    @ BorderEntity
    on boundary between interior and overlap
    Definition: gridenums.hh:32
    \n-
    @ OverlapEntity
    all entities lying in the overlap zone
    Definition: gridenums.hh:33
    \n-
    @ BackwardCommunication
    reverse communication direction
    Definition: gridenums.hh:172
    \n-
    @ ForwardCommunication
    communicate as given in InterfaceType
    Definition: gridenums.hh:171
    \n-
    @ InteriorBorder_All_Interface
    send interior and border, receive all entities
    Definition: gridenums.hh:88
    \n-
    @ All_All_Interface
    send all and receive all entities
    Definition: gridenums.hh:91
    \n-
    @ Overlap_All_Interface
    send overlap, receive all entities
    Definition: gridenums.hh:90
    \n-
    @ Overlap_OverlapFront_Interface
    send overlap, receive overlap and front entities
    Definition: gridenums.hh:89
    \n-
    @ InteriorBorder_InteriorBorder_Interface
    send/receive interior and border entities
    Definition: gridenums.hh:87
    \n+
    66
    \n+
    67 template< class A >
    \n+
    68 inline const A &DGFEntityKey< A > :: origKey ( int i ) const
    \n+
    69 {
    \n+
    70 return origKey_[ i ];
    \n+
    71 }
    \n+
    72
    \n+
    73
    \n+
    74 template< class A >
    \n+
    75 inline int DGFEntityKey< A > :: size () const
    \n+
    76 {
    \n+
    77 return key_.size();
    \n+
    78 }
    \n+
    79
    \n+
    80
    \n+
    81
    \n+
    82 // ElementFaceUtil
    \n+
    83 // ---------------
    \n+
    84
    \n+\n+
    86 {
    \n+
    87 inline static int nofFaces ( int dim, const std::vector< unsigned int > &element );
    \n+
    88 inline static int faceSize ( int dim, bool simpl );
    \n+
    89
    \n+\n+
    91 generateFace ( int dim, const std::vector< unsigned int > &element, int f );
    \n+
    92
    \n+
    93 private:
    \n+
    94 template< int dim >
    \n+\n+
    96 generateCubeFace( const std::vector< unsigned int > &element, int f );
    \n+
    97
    \n+
    98 template< int dim >
    \n+\n+
    100 generateSimplexFace ( const std::vector< unsigned int > &element, int f );
    \n+
    101 };
    \n+
    102
    \n+
    103
    \n+
    104 inline int ElementFaceUtil::nofFaces ( int dim, const std::vector< unsigned int > &element )
    \n+
    105 {
    \n+
    106 switch( dim )
    \n+
    107 {
    \n+
    108 case 1 :
    \n+
    109 return 2;
    \n+
    110 case 2 :
    \n+
    111 switch( element.size() )
    \n+
    112 {
    \n+
    113 case 3 :
    \n+
    114 return 3;
    \n+
    115 case 4 :
    \n+
    116 return 4;
    \n+
    117 default :
    \n+
    118 return -1;
    \n+
    119 }
    \n+
    120 case 3 :
    \n+
    121 switch( element.size() )
    \n+
    122 {
    \n+
    123 case 4 :
    \n+
    124 return 4;
    \n+
    125 case 8 :
    \n+
    126 return 6;
    \n+
    127 default :
    \n+
    128 return -1;
    \n+
    129 }
    \n+
    130 default :
    \n+
    131 return -1;
    \n+
    132 }
    \n+
    133 }
    \n+
    134
    \n+
    135
    \n+
    136 inline int ElementFaceUtil::faceSize( int dim, bool simpl )
    \n+
    137 {
    \n+
    138 switch( dim )
    \n+
    139 {
    \n+
    140 case 1 :
    \n+
    141 return 1;
    \n+
    142 case 2 :
    \n+
    143 return 2;
    \n+
    144 case 3 :
    \n+
    145 return (simpl ? 3 : 4);
    \n+
    146 default :
    \n+
    147 return -1;
    \n+
    148 }
    \n+
    149 }
    \n+
    150
    \n+
    151} //end namespace Dune
    \n+
    152
    \n+
    153// inlcude inline implementation
    \n+
    154#include "entitykey_inline.hh"
    \n+
    155#endif
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n+
    Definition: entitykey.hh:21
    \n+
    bool operator<(const DGFEntityKey< A > &k) const
    Definition: entitykey.hh:53
    \n+
    DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)
    Definition: entitykey_inline.hh:64
    \n+
    bool origKeySet() const
    Definition: entitykey.hh:61
    \n+
    int size() const
    Definition: entitykey.hh:75
    \n+
    void orientation(int base, std ::vector< std ::vector< double > > &vtx)
    Definition: entitykey_inline.hh:78
    \n+
    const A & origKey(int i) const
    Definition: entitykey.hh:68
    \n+
    DGFEntityKey(const std::vector< A > &key, int N, int offset, bool setOrigKey=true)
    \n+
    void print(std ::ostream &out=std ::cerr) const
    Definition: entitykey_inline.hh:105
    \n+
    DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)
    Definition: entitykey_inline.hh:19
    \n+
    const A & operator[](int i) const
    Definition: entitykey.hh:46
    \n+
    Definition: entitykey.hh:86
    \n+
    static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector< unsigned int > &element, int f)
    Definition: entitykey_inline.hh:145
    \n+
    static int faceSize(int dim, bool simpl)
    Definition: entitykey.hh:136
    \n+
    static int nofFaces(int dim, const std::vector< unsigned int > &element)
    Definition: entitykey.hh:104
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,224 +4,225 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * common\n-gridenums.hh\n+ * io\n+ * file\n+ * dgfparser\n+entitykey.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_GRIDENUMS_HH\n- 6#define DUNE_GRID_COMMON_GRIDENUMS_HH\n+ 5#ifndef DUNE_DGFEnTITYKEY_HH\n+ 6#define DUNE_DGFEnTITYKEY_HH\n 7\n 8#include \n- 9\n- 10#include \n- 11\n- 12namespace Dune {\n- 13\n-30 enum PartitionType {\n-31 InteriorEntity=0,\n-32 BorderEntity=1 ,\n-33 OverlapEntity=2 ,\n-34 FrontEntity=3 ,\n- 35 GhostEntity=4\n-36 };\n- 37\n-46 inline std::string PartitionName(PartitionType type)\n+ 9#include \n+ 10\n+ 11#include \n+ 12\n+ 13namespace Dune\n+ 14{\n+ 15\n+ 16 // DGFEntityKey\n+ 17 // ------------\n+ 18\n+ 19 template< class A >\n+20 struct DGFEntityKey\n+ 21 {\n+ 22 DGFEntityKey ( const std :: vector< A > &key, bool setOrigKey = true );\n+23 DGFEntityKey ( const std::vector< A > &key,\n+ 24 int N, int offset, bool setOrigKey = true );\n+ 25 DGFEntityKey ( const DGFEntityKey<_A_> &k );\n+ 26\n+ 27 DGFEntityKey<_A_> &operator=( const DGFEntityKey<_A_> &k );\n+ 28\n+29 inline const A &operator[]( int i ) const;\n+30 inline bool operator_<( const DGFEntityKey<_A_> &k ) const;\n+ 31\n+ 32 void orientation ( int base, std :: vector< std :: vector< double > > &vtx\n+);\n+ 33 void print( std :: ostream &out = std :: cerr ) const;\n+ 34\n+35 inline bool origKeySet () const;\n+36 inline const A &origKey ( int i ) const;\n+37 inline int size () const;\n+ 38\n+ 39 private:\n+ 40 std :: vector< A > key_, origKey_;\n+ 41 bool origKeySet_;\n+ 42 };\n+ 43\n+ 44\n+ 45 template< class A >\n+46 inline const A &DGFEntityKey<_A_>_::_operator[]( int i ) const\n 47 {\n- 48 switch(type) {\n- 49 case InteriorEntity :\n- 50 return \"interior\";\n- 51 case BorderEntity :\n- 52 return \"border\";\n- 53 case OverlapEntity :\n- 54 return \"overlap\";\n- 55 case FrontEntity :\n- 56 return \"front\";\n- 57 case GhostEntity :\n- 58 return \"ghost\";\n- 59 default :\n- 60 DUNE_THROW(NotImplemented, \"name of unknown partition type requested\");\n- 61 }\n- 62 }\n- 63\n+ 48 return key_[ i ];\n+ 49 }\n+ 50\n+ 51\n+ 52 template< class A >\n+53 inline bool DGFEntityKey<_A_>_::_operator<( const DGFEntityKey<_A_> &k )\n+const\n+ 54 {\n+ 55 // assert(k.key_.size()==key_.size());\n+ 56 return key_ < k.key_;\n+ 57 }\n+ 58\n+ 59\n+ 60 template< class A >\n+61 inline bool DGFEntityKey<_A_>_::_origKeySet () const\n+ 62 {\n+ 63 return origKeySet_;\n+ 64 }\n 65\n-72 inline std::ostream &operator<<( std::ostream &out, const PartitionType\n-&type )\n- 73 {\n- 74 return out << PartitionName( type );\n- 75 }\n- 76\n- 77\n-86 enum InterfaceType {\n-87 InteriorBorder_InteriorBorder_Interface=0,\n-88 InteriorBorder_All_Interface=1,\n-89 Overlap_OverlapFront_Interface=2,\n-90 Overlap_All_Interface=3,\n- 91 All_All_Interface=4\n-92 };\n- 93\n- 94\n- 96\n-103 inline std::ostream &operator<<( std::ostream &out, const InterfaceType\n-&type )\n- 104 {\n- 105 switch( type )\n- 106 {\n- 107 case InteriorBorder_InteriorBorder_Interface :\n- 108 return out << \"interior-border / interior-border interface\";\n- 109\n- 110 case InteriorBorder_All_Interface :\n- 111 return out << \"interior-border / all interface\";\n- 112\n- 113 case Overlap_OverlapFront_Interface :\n- 114 return out << \"overlap / overlap-front interface\";\n- 115\n- 116 case Overlap_All_Interface :\n- 117 return out << \"overlap / all interface\";\n- 118\n- 119 case All_All_Interface :\n- 120 return out << \"all / all interface\";\n- 121\n- 122 default :\n- 123 return out << \"unknown interface\";\n- 124 }\n- 125 }\n- 126\n- 127\n-136 enum PartitionIteratorType {\n-137 Interior_Partition=0,\n-138 InteriorBorder_Partition=1,\n-139 Overlap_Partition=2,\n-140 OverlapFront_Partition=3,\n-141 All_Partition=4,\n- 142 Ghost_Partition=5\n-143 };\n- 144\n- 145\n- 147\n-154 inline std::ostream &operator<<( std::ostream &out, const\n-PartitionIteratorType &type )\n- 155 {\n- 156 static std::string name[ 6 ] = { \"interior partition\", \"interior-border\n-partition\", \"overlap partition\",\n- 157 \"overlap-front partition\", \"all partition\", \"ghost partition\" };\n- 158 return out << name[ type ];\n- 159 }\n- 160\n- 161\n-170 enum CommunicationDirection {\n-171 ForwardCommunication,\n- 172 BackwardCommunication\n-173 };\n- 174\n- 180}\n- 181#endif\n-Dune::PartitionName\n-std::string PartitionName(PartitionType type)\n-Provide names for the partition types.\n-Definition: gridenums.hh:46\n-Dune::PartitionIteratorType\n-PartitionIteratorType\n-Parameter to be used for the parallel level- and leaf iterators.\n-Definition: gridenums.hh:136\n-Dune::operator<<\n-std::ostream & operator<<(std::ostream &out, const PartitionType &type)\n-write a PartitionType to a stream\n-Definition: gridenums.hh:72\n-Dune::PartitionType\n-PartitionType\n-Attributes used in the generic overlap model.\n-Definition: gridenums.hh:30\n-Dune::CommunicationDirection\n-CommunicationDirection\n-Define a type for communication direction parameter.\n-Definition: gridenums.hh:170\n-Dune::InterfaceType\n-InterfaceType\n-Parameter to be used for the communication functions.\n-Definition: gridenums.hh:86\n-Dune::All_Partition\n-@ All_Partition\n-all entities\n-Definition: gridenums.hh:141\n-Dune::OverlapFront_Partition\n-@ OverlapFront_Partition\n-interior, border, overlap and front entities\n-Definition: gridenums.hh:140\n-Dune::Interior_Partition\n-@ Interior_Partition\n-only interior entities\n-Definition: gridenums.hh:137\n-Dune::InteriorBorder_Partition\n-@ InteriorBorder_Partition\n-interior and border entities\n-Definition: gridenums.hh:138\n-Dune::Overlap_Partition\n-@ Overlap_Partition\n-interior, border, and overlap entities\n-Definition: gridenums.hh:139\n-Dune::Ghost_Partition\n-@ Ghost_Partition\n-only ghost entities\n-Definition: gridenums.hh:142\n-Dune::FrontEntity\n-@ FrontEntity\n-on boundary between overlap and ghost\n-Definition: gridenums.hh:34\n-Dune::InteriorEntity\n-@ InteriorEntity\n-all interior entities\n-Definition: gridenums.hh:31\n-Dune::GhostEntity\n-@ GhostEntity\n-ghost entities\n-Definition: gridenums.hh:35\n-Dune::BorderEntity\n-@ BorderEntity\n-on boundary between interior and overlap\n-Definition: gridenums.hh:32\n-Dune::OverlapEntity\n-@ OverlapEntity\n-all entities lying in the overlap zone\n-Definition: gridenums.hh:33\n-Dune::BackwardCommunication\n-@ BackwardCommunication\n-reverse communication direction\n-Definition: gridenums.hh:172\n-Dune::ForwardCommunication\n-@ ForwardCommunication\n-communicate as given in InterfaceType\n-Definition: gridenums.hh:171\n-Dune::InteriorBorder_All_Interface\n-@ InteriorBorder_All_Interface\n-send interior and border, receive all entities\n-Definition: gridenums.hh:88\n-Dune::All_All_Interface\n-@ All_All_Interface\n-send all and receive all entities\n-Definition: gridenums.hh:91\n-Dune::Overlap_All_Interface\n-@ Overlap_All_Interface\n-send overlap, receive all entities\n-Definition: gridenums.hh:90\n-Dune::Overlap_OverlapFront_Interface\n-@ Overlap_OverlapFront_Interface\n-send overlap, receive overlap and front entities\n-Definition: gridenums.hh:89\n-Dune::InteriorBorder_InteriorBorder_Interface\n-@ InteriorBorder_InteriorBorder_Interface\n-send/receive interior and border entities\n-Definition: gridenums.hh:87\n+ 66\n+ 67 template< class A >\n+68 inline const A &DGFEntityKey<_A_>_::_origKey ( int i ) const\n+ 69 {\n+ 70 return origKey_[ i ];\n+ 71 }\n+ 72\n+ 73\n+ 74 template< class A >\n+75 inline int DGFEntityKey<_A_>_::_size () const\n+ 76 {\n+ 77 return key_.size();\n+ 78 }\n+ 79\n+ 80\n+ 81\n+ 82 // ElementFaceUtil\n+ 83 // ---------------\n+ 84\n+85 struct ElementFaceUtil\n+ 86 {\n+ 87 inline static int nofFaces ( int dim, const std::vector< unsigned int >\n+&element );\n+ 88 inline static int faceSize ( int dim, bool simpl );\n+ 89\n+ 90 static DGFEntityKey<_unsigned_int_>\n+ 91 generateFace ( int dim, const std::vector< unsigned int > &element, int f\n+);\n+ 92\n+ 93 private:\n+ 94 template< int dim >\n+ 95 static DGFEntityKey<_unsigned_int_>\n+ 96 generateCubeFace( const std::vector< unsigned int > &element, int f );\n+ 97\n+ 98 template< int dim >\n+ 99 static DGFEntityKey<_unsigned_int_>\n+ 100 generateSimplexFace ( const std::vector< unsigned int > &element, int f );\n+ 101 };\n+ 102\n+ 103\n+104 inline int ElementFaceUtil::nofFaces ( int dim, const std::vector< unsigned\n+int > &element )\n+ 105 {\n+ 106 switch( dim )\n+ 107 {\n+ 108 case 1 :\n+ 109 return 2;\n+ 110 case 2 :\n+ 111 switch( element.size() )\n+ 112 {\n+ 113 case 3 :\n+ 114 return 3;\n+ 115 case 4 :\n+ 116 return 4;\n+ 117 default :\n+ 118 return -1;\n+ 119 }\n+ 120 case 3 :\n+ 121 switch( element.size() )\n+ 122 {\n+ 123 case 4 :\n+ 124 return 4;\n+ 125 case 8 :\n+ 126 return 6;\n+ 127 default :\n+ 128 return -1;\n+ 129 }\n+ 130 default :\n+ 131 return -1;\n+ 132 }\n+ 133 }\n+ 134\n+ 135\n+136 inline int ElementFaceUtil::faceSize( int dim, bool simpl )\n+ 137 {\n+ 138 switch( dim )\n+ 139 {\n+ 140 case 1 :\n+ 141 return 1;\n+ 142 case 2 :\n+ 143 return 2;\n+ 144 case 3 :\n+ 145 return (simpl ? 3 : 4);\n+ 146 default :\n+ 147 return -1;\n+ 148 }\n+ 149 }\n+ 150\n+ 151} //end namespace Dune\n+ 152\n+ 153// inlcude inline implementation\n+ 154#include \"entitykey_inline.hh\"\n+ 155#endif\n+dgfexception.hh\n+entitykey_inline.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n+Dune::DGFEntityKey\n+Definition: entitykey.hh:21\n+Dune::DGFEntityKey::operator<\n+bool operator<(const DGFEntityKey< A > &k) const\n+Definition: entitykey.hh:53\n+Dune::DGFEntityKey::operator=\n+DGFEntityKey< A > & operator=(const DGFEntityKey< A > &k)\n+Definition: entitykey_inline.hh:64\n+Dune::DGFEntityKey::origKeySet\n+bool origKeySet() const\n+Definition: entitykey.hh:61\n+Dune::DGFEntityKey::size\n+int size() const\n+Definition: entitykey.hh:75\n+Dune::DGFEntityKey::orientation\n+void orientation(int base, std ::vector< std ::vector< double > > &vtx)\n+Definition: entitykey_inline.hh:78\n+Dune::DGFEntityKey::origKey\n+const A & origKey(int i) const\n+Definition: entitykey.hh:68\n+Dune::DGFEntityKey::DGFEntityKey\n+DGFEntityKey(const std::vector< A > &key, int N, int offset, bool\n+setOrigKey=true)\n+Dune::DGFEntityKey::print\n+void print(std ::ostream &out=std ::cerr) const\n+Definition: entitykey_inline.hh:105\n+Dune::DGFEntityKey::DGFEntityKey\n+DGFEntityKey(const std ::vector< A > &key, bool setOrigKey=true)\n+Definition: entitykey_inline.hh:19\n+Dune::DGFEntityKey::operator[]\n+const A & operator[](int i) const\n+Definition: entitykey.hh:46\n+Dune::ElementFaceUtil\n+Definition: entitykey.hh:86\n+Dune::ElementFaceUtil::generateFace\n+static DGFEntityKey< unsigned int > generateFace(int dim, const std::vector<\n+unsigned int > &element, int f)\n+Definition: entitykey_inline.hh:145\n+Dune::ElementFaceUtil::faceSize\n+static int faceSize(int dim, bool simpl)\n+Definition: entitykey.hh:136\n+Dune::ElementFaceUtil::nofFaces\n+static int nofFaces(int dim, const std::vector< unsigned int > &element)\n+Definition: entitykey.hh:104\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00269.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00329.html", "comments": ["Files 2% similar despite different names"], "unified_diff": "@@ -72,19 +72,19 @@\n
    boundaryprojection.hh File Reference
    \n
    \n
    \n
    #include <cmath>
    \n #include <memory>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/geometry/multilineargeometry.hh>
    \n-#include <dune/grid/common/boundarysegment.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n-#include <dune/grid/io/file/gmshreader.hh>
    \n+#include <dune/grid/common/boundarysegment.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/grid/io/file/gmshreader.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00269_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00329_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n
    boundaryprojection.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_COMMON_BOUNDARYPROJECTION_HH
    \n
    6#define DUNE_GRID_COMMON_BOUNDARYPROJECTION_HH
    \n
    7
    \n
    8//- system includes
    \n@@ -81,17 +81,17 @@\n
    10#include <memory>
    \n
    11
    \n
    12//- Dune includes
    \n
    13#include <dune/common/fvector.hh>
    \n
    14
    \n
    15#include <dune/geometry/multilineargeometry.hh>
    \n
    16
    \n-\n-\n-\n+\n+\n+\n
    20
    \n
    21namespace Dune
    \n
    22{
    \n
    25 template <int dimworld>
    \n
    26 struct DuneBoundaryProjection;
    \n
    27
    \n
    30 template <int dimworld>
    \n@@ -305,17 +305,17 @@\n
    262 protected:
    \n
    264 const double radius_;
    \n
    265 };
    \n
    266
    \n
    267} // end namespace
    \n
    268
    \n
    269#endif // #ifndef DUNE_GRID_COMMON_BOUNDARYPROJECTION_HH
    \n-
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n-
    Base class for grid boundary segments of arbitrary geometry.
    \n-\n+
    Describes the parallel communication interface class for MessageBuffers and DataHandles.
    \n+
    Base class for grid boundary segments of arbitrary geometry.
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Interface class for vertex projection at the boundary.
    Definition: boundaryprojection.hh:33
    \n
    DuneBoundaryProjection< dimworld > ThisType
    Definition: boundaryprojection.hh:34
    \n
    virtual void backup(ObjectStreamType &buffer) const
    write DuneBoundaryProjection's data to stream buffer
    Definition: boundaryprojection.hh:52
    \n
    static std::unique_ptr< ThisType > restoreFromBuffer(MessageBufferIF< BufferImp > &buffer)
    Definition: boundaryprojection.hh:85
    \n
    virtual CoordinateType operator()(const CoordinateType &global) const =0
    projection operator projection a global coordinate
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00272.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00296.html", "comments": ["Files 1% similar despite different names"], "unified_diff": "@@ -81,17 +81,17 @@\n #include <iostream>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/common/rangeutilities.hh>
    \n #include <dune/geometry/dimension.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n #include <dune/geometry/type.hh>
    \n #include <dune/geometry/typeindex.hh>
    \n-#include "mapper.hh"
    \n+#include "mapper.hh"
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n

    \n Classes

    struct  Dune::DuneBoundaryProjection< dimworld >
     Interface class for vertex projection at the boundary. More...
     
    class  Dune::BoundaryProjectionWrapper< dimworld >
    \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00272_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00296_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n
    mcmgmapper.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n
    6#ifndef DUNE_GRID_COMMON_MCMGMAPPER_HH
    \n
    7#define DUNE_GRID_COMMON_MCMGMAPPER_HH
    \n
    8
    \n@@ -83,15 +83,15 @@\n
    12#include <dune/common/exceptions.hh>
    \n
    13#include <dune/common/rangeutilities.hh>
    \n
    14#include <dune/geometry/dimension.hh>
    \n
    15#include <dune/geometry/referenceelements.hh>
    \n
    16#include <dune/geometry/type.hh>
    \n
    17#include <dune/geometry/typeindex.hh>
    \n
    18
    \n-
    19#include "mapper.hh"
    \n+
    19#include "mapper.hh"
    \n
    20
    \n
    27namespace Dune
    \n
    28{
    \n
    36 //
    \n
    37 // Common Layout templates
    \n
    38 //
    \n
    39
    \n@@ -350,15 +350,15 @@\n
    470 private:
    \n
    471 const G* gridPtr_;
    \n
    472 int level_;
    \n
    473 };
    \n
    474
    \n
    476}
    \n
    477#endif
    \n-
    Provides classes with basic mappers which are used to attach data to a grid.
    \n+
    Provides classes with basic mappers which are used to attach data to a grid.
    \n
    Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
    leaf grid view for the given grid
    Definition: common/grid.hh:819
    \n
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n
    MCMGLayout mcmgLayout(Codim< codim >)
    layout for entities of codimension codim
    Definition: mcmgmapper.hh:72
    \n
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n
    std::function< size_t(GeometryType, int)> MCMGLayout
    layout function for MultipleCodimMultipleGeomTypeMapper
    Definition: mcmgmapper.hh:64
    \n
    MCMGLayout mcmgVertexLayout()
    layout for vertices (dim-0 entities)
    Definition: mcmgmapper.hh:107
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00305.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00578.html", "comments": ["Files 7% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundarysegment.hh File Reference\n+dune-grid: idset.hh File Reference\n \n \n \n \n \n \n \n@@ -58,51 +58,42 @@\n \n
    \n \n \n
    \n
    \n \n-
    boundarysegment.hh File Reference
    \n+
    idset.hh File Reference
    \n
    \n
    \n-\n-

    Base class for grid boundary segments of arbitrary geometry. \n-More...

    \n-
    #include <map>
    \n-#include <sstream>
    \n-#include <dune/common/singleton.hh>
    \n-#include <dune/common/parameterizedobject.hh>
    \n-#include <dune/common/fvector.hh>
    \n+\n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::MultipleCodimMultipleGeomTypeMapper< GV >
     Implementation class for a multiple codim and multiple geometry type mapper. More...
     
    class  Dune::LeafMultipleCodimMultipleGeomTypeMapper< G >
    \n \n-\n-\n-\n-\n+\n \n

    \n Classes

    class  Dune::BoundarySegmentBackupRestore< BndSeg >
     
    struct  Dune::BoundarySegment< dim, dimworld, ctype >
     Base class for classes implementing geometries of boundary segments. More...
    class  Dune::GeoGrid::IdSet< Grid, HostIdSet >
     
    \n \n \n \n \n+\n+\n+\n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    namespace  Dune::GeoGrid
     namespace containing the implementations of GeometryGrid
     
    \n-

    Detailed Description

    \n-

    Base class for grid boundary segments of arbitrary geometry.

    \n-
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,33 +4,25 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * common\n+ * geometrygrid\n Classes | Namespaces\n-boundarysegment.hh File Reference\n-Base class for grid boundary segments of arbitrary geometry. More...\n-#include \n-#include \n-#include \n-#include \n-#include \n+idset.hh File Reference\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n- class \u00a0Dune::BoundarySegmentBackupRestore<_BndSeg_>\n-\u00a0\n-struct \u00a0Dune::BoundarySegment<_dim,_dimworld,_ctype_>\n-\u00a0 Base class for classes implementing geometries of boundary segments.\n- More...\n+class \u00a0Dune::GeoGrid::IdSet<_Grid,_HostIdSet_>\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-***** Detailed Description *****\n-Base class for grid boundary segments of arbitrary geometry.\n+namespace \u00a0Dune::GeoGrid\n+\u00a0 namespace containing the implementations of GeometryGrid\n+\u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00305_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00905_source.html", "comments": ["Files 8% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: boundarysegment.hh Source File\n+dune-grid: gridparameter.hh Source File\n \n \n \n \n \n \n \n@@ -58,124 +58,124 @@\n \n \n \n \n \n
    \n-
    boundarysegment.hh
    \n+
    gridparameter.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
    \n-
    6#define DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH
    \n+
    5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH
    \n+
    6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH
    \n
    7
    \n-
    8#include <map>
    \n-
    9#include <sstream>
    \n+
    8#include <iostream>
    \n+
    9#include <string>
    \n
    10
    \n-
    11#include <dune/common/singleton.hh>
    \n-
    12#include <dune/common/parameterizedobject.hh>
    \n-
    13#include <dune/common/fvector.hh>
    \n-
    14
    \n-
    19namespace Dune {
    \n-
    20
    \n-
    36 template< int dim, int dimworld = dim, class ctype = double >
    \n-
    37 struct BoundarySegment;
    \n+\n+
    12
    \n+
    13
    \n+
    14namespace Dune
    \n+
    15{
    \n+
    16
    \n+
    17 namespace dgf
    \n+
    18 {
    \n+\n+
    34 : public BasicBlock
    \n+
    35 {
    \n+
    36 public:
    \n+
    37 typedef unsigned int Flags;
    \n
    38
    \n-
    39 template <class BndSeg>
    \n-\n-
    41 {
    \n-
    42 public:
    \n-
    43 // type of object stream used for storing boundary segment information
    \n-
    44 typedef std::stringstream ObjectStreamType ;
    \n-
    45
    \n-
    46 protected:
    \n-
    48 typedef BndSeg BoundarySegment;
    \n-
    49
    \n-
    51 typedef Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment > ( ObjectStreamType& ), int > FactoryType;
    \n+
    39 static const Flags foundName = 1 << 0;
    \n+
    40 static const Flags foundDumpFileName = 1 << 1;
    \n+
    41 static const Flags foundLongestEdge = 1 << 5;
    \n+
    42
    \n+
    43 protected:
    \n+
    44 Flags foundFlags_; // supportFlags, this block was created with
    \n+
    45 std::string name_; // name of the grid
    \n+
    46 std::string dumpFileName_; // name of the grid
    \n+
    47 bool markLongestEdge_; // Mark longest edge for AlbertaGrid
    \n+
    48
    \n+
    49 private:
    \n+
    50 // copy not implemented
    \n+\n
    52
    \n-
    59 static std::unique_ptr< BoundarySegment > restore( ObjectStreamType& in )
    \n-
    60 {
    \n-
    61 int key = -1;
    \n-
    62 // read class key for restore
    \n-
    63 in.read( (char *) &key, sizeof( int ) );
    \n-
    64
    \n-
    65 // factory creates a unique_ptr which can be released later on
    \n-
    66 return factory().create( key, in );
    \n-
    67 }
    \n-
    68
    \n-
    69 template <class DerivedType>
    \n-
    70 static int registerFactory()
    \n-
    71 {
    \n-
    72 const int key = createKey();
    \n-
    73 // create factory method that produces unique_ptr
    \n-
    74 factory().template define< DerivedType >( key );
    \n-
    75 // return key for storage in derived class
    \n-
    76 return key;
    \n-
    77 }
    \n-
    78
    \n-
    79 private:
    \n-
    80 static int createKey()
    \n-
    81 {
    \n-
    82 static int key = 0;
    \n-
    83 return key++;
    \n-
    84 }
    \n-
    85
    \n-
    86 static FactoryType& factory()
    \n-
    87 {
    \n-
    88 return Dune::Singleton< FactoryType > :: instance();
    \n-
    89 }
    \n-
    90 };
    \n-
    91
    \n-
    92 template< int dim, int dimworld, class ctype >
    \n-
    93 struct BoundarySegment : public BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > >
    \n-
    94 {
    \n-\n-\n+
    53 public:
    \n+
    55 GridParameterBlock ( std::istream &in );
    \n+
    56
    \n+
    58 const std::string &name ( const std::string &defaultValue ) const
    \n+
    59 {
    \n+
    60 if( (foundFlags_ & foundName) == 0 )
    \n+
    61 {
    \n+
    62 dwarn << "GridParameterBlock: Parameter 'name' not specified, "
    \n+
    63 << "defaulting to '" << defaultValue << "'." << std::endl;
    \n+
    64 return defaultValue;
    \n+
    65 }
    \n+
    66 else
    \n+
    67 return name_;
    \n+
    68 }
    \n+
    69
    \n+
    70 const std::string &dumpFileName ( ) const
    \n+
    71 {
    \n+
    72 if( (foundFlags_ & foundDumpFileName) != 0 )
    \n+
    73 {
    \n+
    74 dwarn << "GridParameterBlock: found Parameter 'dumpfilename', "
    \n+
    75 << "dumping file to `" << dumpFileName_ << "'" << std::endl;
    \n+
    76 }
    \n+
    77 return dumpFileName_;
    \n+
    78 }
    \n+
    79
    \n+
    81 bool markLongestEdge () const
    \n+
    82 {
    \n+
    83 if( (foundFlags_ & foundLongestEdge) == 0 )
    \n+
    84 {
    \n+
    85 dwarn << "GridParameterBlock: Parameter 'refinementedge' not specified, "
    \n+
    86 << "defaulting to 'ARBITRARY'." << std::endl;
    \n+
    87 }
    \n+
    88 return markLongestEdge_;
    \n+
    89 }
    \n+
    90
    \n+
    91 // some information
    \n+
    92 bool ok()
    \n+
    93 {
    \n+
    94 return true;
    \n+
    95 }
    \n+
    96 };
    \n
    97
    \n-\n-
    99
    \n-
    100 using BaseType :: restore;
    \n-\n+
    98
    \n+
    99 } // end namespace dgf
    \n+
    100
    \n+
    101} // end namespace Dune
    \n
    102
    \n-
    104 virtual ~BoundarySegment() {}
    \n-
    105
    \n-
    108 virtual FieldVector< ctype, dimworld >
    \n-
    109 operator() ( const FieldVector< ctype, dim-1> &local ) const = 0;
    \n-
    110
    \n-
    114 virtual void backup( [[maybe_unused]] ObjectStreamType& buffer ) const
    \n-
    115 {
    \n-
    116 DUNE_THROW(NotImplemented,"BoundarySegment::backup needs to be overloaded!");
    \n-
    117 }
    \n-
    118 };
    \n-
    119
    \n-
    120
    \n-
    121} // end namespace Dune
    \n-
    122
    \n-
    123#endif
    \n+
    103#endif
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    BaseType::ObjectStreamType ObjectStreamType
    Definition: boundarysegment.hh:98
    \n-
    BoundarySegment< dim, dimworld, ctype > ThisType
    Definition: boundarysegment.hh:95
    \n-
    virtual void backup(ObjectStreamType &buffer) const
    write BoundarySegment's data to stream buffer
    Definition: boundarysegment.hh:114
    \n-
    BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > > BaseType
    Definition: boundarysegment.hh:96
    \n-
    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.
    \n-
    virtual ~BoundarySegment()
    Dummy virtual destructor.
    Definition: boundarysegment.hh:104
    \n-
    Definition: boundarysegment.hh:41
    \n-
    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
    \n-
    Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment >(ObjectStreamType &), int > FactoryType
    type of factory creating a unique_ptr from an ObjectStreamType
    Definition: boundarysegment.hh:51
    \n-
    BndSeg BoundarySegment
    type of BoundarySegment interface class
    Definition: boundarysegment.hh:48
    \n-
    std::stringstream ObjectStreamType
    Definition: boundarysegment.hh:44
    \n-
    static int registerFactory()
    Definition: boundarysegment.hh:70
    \n+
    Definition: basic.hh:31
    \n+
    Common Grid parameters.
    Definition: gridparameter.hh:35
    \n+
    static const Flags foundDumpFileName
    Definition: gridparameter.hh:40
    \n+
    const std::string & dumpFileName() const
    Definition: gridparameter.hh:70
    \n+
    static const Flags foundName
    Definition: gridparameter.hh:39
    \n+
    GridParameterBlock(std::istream &in)
    constructor: read commmon parameters
    \n+
    unsigned int Flags
    Definition: gridparameter.hh:37
    \n+
    std::string dumpFileName_
    Definition: gridparameter.hh:46
    \n+
    bool ok()
    Definition: gridparameter.hh:92
    \n+
    Flags foundFlags_
    Definition: gridparameter.hh:44
    \n+
    const std::string & name(const std::string &defaultValue) const
    return the name of the grid
    Definition: gridparameter.hh:58
    \n+
    std::string name_
    Definition: gridparameter.hh:45
    \n+
    bool markLongestEdge() const
    returns true if longest edge should be marked for AlbertaGrid
    Definition: gridparameter.hh:81
    \n+
    static const Flags foundLongestEdge
    Definition: gridparameter.hh:41
    \n+
    bool markLongestEdge_
    Definition: gridparameter.hh:47
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,156 +4,153 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * common\n-boundarysegment.hh\n+ * io\n+ * file\n+ * dgfparser\n+ * blocks\n+gridparameter.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH\n- 6#define DUNE_GRID_COMMON_BOUNDARY_SEGMENT_HH\n+ 5#ifndef DUNE_DGF_GRIDPARAMETERBLOCK_HH\n+ 6#define DUNE_DGF_GRIDPARAMETERBLOCK_HH\n 7\n- 8#include \n- 9#include \n+ 8#include \n+ 9#include \n 10\n- 11#include \n- 12#include \n- 13#include \n- 14\n- 19namespace Dune {\n- 20\n- 36 template< int dim, int dimworld = dim, class ctype = double >\n- 37 struct BoundarySegment;\n+ 11#include \n+ 12\n+ 13\n+ 14namespace Dune\n+ 15{\n+ 16\n+ 17 namespace dgf\n+ 18 {\n+33 class GridParameterBlock\n+ 34 : public BasicBlock\n+ 35 {\n+ 36 public:\n+37 typedef unsigned int Flags;\n 38\n- 39 template \n-40 class BoundarySegmentBackupRestore\n- 41 {\n- 42 public:\n- 43 // type of object stream used for storing boundary segment information\n-44 typedef std::stringstream ObjectStreamType ;\n- 45\n- 46 protected:\n-48 typedef BndSeg BoundarySegment;\n- 49\n-51 typedef Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment >\n-( ObjectStreamType& ), int > FactoryType;\n+39 static const Flags foundName = 1 << 0;\n+40 static const Flags foundDumpFileName = 1 << 1;\n+41 static const Flags foundLongestEdge = 1 << 5;\n+ 42\n+ 43 protected:\n+44 Flags foundFlags_; // supportFlags, this block was created with\n+45 std::string name_; // name of the grid\n+46 std::string dumpFileName_; // name of the grid\n+47 bool markLongestEdge_; // Mark longest edge for AlbertaGrid\n+ 48\n+ 49 private:\n+ 50 // copy not implemented\n+ 51 GridParameterBlock(const GridParameterBlock&);\n 52\n-59 static std::unique_ptr< BoundarySegment > restore( ObjectStreamType& in )\n- 60 {\n- 61 int key = -1;\n- 62 // read class key for restore\n- 63 in.read( (char *) &key, sizeof( int ) );\n- 64\n- 65 // factory creates a unique_ptr which can be released later on\n- 66 return factory().create( key, in );\n- 67 }\n- 68\n- 69 template \n-70 static int registerFactory()\n+ 53 public:\n+55 GridParameterBlock ( std::istream &in );\n+ 56\n+58 const std::string &name ( const std::string &defaultValue ) const\n+ 59 {\n+ 60 if( (foundFlags_ & foundName) == 0 )\n+ 61 {\n+ 62 dwarn << \"GridParameterBlock: Parameter 'name' not specified, \"\n+ 63 << \"defaulting to '\" << defaultValue << \"'.\" << std::endl;\n+ 64 return defaultValue;\n+ 65 }\n+ 66 else\n+ 67 return name_;\n+ 68 }\n+ 69\n+70 const std::string &dumpFileName ( ) const\n 71 {\n- 72 const int key = createKey();\n- 73 // create factory method that produces unique_ptr\n- 74 factory().template define< DerivedType >( key );\n- 75 // return key for storage in derived class\n- 76 return key;\n- 77 }\n- 78\n- 79 private:\n- 80 static int createKey()\n- 81 {\n- 82 static int key = 0;\n- 83 return key++;\n- 84 }\n- 85\n- 86 static FactoryType& factory()\n- 87 {\n- 88 return Dune::Singleton< FactoryType > :: instance();\n+ 72 if( (foundFlags_ & foundDumpFileName) != 0 )\n+ 73 {\n+ 74 dwarn << \"GridParameterBlock: found Parameter 'dumpfilename', \"\n+ 75 << \"dumping file to `\" << dumpFileName_ << \"'\" << std::endl;\n+ 76 }\n+ 77 return dumpFileName_;\n+ 78 }\n+ 79\n+81 bool markLongestEdge () const\n+ 82 {\n+ 83 if( (foundFlags_ & foundLongestEdge) == 0 )\n+ 84 {\n+ 85 dwarn << \"GridParameterBlock: Parameter 'refinementedge' not specified, \"\n+ 86 << \"defaulting to 'ARBITRARY'.\" << std::endl;\n+ 87 }\n+ 88 return markLongestEdge_;\n 89 }\n- 90 };\n- 91\n- 92 template< int dim, int dimworld, class ctype >\n-93 struct BoundarySegment : public BoundarySegmentBackupRestore<\n-BoundarySegment< dim, dimworld, ctype > >\n- 94 {\n-95 typedef BoundarySegment<_dim,_dimworld,_ctype_> ThisType;\n-96 typedef BoundarySegmentBackupRestore<_BoundarySegment<_dim,_dimworld,_ctype\n-> > BaseType;\n+ 90\n+ 91 // some information\n+92 bool ok()\n+ 93 {\n+ 94 return true;\n+ 95 }\n+ 96 };\n 97\n-98 typedef typename BaseType_::_ObjectStreamType ObjectStreamType;\n- 99\n- 100 using BaseType ::_restore;\n- 101 using BaseType ::_registerFactory;\n+ 98\n+ 99 } // end namespace dgf\n+ 100\n+ 101} // end namespace Dune\n 102\n-104 virtual ~BoundarySegment() {}\n- 105\n- 108 virtual FieldVector< ctype, dimworld >\n-109 operator()( const FieldVector< ctype, dim-1> &local ) const = 0;\n- 110\n-114 virtual void backup( [[maybe_unused]] ObjectStreamType& buffer ) const\n- 115 {\n- 116 DUNE_THROW(NotImplemented,\"BoundarySegment::backup needs to be\n-overloaded!\");\n- 117 }\n- 118 };\n- 119\n- 120\n- 121} // end namespace Dune\n- 122\n- 123#endif\n+ 103#endif\n+basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::BoundarySegment::ObjectStreamType\n-BaseType::ObjectStreamType ObjectStreamType\n-Definition: boundarysegment.hh:98\n-Dune::BoundarySegment::ThisType\n-BoundarySegment< dim, dimworld, ctype > ThisType\n-Definition: boundarysegment.hh:95\n-Dune::BoundarySegment::backup\n-virtual void backup(ObjectStreamType &buffer) const\n-write BoundarySegment's data to stream buffer\n-Definition: boundarysegment.hh:114\n-Dune::BoundarySegment::BaseType\n-BoundarySegmentBackupRestore< BoundarySegment< dim, dimworld, ctype > >\n-BaseType\n-Definition: boundarysegment.hh:96\n-Dune::BoundarySegment::operator()\n-virtual FieldVector< ctype, dimworld > operator()(const FieldVector< ctype,\n-dim-1 > &local) const =0\n-A function mapping local coordinates on a boundary segment to world\n-coordinates.\n-Dune::BoundarySegment::~BoundarySegment\n-virtual ~BoundarySegment()\n-Dummy virtual destructor.\n-Definition: boundarysegment.hh:104\n-Dune::BoundarySegmentBackupRestore\n-Definition: boundarysegment.hh:41\n-Dune::BoundarySegmentBackupRestore::restore\n-static std::unique_ptr< BoundarySegment > restore(ObjectStreamType &in)\n-create an object of BoundarySegment type from a previously registered factory\n-linked to key.\n-Definition: boundarysegment.hh:59\n-Dune::BoundarySegmentBackupRestore::FactoryType\n-Dune::ParameterizedObjectFactory< std::unique_ptr< BoundarySegment >\n-(ObjectStreamType &), int > FactoryType\n-type of factory creating a unique_ptr from an ObjectStreamType\n-Definition: boundarysegment.hh:51\n-Dune::BoundarySegmentBackupRestore::BoundarySegment\n-BndSeg BoundarySegment\n-type of BoundarySegment interface class\n-Definition: boundarysegment.hh:48\n-Dune::BoundarySegmentBackupRestore::ObjectStreamType\n-std::stringstream ObjectStreamType\n-Definition: boundarysegment.hh:44\n-Dune::BoundarySegmentBackupRestore::registerFactory\n-static int registerFactory()\n-Definition: boundarysegment.hh:70\n+Dune::dgf::BasicBlock\n+Definition: basic.hh:31\n+Dune::dgf::GridParameterBlock\n+Common Grid parameters.\n+Definition: gridparameter.hh:35\n+Dune::dgf::GridParameterBlock::foundDumpFileName\n+static const Flags foundDumpFileName\n+Definition: gridparameter.hh:40\n+Dune::dgf::GridParameterBlock::dumpFileName\n+const std::string & dumpFileName() const\n+Definition: gridparameter.hh:70\n+Dune::dgf::GridParameterBlock::foundName\n+static const Flags foundName\n+Definition: gridparameter.hh:39\n+Dune::dgf::GridParameterBlock::GridParameterBlock\n+GridParameterBlock(std::istream &in)\n+constructor: read commmon parameters\n+Dune::dgf::GridParameterBlock::Flags\n+unsigned int Flags\n+Definition: gridparameter.hh:37\n+Dune::dgf::GridParameterBlock::dumpFileName_\n+std::string dumpFileName_\n+Definition: gridparameter.hh:46\n+Dune::dgf::GridParameterBlock::ok\n+bool ok()\n+Definition: gridparameter.hh:92\n+Dune::dgf::GridParameterBlock::foundFlags_\n+Flags foundFlags_\n+Definition: gridparameter.hh:44\n+Dune::dgf::GridParameterBlock::name\n+const std::string & name(const std::string &defaultValue) const\n+return the name of the grid\n+Definition: gridparameter.hh:58\n+Dune::dgf::GridParameterBlock::name_\n+std::string name_\n+Definition: gridparameter.hh:45\n+Dune::dgf::GridParameterBlock::markLongestEdge\n+bool markLongestEdge() const\n+returns true if longest edge should be marked for AlbertaGrid\n+Definition: gridparameter.hh:81\n+Dune::dgf::GridParameterBlock::foundLongestEdge\n+static const Flags foundLongestEdge\n+Definition: gridparameter.hh:41\n+Dune::dgf::GridParameterBlock::markLongestEdge_\n+bool markLongestEdge_\n+Definition: gridparameter.hh:47\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00338.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00317.html", "comments": ["Files 1% similar despite different names"], "unified_diff": "@@ -73,15 +73,15 @@\n
    \n
    \n
    #include <dune/common/typetraits.hh>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/grid/common/capabilities.hh>
    \n #include <dune/grid/common/gridview.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00338_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00317_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n
    defaultgridview.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
    \n
    6#define DUNE_GRID_COMMON_DEFAULTGRIDVIEW_HH
    \n
    7
    \n
    8#include <dune/common/typetraits.hh>
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00359.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00299.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -76,15 +76,15 @@\n

    Provides base classes for index and id sets. \n More...

    \n
    #include <vector>
    \n #include <dune/common/exceptions.hh>
    \n #include <dune/grid/common/grid.hh>
    \n #include <dune/common/bartonnackmanifcheck.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n

    \n Classes

    struct  Dune::DefaultLevelGridViewTraits< GridImp >
     
    struct  Dune::DefaultLevelGridViewTraits< GridImp >::Codim< cd >
     
    \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00359_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00299_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • common
  • \n \n \n
    \n
    indexidset.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5
    \n
    6#ifndef DUNE_GRID_COMMON_INDEXIDSET_HH
    \n
    7#define DUNE_GRID_COMMON_INDEXIDSET_HH
    \n
    8
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00572.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00566.html", "comments": ["Files 12% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: declaration.hh File Reference\n+dune-grid: identity.hh File Reference\n \n \n \n \n \n \n \n@@ -63,21 +63,28 @@\n \n
    \n
    \n \n-
    declaration.hh File Reference
    \n+
    identity.hh File Reference
    \n
    \n

    \n Classes

    class  Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >
     Index Set Interface base class. More...
     
    struct  Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >::Codim< cc >
    \n+\n+\n+\n+

    \n+Classes

    class  Dune::IdenticalCoordFunction< ctype, dim >
     
    \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,17 +5,21 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * geometrygrid\n-Namespaces\n-declaration.hh File Reference\n+Classes | Namespaces\n+identity.hh File Reference\n+#include \n Go_to_the_source_code_of_this_file.\n+ Classes\n+class \u00a0Dune::IdenticalCoordFunction<_ctype,_dim_>\n+\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00575.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00599.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -72,15 +72,15 @@\n
    coordfunction.hh File Reference
    \n \n
    \n
    #include <cassert>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/common/std/type_traits.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n \n \n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00575_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00599_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • geometrygrid
  • \n \n \n
    \n
    coordfunction.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GEOGRID_COORDFUNCTION_HH
    \n
    6#define DUNE_GEOGRID_COORDFUNCTION_HH
    \n
    7
    \n
    8#include <cassert>
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00587.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00179.html", "comments": ["Files 12% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: iterator.hh File Reference\n+dune-grid: partitioning.hh File Reference\n \n \n \n \n \n \n \n@@ -58,64 +58,71 @@\n \n
    \n \n \n
    \n
    \n \n-
    iterator.hh File Reference
    \n+
    partitioning.hh File Reference
    \n
    \n
    \n-
    #include <cassert>
    \n-#include <type_traits>
    \n-#include <utility>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/geometrygrid/capabilities.hh>
    \n-#include <dune/grid/geometrygrid/declaration.hh>
    \n-#include <dune/grid/geometrygrid/entity.hh>
    \n+\n+

    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. \n+More...

    \n+
    #include <array>
    \n+#include <dune/common/math.hh>
    \n+#include <dune/common/deprecated.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl >
     Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid. An implementation should be derived from Dune::AnalyticalCoordFunction and the evaluate method mapping \"$ has to be supplied. More...
     
    class  Dune::AnalyticalCoordFunction< ct, dimD, dimR, Impl >
    \n \n-\n+\n+\n \n-\n+\n \n-\n+\n+\n \n-\n+\n+\n \n-\n+\n+\n \n-\n+\n \n-\n+\n+\n \n-\n+\n+\n \n-\n+\n+\n \n

    \n Classes

    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Interior_Partition, Grid >
    class  Dune::Yasp::Partitioning< d >
     a base class for the yaspgrid partitioning strategy More...
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, InteriorBorder_Partition, Grid >
    class  Dune::Yasp::DefaultPartitioning< d >
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Overlap_Partition, Grid >
    class  Dune::Yasp::PowerDPartitioning< d >
     Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, OverlapFront_Partition, Grid >
    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...
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, All_Partition, Grid >
    class  Dune::YLoadBalance< d >
     a base class for the yaspgrid partitioning strategy More...
     
    struct  Dune::GeoGrid::PartitionIteratorFilter< codim, Ghost_Partition, Grid >
    class  Dune::YLoadBalanceForward< d >
     
    class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, false >
    class  Dune::YLoadBalanceDefault< d >
     Implement the default load balance strategy of yaspgrid. More...
     
    class  Dune::GeoGrid::Iterator< HostGridView, codim, pitype, G, true >
    class  Dune::YLoadBalancePowerD< d >
     Implement yaspgrid load balance strategy for P=x^{dim} processors. More...
     
    class  Dune::GeoGrid::HierarchicIterator< G >
    class  Dune::YaspFixedSizePartitioner< d >
     Implement partitioner that gets a fixed partitioning from an array If the given partitioning doesn't match the number of processors, the grid should be distributed to, an exception is thrown. More...
     
    \n \n \n \n \n-\n-\n+\n \n

    \n Namespaces

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

    Detailed Description

    \n+

    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.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,51 +4,64 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * geometrygrid\n+ * yaspgrid\n Classes | Namespaces\n-iterator.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+partitioning.hh File Reference\n+This file provides tools to partition YaspGrids. If you want to write your own\n+partitioner, inherit from Yasp::Partitioning and implement the partition()\n+method. You can also browse this file for already available useful\n+partitioners, like Yasp::FixedSizePartitioning. More...\n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_Interior_Partition,\n- Grid_>\n+class \u00a0Dune::Yasp::Partitioning<_d_>\n+\u00a0 a base class for the yaspgrid partitioning strategy More...\n \u00a0\n-struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,\n- InteriorBorder_Partition,_Grid_>\n+class \u00a0Dune::Yasp::DefaultPartitioning<_d_>\n \u00a0\n-struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_Overlap_Partition,_Grid\n- >\n+class \u00a0Dune::Yasp::PowerDPartitioning<_d_>\n+\u00a0 Implement yaspgrid load balance strategy for P=x^{dim} processors.\n+ More...\n \u00a0\n-struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_OverlapFront_Partition,\n- Grid_>\n+class \u00a0Dune::Yasp::FixedSizePartitioning<_d_>\n+ Implement partitioner that gets a fixed partitioning from an array If\n+\u00a0 the given partitioning doesn't match the number of processors, the grid\n+ should be distributed to, an exception is thrown. More...\n \u00a0\n-struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_All_Partition,_Grid_>\n+class \u00a0Dune::YLoadBalance<_d_>\n+\u00a0 a base class for the yaspgrid partitioning strategy More...\n \u00a0\n-struct \u00a0Dune::GeoGrid::PartitionIteratorFilter<_codim,_Ghost_Partition,_Grid_>\n+class \u00a0Dune::YLoadBalanceForward<_d_>\n \u00a0\n- class \u00a0Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_false_>\n+class \u00a0Dune::YLoadBalanceDefault<_d_>\n+\u00a0 Implement the default load balance strategy of yaspgrid. More...\n \u00a0\n- class \u00a0Dune::GeoGrid::Iterator<_HostGridView,_codim,_pitype,_G,_true_>\n+class \u00a0Dune::YLoadBalancePowerD<_d_>\n+\u00a0 Implement yaspgrid load balance strategy for P=x^{dim} processors.\n+ More...\n \u00a0\n- class \u00a0Dune::GeoGrid::HierarchicIterator<_G_>\n+class \u00a0Dune::YaspFixedSizePartitioner<_d_>\n+ Implement partitioner that gets a fixed partitioning from an array If\n+\u00a0 the given partitioning doesn't match the number of processors, the grid\n+ should be distributed to, an exception is thrown. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::GeoGrid\n-\u00a0 namespace containing the implementations of GeometryGrid\n+namespace \u00a0Dune::Yasp\n \u00a0\n+***** Detailed Description *****\n+This file provides tools to partition YaspGrids. If you want to write your own\n+partitioner, inherit from Yasp::Partitioning and implement the partition()\n+method. You can also browse this file for already available useful\n+partitioners, like Yasp::FixedSizePartitioning.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00590.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00692.html", "comments": ["Files 5% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: cornerstorage.hh File Reference\n+dune-grid: coordcache.hh File Reference\n \n \n \n \n \n \n \n@@ -58,47 +58,45 @@\n \n \n \n \n \n
    \n \n-
    cornerstorage.hh File Reference
    \n+
    coordcache.hh File Reference
    \n
    \n
    \n-\n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,32 +4,30 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * geometrygrid\n+ * albertagrid\n Classes | Namespaces\n-cornerstorage.hh File Reference\n-#include \n-#include \n+coordcache.hh File Reference\n+#include \n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::GeoGrid::CoordVector<_mydim,_Grid,_false_>\n+ class \u00a0Dune::Alberta::CoordCache<_dim_>\n \u00a0\n-class \u00a0Dune::GeoGrid::CoordVector<_mydim,_Grid,_true_>\n+ class \u00a0Dune::Alberta::CoordCache<_dim_>::LocalCaching\n \u00a0\n-class \u00a0Dune::GeoGrid::IntersectionCoordVector<_Grid_>\n-\u00a0\n-class \u00a0Dune::GeoGrid::CornerStorage<_mydim,_cdim,_Grid_>\n+struct \u00a0Dune::Alberta::CoordCache<_dim_>::Interpolation\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n-namespace \u00a0Dune::GeoGrid\n-\u00a0 namespace containing the implementations of GeometryGrid\n+namespace \u00a0Dune::Alberta\n \u00a0\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00590_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00569_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,24 +65,24 @@\n
  • dune
  • grid
  • geometrygrid
  • \n
    \n \n
    \n
    cornerstorage.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GEOGRID_CORNERSTORAGE_HH
    \n
    6#define DUNE_GEOGRID_CORNERSTORAGE_HH
    \n
    7
    \n
    8#include <array>
    \n
    9
    \n-\n+\n
    11
    \n
    12namespace Dune
    \n
    13{
    \n
    14
    \n
    15 namespace GeoGrid
    \n
    16 {
    \n
    17
    \n@@ -277,15 +277,15 @@\n
    206 };
    \n
    207
    \n
    208 } // namespace GeoGrid
    \n
    209
    \n
    210} // namespace Dune
    \n
    211
    \n
    212#endif // #ifndef DUNE_GEOGRID_CORNERSTORAGE_HH
    \n-\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n
    Definition: coordfunctioncaller.hh:21
    \n
    Definition: cornerstorage.hh:22
    \n
    CoordVector(const HostEntity &hostEntity, const CoordFunction &coordFunction)
    Definition: cornerstorage.hh:48
    \n
    void calculate(std::array< Coordinate, size >(&corners)) const
    Definition: cornerstorage.hh:54
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00602.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00608.html", "comments": ["Files 6% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: idset.hh File Reference\n+dune-grid: coordfunctioncaller.hh File Reference\n \n \n \n \n \n \n \n@@ -63,28 +63,23 @@\n \n
    \n
    \n \n-
    idset.hh File Reference
    \n+
    coordfunctioncaller.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid/common/indexidset.hh>
    \n+\n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n \n-\n-\n-\n-

    \n-Classes

    class  Dune::GeoGrid::IdSet< Grid, HostIdSet >
     
    \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,21 +5,19 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * geometrygrid\n-Classes | Namespaces\n-idset.hh File Reference\n-#include \n+Namespaces\n+coordfunctioncaller.hh File Reference\n+#include \n+#include \n Go_to_the_source_code_of_this_file.\n- Classes\n-class \u00a0Dune::GeoGrid::IdSet<_Grid,_HostIdSet_>\n-\u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n namespace \u00a0Dune::GeoGrid\n \u00a0 namespace containing the implementations of GeometryGrid\n \u00a0\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00602_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00578_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,22 +65,22 @@\n
  • dune
  • grid
  • geometrygrid
  • \n \n \n
    \n
    idset.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_GEOGRID_IDSET_HH
    \n
    6#define DUNE_GEOGRID_IDSET_HH
    \n
    7
    \n-\n+\n
    9
    \n
    10namespace Dune
    \n
    11{
    \n
    12
    \n
    13 namespace GeoGrid
    \n
    14 {
    \n
    15
    \n@@ -149,15 +149,15 @@\n
    78 };
    \n
    79
    \n
    80 } // namespace GeoGrid
    \n
    81
    \n
    82} // namespace Dune
    \n
    83
    \n
    84#endif // #ifndef DUNE_GEOGRID_IDSET_HH
    \n-
    Provides base classes for index and id sets.
    \n+
    Provides base classes for index and id sets.
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Id Set Interface.
    Definition: indexidset.hh:452
    \n
    IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
    Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
    Definition: indexidset.hh:486
    \n
    DUNE-conform implementation of the entity.
    Definition: geometrygrid/entity.hh:694
    \n
    Definition: idset.hh:22
    \n
    IdSet()
    Definition: idset.hh:33
    \n
    IdSet(const HostIdSet &hostIdSet)
    Definition: idset.hh:37
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00617.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00278.html", "comments": ["Files 22% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: transformation.hh File Reference\n+dune-grid: datahandleif.hh File Reference\n \n \n \n \n \n \n \n@@ -58,40 +58,49 @@\n \n
    \n \n \n
    \n
    \n \n-
    transformation.hh File Reference
    \n+
    datahandleif.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/fvector.hh>
    \n-#include <dune/grid/albertagrid/misc.hh>
    \n+\n+

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

    \n+
    #include <dune/common/bartonnackmanifcheck.hh>
    \n
    \n-

    Go to the source code of this file.

    \n+

    Go to the source code of this file.

    \n

    \n Namespaces

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

    \n Classes

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

    \n Namespaces

    namespace  Dune
     Include standard header files.
     
    \n-
    \n+

    Detailed Description

    \n+

    Describes the parallel communication interface class for MessageBuffers and DataHandles.

    \n+
    Author
    Robert Kloefkorn
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,23 +4,43 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * albertagrid\n+ * common\n Classes | Namespaces\n-transformation.hh File Reference\n-#include \n-#include \n+datahandleif.hh File Reference\n+Describes the parallel communication interface class for MessageBuffers and\n+DataHandles. More...\n+#include \n Go_to_the_source_code_of_this_file.\n Classes\n-class \u00a0Dune::AlbertaTransformation\n+class \u00a0Dune::MessageBufferIF<_MessageBufferImp_>\n+ Communication message buffer interface. This class describes the\n+ interface for reading and writing data to the communication message\n+ buffer. As message buffers might be deeply implemented in various\n+\u00a0 packages the message buffers implementations cannot be derived from\n+ this interface class. Therefore we just apply the engine concept to\n+ wrap the message buffer call and make sure that the interface is\n+ fulfilled. More...\n+\u00a0\n+class \u00a0Dune::CommDataHandleIF<_DataHandleImp,_DataTypeImp_>\n+ CommDataHandleIF describes the features of a data handle for\n+ communication in parallel runs using the Grid::communicate methods.\n+\u00a0 Here the Barton-Nackman trick is used to interprete data handle objects\n+ as its interface. Therefore usable data handle classes need to be\n+ derived from this class. More...\n \u00a0\n Namespaces\n namespace \u00a0Dune\n \u00a0 Include standard header files.\n \u00a0\n+***** Detailed Description *****\n+Describes the parallel communication interface class for MessageBuffers and\n+DataHandles.\n+ Author\n+ Robert Kloefkorn\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00617_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00860_source.html", "comments": ["Files 14% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: transformation.hh Source File\n+dune-grid: polyhedron.hh Source File\n \n \n \n \n \n \n \n@@ -58,113 +58,105 @@\n \n
    \n \n \n
    \n
    \n-
    transformation.hh
    \n+
    polyhedron.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH
    \n-
    6#define DUNE_ALBERTA_TRANSFORMATION_HH
    \n+
    3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    4// vi: set et ts=2 sw=2 sts=2:
    \n+
    5#ifndef DUNE_POLYHEDRON_HH
    \n+
    6#define DUNE_POLYHEDRON_HH
    \n
    7
    \n-
    8#include <dune/common/fvector.hh>
    \n+
    8#include <algorithm>
    \n
    9
    \n-\n+\n
    11
    \n-
    12#if HAVE_ALBERTA
    \n-
    13
    \n-
    14namespace Dune
    \n-
    15{
    \n-
    16
    \n-\n-
    18 {
    \n-\n+
    12namespace Dune
    \n+
    13{
    \n+
    14
    \n+
    15 namespace dgf
    \n+
    16 {
    \n+
    17
    \n+
    18 // PolyhedronBlock
    \n+
    19 // ---------------
    \n
    20
    \n-
    21 public:
    \n-\n-
    23
    \n-
    24 static const int dimension = Alberta::dimWorld;
    \n-
    25
    \n-
    26 typedef FieldVector< ctype, dimension > WorldVector;
    \n+\n+
    22 : public BasicBlock
    \n+
    23 {
    \n+
    24 explicit PolyhedronBlock ( std::istream &in, int numPolys )
    \n+
    25 : BasicBlock( in, "Polyhedron" ), numPolys_( numPolys )
    \n+
    26 {}
    \n
    27
    \n-
    28 explicit
    \n-\n-
    30 : matrix_( (trafo != NULL ? trafo->M : GlobalSpace::identityMatrix()) ),
    \n-
    31 shift_( (trafo != NULL ? trafo->t : GlobalSpace::nullVector()) )
    \n-
    32 {}
    \n-
    33
    \n-\n-
    35 const GlobalSpace::Vector &shift )
    \n-
    36 : matrix_( matrix ),
    \n-
    37 shift_( shift )
    \n-
    38 {}
    \n-
    39
    \n-
    40 WorldVector evaluate ( const WorldVector &x ) const
    \n-
    41 {
    \n-\n-
    43 for( int i = 0; i < dimension; ++i )
    \n-
    44 {
    \n-
    45 const GlobalSpace::Vector &row = matrix_[ i ];
    \n-
    46 y[ i ] = shift_[ i ];
    \n-
    47 for( int j = 0; j < dimension; ++j )
    \n-
    48 y[ i ] += row[ j ] * x[ j ];
    \n-
    49 }
    \n-
    50 return y;
    \n-
    51 }
    \n-
    52
    \n-\n-
    54 {
    \n-
    55 // Note: ALBERTA requires the matrix to be orthogonal
    \n-
    56 WorldVector x( ctype( 0 ) );
    \n-
    57 for( int i = 0; i < dimension; ++i )
    \n-
    58 {
    \n-
    59 const GlobalSpace::Vector &row = matrix_[ i ];
    \n-
    60 const ctype v = y[ i ] - shift_[ i ];
    \n-
    61 for( int j = 0; j < dimension; ++j )
    \n-
    62 x[ j ] += row[ j ] * v;
    \n-
    63 }
    \n-
    64 return x;
    \n-
    65 }
    \n-
    66
    \n-
    67 private:
    \n-
    68 const GlobalSpace::Matrix &matrix_;
    \n-
    69 const GlobalSpace::Vector &shift_;
    \n-
    70 };
    \n-
    71
    \n-
    72}
    \n-
    73
    \n-
    74#endif // #if HAVE_ALBERTA
    \n-
    75
    \n-
    76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH
    \n-\n+
    28 int get ( std::vector< std::vector< int > > &polyhedra )
    \n+
    29 {
    \n+
    30 reset();
    \n+
    31 std::vector< int > polyhedron;
    \n+
    32 int minPolyId = 1;
    \n+
    33 while( getnextline() )
    \n+
    34 {
    \n+
    35 polyhedron.clear();
    \n+
    36 for( int polyIdx; getnextentry( polyIdx ); )
    \n+
    37 {
    \n+
    38 if( (polyIdx < 0) || (polyIdx > numPolys_) )
    \n+
    39 DUNE_THROW( DGFException, "Error in " << *this << ": Invalid polygon index (" << polyIdx << " not int [0, " << numPolys_ << "])" );
    \n+
    40
    \n+
    41 minPolyId = std::min( minPolyId, polyIdx );
    \n+
    42 polyhedron.push_back( polyIdx );
    \n+
    43 }
    \n+
    44
    \n+
    45 polyhedra.push_back( polyhedron );
    \n+
    46 }
    \n+
    47
    \n+
    48 // subtract minimal number to have 0 starting numbering
    \n+
    49 if( minPolyId > 0 )
    \n+
    50 {
    \n+
    51 const size_t polySize = polyhedra.size();
    \n+
    52 for( size_t i=0; i<polySize; ++i )
    \n+
    53 {
    \n+
    54 const size_t pSize = polyhedra[ i ].size();
    \n+
    55 for( size_t j=0; j<pSize; ++j )
    \n+
    56 {
    \n+
    57 polyhedra[ i ][ j ] -= minPolyId;
    \n+
    58 }
    \n+
    59 }
    \n+
    60 }
    \n+
    61 return polyhedra.size();
    \n+
    62 }
    \n+
    63
    \n+
    64 protected:
    \n+
    65 const int numPolys_;
    \n+
    66 };
    \n+
    67
    \n+
    68 } // namespace dgf
    \n+
    69} // end namespace Dune
    \n+
    70
    \n+
    71#endif // #ifndef DUNE_POLYHEDRON_HH
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    ALBERTA AFF_TRAFO AffineTransformation
    Definition: misc.hh:52
    \n-
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n-
    static const int dimWorld
    Definition: misc.hh:46
    \n-
    Definition: misc.hh:102
    \n-
    GlobalMatrix Matrix
    Definition: misc.hh:106
    \n-
    GlobalVector Vector
    Definition: misc.hh:107
    \n-
    Definition: transformation.hh:18
    \n-
    AlbertaTransformation(const Alberta::AffineTransformation *trafo=NULL)
    Definition: transformation.hh:29
    \n-
    static const int dimension
    Definition: transformation.hh:24
    \n-
    FieldVector< ctype, dimension > WorldVector
    Definition: transformation.hh:26
    \n-
    AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace::Vector &shift)
    Definition: transformation.hh:34
    \n-
    Alberta::Real ctype
    Definition: transformation.hh:22
    \n-
    WorldVector evaluateInverse(const WorldVector &y) const
    Definition: transformation.hh:53
    \n-
    WorldVector evaluate(const WorldVector &x) const
    Definition: transformation.hh:40
    \n+
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n+
    @ polyhedron
    Definition: common.hh:142
    \n+
    Definition: basic.hh:31
    \n+
    void reset()
    Definition: basic.hh:51
    \n+
    bool getnextline()
    Definition: basic.cc:94
    \n+
    bool getnextentry(ENTRY &entry)
    Definition: basic.hh:63
    \n+
    Definition: polyhedron.hh:23
    \n+
    const int numPolys_
    Definition: polyhedron.hh:65
    \n+
    PolyhedronBlock(std::istream &in, int numPolys)
    Definition: polyhedron.hh:24
    \n+
    int get(std::vector< std::vector< int > > &polyhedra)
    Definition: polyhedron.hh:28
    \n+
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,135 +4,124 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * albertagrid\n-transformation.hh\n+ * io\n+ * file\n+ * dgfparser\n+ * blocks\n+polyhedron.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n- 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_TRANSFORMATION_HH\n- 6#define DUNE_ALBERTA_TRANSFORMATION_HH\n+ 3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+ 4// vi: set et ts=2 sw=2 sts=2:\n+ 5#ifndef DUNE_POLYHEDRON_HH\n+ 6#define DUNE_POLYHEDRON_HH\n 7\n- 8#include \n+ 8#include \n 9\n- 10#include \n+ 10#include \n 11\n- 12#if HAVE_ALBERTA\n- 13\n- 14namespace Dune\n- 15{\n- 16\n-17 class AlbertaTransformation\n- 18 {\n- 19 typedef Alberta::GlobalSpace GlobalSpace;\n+ 12namespace Dune\n+ 13{\n+ 14\n+ 15 namespace dgf\n+ 16 {\n+ 17\n+ 18 // PolyhedronBlock\n+ 19 // ---------------\n 20\n- 21 public:\n-22 typedef Alberta::Real ctype;\n- 23\n-24 static const int dimension = Alberta::dimWorld;\n- 25\n-26 typedef FieldVector< ctype, dimension > WorldVector;\n+21 struct PolyhedronBlock\n+ 22 : public BasicBlock\n+ 23 {\n+24 explicit PolyhedronBlock ( std::istream &in, int numPolys )\n+ 25 : BasicBlock( in, \"Polyhedron\" ), numPolys_( numPolys )\n+ 26 {}\n 27\n- 28 explicit\n-29 AlbertaTransformation ( const Alberta::AffineTransformation *trafo = NULL )\n- 30 : matrix_( (trafo != NULL ? trafo->M : GlobalSpace::identityMatrix()) ),\n- 31 shift_( (trafo != NULL ? trafo->t : GlobalSpace::nullVector()) )\n- 32 {}\n- 33\n-34 AlbertaTransformation ( const GlobalSpace::Matrix &matrix,\n- 35 const GlobalSpace::Vector &shift )\n- 36 : matrix_( matrix ),\n- 37 shift_( shift )\n- 38 {}\n- 39\n-40 WorldVector evaluate ( const WorldVector &x ) const\n- 41 {\n- 42 WorldVector y;\n- 43 for( int i = 0; i < dimension; ++i )\n- 44 {\n- 45 const GlobalSpace::Vector &row = matrix_[ i ];\n- 46 y[ i ] = shift_[ i ];\n- 47 for( int j = 0; j < dimension; ++j )\n- 48 y[ i ] += row[ j ] * x[ j ];\n- 49 }\n- 50 return y;\n- 51 }\n- 52\n-53 WorldVector evaluateInverse ( const WorldVector &y ) const\n- 54 {\n- 55 // Note: ALBERTA requires the matrix to be orthogonal\n- 56 WorldVector x( ctype( 0 ) );\n- 57 for( int i = 0; i < dimension; ++i )\n- 58 {\n- 59 const GlobalSpace::Vector &row = matrix_[ i ];\n- 60 const ctype v = y[ i ] - shift_[ i ];\n- 61 for( int j = 0; j < dimension; ++j )\n- 62 x[ j ] += row[ j ] * v;\n- 63 }\n- 64 return x;\n- 65 }\n- 66\n- 67 private:\n- 68 const GlobalSpace::Matrix &matrix_;\n- 69 const GlobalSpace::Vector &shift_;\n- 70 };\n- 71\n- 72}\n- 73\n- 74#endif // #if HAVE_ALBERTA\n- 75\n- 76#endif // #ifndef DUNE_ALBERTA_TRANSFORMATION_HH\n-misc.hh\n+28 int get ( std::vector< std::vector< int > > &polyhedra )\n+ 29 {\n+ 30 reset();\n+ 31 std::vector< int > polyhedron;\n+ 32 int minPolyId = 1;\n+ 33 while( getnextline() )\n+ 34 {\n+ 35 polyhedron.clear();\n+ 36 for( int polyIdx; getnextentry( polyIdx ); )\n+ 37 {\n+ 38 if( (polyIdx < 0) || (polyIdx > numPolys_) )\n+ 39 DUNE_THROW( DGFException, \"Error in \" << *this << \": Invalid polygon index\n+(\" << polyIdx << \" not int [0, \" << numPolys_ << \"])\" );\n+ 40\n+ 41 minPolyId = std::min( minPolyId, polyIdx );\n+ 42 polyhedron.push_back( polyIdx );\n+ 43 }\n+ 44\n+ 45 polyhedra.push_back( polyhedron );\n+ 46 }\n+ 47\n+ 48 // subtract minimal number to have 0 starting numbering\n+ 49 if( minPolyId > 0 )\n+ 50 {\n+ 51 const size_t polySize = polyhedra.size();\n+ 52 for( size_t i=0; i WorldVector\n-Definition: transformation.hh:26\n-Dune::AlbertaTransformation::AlbertaTransformation\n-AlbertaTransformation(const GlobalSpace::Matrix &matrix, const GlobalSpace::\n-Vector &shift)\n-Definition: transformation.hh:34\n-Dune::AlbertaTransformation::ctype\n-Alberta::Real ctype\n-Definition: transformation.hh:22\n-Dune::AlbertaTransformation::evaluateInverse\n-WorldVector evaluateInverse(const WorldVector &y) const\n-Definition: transformation.hh:53\n-Dune::AlbertaTransformation::evaluate\n-WorldVector evaluate(const WorldVector &x) const\n-Definition: transformation.hh:40\n+Dune::Alberta::min\n+int min(const DofVectorPointer< int > &dofVector)\n+Definition: dofvector.hh:348\n+Dune::VTK::polyhedron\n+@ polyhedron\n+Definition: common.hh:142\n+Dune::dgf::BasicBlock\n+Definition: basic.hh:31\n+Dune::dgf::BasicBlock::reset\n+void reset()\n+Definition: basic.hh:51\n+Dune::dgf::BasicBlock::getnextline\n+bool getnextline()\n+Definition: basic.cc:94\n+Dune::dgf::BasicBlock::getnextentry\n+bool getnextentry(ENTRY &entry)\n+Definition: basic.hh:63\n+Dune::dgf::PolyhedronBlock\n+Definition: polyhedron.hh:23\n+Dune::dgf::PolyhedronBlock::numPolys_\n+const int numPolys_\n+Definition: polyhedron.hh:65\n+Dune::dgf::PolyhedronBlock::PolyhedronBlock\n+PolyhedronBlock(std::istream &in, int numPolys)\n+Definition: polyhedron.hh:24\n+Dune::dgf::PolyhedronBlock::get\n+int get(std::vector< std::vector< int > > &polyhedra)\n+Definition: polyhedron.hh:28\n+Dune::DGFException\n+exception class for IO errors in the DGF parser\n+Definition: dgfexception.hh:16\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00650_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00704_source.html", "comments": ["Files 1% similar despite different names"], "unified_diff": "@@ -65,15 +65,15 @@\n
  • dune
  • grid
  • albertagrid
  • \n
    \n \n
    \n
    albertaheader.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTAHEADER_HH
    \n
    6#define DUNE_ALBERTAHEADER_HH
    \n
    7
    \n
    8#if HAVE_ALBERTA
    \n@@ -87,39 +87,39 @@\n
    16 #endif
    \n
    17#endif
    \n
    18
    \n
    19// Set ALBERTA's DIM_OF_WORLD preprocessor variable
    \n
    20#ifndef ALBERTA_DIM
    \n
    21#error "ALBERTA_DIM needed to use AlbertaGrid."
    \n
    22#endif
    \n-
    23#define DIM_OF_WORLD ALBERTA_DIM
    \n+
    23#define DIM_OF_WORLD ALBERTA_DIM
    \n
    24
    \n
    25// if we have ALBERTA C++ lib define namespace for ALBERTA
    \n
    26#ifdef __ALBERTApp__
    \n
    27#define ALBERTA Alberta::
    \n
    28#else
    \n-
    29#define ALBERTA ::
    \n+
    29#define ALBERTA ::
    \n
    30#endif
    \n
    31
    \n
    32#ifndef ALBERTA_DEBUG
    \n-
    33#define ALBERTA_DEBUG 0
    \n+
    33#define ALBERTA_DEBUG 0
    \n
    34#endif
    \n
    35
    \n
    36// MAX, MIN, and ABS are defined macros of ALBERTA
    \n
    37// if they are not defined elsewhere, they are undefined here
    \n
    38#ifndef MAX
    \n-
    39#define _MAX_NOT_DEFINED_
    \n+
    39#define _MAX_NOT_DEFINED_
    \n
    40#endif
    \n
    41
    \n
    42#ifndef MIN
    \n-
    43#define _MIN_NOT_DEFINED_
    \n+
    43#define _MIN_NOT_DEFINED_
    \n
    44#endif
    \n
    45
    \n
    46#ifndef ABS
    \n-
    47#define _ABS_NOT_DEFINED_
    \n+
    47#define _ABS_NOT_DEFINED_
    \n
    48#endif
    \n
    49
    \n
    50#ifndef DIM_OF_WORLD
    \n
    51#error "DIM_OF_WORLD not defined."
    \n
    52#endif
    \n
    53
    \n
    54#ifdef HAVE_CONFIG_H
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00677_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00692_source.html", "comments": ["Files 20% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: indexstack.hh Source File\n+dune-grid: coordcache.hh Source File\n \n \n \n \n \n \n \n@@ -62,241 +62,206 @@\n \n \n
    \n
    \n-
    indexstack.hh
    \n+
    coordcache.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH
    \n-
    6#define DUNE_ALBERTAGRID_INDEXSTACK_HH
    \n+
    5#ifndef DUNE_ALBERTA_COORDCACHE_HH
    \n+
    6#define DUNE_ALBERTA_COORDCACHE_HH
    \n
    7
    \n-
    8#include <assert.h>
    \n-
    9#include <stack>
    \n-
    10
    \n-
    11#include <dune/common/exceptions.hh>
    \n-
    12#include <dune/common/reservedvector.hh>
    \n+\n+\n+\n+
    11
    \n+
    12#if HAVE_ALBERTA
    \n
    13
    \n-
    20namespace Dune {
    \n-
    21
    \n-
    24 template <class T, int length>
    \n-\n-
    26 {
    \n-
    27 class MyFiniteStack : public ReservedVector<T,length>
    \n-
    28 {
    \n-
    29 typedef ReservedVector<T,length> BaseType ;
    \n-
    30 public:
    \n-
    32 bool full () const { return this->size() >= length; }
    \n-
    33
    \n-
    35 void push( const T& t ) { BaseType :: push_back( t ); }
    \n-
    36
    \n-
    38 T topAndPop ()
    \n-
    39 {
    \n-
    40 assert( !this->empty() );
    \n-
    41 assert( this->size() <= length );
    \n-
    42 // This code is not slower than using the array structure directly.
    \n-
    43 // The compiler removes the temporary completely. I measured this.
    \n-
    44 // See the commit message for revision 7837 for more details.
    \n-
    45 T tmp = this->back();
    \n-
    46 this->pop_back();
    \n-
    47 return tmp;
    \n-
    48 }
    \n-
    49 };
    \n+
    14namespace Dune
    \n+
    15{
    \n+
    16
    \n+
    17 namespace Alberta
    \n+
    18 {
    \n+
    19
    \n+
    20 // CoordCache
    \n+
    21 // ----------
    \n+
    22
    \n+
    23 template< int dim >
    \n+\n+
    25 {
    \n+\n+\n+
    28
    \n+
    29 class LocalCaching;
    \n+
    30 struct Interpolation;
    \n+
    31
    \n+
    32 public:
    \n+
    33 static const int dimension = dim;
    \n+
    34
    \n+\n+\n+\n+
    38
    \n+
    39 GlobalVector &operator() ( const Element *element, int vertex ) const
    \n+
    40 {
    \n+
    41 assert( !(!coords_) );
    \n+
    42 GlobalVector *array = (GlobalVector *)coords_;
    \n+
    43 return array[ dofAccess_( element, vertex ) ];
    \n+
    44 }
    \n+
    45
    \n+
    46 GlobalVector &operator() ( const ElementInfo &elementInfo, int vertex ) const
    \n+
    47 {
    \n+
    48 return (*this)( elementInfo.el(), vertex );
    \n+
    49 }
    \n
    50
    \n-
    51 typedef MyFiniteStack StackType;
    \n-
    52 typedef typename std::stack < StackType * > StackListType;
    \n-
    53
    \n-
    54 StackListType fullStackList_;
    \n-
    55 StackListType emptyStackList_;
    \n-
    56
    \n-
    57 //typedef typename StackListType::Iterator DListIteratorType;
    \n-
    58 StackType * stack_;
    \n-
    59
    \n-
    60 // current maxIndex
    \n-
    61 int maxIndex_;
    \n-
    62 public:
    \n-
    64 inline IndexStack();
    \n-
    65
    \n-
    67 inline ~IndexStack ();
    \n+
    51 void create ( const DofNumbering &dofNumbering )
    \n+
    52 {
    \n+
    53 MeshPointer mesh = dofNumbering.mesh();
    \n+
    54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );
    \n+
    55
    \n+
    56 coords_.create( dofSpace, "Coordinate Cache" );
    \n+
    57 LocalCaching localCaching( coords_ );
    \n+\n+
    59 coords_.template setupInterpolation< Interpolation >();
    \n+
    60
    \n+
    61 dofAccess_ = DofAccess( dofSpace );
    \n+
    62 }
    \n+
    63
    \n+
    64 void release ()
    \n+
    65 {
    \n+
    66 coords_.release();
    \n+
    67 }
    \n
    68
    \n-
    70 inline void checkAndSetMax(T index) { if(index > maxIndex_) maxIndex_ = index;}
    \n-
    71
    \n-
    73 inline void setMaxIndex(T index) { maxIndex_ = index; }
    \n+
    69 private:
    \n+
    70 CoordVectorPointer coords_;
    \n+
    71 DofAccess dofAccess_;
    \n+
    72 };
    \n+
    73
    \n
    74
    \n-
    76 inline int getMaxIndex() const { return maxIndex_; }
    \n-
    77
    \n-
    79 inline int size() const { return getMaxIndex(); }
    \n-
    80
    \n-
    82 inline T getIndex ();
    \n-
    83
    \n-
    85 inline void freeIndex(T index);
    \n-
    86
    \n-
    88 inline void test ();
    \n-
    89
    \n-
    90 // backup set to out stream
    \n-
    91 inline void backupIndexSet ( std::ostream & os );
    \n-
    92
    \n-
    93 // restore from in stream
    \n-
    94 inline void restoreIndexSet ( std::istream & is );
    \n-
    95 private:
    \n-
    96 // no copy constructor allowed
    \n-
    97 IndexStack( const IndexStack<T,length> & s) : maxIndex_ (0) , stack_(0) {}
    \n-
    98
    \n-
    99 // no assignment operator allowed
    \n-
    100 IndexStack<T,length> & operator = ( const IndexStack<T,length> & s)
    \n-
    101 {
    \n-
    102 DUNE_THROW(Exception, "IndexStack::operator = () not allowed!");
    \n-
    103 return *this;
    \n-
    104 }
    \n+
    75
    \n+
    76 // CoordCache::LocalCaching
    \n+
    77 // ------------------------
    \n+
    78
    \n+
    79 template< int dim >
    \n+\n+
    81 {
    \n+
    82 CoordVectorPointer coords_;
    \n+
    83 DofAccess dofAccess_;
    \n+
    84
    \n+
    85 public:
    \n+
    86 explicit LocalCaching ( const CoordVectorPointer &coords )
    \n+
    87 : coords_( coords ),
    \n+
    88 dofAccess_( coords.dofSpace() )
    \n+
    89 {}
    \n+
    90
    \n+
    91 void operator() ( const ElementInfo &elementInfo ) const
    \n+
    92 {
    \n+
    93 GlobalVector *array = (GlobalVector *)coords_;
    \n+
    94 for( int i = 0; i < DofAccess::numSubEntities; ++i )
    \n+
    95 {
    \n+
    96 const GlobalVector &x = elementInfo.coordinate( i );
    \n+
    97 GlobalVector &y = array[ dofAccess_( elementInfo.el(), i ) ];
    \n+
    98 for( int i = 0; i < dimWorld; ++i )
    \n+
    99 y[ i ] = x[ i ];
    \n+
    100 }
    \n+
    101 }
    \n+
    102 };
    \n+
    103
    \n+
    104
    \n
    105
    \n-
    106 // clear fullStacks
    \n-
    107 void clearStack ();
    \n+
    106 // CoordCache::Interpolation
    \n+
    107 // -------------------------
    \n
    108
    \n-
    109 }; // end class IndexStack
    \n-
    110
    \n-
    111 //****************************************************************
    \n-
    112 // Inline implementation
    \n-
    113 // ***************************************************************
    \n-
    114 template <class T, int length>
    \n-\n-
    116 : stack_ ( new StackType () ) , maxIndex_ (0) {}
    \n-
    117
    \n-
    118 template <class T, int length>
    \n-\n-
    120 {
    \n-
    121 if(stack_) delete stack_;
    \n-
    122 stack_ = 0;
    \n+
    109 template< int dim >
    \n+\n+
    111 {
    \n+
    112 static const int dimension = dim;
    \n+
    113
    \n+\n+
    115
    \n+
    116 static void
    \n+
    117 interpolateVector ( const CoordVectorPointer &dofVector, const Patch &patch )
    \n+
    118 {
    \n+
    119 DofAccess dofAccess( dofVector.dofSpace() );
    \n+
    120 GlobalVector *array = (GlobalVector *)dofVector;
    \n+
    121
    \n+
    122 const Element *element = patch[ 0 ];
    \n
    123
    \n-
    124 while( !fullStackList_.empty() )
    \n-
    125 {
    \n-
    126 StackType * st = fullStackList_.top();
    \n-
    127 if(st) delete st;
    \n-
    128 fullStackList_.pop();
    \n-
    129 }
    \n-
    130 while( !emptyStackList_.empty() )
    \n-
    131 {
    \n-
    132 StackType * st = emptyStackList_.top();
    \n-
    133 if(st) delete st;
    \n-
    134 emptyStackList_.pop();
    \n-
    135 }
    \n-
    136 }
    \n-
    137
    \n-
    138 template <class T, int length>
    \n-\n-
    140 {
    \n-
    141 if((*stack_).empty())
    \n-
    142 {
    \n-
    143 if( fullStackList_.size() <= 0)
    \n-
    144 {
    \n-
    145 return maxIndex_++;
    \n-
    146 }
    \n-
    147 else
    \n-
    148 {
    \n-
    149 emptyStackList_.push( stack_ );
    \n-
    150 stack_ = fullStackList_.top();
    \n-
    151 fullStackList_.pop();
    \n-
    152 }
    \n-
    153 }
    \n-
    154 return (*stack_).topAndPop();
    \n-
    155 }
    \n-
    156
    \n-
    157 template <class T, int length>
    \n-
    158 inline void IndexStack<T,length>::freeIndex ( T index )
    \n-
    159 {
    \n-
    160 if((*stack_).full())
    \n-
    161 {
    \n-
    162 fullStackList_.push( stack_ );
    \n-
    163 if(emptyStackList_.size() <= 0)
    \n-
    164 {
    \n-
    165 stack_ = new StackType ();
    \n-
    166 }
    \n-
    167 else
    \n-
    168 {
    \n-
    169 stack_ = emptyStackList_.top();
    \n-
    170 emptyStackList_.pop();
    \n-
    171 }
    \n-
    172 }
    \n-
    173 (*stack_).push(index);
    \n-
    174 }
    \n-
    175
    \n-
    176 template <class T, int length>
    \n-\n-
    178 {
    \n-
    179 T vec[2*length];
    \n-
    180
    \n-
    181 for(int i=0; i<2*length; i++)
    \n-
    182 vec[i] = getIndex();
    \n-
    183
    \n-
    184 for(int i=0; i<2*length; i++)
    \n-
    185 freeIndex(vec[i]);
    \n-
    186
    \n-
    187 for(int i=0; i<2*length; i++)
    \n-
    188 vec[i] = getIndex();
    \n-
    189
    \n-
    190 for(int i=0; i<2*length; i++)
    \n-
    191 printf(" index [%d] = %d \\n",i,vec[i]);
    \n-
    192 }
    \n-
    193
    \n-
    194 template <class T, int length>
    \n-
    195 inline void IndexStack<T,length>::backupIndexSet ( std::ostream & os )
    \n-
    196 {
    \n-
    197 // holes are not stored at the moment
    \n-
    198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ;
    \n-
    199 return ;
    \n-
    200 }
    \n-
    201
    \n-
    202 template <class T, int length>
    \n-
    203 inline void IndexStack<T,length>::restoreIndexSet ( std::istream & is )
    \n-
    204 {
    \n-
    205 is.read ( ((char *) &maxIndex_), sizeof(int) );
    \n-
    206 clearStack ();
    \n-
    207
    \n-
    208 return ;
    \n-
    209 }
    \n-
    210
    \n-
    211 template <class T, int length>
    \n-\n-
    213 {
    \n-
    214 if(stack_)
    \n-
    215 {
    \n-
    216 delete stack_;
    \n-
    217 stack_ = new StackType();
    \n-
    218 assert(stack_);
    \n-
    219 }
    \n-
    220
    \n-
    221 while( !fullStackList_.empty() )
    \n-
    222 {
    \n-
    223 StackType * st = fullStackList_.top();
    \n-
    224 if(st) delete st;
    \n-
    225 fullStackList_.pop();
    \n-
    226 }
    \n-
    227 return;
    \n-
    228 }
    \n-
    229
    \n-
    230} // end namespace Dune
    \n-
    231#endif
    \n+
    124 // new vertex is always the last one
    \n+
    125 assert( element->child[ 0 ] != NULL );
    \n+
    126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension ) ];
    \n+
    127
    \n+
    128 if( element->new_coord != NULL )
    \n+
    129 {
    \n+
    130 for( int j = 0; j < dimWorld; ++j )
    \n+
    131 newCoord[ j ] = element->new_coord[ j ];
    \n+
    132 }
    \n+
    133 else
    \n+
    134 {
    \n+
    135 // new coordinate is the average of of old ones on the same edge
    \n+
    136 // refinement edge is always between vertices 0 and 1
    \n+
    137 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];
    \n+
    138 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];
    \n+
    139 for( int j = 0; j < dimWorld; ++j )
    \n+
    140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);
    \n+
    141 }
    \n+
    142 }
    \n+
    143 };
    \n+
    144
    \n+
    145 }
    \n+
    146
    \n+
    147}
    \n+
    148
    \n+
    149#endif // #if HAVE_ALBERTA
    \n+
    150
    \n+
    151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH
    \n+\n+
    provides a wrapper for ALBERTA's mesh structure
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: indexstack.hh:26
    \n-
    void restoreIndexSet(std::istream &is)
    Definition: indexstack.hh:203
    \n-
    void checkAndSetMax(T index)
    set index as maxIndex if index is bigger than maxIndex
    Definition: indexstack.hh:70
    \n-
    void backupIndexSet(std::ostream &os)
    Definition: indexstack.hh:195
    \n-
    ~IndexStack()
    Destructor, deleting all stacks.
    Definition: indexstack.hh:119
    \n-
    T getIndex()
    restore index from stack or create new index
    Definition: indexstack.hh:139
    \n-
    IndexStack()
    Constructor, create new IndexStack.
    Definition: indexstack.hh:115
    \n-
    void setMaxIndex(T index)
    set index as maxIndex
    Definition: indexstack.hh:73
    \n-
    int size() const
    return maxIndex which is also the
    Definition: indexstack.hh:79
    \n-
    void test()
    test stack functionality
    Definition: indexstack.hh:177
    \n-
    void freeIndex(T index)
    store index on stack
    Definition: indexstack.hh:158
    \n-
    int getMaxIndex() const
    return maxIndex which is also the
    Definition: indexstack.hh:76
    \n+
    ALBERTA EL Element
    Definition: misc.hh:54
    \n+
    ALBERTA FE_SPACE DofSpace
    Definition: misc.hh:65
    \n+
    static const int dimWorld
    Definition: misc.hh:46
    \n+
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n+
    @ vertex
    Definition: common.hh:133
    \n+
    Definition: coordcache.hh:25
    \n+
    static const int dimension
    Definition: coordcache.hh:33
    \n+
    GlobalVector & operator()(const Element *element, int vertex) const
    Definition: coordcache.hh:39
    \n+
    Alberta::MeshPointer< dimension > MeshPointer
    Definition: coordcache.hh:36
    \n+
    void release()
    Definition: coordcache.hh:64
    \n+
    Alberta::ElementInfo< dimension > ElementInfo
    Definition: coordcache.hh:35
    \n+
    HierarchyDofNumbering< dimension > DofNumbering
    Definition: coordcache.hh:37
    \n+
    void create(const DofNumbering &dofNumbering)
    Definition: coordcache.hh:51
    \n+
    Definition: coordcache.hh:81
    \n+
    LocalCaching(const CoordVectorPointer &coords)
    Definition: coordcache.hh:86
    \n+
    Definition: coordcache.hh:111
    \n+
    Alberta::Patch< dimension > Patch
    Definition: coordcache.hh:114
    \n+
    static void interpolateVector(const CoordVectorPointer &dofVector, const Patch &patch)
    Definition: coordcache.hh:117
    \n+\n+
    void hierarchicTraverse(Functor &functor, typename FillFlags::Flags fillFlags=FillFlags::standard) const
    Definition: meshpointer.hh:370
    \n+\n+
    static const int numSubEntities
    Definition: dofadmin.hh:40
    \n+\n+
    const MeshPointer & mesh() const
    Definition: dofadmin.hh:158
    \n+
    const DofSpace * dofSpace(int codim) const
    Definition: dofadmin.hh:145
    \n+\n+
    void create(const DofSpace *dofSpace, const std::string &name="")
    Definition: dofvector.hh:236
    \n+
    void release()
    Definition: dofvector.hh:254
    \n+
    const DofSpace * dofSpace() const
    Definition: dofvector.hh:223
    \n+\n+
    const GlobalVector & coordinate(int vertex) const
    Definition: elementinfo.hh:685
    \n+
    Element * el() const
    Definition: elementinfo.hh:737
    \n+
    Definition: misc.hh:231
    \n+
    Definition: refinement.hh:40
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -5,272 +5,262 @@\n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n * albertagrid\n-indexstack.hh\n+coordcache.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTAGRID_INDEXSTACK_HH\n- 6#define DUNE_ALBERTAGRID_INDEXSTACK_HH\n+ 5#ifndef DUNE_ALBERTA_COORDCACHE_HH\n+ 6#define DUNE_ALBERTA_COORDCACHE_HH\n 7\n- 8#include \n- 9#include \n- 10\n- 11#include \n- 12#include \n+ 8#include \n+ 9#include \n+ 10#include \n+ 11\n+ 12#if HAVE_ALBERTA\n 13\n- 20namespace Dune {\n- 21\n- 24 template \n-25 class IndexStack\n- 26 {\n- 27 class MyFiniteStack : public ReservedVector\n- 28 {\n- 29 typedef ReservedVector BaseType ;\n- 30 public:\n- 32 bool full () const { return this->size() >= length; }\n- 33\n- 35 void push( const T& t ) { BaseType :: push_back( t ); }\n- 36\n- 38 T topAndPop ()\n- 39 {\n- 40 assert( !this->empty() );\n- 41 assert( this->size() <= length );\n- 42 // This code is not slower than using the array structure directly.\n- 43 // The compiler removes the temporary completely. I measured this.\n- 44 // See the commit message for revision 7837 for more details.\n- 45 T tmp = this->back();\n- 46 this->pop_back();\n- 47 return tmp;\n- 48 }\n- 49 };\n+ 14namespace Dune\n+ 15{\n+ 16\n+ 17 namespace Alberta\n+ 18 {\n+ 19\n+ 20 // CoordCache\n+ 21 // ----------\n+ 22\n+ 23 template< int dim >\n+24 class CoordCache\n+ 25 {\n+ 26 typedef DofVectorPointer<_GlobalVector_> CoordVectorPointer;\n+ 27 typedef Alberta::DofAccess<_dim,_dim_> DofAccess;\n+ 28\n+ 29 class LocalCaching;\n+ 30 struct Interpolation;\n+ 31\n+ 32 public:\n+33 static const int dimension = dim;\n+ 34\n+35 typedef Alberta::ElementInfo<_dimension_> ElementInfo;\n+36 typedef Alberta::MeshPointer<_dimension_> MeshPointer;\n+37 typedef HierarchyDofNumbering<_dimension_> DofNumbering;\n+ 38\n+39 GlobalVector &operator()( const Element *element, int vertex ) const\n+ 40 {\n+ 41 assert( !(!coords_) );\n+ 42 GlobalVector *array = (GlobalVector *)coords_;\n+ 43 return array[ dofAccess_( element, vertex ) ];\n+ 44 }\n+ 45\n+46 GlobalVector &operator()( const ElementInfo &elementInfo, int vertex ) const\n+ 47 {\n+ 48 return (*this)( elementInfo.el(), vertex );\n+ 49 }\n 50\n- 51 typedef MyFiniteStack StackType;\n- 52 typedef typename std::stack < StackType * > StackListType;\n- 53\n- 54 StackListType fullStackList_;\n- 55 StackListType emptyStackList_;\n- 56\n- 57 //typedef typename StackListType::Iterator DListIteratorType;\n- 58 StackType * stack_;\n- 59\n- 60 // current maxIndex\n- 61 int maxIndex_;\n- 62 public:\n- 64 inline IndexStack();\n- 65\n- 67 inline ~IndexStack ();\n+51 void create ( const DofNumbering &dofNumbering )\n+ 52 {\n+ 53 MeshPointer mesh = dofNumbering.mesh();\n+ 54 const DofSpace *dofSpace = dofNumbering.dofSpace( dimension );\n+ 55\n+ 56 coords_.create( dofSpace, \"Coordinate Cache\" );\n+ 57 LocalCaching localCaching( coords_ );\n+ 58 mesh.hierarchicTraverse( localCaching, FillFlags<_dimension_>::coords );\n+ 59 coords_.template setupInterpolation< Interpolation >();\n+ 60\n+ 61 dofAccess_ = DofAccess( dofSpace );\n+ 62 }\n+ 63\n+64 void release ()\n+ 65 {\n+ 66 coords_.release();\n+ 67 }\n 68\n-70 inline void checkAndSetMax(T index) { if(index > maxIndex_) maxIndex_ =\n-index;}\n- 71\n-73 inline void setMaxIndex(T index) { maxIndex_ = index; }\n+ 69 private:\n+ 70 CoordVectorPointer coords_;\n+ 71 DofAccess dofAccess_;\n+ 72 };\n+ 73\n 74\n-76 inline int getMaxIndex() const { return maxIndex_; }\n- 77\n-79 inline int size() const { return getMaxIndex(); }\n- 80\n- 82 inline T getIndex ();\n- 83\n- 85 inline void freeIndex(T index);\n- 86\n- 88 inline void test ();\n- 89\n- 90 // backup set to out stream\n- 91 inline void backupIndexSet ( std::ostream & os );\n- 92\n- 93 // restore from in stream\n- 94 inline void restoreIndexSet ( std::istream & is );\n- 95 private:\n- 96 // no copy constructor allowed\n- 97 IndexStack( const IndexStack & s) : maxIndex_ (0) , stack_(0) {}\n- 98\n- 99 // no assignment operator allowed\n- 100 IndexStack & operator = ( const IndexStack & s)\n- 101 {\n- 102 DUNE_THROW(Exception, \"IndexStack::operator = () not allowed!\");\n- 103 return *this;\n- 104 }\n+ 75\n+ 76 // CoordCache::LocalCaching\n+ 77 // ------------------------\n+ 78\n+ 79 template< int dim >\n+80 class CoordCache< dim >::LocalCaching\n+ 81 {\n+ 82 CoordVectorPointer coords_;\n+ 83 DofAccess dofAccess_;\n+ 84\n+ 85 public:\n+86 explicit LocalCaching ( const CoordVectorPointer &coords )\n+ 87 : coords_( coords ),\n+ 88 dofAccess_( coords.dofSpace() )\n+ 89 {}\n+ 90\n+91 void operator()( const ElementInfo &elementInfo ) const\n+ 92 {\n+ 93 GlobalVector *array = (GlobalVector *)coords_;\n+ 94 for( int i = 0; i < DofAccess::numSubEntities; ++i )\n+ 95 {\n+ 96 const GlobalVector &x = elementInfo.coordinate( i );\n+ 97 GlobalVector &y = array[ dofAccess_( elementInfo.el(), i ) ];\n+ 98 for( int i = 0; i < dimWorld; ++i )\n+ 99 y[ i ] = x[ i ];\n+ 100 }\n+ 101 }\n+ 102 };\n+ 103\n+ 104\n 105\n- 106 // clear fullStacks\n- 107 void clearStack ();\n+ 106 // CoordCache::Interpolation\n+ 107 // -------------------------\n 108\n- 109 }; // end class IndexStack\n- 110\n- 111 //****************************************************************\n- 112 // Inline implementation\n- 113 // ***************************************************************\n- 114 template \n-115 inline IndexStack::IndexStack()\n- 116 : stack_ ( new StackType () ) , maxIndex_ (0) {}\n- 117\n- 118 template \n-119 inline IndexStack::~IndexStack ()\n- 120 {\n- 121 if(stack_) delete stack_;\n- 122 stack_ = 0;\n+ 109 template< int dim >\n+110 struct CoordCache< dim >::Interpolation\n+ 111 {\n+112 static const int dimension = dim;\n+ 113\n+114 typedef Alberta::Patch<_dimension_> Patch;\n+ 115\n+ 116 static void\n+117 interpolateVector ( const CoordVectorPointer &dofVector, const Patch &patch\n+)\n+ 118 {\n+ 119 DofAccess dofAccess( dofVector.dofSpace() );\n+ 120 GlobalVector *array = (GlobalVector *)dofVector;\n+ 121\n+ 122 const Element *element = patch[ 0 ];\n 123\n- 124 while( !fullStackList_.empty() )\n- 125 {\n- 126 StackType * st = fullStackList_.top();\n- 127 if(st) delete st;\n- 128 fullStackList_.pop();\n- 129 }\n- 130 while( !emptyStackList_.empty() )\n- 131 {\n- 132 StackType * st = emptyStackList_.top();\n- 133 if(st) delete st;\n- 134 emptyStackList_.pop();\n- 135 }\n- 136 }\n- 137\n- 138 template \n-139 inline T IndexStack::getIndex ()\n- 140 {\n- 141 if((*stack_).empty())\n- 142 {\n- 143 if( fullStackList_.size() <= 0)\n- 144 {\n- 145 return maxIndex_++;\n- 146 }\n- 147 else\n- 148 {\n- 149 emptyStackList_.push( stack_ );\n- 150 stack_ = fullStackList_.top();\n- 151 fullStackList_.pop();\n- 152 }\n- 153 }\n- 154 return (*stack_).topAndPop();\n- 155 }\n- 156\n- 157 template \n-158 inline void IndexStack::freeIndex ( T index )\n- 159 {\n- 160 if((*stack_).full())\n- 161 {\n- 162 fullStackList_.push( stack_ );\n- 163 if(emptyStackList_.size() <= 0)\n- 164 {\n- 165 stack_ = new StackType ();\n- 166 }\n- 167 else\n- 168 {\n- 169 stack_ = emptyStackList_.top();\n- 170 emptyStackList_.pop();\n- 171 }\n- 172 }\n- 173 (*stack_).push(index);\n- 174 }\n- 175\n- 176 template \n-177 inline void IndexStack::test ()\n- 178 {\n- 179 T vec[2*length];\n- 180\n- 181 for(int i=0; i<2*length; i++)\n- 182 vec[i] = getIndex();\n- 183\n- 184 for(int i=0; i<2*length; i++)\n- 185 freeIndex(vec[i]);\n- 186\n- 187 for(int i=0; i<2*length; i++)\n- 188 vec[i] = getIndex();\n- 189\n- 190 for(int i=0; i<2*length; i++)\n- 191 printf(\" index [%d] = %d \\n\",i,vec[i]);\n- 192 }\n- 193\n- 194 template \n-195 inline void IndexStack::backupIndexSet ( std::ostream & os )\n- 196 {\n- 197 // holes are not stored at the moment\n- 198 os.write( ((const char *) &maxIndex_ ), sizeof(int) ) ;\n- 199 return ;\n- 200 }\n- 201\n- 202 template \n-203 inline void IndexStack::restoreIndexSet ( std::istream & is )\n- 204 {\n- 205 is.read ( ((char *) &maxIndex_), sizeof(int) );\n- 206 clearStack ();\n- 207\n- 208 return ;\n- 209 }\n- 210\n- 211 template \n- 212 inline void IndexStack::clearStack ()\n- 213 {\n- 214 if(stack_)\n- 215 {\n- 216 delete stack_;\n- 217 stack_ = new StackType();\n- 218 assert(stack_);\n- 219 }\n- 220\n- 221 while( !fullStackList_.empty() )\n- 222 {\n- 223 StackType * st = fullStackList_.top();\n- 224 if(st) delete st;\n- 225 fullStackList_.pop();\n- 226 }\n- 227 return;\n- 228 }\n- 229\n- 230} // end namespace Dune\n- 231#endif\n+ 124 // new vertex is always the last one\n+ 125 assert( element->child[ 0 ] != NULL );\n+ 126 GlobalVector &newCoord = array[ dofAccess( element->child[ 0 ], dimension\n+) ];\n+ 127\n+ 128 if( element->new_coord != NULL )\n+ 129 {\n+ 130 for( int j = 0; j < dimWorld; ++j )\n+ 131 newCoord[ j ] = element->new_coord[ j ];\n+ 132 }\n+ 133 else\n+ 134 {\n+ 135 // new coordinate is the average of of old ones on the same edge\n+ 136 // refinement edge is always between vertices 0 and 1\n+ 137 const GlobalVector &coord0 = array[ dofAccess( element, 0 ) ];\n+ 138 const GlobalVector &coord1 = array[ dofAccess( element, 1 ) ];\n+ 139 for( int j = 0; j < dimWorld; ++j )\n+ 140 newCoord[ j ] = 0.5 * (coord0[ j ] + coord1[ j ]);\n+ 141 }\n+ 142 }\n+ 143 };\n+ 144\n+ 145 }\n+ 146\n+ 147}\n+ 148\n+ 149#endif // #if HAVE_ALBERTA\n+ 150\n+ 151#endif // #ifndef DUNE_ALBERTA_COORDCACHE_HH\n+dofadmin.hh\n+meshpointer.hh\n+provides a wrapper for ALBERTA's mesh structure\n+dofvector.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::IndexStack\n-Definition: indexstack.hh:26\n-Dune::IndexStack::restoreIndexSet\n-void restoreIndexSet(std::istream &is)\n-Definition: indexstack.hh:203\n-Dune::IndexStack::checkAndSetMax\n-void checkAndSetMax(T index)\n-set index as maxIndex if index is bigger than maxIndex\n-Definition: indexstack.hh:70\n-Dune::IndexStack::backupIndexSet\n-void backupIndexSet(std::ostream &os)\n-Definition: indexstack.hh:195\n-Dune::IndexStack::~IndexStack\n-~IndexStack()\n-Destructor, deleting all stacks.\n-Definition: indexstack.hh:119\n-Dune::IndexStack::getIndex\n-T getIndex()\n-restore index from stack or create new index\n-Definition: indexstack.hh:139\n-Dune::IndexStack::IndexStack\n-IndexStack()\n-Constructor, create new IndexStack.\n-Definition: indexstack.hh:115\n-Dune::IndexStack::setMaxIndex\n-void setMaxIndex(T index)\n-set index as maxIndex\n-Definition: indexstack.hh:73\n-Dune::IndexStack::size\n-int size() const\n-return maxIndex which is also the\n-Definition: indexstack.hh:79\n-Dune::IndexStack::test\n-void test()\n-test stack functionality\n-Definition: indexstack.hh:177\n-Dune::IndexStack::freeIndex\n-void freeIndex(T index)\n-store index on stack\n-Definition: indexstack.hh:158\n-Dune::IndexStack::getMaxIndex\n-int getMaxIndex() const\n-return maxIndex which is also the\n-Definition: indexstack.hh:76\n+Dune::Alberta::Element\n+ALBERTA EL Element\n+Definition: misc.hh:54\n+Dune::Alberta::DofSpace\n+ALBERTA FE_SPACE DofSpace\n+Definition: misc.hh:65\n+Dune::Alberta::dimWorld\n+static const int dimWorld\n+Definition: misc.hh:46\n+Dune::Alberta::GlobalVector\n+ALBERTA REAL_D GlobalVector\n+Definition: misc.hh:50\n+Dune::VTK::vertex\n+@ vertex\n+Definition: common.hh:133\n+Dune::Alberta::CoordCache\n+Definition: coordcache.hh:25\n+Dune::Alberta::CoordCache::dimension\n+static const int dimension\n+Definition: coordcache.hh:33\n+Dune::Alberta::CoordCache::operator()\n+GlobalVector & operator()(const Element *element, int vertex) const\n+Definition: coordcache.hh:39\n+Dune::Alberta::CoordCache::MeshPointer\n+Alberta::MeshPointer< dimension > MeshPointer\n+Definition: coordcache.hh:36\n+Dune::Alberta::CoordCache::release\n+void release()\n+Definition: coordcache.hh:64\n+Dune::Alberta::CoordCache::ElementInfo\n+Alberta::ElementInfo< dimension > ElementInfo\n+Definition: coordcache.hh:35\n+Dune::Alberta::CoordCache::DofNumbering\n+HierarchyDofNumbering< dimension > DofNumbering\n+Definition: coordcache.hh:37\n+Dune::Alberta::CoordCache::create\n+void create(const DofNumbering &dofNumbering)\n+Definition: coordcache.hh:51\n+Dune::Alberta::CoordCache::LocalCaching\n+Definition: coordcache.hh:81\n+Dune::Alberta::CoordCache::LocalCaching::LocalCaching\n+LocalCaching(const CoordVectorPointer &coords)\n+Definition: coordcache.hh:86\n+Dune::Alberta::CoordCache::Interpolation\n+Definition: coordcache.hh:111\n+Dune::Alberta::CoordCache::Interpolation::Patch\n+Alberta::Patch< dimension > Patch\n+Definition: coordcache.hh:114\n+Dune::Alberta::CoordCache::Interpolation::interpolateVector\n+static void interpolateVector(const CoordVectorPointer &dofVector, const Patch\n+&patch)\n+Definition: coordcache.hh:117\n+Dune::Alberta::MeshPointer<_dimension_>\n+Dune::Alberta::MeshPointer::hierarchicTraverse\n+void hierarchicTraverse(Functor &functor, typename FillFlags::Flags\n+fillFlags=FillFlags::standard) const\n+Definition: meshpointer.hh:370\n+Dune::Alberta::DofAccess<_dim,_dim_>\n+Dune::Alberta::DofAccess<_dim,_dim_>::numSubEntities\n+static const int numSubEntities\n+Definition: dofadmin.hh:40\n+Dune::Alberta::HierarchyDofNumbering<_dimension_>\n+Dune::Alberta::HierarchyDofNumbering::mesh\n+const MeshPointer & mesh() const\n+Definition: dofadmin.hh:158\n+Dune::Alberta::HierarchyDofNumbering::dofSpace\n+const DofSpace * dofSpace(int codim) const\n+Definition: dofadmin.hh:145\n+Dune::Alberta::DofVectorPointer<_GlobalVector_>\n+Dune::Alberta::DofVectorPointer::create\n+void create(const DofSpace *dofSpace, const std::string &name=\"\")\n+Definition: dofvector.hh:236\n+Dune::Alberta::DofVectorPointer::release\n+void release()\n+Definition: dofvector.hh:254\n+Dune::Alberta::DofVectorPointer::dofSpace\n+const DofSpace * dofSpace() const\n+Definition: dofvector.hh:223\n+Dune::Alberta::ElementInfo<_dimension_>\n+Dune::Alberta::ElementInfo::coordinate\n+const GlobalVector & coordinate(int vertex) const\n+Definition: elementinfo.hh:685\n+Dune::Alberta::ElementInfo::el\n+Element * el() const\n+Definition: elementinfo.hh:737\n+Dune::Alberta::FillFlags\n+Definition: misc.hh:231\n+Dune::Alberta::Patch\n+Definition: refinement.hh:40\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00680_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00353_source.html", "comments": ["Files 8% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: geometrycache.hh Source File\n+dune-grid: scsgmapper.hh Source File\n \n \n \n \n \n \n \n@@ -58,172 +58,180 @@\n \n
    \n \n \n
    \n
    \n-
    geometrycache.hh
    \n+
    scsgmapper.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
    \n-
    6#define DUNE_ALBERTA_GEOMETRYCACHE_HH
    \n+
    5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH
    \n+
    6#define DUNE_GRID_COMMON_SCSGMAPPER_HH
    \n
    7
    \n-\n-\n+
    8#include <iostream>
    \n+
    9#include "mapper.hh"
    \n
    10
    \n-
    11#if HAVE_ALBERTA
    \n+\n
    12
    \n-
    13namespace Dune
    \n-
    14{
    \n-
    15
    \n-
    16 namespace Alberta
    \n-
    17 {
    \n-
    18
    \n-
    19 // GeometryCache
    \n-
    20 // -------------
    \n-
    21
    \n-
    22 template< int dim >
    \n-\n-
    24 {
    \n-
    25 static const unsigned int flagIntegrationElement = (1 << 0);
    \n-
    26 static const unsigned int flagJacobianTransposed = (1 << 1);
    \n-
    27 static const unsigned int flagJacobianInverseTransposed = (1 << 2);
    \n-
    28
    \n-
    29 public:
    \n-
    30 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;
    \n-
    31 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;
    \n-
    32
    \n-\n-
    34 : flags_( 0 )
    \n-
    35 {}
    \n-
    36
    \n-
    37 const Real &integrationElement ( const ALBERTA EL_INFO &elInfo )
    \n-
    38 {
    \n-
    39 if( (flags_ & flagIntegrationElement) == 0 )
    \n-
    40 {
    \n-
    41 integrationElement_ = std::abs( determinant( jacobianTransposed( elInfo ) ) );
    \n-
    42 assert( integrationElement_ > 1e-14 );
    \n-
    43 flags_ |= flagIntegrationElement;
    \n-
    44 }
    \n-
    45 return integrationElement_;
    \n-
    46 }
    \n-
    47
    \n-
    48 const JacobianTransposed &jacobianTransposed ( const ALBERTA EL_INFO &elInfo )
    \n-
    49 {
    \n-
    50 if( (flags_ & flagJacobianTransposed) == 0 )
    \n-
    51 {
    \n-
    52 assert( (elInfo.fill_flag & FillFlags< dim >::coords) != 0 );
    \n-
    53 const GlobalVector &x = elInfo.coord[ 0 ];
    \n-
    54 for( int i = 0; i < dim; ++i )
    \n-
    55 {
    \n-
    56 const GlobalVector &y = elInfo.coord[ i+1 ];
    \n-
    57 for( int j = 0; j < dimWorld; ++j )
    \n-
    58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ];
    \n-
    59 }
    \n-
    60 flags_ |= flagJacobianTransposed;
    \n-
    61 }
    \n-
    62 return jacobianTransposed_;
    \n-
    63 }
    \n+
    19namespace Dune
    \n+
    20{
    \n+
    37 template <typename GV, int c>
    \n+\n+
    39 public Mapper<typename GV::Grid,SingleCodimSingleGeomTypeMapper<GV,c>, typename GV::IndexSet::IndexType >
    \n+
    40 {
    \n+
    41 public:
    \n+
    42
    \n+
    44 typedef typename GV::IndexSet::IndexType Index;
    \n+
    45
    \n+
    50 using size_type = decltype(std::declval<typename GV::IndexSet>().size(0));
    \n+
    51
    \n+\n+
    57 : gridView_(gridView)
    \n+
    58 , indexSet_(&gridView_.indexSet())
    \n+
    59 {
    \n+
    60 // check that grid has only a single geometry type
    \n+
    61 if (indexSet_->types(c).size() != 1)
    \n+
    62 DUNE_THROW(GridError, "mapper treats only a single codim and a single geometry type");
    \n+
    63 }
    \n
    64
    \n-\n-
    66 jacobianInverseTransposed ( const ALBERTA EL_INFO &elInfo )
    \n-
    67 {
    \n-
    68 if( (flags_ & flagJacobianInverseTransposed) == 0 )
    \n-
    69 {
    \n-
    70 integrationElement_ = std::abs( invert( jacobianTransposed( elInfo ), jacobianInverseTransposed_ ) );
    \n-
    71 assert( integrationElement_ > 1e-14 );
    \n-
    72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed;
    \n-
    73 }
    \n-
    74 return jacobianInverseTransposed_;
    \n-
    75 }
    \n+
    70 template<class EntityType>
    \n+
    71 Index index (const EntityType& e) const
    \n+
    72 {
    \n+
    73 static_assert(EntityType::codimension == c, "Entity of wrong codim passed to SingleCodimSingleGeomTypeMapper");
    \n+
    74 return indexSet_->index(e);
    \n+
    75 }
    \n
    76
    \n-
    77 private:
    \n-
    78 unsigned int flags_;
    \n-
    79 Real integrationElement_;
    \n-
    80 FieldMatrix< Real, dim, dimWorld > jacobianTransposed_;
    \n-
    81 FieldMatrix< Real, dimWorld, dim > jacobianInverseTransposed_;
    \n-
    82 };
    \n-
    83
    \n-
    84
    \n-
    85
    \n-
    86 // GeometryCacheProxy
    \n-
    87 // ------------------
    \n-
    88
    \n-
    89 template< int dim >
    \n-\n-
    91 {
    \n-
    92 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;
    \n-
    93 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;
    \n-
    94
    \n-
    95 GeometryCacheProxy ( GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo )
    \n-
    96 : geometryCache_( geometryCache ),
    \n-
    97 elInfo_( elInfo )
    \n-
    98 {}
    \n-
    99
    \n-\n-
    101 {
    \n-
    102 return geometryCache_.integrationElement( elInfo_ );
    \n-
    103 }
    \n+
    84 Index subIndex (const typename GV::template Codim<0>::Entity& e,
    \n+
    85 int i, unsigned int codim) const
    \n+
    86 {
    \n+
    87 if (codim != c)
    \n+
    88 DUNE_THROW(GridError, "Id of wrong codim requested from SingleCodimSingleGeomTypeMapper");
    \n+
    89 return indexSet_->subIndex(e,i,codim);
    \n+
    90 }
    \n+
    91
    \n+\n+
    101 {
    \n+
    102 return indexSet_->size(c);
    \n+
    103 }
    \n
    104
    \n-\n-
    106 {
    \n-
    107 return geometryCache_.jacobianTransposed( elInfo_ );
    \n-
    108 }
    \n-
    109
    \n-\n-
    111 {
    \n-
    112 return geometryCache_.jacobianInverseTransposed( elInfo_ );
    \n-
    113 }
    \n-
    114
    \n-
    115 private:
    \n-
    116 GeometryCache< dim > &geometryCache_;
    \n-
    117 const ALBERTA EL_INFO &elInfo_;
    \n-
    118 };
    \n-
    119
    \n-
    120 } // namespace Alberta
    \n-
    121
    \n-
    122} // namespace Dune
    \n-
    123
    \n-
    124#endif // #if HAVE_ALBERTA
    \n-
    125
    \n-
    126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH
    \n-\n-
    #define ALBERTA
    Definition: albertaheader.hh:29
    \n-\n+
    111 template<class EntityType>
    \n+
    112 bool contains (const EntityType& e, Index& result) const
    \n+
    113 {
    \n+
    114 result = index(e);
    \n+
    115 return true;
    \n+
    116 }
    \n+
    117
    \n+
    126 bool contains (const typename GV::template Codim<0>::Entity& e, int i, int cc, Index& result) const
    \n+
    127 {
    \n+
    128 result = subIndex(e,i,cc);
    \n+
    129 return true;
    \n+
    130 }
    \n+
    131
    \n+
    137 void update (const GV& gridView)
    \n+
    138 {
    \n+
    139 gridView_ = gridView;
    \n+
    140 indexSet_ = &gridView_.indexSet();
    \n+
    141 }
    \n+
    142
    \n+
    148 void update (GV&& gridView)
    \n+
    149 {
    \n+
    150 gridView_ = std::move(gridView);
    \n+
    151 indexSet_ = &gridView_.indexSet();
    \n+
    152 }
    \n+
    153
    \n+
    156 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8.")]]
    \n+
    157 void update ()
    \n+
    158 { // nothing to do here
    \n+
    159 }
    \n+
    160
    \n+
    161 private:
    \n+
    162 GV gridView_;
    \n+
    163 const typename GV::IndexSet* indexSet_;
    \n+
    164 };
    \n+
    165
    \n+
    184 template <typename G, int c>
    \n+
    185 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
    \n+
    186 LeafSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LeafGridView,c> {
    \n+\n+
    188 public:
    \n+\n+
    193 : Base(grid.leafGridView())
    \n+
    194 , gridPtr_(&grid)
    \n+
    195 {}
    \n+
    196
    \n+
    202 void update ()
    \n+
    203 {
    \n+
    204 Base::update(gridPtr_->leafGridView());
    \n+
    205 }
    \n+
    206
    \n+
    207 private:
    \n+
    208 const G* gridPtr_;
    \n+
    209 };
    \n+
    210
    \n+
    222 template <typename G, int c>
    \n+
    223 class [[deprecated("Use SingleCodimSingleGeomTypeMapper instead! Will be removed after release 2.8.")]]
    \n+
    224 LevelSingleCodimSingleGeomTypeMapper : public SingleCodimSingleGeomTypeMapper<typename G::LevelGridView,c> {
    \n+\n+
    226 public:
    \n+
    227 /* @brief The constructor
    \n+
    228 @param grid A reference to a grid.
    \n+
    229 @param level A valid level of the grid.
    \n+
    230 */
    \n+
    231 LevelSingleCodimSingleGeomTypeMapper (const G& grid, int level)
    \n+
    232 : Base(grid.levelGridView(level))
    \n+
    233 , gridPtr_(&grid)
    \n+
    234 , level_(level)
    \n+
    235 {}
    \n+
    236
    \n+
    242 void update ()
    \n+
    243 {
    \n+
    244 Base::update(gridPtr_->levelGridView(level_));
    \n+
    245 }
    \n+
    246
    \n+
    247 private:
    \n+
    248 const G* gridPtr_;
    \n+
    249 int level_;
    \n+
    250 };
    \n+
    251
    \n+
    253}
    \n+
    254#endif
    \n+
    Provides classes with basic mappers which are used to attach data to a grid.
    \n+
    Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid< dim, dimworld, ct, GridFamily > &grid)
    leaf grid view for the given grid
    Definition: common/grid.hh:819
    \n+
    Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid< dim, dimworld, ct, GridFamily > &grid, int level)
    level grid view for the given grid and level.
    Definition: common/grid.hh:802
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    void abs(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:328
    \n-
    ALBERTA REAL Real
    Definition: misc.hh:48
    \n-
    static K determinant(const FieldMatrix< K, 0, m > &matrix)
    Definition: algebra.hh:30
    \n-
    static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
    Definition: algebra.hh:81
    \n-
    static const int dimWorld
    Definition: misc.hh:46
    \n-
    ALBERTA REAL_D GlobalVector
    Definition: misc.hh:50
    \n-
    Definition: geometrycache.hh:24
    \n-
    GeometryCache()
    Definition: geometrycache.hh:33
    \n-
    const Real & integrationElement(const ALBERTA EL_INFO &elInfo)
    Definition: geometrycache.hh:37
    \n-
    FieldMatrix< Real, dim, dimWorld > JacobianTransposed
    Definition: geometrycache.hh:31
    \n-
    const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo)
    Definition: geometrycache.hh:48
    \n-
    const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA EL_INFO &elInfo)
    Definition: geometrycache.hh:66
    \n-
    FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
    Definition: geometrycache.hh:30
    \n-
    Definition: geometrycache.hh:91
    \n-
    const JacobianTransposed & jacobianTransposed()
    Definition: geometrycache.hh:105
    \n-
    FieldMatrix< Real, dim, dimWorld > JacobianTransposed
    Definition: geometrycache.hh:93
    \n-
    FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed
    Definition: geometrycache.hh:92
    \n-
    const Real & integrationElement()
    Definition: geometrycache.hh:100
    \n-
    GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO &elInfo)
    Definition: geometrycache.hh:95
    \n-
    const JacobianInverseTransposed & jacobianInverseTransposed()
    Definition: geometrycache.hh:110
    \n-
    Definition: misc.hh:231
    \n+
    Base class for exceptions in Dune grid modules.
    Definition: exceptions.hh:20
    \n+
    Mapper interface.
    Definition: mapper.hh:110
    \n+
    Implementation class for a single codim and single geometry type mapper.
    Definition: scsgmapper.hh:40
    \n+
    bool contains(const EntityType &e, Index &result) const
    Returns true if the entity is contained in the index set.
    Definition: scsgmapper.hh:112
    \n+
    GV::IndexSet::IndexType Index
    Number type used for indices.
    Definition: scsgmapper.hh:44
    \n+
    bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc, Index &result) const
    Returns true if the entity is contained in the index set.
    Definition: scsgmapper.hh:126
    \n+
    decltype(std::declval< typename GV::IndexSet >().size(0)) size_type
    Number type used for the overall size (the return value of the 'size' method)
    Definition: scsgmapper.hh:50
    \n+
    Index index(const EntityType &e) const
    Map entity to array index.
    Definition: scsgmapper.hh:71
    \n+
    Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const
    Map subentity of codim 0 entity to array index.
    Definition: scsgmapper.hh:84
    \n+
    SingleCodimSingleGeomTypeMapper(const GV &gridView)
    Construct mapper from grid and one of its index sets.
    Definition: scsgmapper.hh:56
    \n+
    void update(GV &&gridView)
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:148
    \n+
    size_type size() const
    Return total number of entities in the entity set managed by the mapper.
    Definition: scsgmapper.hh:100
    \n+
    void update()
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:157
    \n+
    void update(const GV &gridView)
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:137
    \n+
    Single codim and single geometry type mapper for leaf entities.
    Definition: scsgmapper.hh:186
    \n+
    LeafSingleCodimSingleGeomTypeMapper(const G &grid)
    The constructor.
    Definition: scsgmapper.hh:192
    \n+
    void update()
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:202
    \n+
    Single codim and single geometry type mapper for entities of one level.
    Definition: scsgmapper.hh:224
    \n+
    LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level)
    Definition: scsgmapper.hh:231
    \n+
    void update()
    Recalculates indices after grid adaptation.
    Definition: scsgmapper.hh:242
    \n+
    Different resources needed by all grid implementations.
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,215 +4,252 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * albertagrid\n-geometrycache.hh\n+ * common\n+scsgmapper.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH\n- 6#define DUNE_ALBERTA_GEOMETRYCACHE_HH\n+ 5#ifndef DUNE_GRID_COMMON_SCSGMAPPER_HH\n+ 6#define DUNE_GRID_COMMON_SCSGMAPPER_HH\n 7\n- 8#include \n- 9#include \n+ 8#include \n+ 9#include \"mapper.hh\"\n 10\n- 11#if HAVE_ALBERTA\n+ 11#include \n 12\n- 13namespace Dune\n- 14{\n- 15\n- 16 namespace Alberta\n- 17 {\n- 18\n- 19 // GeometryCache\n- 20 // -------------\n- 21\n- 22 template< int dim >\n-23 class GeometryCache\n- 24 {\n- 25 static const unsigned int flagIntegrationElement = (1 << 0);\n- 26 static const unsigned int flagJacobianTransposed = (1 << 1);\n- 27 static const unsigned int flagJacobianInverseTransposed = (1 << 2);\n- 28\n- 29 public:\n-30 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;\n-31 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;\n- 32\n-33 GeometryCache ()\n- 34 : flags_( 0 )\n- 35 {}\n- 36\n-37 const Real &integrationElement ( const ALBERTA EL_INFO &elInfo )\n- 38 {\n- 39 if( (flags_ & flagIntegrationElement) == 0 )\n+ 19namespace Dune\n+ 20{\n+ 37 template \n+38 class SingleCodimSingleGeomTypeMapper :\n+ 39 public Mapper,\n+typename GV::IndexSet::IndexType >\n 40 {\n- 41 integrationElement_ = std::abs( determinant( jacobianTransposed( elInfo ) )\n-);\n- 42 assert( integrationElement_ > 1e-14 );\n- 43 flags_ |= flagIntegrationElement;\n- 44 }\n- 45 return integrationElement_;\n- 46 }\n- 47\n-48 const JacobianTransposed &jacobianTransposed ( const ALBERTA EL_INFO &elInfo\n-)\n- 49 {\n- 50 if( (flags_ & flagJacobianTransposed) == 0 )\n- 51 {\n- 52 assert( (elInfo.fill_flag & FillFlags<_dim_>::coords) != 0 );\n- 53 const GlobalVector &x = elInfo.coord[ 0 ];\n- 54 for( int i = 0; i < dim; ++i )\n- 55 {\n- 56 const GlobalVector &y = elInfo.coord[ i+1 ];\n- 57 for( int j = 0; j < dimWorld; ++j )\n- 58 jacobianTransposed_[ i ][ j ] = y[ j ] - x[ j ];\n- 59 }\n- 60 flags_ |= flagJacobianTransposed;\n- 61 }\n- 62 return jacobianTransposed_;\n+ 41 public:\n+ 42\n+44 typedef typename GV::IndexSet::IndexType Index;\n+ 45\n+50 using size_type = decltype(std::declval().size(0));\n+ 51\n+56 SingleCodimSingleGeomTypeMapper (const GV& gridView)\n+ 57 : gridView_(gridView)\n+ 58 , indexSet_(&gridView_.indexSet())\n+ 59 {\n+ 60 // check that grid has only a single geometry type\n+ 61 if (indexSet_->types(c).size() != 1)\n+ 62 DUNE_THROW(GridError, \"mapper treats only a single codim and a single\n+geometry type\");\n 63 }\n 64\n- 65 const JacobianInverseTransposed &\n-66 jacobianInverseTransposed ( const ALBERTA EL_INFO &elInfo )\n- 67 {\n- 68 if( (flags_ & flagJacobianInverseTransposed) == 0 )\n- 69 {\n- 70 integrationElement_ = std::abs( invert( jacobianTransposed( elInfo ),\n-jacobianInverseTransposed_ ) );\n- 71 assert( integrationElement_ > 1e-14 );\n- 72 flags_ |= flagIntegrationElement | flagJacobianInverseTransposed;\n- 73 }\n- 74 return jacobianInverseTransposed_;\n+ 70 template\n+71 Index index (const EntityType& e) const\n+ 72 {\n+ 73 static_assert(EntityType::codimension == c, \"Entity of wrong codim passed\n+to SingleCodimSingleGeomTypeMapper\");\n+ 74 return indexSet_->index(e);\n 75 }\n 76\n- 77 private:\n- 78 unsigned int flags_;\n- 79 Real integrationElement_;\n- 80 FieldMatrix< Real, dim, dimWorld > jacobianTransposed_;\n- 81 FieldMatrix< Real, dimWorld, dim > jacobianInverseTransposed_;\n- 82 };\n- 83\n- 84\n- 85\n- 86 // GeometryCacheProxy\n- 87 // ------------------\n- 88\n- 89 template< int dim >\n-90 struct GeometryCacheProxy\n- 91 {\n-92 typedef FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed;\n-93 typedef FieldMatrix< Real, dim, dimWorld > JacobianTransposed;\n- 94\n-95 GeometryCacheProxy ( GeometryCache<_dim_> &geometryCache, const ALBERTA\n-EL_INFO &elInfo )\n- 96 : geometryCache_( geometryCache ),\n- 97 elInfo_( elInfo )\n- 98 {}\n- 99\n-100 const Real &integrationElement ()\n+84 Index subIndex (const typename GV::template Codim<0>::Entity& e,\n+ 85 int i, unsigned int codim) const\n+ 86 {\n+ 87 if (codim != c)\n+ 88 DUNE_THROW(GridError, \"Id of wrong codim requested from\n+SingleCodimSingleGeomTypeMapper\");\n+ 89 return indexSet_->subIndex(e,i,codim);\n+ 90 }\n+ 91\n+100 size_type size () const\n 101 {\n- 102 return geometryCache_.integrationElement( elInfo_ );\n+ 102 return indexSet_->size(c);\n 103 }\n 104\n-105 const JacobianTransposed &jacobianTransposed ()\n- 106 {\n- 107 return geometryCache_.jacobianTransposed( elInfo_ );\n- 108 }\n- 109\n-110 const JacobianInverseTransposed &jacobianInverseTransposed ()\n- 111 {\n- 112 return geometryCache_.jacobianInverseTransposed( elInfo_ );\n- 113 }\n- 114\n- 115 private:\n- 116 GeometryCache<_dim_> &geometryCache_;\n- 117 const ALBERTA EL_INFO &elInfo_;\n- 118 };\n- 119\n- 120 } // namespace Alberta\n- 121\n- 122} // namespace Dune\n- 123\n- 124#endif // #if HAVE_ALBERTA\n- 125\n- 126#endif // #ifndef DUNE_ALBERTA_GEOMETRYCACHE_HH\n-misc.hh\n-ALBERTA\n-#define ALBERTA\n-Definition: albertaheader.hh:29\n-algebra.hh\n+ 111 template\n+112 bool contains (const EntityType& e, Index& result) const\n+ 113 {\n+ 114 result = index(e);\n+ 115 return true;\n+ 116 }\n+ 117\n+126 bool contains (const typename GV::template Codim<0>::Entity& e, int i, int\n+cc, Index& result) const\n+ 127 {\n+ 128 result = subIndex(e,i,cc);\n+ 129 return true;\n+ 130 }\n+ 131\n+137 void update (const GV& gridView)\n+ 138 {\n+ 139 gridView_ = gridView;\n+ 140 indexSet_ = &gridView_.indexSet();\n+ 141 }\n+ 142\n+148 void update (GV&& gridView)\n+ 149 {\n+ 150 gridView_ = std::move(gridView);\n+ 151 indexSet_ = &gridView_.indexSet();\n+ 152 }\n+ 153\n+ 156 [[deprecated(\"Use update(gridView) instead! Will be removed after release\n+2.8.\")]]\n+157 void update ()\n+ 158 { // nothing to do here\n+ 159 }\n+ 160\n+ 161 private:\n+ 162 GV gridView_;\n+ 163 const typename GV::IndexSet* indexSet_;\n+ 164 };\n+ 165\n+ 184 template \n+185 class [[deprecated(\"Use SingleCodimSingleGeomTypeMapper instead! Will be\n+removed after release 2.8.\")]]\n+ 186 LeafSingleCodimSingleGeomTypeMapper : public\n+SingleCodimSingleGeomTypeMapper {\n+ 187 using Base = SingleCodimSingleGeomTypeMapper;\n+ 188 public:\n+192 LeafSingleCodimSingleGeomTypeMapper (const G& grid)\n+ 193 : Base(grid.leafGridView())\n+ 194 , gridPtr_(&grid)\n+ 195 {}\n+ 196\n+202 void update ()\n+ 203 {\n+ 204 Base::update(gridPtr_->leafGridView());\n+ 205 }\n+ 206\n+ 207 private:\n+ 208 const G* gridPtr_;\n+ 209 };\n+ 210\n+ 222 template \n+223 class [[deprecated(\"Use SingleCodimSingleGeomTypeMapper instead! Will be\n+removed after release 2.8.\")]]\n+ 224 LevelSingleCodimSingleGeomTypeMapper : public\n+SingleCodimSingleGeomTypeMapper {\n+ 225 using Base = SingleCodimSingleGeomTypeMapper;\n+ 226 public:\n+ 227 /* @brief The constructor\n+ 228 @param grid A reference to a grid.\n+ 229 @param level A valid level of the grid.\n+ 230 */\n+231 LevelSingleCodimSingleGeomTypeMapper (const G& grid, int level)\n+ 232 : Base(grid.levelGridView(level))\n+ 233 , gridPtr_(&grid)\n+ 234 , level_(level)\n+ 235 {}\n+ 236\n+242 void update ()\n+ 243 {\n+ 244 Base::update(gridPtr_->levelGridView(level_));\n+ 245 }\n+ 246\n+ 247 private:\n+ 248 const G* gridPtr_;\n+ 249 int level_;\n+ 250 };\n+ 251\n+ 253}\n+ 254#endif\n+mapper.hh\n+Provides classes with basic mappers which are used to attach data to a grid.\n+Dune::leafGridView\n+Grid< dim, dimworld, ct, GridFamily >::LeafGridView leafGridView(const Grid<\n+dim, dimworld, ct, GridFamily > &grid)\n+leaf grid view for the given grid\n+Definition: common/grid.hh:819\n+Dune::levelGridView\n+Grid< dim, dimworld, ct, GridFamily >::LevelGridView levelGridView(const Grid<\n+dim, dimworld, ct, GridFamily > &grid, int level)\n+level grid view for the given grid and level.\n+Definition: common/grid.hh:802\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::abs\n-void abs(const DofVectorPointer< int > &dofVector)\n-Definition: dofvector.hh:328\n-Dune::Alberta::Real\n-ALBERTA REAL Real\n-Definition: misc.hh:48\n-Dune::Alberta::determinant\n-static K determinant(const FieldMatrix< K, 0, m > &matrix)\n-Definition: algebra.hh:30\n-Dune::Alberta::invert\n-static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 >\n-&inverse)\n-Definition: algebra.hh:81\n-Dune::Alberta::dimWorld\n-static const int dimWorld\n-Definition: misc.hh:46\n-Dune::Alberta::GlobalVector\n-ALBERTA REAL_D GlobalVector\n-Definition: misc.hh:50\n-Dune::Alberta::GeometryCache\n-Definition: geometrycache.hh:24\n-Dune::Alberta::GeometryCache::GeometryCache\n-GeometryCache()\n-Definition: geometrycache.hh:33\n-Dune::Alberta::GeometryCache::integrationElement\n-const Real & integrationElement(const ALBERTA EL_INFO &elInfo)\n-Definition: geometrycache.hh:37\n-Dune::Alberta::GeometryCache::JacobianTransposed\n-FieldMatrix< Real, dim, dimWorld > JacobianTransposed\n-Definition: geometrycache.hh:31\n-Dune::Alberta::GeometryCache::jacobianTransposed\n-const JacobianTransposed & jacobianTransposed(const ALBERTA EL_INFO &elInfo)\n-Definition: geometrycache.hh:48\n-Dune::Alberta::GeometryCache::jacobianInverseTransposed\n-const JacobianInverseTransposed & jacobianInverseTransposed(const ALBERTA\n-EL_INFO &elInfo)\n-Definition: geometrycache.hh:66\n-Dune::Alberta::GeometryCache::JacobianInverseTransposed\n-FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed\n-Definition: geometrycache.hh:30\n-Dune::Alberta::GeometryCacheProxy\n-Definition: geometrycache.hh:91\n-Dune::Alberta::GeometryCacheProxy::jacobianTransposed\n-const JacobianTransposed & jacobianTransposed()\n-Definition: geometrycache.hh:105\n-Dune::Alberta::GeometryCacheProxy::JacobianTransposed\n-FieldMatrix< Real, dim, dimWorld > JacobianTransposed\n-Definition: geometrycache.hh:93\n-Dune::Alberta::GeometryCacheProxy::JacobianInverseTransposed\n-FieldMatrix< Real, dimWorld, dim > JacobianInverseTransposed\n-Definition: geometrycache.hh:92\n-Dune::Alberta::GeometryCacheProxy::integrationElement\n-const Real & integrationElement()\n-Definition: geometrycache.hh:100\n-Dune::Alberta::GeometryCacheProxy::GeometryCacheProxy\n-GeometryCacheProxy(GeometryCache< dim > &geometryCache, const ALBERTA EL_INFO\n-&elInfo)\n-Definition: geometrycache.hh:95\n-Dune::Alberta::GeometryCacheProxy::jacobianInverseTransposed\n-const JacobianInverseTransposed & jacobianInverseTransposed()\n-Definition: geometrycache.hh:110\n-Dune::Alberta::FillFlags\n-Definition: misc.hh:231\n+Dune::GridError\n+Base class for exceptions in Dune grid modules.\n+Definition: exceptions.hh:20\n+Dune::Mapper\n+Mapper interface.\n+Definition: mapper.hh:110\n+Dune::SingleCodimSingleGeomTypeMapper\n+Implementation class for a single codim and single geometry type mapper.\n+Definition: scsgmapper.hh:40\n+Dune::SingleCodimSingleGeomTypeMapper::contains\n+bool contains(const EntityType &e, Index &result) const\n+Returns true if the entity is contained in the index set.\n+Definition: scsgmapper.hh:112\n+Dune::SingleCodimSingleGeomTypeMapper::Index\n+GV::IndexSet::IndexType Index\n+Number type used for indices.\n+Definition: scsgmapper.hh:44\n+Dune::SingleCodimSingleGeomTypeMapper::contains\n+bool contains(const typename GV::template Codim< 0 >::Entity &e, int i, int cc,\n+Index &result) const\n+Returns true if the entity is contained in the index set.\n+Definition: scsgmapper.hh:126\n+Dune::SingleCodimSingleGeomTypeMapper::size_type\n+decltype(std::declval< typename GV::IndexSet >().size(0)) size_type\n+Number type used for the overall size (the return value of the 'size' method)\n+Definition: scsgmapper.hh:50\n+Dune::SingleCodimSingleGeomTypeMapper::index\n+Index index(const EntityType &e) const\n+Map entity to array index.\n+Definition: scsgmapper.hh:71\n+Dune::SingleCodimSingleGeomTypeMapper::subIndex\n+Index subIndex(const typename GV::template Codim< 0 >::Entity &e, int i,\n+unsigned int codim) const\n+Map subentity of codim 0 entity to array index.\n+Definition: scsgmapper.hh:84\n+Dune::SingleCodimSingleGeomTypeMapper::SingleCodimSingleGeomTypeMapper\n+SingleCodimSingleGeomTypeMapper(const GV &gridView)\n+Construct mapper from grid and one of its index sets.\n+Definition: scsgmapper.hh:56\n+Dune::SingleCodimSingleGeomTypeMapper::update\n+void update(GV &&gridView)\n+Recalculates indices after grid adaptation.\n+Definition: scsgmapper.hh:148\n+Dune::SingleCodimSingleGeomTypeMapper::size\n+size_type size() const\n+Return total number of entities in the entity set managed by the mapper.\n+Definition: scsgmapper.hh:100\n+Dune::SingleCodimSingleGeomTypeMapper::update\n+void update()\n+Recalculates indices after grid adaptation.\n+Definition: scsgmapper.hh:157\n+Dune::SingleCodimSingleGeomTypeMapper::update\n+void update(const GV &gridView)\n+Recalculates indices after grid adaptation.\n+Definition: scsgmapper.hh:137\n+Dune::LeafSingleCodimSingleGeomTypeMapper\n+Single codim and single geometry type mapper for leaf entities.\n+Definition: scsgmapper.hh:186\n+Dune::LeafSingleCodimSingleGeomTypeMapper::LeafSingleCodimSingleGeomTypeMapper\n+LeafSingleCodimSingleGeomTypeMapper(const G &grid)\n+The constructor.\n+Definition: scsgmapper.hh:192\n+Dune::LeafSingleCodimSingleGeomTypeMapper::update\n+void update()\n+Recalculates indices after grid adaptation.\n+Definition: scsgmapper.hh:202\n+Dune::LevelSingleCodimSingleGeomTypeMapper\n+Single codim and single geometry type mapper for entities of one level.\n+Definition: scsgmapper.hh:224\n+Dune::LevelSingleCodimSingleGeomTypeMapper::\n+LevelSingleCodimSingleGeomTypeMapper\n+LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level)\n+Definition: scsgmapper.hh:231\n+Dune::LevelSingleCodimSingleGeomTypeMapper::update\n+void update()\n+Recalculates indices after grid adaptation.\n+Definition: scsgmapper.hh:242\n+grid.hh\n+Different resources needed by all grid implementations.\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00689_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00620_source.html", "comments": ["Files 0% similar despite different names"], "unified_diff": "@@ -65,23 +65,23 @@\n
  • dune
  • grid
  • albertagrid
  • \n
    \n
    \n
    \n
    hierarchiciterator.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n
    5#ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
    \n
    6#define DUNE_ALBERTA_HIERARCHICITERATOR_HH
    \n
    7
    \n-\n-\n+\n+\n
    10
    \n
    11#if HAVE_ALBERTA
    \n
    12
    \n
    13namespace Dune
    \n
    14{
    \n
    15
    \n
    16 // AlbertaGridHierarchicIterator
    \n@@ -217,16 +217,16 @@\n
    163 }
    \n
    164
    \n
    165}
    \n
    166
    \n
    167#endif // #if HAVE_ALBERTA
    \n
    168
    \n
    169#endif // #ifndef DUNE_ALBERTA_HIERARCHICITERATOR_HH
    \n-\n-
    provides a wrapper for ALBERTA's el_info structure
    \n+\n+
    provides a wrapper for ALBERTA's el_info structure
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: hierarchiciterator.hh:29
    \n
    Entity & dereference() const
    dereferencing
    Definition: hierarchiciterator.hh:68
    \n
    GridImp::template Codim< 0 >::Entity Entity
    Definition: hierarchiciterator.hh:33
    \n
    const GridImp & grid() const
    obtain a reference to the grid
    Definition: hierarchiciterator.hh:81
    \n
    EntityImp::ElementInfo ElementInfo
    Definition: hierarchiciterator.hh:39
    \n
    int level() const
    ask for level of entities
    Definition: hierarchiciterator.hh:74
    \n"}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00719_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00608_source.html", "comments": ["Files 18% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: algebra.hh Source File\n+dune-grid: coordfunctioncaller.hh Source File\n \n \n \n \n \n \n \n@@ -58,173 +58,127 @@\n \n
    \n \n \n
    \n
    \n-
    algebra.hh
    \n+
    coordfunctioncaller.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_ALBERTA_ALGEBRA_HH
    \n-
    6#define DUNE_ALBERTA_ALGEBRA_HH
    \n+
    5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
    \n+
    6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
    \n
    7
    \n-
    8#include <dune/common/fvector.hh>
    \n-
    9#include <dune/common/fmatrix.hh>
    \n+\n+\n
    10
    \n
    11namespace Dune
    \n
    12{
    \n
    13
    \n-
    14 namespace Alberta
    \n+
    14 namespace GeoGrid
    \n
    15 {
    \n
    16
    \n-
    17 template< class K >
    \n-
    18 inline static FieldVector< K, 3 >
    \n-
    19 vectorProduct ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v )
    \n-
    20 {
    \n-
    21 FieldVector< K, 3 > w;
    \n-
    22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ];
    \n-
    23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ];
    \n-
    24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ];
    \n-
    25 return w;
    \n-
    26 }
    \n-
    27
    \n+
    17 // CoordFunctionCaller
    \n+
    18 // -------------------
    \n+
    19
    \n+
    20 template< class HostEntity, class CoordFunctionInterface >
    \n+\n+
    22
    \n+
    23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR, class Impl >
    \n+
    24 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface< ct, dimD, dimR, Impl > >
    \n+
    25 {
    \n+\n+\n
    28
    \n-
    29 template< class K, int m >
    \n-
    30 inline static K determinant ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix )
    \n-
    31 {
    \n-
    32 return K( 1 );
    \n-
    33 }
    \n-
    34
    \n-
    35 template< class K >
    \n-
    36 inline static K determinant ( const FieldMatrix< K, 1, 1 > &matrix )
    \n-
    37 {
    \n-
    38 return matrix[ 0 ][ 0 ];
    \n-
    39 }
    \n-
    40
    \n-
    41 template< class K, int m >
    \n-
    42 inline static K determinant ( const FieldMatrix< K, 1, m > &matrix )
    \n-
    43 {
    \n-
    44 using std::sqrt;
    \n-
    45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ];
    \n-
    46 for( int i = 1; i < m; ++i )
    \n-
    47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ];
    \n-
    48 return sqrt( sum );
    \n-
    49 }
    \n-
    50
    \n-
    51 template< class K >
    \n-
    52 inline static K determinant ( const FieldMatrix< K, 2, 2 > &matrix )
    \n-
    53 {
    \n-
    54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ][ 0 ];
    \n-
    55 }
    \n-
    56
    \n-
    57 template< class K >
    \n-
    58 inline static K determinant ( const FieldMatrix< K, 2, 3 > &matrix )
    \n-
    59 {
    \n-
    60 return vectorProduct( matrix[ 0 ], matrix[ 1 ] ).two_norm();
    \n-
    61 }
    \n-
    62
    \n-
    63 template< class K, int m >
    \n-
    64 inline static K determinant ( const FieldMatrix< K, 2, m > &matrix )
    \n-
    65 {
    \n-
    66 using std::sqrt;
    \n-
    67 const K tmpA = matrix[ 0 ].two_norm2();
    \n-
    68 const K tmpB = matrix[ 1 ].two_norm2();
    \n-
    69 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
    \n-
    70 return sqrt( tmpA * tmpB - tmpC * tmpC );
    \n-
    71 }
    \n-
    72
    \n-
    73 template< class K >
    \n-
    74 inline static K determinant ( const FieldMatrix< K, 3, 3 > &matrix )
    \n-
    75 {
    \n-
    76 return matrix[ 0 ] * vectorProduct( matrix[ 1 ], matrix[ 2 ] );
    \n-
    77 }
    \n-
    78
    \n+
    29 static const int codimension = HostEntity::codimension;
    \n+
    30
    \n+
    31 public:
    \n+
    32 typedef typename CoordFunctionInterface::RangeVector RangeVector;
    \n+
    33
    \n+
    34 CoordFunctionCaller ( const HostEntity &hostEntity,
    \n+
    35 const CoordFunctionInterface &coordFunction )
    \n+
    36 : hostCorners_( hostEntity ),
    \n+
    37 coordFunction_( coordFunction )
    \n+
    38 {}
    \n+
    39
    \n+
    40 void evaluate ( unsigned int i, RangeVector &y ) const
    \n+
    41 {
    \n+
    42 coordFunction_.evaluate( hostCorners_[ i ], y );
    \n+
    43 }
    \n+
    44
    \n+
    45 GeometryType type () const
    \n+
    46 {
    \n+
    47 return hostCorners_.type();
    \n+
    48 }
    \n+
    49
    \n+
    50 std::size_t size () const
    \n+
    51 {
    \n+
    52 return hostCorners_.size();
    \n+
    53 }
    \n+
    54
    \n+
    55 private:
    \n+
    56 const HostCorners< HostEntity > hostCorners_;
    \n+
    57 const CoordFunctionInterface &coordFunction_;
    \n+
    58 };
    \n+
    59
    \n+
    60 template< class HostEntity, class ct, unsigned int dimR, class Impl >
    \n+
    61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct, dimR, Impl > >
    \n+
    62 {
    \n+
    63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl > CoordFunctionInterface;
    \n+
    64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;
    \n+
    65
    \n+
    66 typedef typename CoordFunctionInterface::RangeVector RangeVector;
    \n+
    67
    \n+
    68 public:
    \n+
    69 CoordFunctionCaller ( const HostEntity &hostEntity,
    \n+
    70 const CoordFunctionInterface &coordFunction )
    \n+
    71 : hostEntity_( hostEntity ),
    \n+
    72 coordFunction_( coordFunction )
    \n+
    73 {}
    \n+
    74
    \n+
    75 void evaluate ( unsigned int i, RangeVector &y ) const
    \n+
    76 {
    \n+
    77 coordFunction_.evaluate( hostEntity_, i, y );
    \n+
    78 }
    \n
    79
    \n-
    80 template< class K, int m >
    \n-
    81 inline static K invert ( [[maybe_unused]] const FieldMatrix< K, 0, m > &matrix,
    \n-
    82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse )
    \n-
    83 {
    \n-
    84 return K( 1 );
    \n-
    85 }
    \n-
    86
    \n-
    87 template< class K >
    \n-
    88 inline static K invert ( const FieldMatrix< K, 1, 1 > &matrix,
    \n-
    89 FieldMatrix< K, 1, 1 > &inverse )
    \n-
    90 {
    \n-
    91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ];
    \n-
    92 return matrix[ 0 ][ 0 ];
    \n-
    93 }
    \n-
    94
    \n-
    95 template< class K, int m >
    \n-
    96 inline static K invert ( const FieldMatrix< K, 1, m > &matrix,
    \n-
    97 FieldMatrix< K, m, 1 > &inverse )
    \n-
    98 {
    \n-
    99 using std::sqrt;
    \n-
    100 K detSqr = matrix[ 0 ].two_norm2();
    \n-
    101 K invDetSqr = K( 1 ) / detSqr;
    \n-
    102 for( int i = 0; i < m; ++i )
    \n-
    103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ];
    \n-
    104 return sqrt( detSqr );
    \n-
    105 }
    \n-
    106
    \n-
    107 template< class K >
    \n-
    108 inline static K invert ( const FieldMatrix< K, 2, 2 > &matrix,
    \n-
    109 FieldMatrix< K, 2, 2 > &inverse )
    \n-
    110 {
    \n-
    111 K det = determinant( matrix );
    \n-
    112 K invDet = K( 1 ) / det;
    \n-
    113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ];
    \n-
    114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ];
    \n-
    115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ];
    \n-
    116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ];
    \n-
    117 return det;
    \n-
    118 }
    \n-
    119
    \n-
    120 template< class K, int m >
    \n-
    121 inline static K invert ( const FieldMatrix< K, 2, m > &matrix,
    \n-
    122 FieldMatrix< K, m, 2 > &inverse )
    \n-
    123 {
    \n-
    124 using std::sqrt;
    \n-
    125 const K tmpA = matrix[ 0 ].two_norm2();
    \n-
    126 const K tmpB = matrix[ 1 ].two_norm2();
    \n-
    127 const K tmpC = matrix[ 0 ] * matrix[ 1 ];
    \n-
    128 const K detSqr = tmpA * tmpB - tmpC * tmpC;
    \n-
    129 const K invDetSqr = K( 1 ) / detSqr;
    \n-
    130 for( int i = 0; i < m; ++i )
    \n-
    131 {
    \n-
    132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix[ 1 ][ i ]);
    \n-
    133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix[ 0 ][ i ]);
    \n-
    134 }
    \n-
    135 return sqrt( detSqr );
    \n-
    136 }
    \n-
    137
    \n-
    138 template< class K >
    \n-
    139 inline static K invert ( const FieldMatrix< K, 3, 3 > &matrix,
    \n-
    140 FieldMatrix< K, 3, 3 > &inverse )
    \n-
    141 {
    \n-
    142 return FMatrixHelp::invertMatrix( matrix, inverse );
    \n-
    143 }
    \n-
    144 }
    \n-
    145
    \n-
    146}
    \n-
    147
    \n-
    148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH
    \n+
    80 GeometryType type () const
    \n+
    81 {
    \n+
    82 return hostEntity_.type();
    \n+
    83 }
    \n+
    84
    \n+
    85 std::size_t size () const
    \n+
    86 {
    \n+
    87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type() );
    \n+
    88 return refElement.size( HostEntity::mydimension );
    \n+
    89 }
    \n+
    90
    \n+
    91 private:
    \n+
    92 const HostEntity &hostEntity_;
    \n+
    93 const CoordFunctionInterface &coordFunction_;
    \n+
    94 };
    \n+
    95
    \n+
    96 } // namespace GeoGrid
    \n+
    97
    \n+
    98} // namespace Dune
    \n+
    99
    \n+
    100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    static K determinant(const FieldMatrix< K, 0, m > &matrix)
    Definition: algebra.hh:30
    \n-
    static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 > &inverse)
    Definition: algebra.hh:81
    \n-
    static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v)
    Definition: algebra.hh:19
    \n+
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n+
    Interface class for using an analytical function to define the geometry of a Dune::GeometryGrid....
    Definition: coordfunction.hh:44
    \n+
    Definition: coordfunctioncaller.hh:21
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,181 +4,135 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * albertagrid\n-algebra.hh\n+ * geometrygrid\n+coordfunctioncaller.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_ALBERTA_ALGEBRA_HH\n- 6#define DUNE_ALBERTA_ALGEBRA_HH\n+ 5#ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH\n+ 6#define DUNE_GEOGRID_COORDFUNCTIONCALLER_HH\n 7\n- 8#include \n- 9#include \n+ 8#include \n+ 9#include \n 10\n 11namespace Dune\n 12{\n 13\n- 14 namespace Alberta\n+ 14 namespace GeoGrid\n 15 {\n 16\n- 17 template< class K >\n- 18 inline static FieldVector< K, 3 >\n-19 vectorProduct ( const FieldVector< K, 3 > &u, const FieldVector< K, 3 > &v )\n- 20 {\n- 21 FieldVector< K, 3 > w;\n- 22 w[ 0 ] = u[ 1 ] * v[ 2 ] - u[ 2 ] * v[ 1 ];\n- 23 w[ 1 ] = u[ 2 ] * v[ 0 ] - u[ 0 ] * v[ 2 ];\n- 24 w[ 2 ] = u[ 0 ] * v[ 1 ] - u[ 1 ] * v[ 0 ];\n- 25 return w;\n- 26 }\n- 27\n+ 17 // CoordFunctionCaller\n+ 18 // -------------------\n+ 19\n+ 20 template< class HostEntity, class CoordFunctionInterface >\n+21 class CoordFunctionCaller;\n+ 22\n+ 23 template< class HostEntity, class ct, unsigned int dimD, unsigned int dimR,\n+class Impl >\n+ 24 class CoordFunctionCaller< HostEntity, AnalyticalCoordFunctionInterface<\n+ct, dimD, dimR, Impl > >\n+ 25 {\n+ 26 typedef AnalyticalCoordFunctionInterface<_ct,_dimD,_dimR,_Impl_>\n+CoordFunctionInterface;\n+ 27 typedef CoordFunctionCaller<_HostEntity,_CoordFunctionInterface_> This;\n 28\n- 29 template< class K, int m >\n-30 inline static K determinant ( [[maybe_unused]] const FieldMatrix< K, 0, m >\n-&matrix )\n- 31 {\n- 32 return K( 1 );\n- 33 }\n- 34\n- 35 template< class K >\n-36 inline static K determinant ( const FieldMatrix< K, 1, 1 > &matrix )\n- 37 {\n- 38 return matrix[ 0 ][ 0 ];\n- 39 }\n- 40\n- 41 template< class K, int m >\n-42 inline static K determinant ( const FieldMatrix< K, 1, m > &matrix )\n- 43 {\n- 44 using std::sqrt;\n- 45 K sum = matrix[ 0 ][ 0 ] * matrix[ 0 ][ 0 ];\n- 46 for( int i = 1; i < m; ++i )\n- 47 sum += matrix[ 0 ][ i ] * matrix[ 0 ][ i ];\n- 48 return sqrt( sum );\n- 49 }\n- 50\n- 51 template< class K >\n-52 inline static K determinant ( const FieldMatrix< K, 2, 2 > &matrix )\n- 53 {\n- 54 return matrix[ 0 ][ 0 ] * matrix[ 1 ][ 1 ] - matrix[ 0 ][ 1 ] * matrix[ 1 ]\n-[ 0 ];\n- 55 }\n- 56\n- 57 template< class K >\n-58 inline static K determinant ( const FieldMatrix< K, 2, 3 > &matrix )\n- 59 {\n- 60 return vectorProduct( matrix[ 0 ], matrix[ 1 ] ).two_norm();\n- 61 }\n- 62\n- 63 template< class K, int m >\n-64 inline static K determinant ( const FieldMatrix< K, 2, m > &matrix )\n- 65 {\n- 66 using std::sqrt;\n- 67 const K tmpA = matrix[ 0 ].two_norm2();\n- 68 const K tmpB = matrix[ 1 ].two_norm2();\n- 69 const K tmpC = matrix[ 0 ] * matrix[ 1 ];\n- 70 return sqrt( tmpA * tmpB - tmpC * tmpC );\n- 71 }\n- 72\n- 73 template< class K >\n-74 inline static K determinant ( const FieldMatrix< K, 3, 3 > &matrix )\n- 75 {\n- 76 return matrix[ 0 ] * vectorProduct( matrix[ 1 ], matrix[ 2 ] );\n- 77 }\n- 78\n+ 29 static const int codimension = HostEntity::codimension;\n+ 30\n+ 31 public:\n+ 32 typedef typename CoordFunctionInterface::RangeVector RangeVector;\n+ 33\n+ 34 CoordFunctionCaller ( const HostEntity &hostEntity,\n+ 35 const CoordFunctionInterface &coordFunction )\n+ 36 : hostCorners_( hostEntity ),\n+ 37 coordFunction_( coordFunction )\n+ 38 {}\n+ 39\n+ 40 void evaluate ( unsigned int i, RangeVector &y ) const\n+ 41 {\n+ 42 coordFunction_.evaluate( hostCorners_[ i ], y );\n+ 43 }\n+ 44\n+ 45 GeometryType type () const\n+ 46 {\n+ 47 return hostCorners_.type();\n+ 48 }\n+ 49\n+ 50 std::size_t size () const\n+ 51 {\n+ 52 return hostCorners_.size();\n+ 53 }\n+ 54\n+ 55 private:\n+ 56 const HostCorners< HostEntity > hostCorners_;\n+ 57 const CoordFunctionInterface &coordFunction_;\n+ 58 };\n+ 59\n+ 60 template< class HostEntity, class ct, unsigned int dimR, class Impl >\n+ 61 class CoordFunctionCaller< HostEntity, DiscreteCoordFunctionInterface< ct,\n+dimR, Impl > >\n+ 62 {\n+ 63 typedef DiscreteCoordFunctionInterface< ct, dimR, Impl >\n+CoordFunctionInterface;\n+ 64 typedef CoordFunctionCaller< HostEntity, CoordFunctionInterface > This;\n+ 65\n+ 66 typedef typename CoordFunctionInterface::RangeVector RangeVector;\n+ 67\n+ 68 public:\n+ 69 CoordFunctionCaller ( const HostEntity &hostEntity,\n+ 70 const CoordFunctionInterface &coordFunction )\n+ 71 : hostEntity_( hostEntity ),\n+ 72 coordFunction_( coordFunction )\n+ 73 {}\n+ 74\n+ 75 void evaluate ( unsigned int i, RangeVector &y ) const\n+ 76 {\n+ 77 coordFunction_.evaluate( hostEntity_, i, y );\n+ 78 }\n 79\n- 80 template< class K, int m >\n-81 inline static K invert ( [[maybe_unused]] const FieldMatrix< K, 0, m >\n-&matrix,\n- 82 [[maybe_unused]] FieldMatrix< K, m, 0 > &inverse )\n- 83 {\n- 84 return K( 1 );\n- 85 }\n- 86\n- 87 template< class K >\n-88 inline static K invert ( const FieldMatrix< K, 1, 1 > &matrix,\n- 89 FieldMatrix< K, 1, 1 > &inverse )\n- 90 {\n- 91 inverse[ 0 ][ 0 ] = K( 1 ) / matrix[ 0 ][ 0 ];\n- 92 return matrix[ 0 ][ 0 ];\n- 93 }\n- 94\n- 95 template< class K, int m >\n-96 inline static K invert ( const FieldMatrix< K, 1, m > &matrix,\n- 97 FieldMatrix< K, m, 1 > &inverse )\n- 98 {\n- 99 using std::sqrt;\n- 100 K detSqr = matrix[ 0 ].two_norm2();\n- 101 K invDetSqr = K( 1 ) / detSqr;\n- 102 for( int i = 0; i < m; ++i )\n- 103 inverse[ i ][ 0 ] = invDetSqr * matrix[ 0 ][ i ];\n- 104 return sqrt( detSqr );\n- 105 }\n- 106\n- 107 template< class K >\n-108 inline static K invert ( const FieldMatrix< K, 2, 2 > &matrix,\n- 109 FieldMatrix< K, 2, 2 > &inverse )\n- 110 {\n- 111 K det = determinant( matrix );\n- 112 K invDet = K( 1 ) / det;\n- 113 inverse[ 0 ][ 0 ] = invDet * matrix[ 1 ][ 1 ];\n- 114 inverse[ 0 ][ 1 ] = - invDet * matrix[ 0 ][ 1 ];\n- 115 inverse[ 1 ][ 0 ] = - invDet * matrix[ 1 ][ 0 ];\n- 116 inverse[ 1 ][ 1 ] = invDet * matrix[ 0 ][ 0 ];\n- 117 return det;\n- 118 }\n- 119\n- 120 template< class K, int m >\n-121 inline static K invert ( const FieldMatrix< K, 2, m > &matrix,\n- 122 FieldMatrix< K, m, 2 > &inverse )\n- 123 {\n- 124 using std::sqrt;\n- 125 const K tmpA = matrix[ 0 ].two_norm2();\n- 126 const K tmpB = matrix[ 1 ].two_norm2();\n- 127 const K tmpC = matrix[ 0 ] * matrix[ 1 ];\n- 128 const K detSqr = tmpA * tmpB - tmpC * tmpC;\n- 129 const K invDetSqr = K( 1 ) / detSqr;\n- 130 for( int i = 0; i < m; ++i )\n- 131 {\n- 132 inverse[ i ][ 0 ] = invDetSqr * (tmpB * matrix[ 0 ][ i ] - tmpC * matrix\n-[ 1 ][ i ]);\n- 133 inverse[ i ][ 1 ] = invDetSqr * (tmpA * matrix[ 1 ][ i ] - tmpC * matrix\n-[ 0 ][ i ]);\n- 134 }\n- 135 return sqrt( detSqr );\n- 136 }\n- 137\n- 138 template< class K >\n-139 inline static K invert ( const FieldMatrix< K, 3, 3 > &matrix,\n- 140 FieldMatrix< K, 3, 3 > &inverse )\n- 141 {\n- 142 return FMatrixHelp::invertMatrix( matrix, inverse );\n- 143 }\n- 144 }\n- 145\n- 146}\n- 147\n- 148#endif // #ifndef DUNE_ALBERTA_ALGEBRA_HH\n+ 80 GeometryType type () const\n+ 81 {\n+ 82 return hostEntity_.type();\n+ 83 }\n+ 84\n+ 85 std::size_t size () const\n+ 86 {\n+ 87 auto refElement = referenceElement< ct, HostEntity::mydimension >( type()\n+);\n+ 88 return refElement.size( HostEntity::mydimension );\n+ 89 }\n+ 90\n+ 91 private:\n+ 92 const HostEntity &hostEntity_;\n+ 93 const CoordFunctionInterface &coordFunction_;\n+ 94 };\n+ 95\n+ 96 } // namespace GeoGrid\n+ 97\n+ 98} // namespace Dune\n+ 99\n+ 100#endif // #ifndef DUNE_GEOGRID_COORDFUNCTIONCALLER_HH\n+hostcorners.hh\n+coordfunction.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::Alberta::determinant\n-static K determinant(const FieldMatrix< K, 0, m > &matrix)\n-Definition: algebra.hh:30\n-Dune::Alberta::invert\n-static K invert(const FieldMatrix< K, 0, m > &matrix, FieldMatrix< K, m, 0 >\n-&inverse)\n-Definition: algebra.hh:81\n-Dune::Alberta::vectorProduct\n-static FieldVector< K, 3 > vectorProduct(const FieldVector< K, 3 > &u, const\n-FieldVector< K, 3 > &v)\n-Definition: algebra.hh:19\n+Dune::VTK::GeometryType\n+GeometryType\n+Type representing VTK's entity geometry types.\n+Definition: common.hh:132\n+Dune::AnalyticalCoordFunctionInterface\n+Interface class for using an analytical function to define the geometry of a\n+Dune::GeometryGrid....\n+Definition: coordfunction.hh:44\n+Dune::GeoGrid::CoordFunctionCaller\n+Definition: coordfunctioncaller.hh:21\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00764_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00245_source.html", "comments": ["Files 20% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: corner.hh Source File\n+dune-grid: mapper.hh Source File\n \n \n \n \n \n \n \n@@ -58,83 +58,111 @@\n \n
    \n \n \n
    \n
    \n-
    corner.hh
    \n+
    mapper.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5
    \n-
    6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH
    \n-
    7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH
    \n-
    8
    \n-\n-
    10
    \n-
    11namespace Dune
    \n-
    12{
    \n-
    15
    \n-
    16 namespace VTK {
    \n-
    17
    \n-
    19
    \n-
    24 template<typename Cell>
    \n-
    25 class Corner {
    \n-
    26 // store a pointer to the element
    \n-
    27 const Cell* cell_;
    \n-
    28 // store index of the corner within element (Dune numbering)
    \n-
    29 unsigned index;
    \n-
    30
    \n-
    31 public:
    \n-
    33
    \n-
    38 Corner(const Cell& cell, unsigned duneIndex)
    \n-
    39 : cell_(&cell), index(duneIndex)
    \n-
    40 { }
    \n-
    41
    \n-
    43 Corner() { }
    \n-
    44
    \n-
    46 const Cell& cell() const { return *cell_; }
    \n-
    48
    \n-
    52 void cell(const Cell& cell__) { cell_ = &cell__; index = 0; }
    \n-
    53
    \n-
    55 unsigned duneIndex() const { return index; }
    \n-
    57 void duneIndex(unsigned i) { index = i; }
    \n-
    58
    \n-
    60
    \n-
    63 unsigned vtkIndex() const { return renumber(cell_->type(), index); }
    \n-
    65
    \n-
    68 void vtkIndex(unsigned i) { index = renumber(cell_->type(), i); }
    \n-
    69 };
    \n-
    70
    \n-
    71 } // namespace VTK
    \n-
    72
    \n-
    74
    \n-
    75} // namespace Dune
    \n-
    76
    \n-
    77#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH
    \n-
    Common stuff for the VTKWriter.
    \n+
    5#ifndef DUNE_GRID_COMMON_MAPPER_HH
    \n+
    6#define DUNE_GRID_COMMON_MAPPER_HH
    \n+
    7
    \n+
    8#include <utility>
    \n+
    9
    \n+
    10#include <dune/common/bartonnackmanifcheck.hh>
    \n+
    11
    \n+
    89namespace Dune
    \n+
    90{
    \n+
    108 template <typename G, typename MapperImp, typename IndexType=int>
    \n+
    109 class Mapper
    \n+
    110 {
    \n+
    111 public:
    \n+
    112
    \n+
    114 using Index = IndexType;
    \n+
    115
    \n+
    121 template<class EntityType>
    \n+
    122 Index index (const EntityType& e) const
    \n+
    123 {
    \n+
    124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e)));
    \n+
    125 return asImp().index(e);
    \n+
    126 }
    \n+
    127
    \n+
    128
    \n+
    136 Index subIndex (const typename G::Traits::template Codim<0>::Entity& e,
    \n+
    137 int i,
    \n+
    138 unsigned int codim) const
    \n+
    139 {
    \n+
    140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim)));
    \n+
    141 return asImp().subIndex(e,i,codim);
    \n+
    142 }
    \n+
    143
    \n+
    152 auto size () const
    \n+
    153 {
    \n+
    154 CHECK_INTERFACE_IMPLEMENTATION((asImp().size()));
    \n+
    155 return asImp().size();
    \n+
    156 }
    \n+
    157
    \n+
    158
    \n+
    166 template<class EntityType>
    \n+
    167 bool contains (const EntityType& e, IndexType& result) const
    \n+
    168 {
    \n+
    169 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,result )));
    \n+
    170 return asImp().contains(e,result );
    \n+
    171 }
    \n+
    172
    \n+
    173
    \n+
    183 bool contains (const typename G::Traits::template Codim<0>::Entity& e, int i, int cc, IndexType& result) const
    \n+
    184 {
    \n+
    185 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,i,cc,result)))
    \n+
    186 return asImp().contains(e,i,cc,result);
    \n+
    187 }
    \n+
    188
    \n+
    191 template <class GridView>
    \n+
    192 void update (GridView&& gridView)
    \n+
    193 {
    \n+
    194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update(std::forward<GridView>(gridView))));
    \n+
    195 }
    \n+
    196
    \n+
    199 [[deprecated("Use update(gridView) instead! Will be removed after release 2.8. Mappers have to implement update(gridView).")]]
    \n+
    200 void update ()
    \n+
    201 {
    \n+
    202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update()));
    \n+
    203 }
    \n+
    204
    \n+
    205 private:
    \n+
    207 MapperImp& asImp () {return static_cast<MapperImp &> (*this);}
    \n+
    209 const MapperImp& asImp () const {return static_cast<const MapperImp &>(*this);}
    \n+
    210 };
    \n+
    211
    \n+
    214#undef CHECK_INTERFACE_IMPLEMENTATION
    \n+
    215#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
    \n+
    216
    \n+
    217}
    \n+
    218#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    int renumber(const Dune::GeometryType &t, int i)
    renumber VTK <-> Dune
    Definition: common.hh:186
    \n-
    simple class representing a corner of a cell
    Definition: corner.hh:25
    \n-
    unsigned vtkIndex() const
    get the index of the corner within the cell in VTK-numbering
    Definition: corner.hh:63
    \n-
    void vtkIndex(unsigned i)
    set the index of the corner within the cell in VTK-numbering
    Definition: corner.hh:68
    \n-
    Corner(const Cell &cell, unsigned duneIndex)
    construct a Corner
    Definition: corner.hh:38
    \n-
    void cell(const Cell &cell__)
    set a new cell
    Definition: corner.hh:52
    \n-
    void duneIndex(unsigned i)
    set the index of the corner within the cell in Dune-numbering
    Definition: corner.hh:57
    \n-
    unsigned duneIndex() const
    get the index of the corner within the cell in Dune-numbering
    Definition: corner.hh:55
    \n-
    const Cell & cell() const
    get reference to the cell
    Definition: corner.hh:46
    \n-
    Corner()
    construct an invalid Corner
    Definition: corner.hh:43
    \n+
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n+
    Mapper interface.
    Definition: mapper.hh:110
    \n+
    auto size() const
    Return total number of entities in the entity set managed by the mapper.
    Definition: mapper.hh:152
    \n+
    void update(GridView &&gridView)
    Reinitialize mapper after grid has been modified.
    Definition: mapper.hh:192
    \n+
    void update()
    Reinitialize mapper after grid has been modified.
    Definition: mapper.hh:200
    \n+
    Index index(const EntityType &e) const
    Map entity to array index.
    Definition: mapper.hh:122
    \n+
    IndexType Index
    Number type used for indices.
    Definition: mapper.hh:114
    \n+
    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
    \n+
    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
    \n+
    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
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,110 +4,142 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * io\n- * file\n- * vtk\n-corner.hh\n+ * common\n+mapper.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5\n- 6#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH\n- 7#define DUNE_GRID_IO_FILE_VTK_CORNER_HH\n- 8\n- 9#include \n- 10\n- 11namespace Dune\n- 12{\n- 15\n- 16 namespace VTK {\n- 17\n- 19\n- 24 template\n-25 class Corner {\n- 26 // store a pointer to the element\n- 27 const Cell* cell_;\n- 28 // store index of the corner within element (Dune numbering)\n- 29 unsigned index;\n- 30\n- 31 public:\n- 33\n-38 Corner(const Cell& cell, unsigned duneIndex)\n- 39 : cell_(&cell), index(duneIndex)\n- 40 { }\n- 41\n-43 Corner() { }\n- 44\n-46 const Cell& cell() const { return *cell_; }\n- 48\n-52 void cell(const Cell& cell__) { cell_ = &cell__; index = 0; }\n- 53\n-55 unsigned duneIndex() const { return index; }\n-57 void duneIndex(unsigned i) { index = i; }\n- 58\n- 60\n-63 unsigned vtkIndex() const { return renumber(cell_->type(), index); }\n- 65\n-68 void vtkIndex(unsigned i) { index = renumber(cell_->type(), i); }\n- 69 };\n- 70\n- 71 } // namespace VTK\n- 72\n- 74\n- 75} // namespace Dune\n- 76\n- 77#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH\n-common.hh\n-Common stuff for the VTKWriter.\n+ 5#ifndef DUNE_GRID_COMMON_MAPPER_HH\n+ 6#define DUNE_GRID_COMMON_MAPPER_HH\n+ 7\n+ 8#include \n+ 9\n+ 10#include \n+ 11\n+ 89namespace Dune\n+ 90{\n+ 108 template \n+109 class Mapper\n+ 110 {\n+ 111 public:\n+ 112\n+114 using Index = IndexType;\n+ 115\n+ 121 template\n+122 Index index (const EntityType& e) const\n+ 123 {\n+ 124 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e)));\n+ 125 return asImp().index(e);\n+ 126 }\n+ 127\n+ 128\n+136 Index subIndex (const typename G::Traits::template Codim<0>::Entity& e,\n+ 137 int i,\n+ 138 unsigned int codim) const\n+ 139 {\n+ 140 CHECK_INTERFACE_IMPLEMENTATION((asImp().map(e,i,codim)));\n+ 141 return asImp().subIndex(e,i,codim);\n+ 142 }\n+ 143\n+152 auto size () const\n+ 153 {\n+ 154 CHECK_INTERFACE_IMPLEMENTATION((asImp().size()));\n+ 155 return asImp().size();\n+ 156 }\n+ 157\n+ 158\n+ 166 template\n+167 bool contains (const EntityType& e, IndexType& result) const\n+ 168 {\n+ 169 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,result )));\n+ 170 return asImp().contains(e,result );\n+ 171 }\n+ 172\n+ 173\n+183 bool contains (const typename G::Traits::template Codim<0>::Entity& e, int\n+i, int cc, IndexType& result) const\n+ 184 {\n+ 185 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(e,i,cc,result)))\n+ 186 return asImp().contains(e,i,cc,result);\n+ 187 }\n+ 188\n+ 191 template \n+192 void update (GridView&& gridView)\n+ 193 {\n+ 194 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update(std::\n+forward(gridView))));\n+ 195 }\n+ 196\n+ 199 [[deprecated(\"Use update(gridView) instead! Will be removed after release\n+2.8. Mappers have to implement update(gridView).\")]]\n+200 void update ()\n+ 201 {\n+ 202 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().update()));\n+ 203 }\n+ 204\n+ 205 private:\n+ 207 MapperImp& asImp () {return static_cast (*this);}\n+ 209 const MapperImp& asImp () const {return static_cast\n+(*this);}\n+ 210 };\n+ 211\n+ 214#undef CHECK_INTERFACE_IMPLEMENTATION\n+ 215#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION\n+ 216\n+ 217}\n+ 218#endif\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::renumber\n-int renumber(const Dune::GeometryType &t, int i)\n-renumber VTK <-> Dune\n-Definition: common.hh:186\n-Dune::VTK::Corner\n-simple class representing a corner of a cell\n-Definition: corner.hh:25\n-Dune::VTK::Corner::vtkIndex\n-unsigned vtkIndex() const\n-get the index of the corner within the cell in VTK-numbering\n-Definition: corner.hh:63\n-Dune::VTK::Corner::vtkIndex\n-void vtkIndex(unsigned i)\n-set the index of the corner within the cell in VTK-numbering\n-Definition: corner.hh:68\n-Dune::VTK::Corner::Corner\n-Corner(const Cell &cell, unsigned duneIndex)\n-construct a Corner\n-Definition: corner.hh:38\n-Dune::VTK::Corner::cell\n-void cell(const Cell &cell__)\n-set a new cell\n-Definition: corner.hh:52\n-Dune::VTK::Corner::duneIndex\n-void duneIndex(unsigned i)\n-set the index of the corner within the cell in Dune-numbering\n-Definition: corner.hh:57\n-Dune::VTK::Corner::duneIndex\n-unsigned duneIndex() const\n-get the index of the corner within the cell in Dune-numbering\n-Definition: corner.hh:55\n-Dune::VTK::Corner::cell\n-const Cell & cell() const\n-get reference to the cell\n-Definition: corner.hh:46\n-Dune::VTK::Corner::Corner\n-Corner()\n-construct an invalid Corner\n-Definition: corner.hh:43\n+Dune::GridView\n+Grid view abstract base class.\n+Definition: common/gridview.hh:66\n+Dune::Mapper\n+Mapper interface.\n+Definition: mapper.hh:110\n+Dune::Mapper::size\n+auto size() const\n+Return total number of entities in the entity set managed by the mapper.\n+Definition: mapper.hh:152\n+Dune::Mapper::update\n+void update(GridView &&gridView)\n+Reinitialize mapper after grid has been modified.\n+Definition: mapper.hh:192\n+Dune::Mapper::update\n+void update()\n+Reinitialize mapper after grid has been modified.\n+Definition: mapper.hh:200\n+Dune::Mapper::index\n+Index index(const EntityType &e) const\n+Map entity to array index.\n+Definition: mapper.hh:122\n+Dune::Mapper::Index\n+IndexType Index\n+Number type used for indices.\n+Definition: mapper.hh:114\n+Dune::Mapper::subIndex\n+Index subIndex(const typename G::Traits::template Codim< 0 >::Entity &e, int i,\n+unsigned int codim) const\n+Map subentity i of codim cc of a codim 0 entity to array index.\n+Definition: mapper.hh:136\n+Dune::Mapper::contains\n+bool contains(const typename G::Traits::template Codim< 0 >::Entity &e, int i,\n+int cc, IndexType &result) const\n+Returns true if the subentity is contained in the index set and at the same\n+time the array index is r...\n+Definition: mapper.hh:183\n+Dune::Mapper::contains\n+bool contains(const EntityType &e, IndexType &result) const\n+Returns true if the entity is contained in the index set and at the same time\n+the array index is retu...\n+Definition: mapper.hh:167\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00845_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00938_source.html", "comments": ["Files 19% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: parser.hh Source File\n+dune-grid: dgfgeogrid.hh Source File\n \n \n \n \n \n \n \n@@ -62,219 +62,300 @@\n \n \n
    \n
    \n-
    parser.hh
    \n+
    dgfgeogrid.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH
    \n-
    6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH
    \n+
    5#ifndef DUNE_DGFGEOGRID_HH
    \n+
    6#define DUNE_DGFGEOGRID_HH
    \n
    7
    \n-
    8#include <iostream>
    \n-
    9#include <string>
    \n-
    10#include <vector>
    \n-
    11#include <map>
    \n-
    12
    \n-\n-
    14
    \n-
    15namespace Dune
    \n-
    16{
    \n+
    8#include <dune/common/typetraits.hh>
    \n+
    9
    \n+\n+\n+\n+\n+\n+
    15
    \n+\n
    17
    \n-
    18 class DGFPrintInfo;
    \n-
    19
    \n-\n-
    23 {
    \n-
    25 typedef std::string type;
    \n-
    26
    \n-
    28 static const type &defaultValue ()
    \n-
    29 {
    \n-
    30 static type value;
    \n-
    31 return value;
    \n-
    32 }
    \n+
    18
    \n+
    19namespace Dune
    \n+
    20{
    \n+
    21
    \n+
    22 /************************************************************************
    \n+
    23 * Warning:
    \n+
    24 * Reading DGF files directly into a GeometryGrid is a dirty hack for
    \n+
    25 * two reasons:
    \n+
    26 * 1) The host grid and coordinate function are never deleted (dangling
    \n+
    27 * pointers).
    \n+
    28 * 2) The coordinate function has to provide a default constructor
    \n+
    29 ************************************************************************/
    \n+
    30
    \n+
    31 // External Forward Declarations
    \n+
    32 // -----------------------------
    \n
    33
    \n-
    35 static type convert ( const std::string & parameter )
    \n-
    36 {
    \n-
    37 return parameter;
    \n-
    38 }
    \n-
    39
    \n-
    41 static const char delimiter = ':';
    \n-
    42 };
    \n-
    43
    \n-\n-
    47 {
    \n-
    48 public:
    \n-
    49 typedef enum {Simplex,Cube,General} element_t;
    \n-
    50
    \n-\n+
    34 template< class GridImp, class IntersectionImp >
    \n+
    35 class Intersection;
    \n+
    36
    \n+
    37
    \n+
    38
    \n+
    39 // DGFCoordFunction
    \n+
    40 // ----------------
    \n+
    41
    \n+
    42 template< int dimD, int dimR >
    \n+\n+
    44 : public AnalyticalCoordFunction< double, dimD, dimR, DGFCoordFunction< dimD, dimR > >
    \n+
    45 {
    \n+\n+\n+
    48
    \n+
    49 public:
    \n+\n+\n
    52
    \n-
    54 DuneGridFormatParser ( int rank, int size );
    \n-
    55
    \n-
    66 static bool isDuneGridFormat ( std::istream &input );
    \n-
    67
    \n-
    77 static bool isDuneGridFormat ( const std::string &filename );
    \n-
    78
    \n-
    91 bool readDuneGrid( std::istream &input, int dimG, int dimW );
    \n-
    92
    \n-
    94 void writeTetgenPoly ( const std::string &, std::string &, std::string & );
    \n-
    95
    \n-
    96 void writeTetgenPoly ( std::ostream & out, const bool writeSegments = true );
    \n-
    97
    \n-
    98 protected:
    \n-
    99 void generateBoundaries ( std::istream &, bool );
    \n-
    100
    \n-
    101 // call to tetgen/triangle
    \n-
    102 void generateSimplexGrid ( std::istream & );
    \n-
    103 void readTetgenTriangle ( const std::string & );
    \n+\n+
    54
    \n+
    55 DGFCoordFunction ( const Expression *expression )
    \n+
    56 : expression_( expression )
    \n+
    57 {}
    \n+
    58
    \n+
    59 void evaluate ( const DomainVector &x, RangeVector &y ) const
    \n+
    60 {
    \n+
    61 std::vector< double > vx( dimD );
    \n+
    62 std::vector< double > vy;
    \n+
    63 for( int i = 0; i < dimD; ++i )
    \n+
    64 vx[ i ] = x[ i ];
    \n+
    65 expression_->evaluate( vx, vy );
    \n+
    66 assert( vy.size() == size_t( dimR ) );
    \n+
    67 for( int i = 0; i < dimR; ++i )
    \n+
    68 y[ i ] = vy[ i ];
    \n+
    69 }
    \n+
    70
    \n+
    71 private:
    \n+
    72 const Expression *expression_;
    \n+
    73 };
    \n+
    74
    \n+
    75
    \n+
    76
    \n+
    77 // DGFCoordFunctionFactory
    \n+
    78 // -----------------------
    \n+
    79
    \n+
    80 template< class HostGrid, class CoordFunction,
    \n+\n+\n+
    83
    \n+
    84
    \n+
    85 template< class HostGrid, class CoordFunction >
    \n+
    86 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, false >
    \n+
    87 {
    \n+
    88 static CoordFunction *create ( std::istream &, const HostGrid & )
    \n+
    89 {
    \n+
    90 return new CoordFunction;
    \n+
    91 }
    \n+
    92 };
    \n+
    93
    \n+
    94
    \n+
    95 template< class HostGrid, class CoordFunction >
    \n+
    96 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, true >
    \n+
    97 {
    \n+
    98 static CoordFunction *create ( std::istream &, const HostGrid &hostGrid )
    \n+
    99 {
    \n+
    100 return new CoordFunction( hostGrid );
    \n+
    101 }
    \n+
    102 };
    \n+
    103
    \n
    104
    \n-
    105 // helper methods
    \n-
    106 void removeCopies ();
    \n-
    107
    \n-
    108 void setOrientation ( int use1, int use2,
    \n-
    109 orientation_t orientation=counterclockwise );
    \n-
    110
    \n-
    111 void setRefinement ( int use1, int use2, int is1=-1, int is2=-1 );
    \n-
    112
    \n-
    113 double testTriang ( int snr );
    \n-
    114
    \n-
    115 std::vector< double > & getElParam ( int i, std::vector< double > & coord );
    \n-
    116
    \n-
    117 std::vector< double > & getVtxParam ( int i, std::vector< double > & coord );
    \n-
    118
    \n-
    119 static std::string temporaryFileName ();
    \n+
    105 template< class HostGrid, int dimD, int dimR >
    \n+
    106 struct DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >, false >
    \n+
    107 {
    \n+\n+
    109
    \n+
    110 static CoordFunction *create ( std::istream &input, const HostGrid &hostGrid )
    \n+
    111 {
    \n+
    112 dgf::ProjectionBlock projectionBlock( input, dimR );
    \n+
    113 const typename CoordFunction::Expression *expression = projectionBlock.function( "coordfunction" );
    \n+
    114 if( expression == 0 )
    \n+
    115 DUNE_THROW( DGFException, "no coordfunction specified in DGF file." );
    \n+
    116 return new CoordFunction( expression );
    \n+
    117 }
    \n+
    118 };
    \n+
    119
    \n
    120
    \n-
    121 // dimension of world and problem: set through the readDuneGrid() method
    \n-\n-
    123
    \n-
    124 // vector of vertex coordinates
    \n-
    125 std::vector < std::vector < double > > vtx;
    \n-
    126
    \n-\n-
    128
    \n-\n-
    130
    \n-
    131 double minVertexDistance; // min. L^1 distance of distinct points
    \n-
    132
    \n-
    133 // vector of elements
    \n-
    134 std :: vector< std :: vector< unsigned int > > elements;
    \n-
    135
    \n-\n-
    137
    \n-
    138 // vector of boundary segments + identifier
    \n-
    139 std::vector < std::vector < int > > bound;
    \n-
    140
    \n-\n-
    142
    \n-
    143 // map to generate and find boundary segments
    \n-\n-
    145 typedef std::pair < int, BoundaryParameter > BndParam;
    \n-
    146 typedef std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t;
    \n-\n-
    148
    \n-
    149 // true if parameters on a boundary found
    \n-\n-
    151
    \n-
    152 // set by generator depending on element type wanted
    \n-\n-
    154
    \n-
    155 // set by the readDuneGrid method depending
    \n-
    156 // on what type the elements were generated
    \n-\n-
    158
    \n-
    159 // true if grid is generated using the intervall Block
    \n-\n-
    161
    \n-
    162 // parameters on elements
    \n-\n+
    121
    \n+
    122 // DGFGridFactory for GeometryGrid
    \n+
    123 // -------------------------------
    \n+
    124
    \n+
    125 template< class HostGrid, class CoordFunction, class Allocator >
    \n+
    126 struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >
    \n+
    127 {
    \n+\n+
    129
    \n+
    130 const static int dimension = Grid::dimension;
    \n+
    131 typedef MPIHelper::MPICommunicator MPICommunicator;
    \n+
    132 typedef typename Grid::template Codim<0>::Entity Element;
    \n+
    133 typedef typename Grid::template Codim<dimension>::Entity Vertex;
    \n+
    134
    \n+\n+
    136
    \n+
    137 explicit DGFGridFactory ( std::istream &input,
    \n+
    138 MPICommunicator comm = MPIHelper::getCommunicator() )
    \n+
    139 : dgfHostFactory_( input, comm ),
    \n+
    140 grid_( 0 )
    \n+
    141 {
    \n+
    142 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
    \n+
    143 assert( hostGrid != 0 );
    \n+
    144 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
    \n+
    145 grid_ = new Grid( hostGrid, coordFunction );
    \n+
    146 }
    \n+
    147
    \n+
    148 explicit DGFGridFactory ( const std::string &filename,
    \n+
    149 MPICommunicator comm = MPIHelper::getCommunicator() )
    \n+
    150 : dgfHostFactory_( filename, comm ),
    \n+
    151 grid_( 0 )
    \n+
    152 {
    \n+
    153 auto hostGrid = std::shared_ptr<HostGrid>(dgfHostFactory_.grid());
    \n+
    154 assert( hostGrid != 0 );
    \n+
    155 std::ifstream input( filename.c_str() );
    \n+
    156 auto coordFunction = std::shared_ptr<CoordFunction>(CoordFunctionFactory::create( input, *hostGrid ));
    \n+
    157 grid_ = new Grid( hostGrid, coordFunction );
    \n+
    158 }
    \n+
    159
    \n+
    160 Grid *grid () const
    \n+
    161 {
    \n+
    162 return grid_;
    \n+
    163 }
    \n
    164
    \n-
    165 std::vector< std::vector< double > > vtxParams,elParams;
    \n-
    166
    \n-
    167 // write information about generation process
    \n-\n-
    169
    \n-
    170 std::vector < double > emptyParam_;
    \n-
    171
    \n-
    172
    \n-
    173 private:
    \n-
    174 int rank_;
    \n-
    175 int size_;
    \n+
    165 template< class Intersection >
    \n+
    166 bool wasInserted ( const Intersection &intersection ) const
    \n+
    167 {
    \n+
    168 return dgfHostFactory_.wasInserted( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n+
    169 }
    \n+
    170
    \n+
    171 template< class Intersection >
    \n+
    172 int boundaryId ( const Intersection &intersection ) const
    \n+
    173 {
    \n+
    174 return dgfHostFactory_.boundaryId( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n+
    175 }
    \n
    176
    \n-
    177 template< class GridType >
    \n-
    178 friend struct DGFGridFactory;
    \n-
    179
    \n-
    180 template< class GridType >
    \n-
    181 friend struct DGFBaseFactory;
    \n+
    177 template< int codim >
    \n+
    178 int numParameters () const
    \n+
    179 {
    \n+
    180 return dgfHostFactory_.template numParameters< codim >();
    \n+
    181 }
    \n
    182
    \n-
    183 };
    \n-
    184
    \n-
    185} // end namespace Dune
    \n-
    186
    \n-
    187#endif
    \n-\n+
    183 // return true if boundary parameters found
    \n+\n+
    185 {
    \n+
    186 return dgfHostFactory_.haveBoundaryParameters();
    \n+
    187 }
    \n+
    188
    \n+
    189 template< class GG, class II >
    \n+
    190 const typename DGFBoundaryParameter::type &
    \n+
    191 boundaryParameter ( const Dune::Intersection< GG, II > & intersection ) const
    \n+
    192 {
    \n+
    193 return dgfHostFactory_.boundaryParameter( HostGridAccess< Grid >::hostIntersection( intersection ) );
    \n+
    194 }
    \n+
    195
    \n+
    196 template< class Entity >
    \n+
    197 std::vector< double > &parameter ( const Entity &entity )
    \n+
    198 {
    \n+
    199 return dgfHostFactory_.parameter( HostGridAccess< Grid >::hostEntity( entity ) );
    \n+
    200 }
    \n+
    201
    \n+
    202 private:
    \n+
    203 DGFGridFactory< HostGrid > dgfHostFactory_;
    \n+
    204 Grid *grid_;
    \n+
    205 };
    \n+
    206
    \n+
    207
    \n+
    208
    \n+
    209 // DGFGridInfo for GeometryGrid
    \n+
    210 // ----------------------------
    \n+
    211
    \n+
    212 template< class HostGrid, class CoordFunction, class Allocator >
    \n+
    213 struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >
    \n+
    214 {
    \n+
    215 static int refineStepsForHalf ()
    \n+
    216 {
    \n+\n+
    218 }
    \n+
    219
    \n+
    220 static double refineWeight ()
    \n+
    221 {
    \n+
    222 return -1.0;
    \n+
    223 }
    \n+
    224 };
    \n+
    225
    \n+
    226}
    \n+
    227
    \n+
    228#endif // #ifndef DUNE_DGFGEOGRID_HH
    \n+\n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: dgfgridfactory.hh:38
    \n-
    Definition: io/file/dgfparser/dgfparser.cc:26
    \n-
    Contains types for additional features.
    Definition: parser.hh:23
    \n-
    static const type & defaultValue()
    default constructor
    Definition: parser.hh:28
    \n-
    static const char delimiter
    delimiter
    Definition: parser.hh:41
    \n-
    static type convert(const std::string &parameter)
    copy from string
    Definition: parser.hh:35
    \n+
    G Grid
    Definition: dgfgridfactory.hh:39
    \n+
    static const int dimension
    Definition: dgfgridfactory.hh:40
    \n+
    Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
    Definition: common/intersection.hh:164
    \n+
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n+
    Grid abstract base class.
    Definition: common/grid.hh:375
    \n+
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/grid.hh:387
    \n+
    Derive an implementation of an analytical coordinate function from this class.
    Definition: coordfunction.hh:134
    \n+
    Base::DomainVector DomainVector
    Definition: coordfunction.hh:139
    \n+
    Base::RangeVector RangeVector
    Definition: coordfunction.hh:140
    \n+
    static const bool value
    Definition: coordfunction.hh:308
    \n+
    grid wrapper replacing the geometries
    Definition: geometrygrid/grid.hh:86
    \n+
    provides access to host grid objects from GeometryGrid
    Definition: identitygrid.hh:37
    \n+
    Definition: io/file/dgfparser/blocks/projection.hh:24
    \n+
    ExpressionPointer function(const std::string &name) const
    Definition: io/file/dgfparser/blocks/projection.hh:100
    \n+
    Definition: io/file/dgfparser/blocks/projection.hh:160
    \n+
    virtual void evaluate(const Vector &argument, Vector &result) const =0
    \n+
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n+
    Definition: dgfgeogrid.hh:45
    \n+
    Base::DomainVector DomainVector
    Definition: dgfgeogrid.hh:50
    \n+
    void evaluate(const DomainVector &x, RangeVector &y) const
    Definition: dgfgeogrid.hh:59
    \n+
    dgf::ProjectionBlock::Expression Expression
    Definition: dgfgeogrid.hh:53
    \n+
    DGFCoordFunction(const Expression *expression)
    Definition: dgfgeogrid.hh:55
    \n+
    Base::RangeVector RangeVector
    Definition: dgfgeogrid.hh:51
    \n+
    Definition: dgfgeogrid.hh:82
    \n+
    static CoordFunction * create(std::istream &, const HostGrid &)
    Definition: dgfgeogrid.hh:88
    \n+
    static CoordFunction * create(std::istream &, const HostGrid &hostGrid)
    Definition: dgfgeogrid.hh:98
    \n+
    static CoordFunction * create(std::istream &input, const HostGrid &hostGrid)
    Definition: dgfgeogrid.hh:110
    \n+
    DGFCoordFunction< dimD, dimR > CoordFunction
    Definition: dgfgeogrid.hh:108
    \n+
    Grid::template Codim< dimension >::Entity Vertex
    Definition: dgfgeogrid.hh:133
    \n+
    int boundaryId(const Intersection &intersection) const
    Definition: dgfgeogrid.hh:172
    \n+
    MPIHelper::MPICommunicator MPICommunicator
    Definition: dgfgeogrid.hh:131
    \n+
    const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection< GG, II > &intersection) const
    Definition: dgfgeogrid.hh:191
    \n+
    DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::getCommunicator())
    Definition: dgfgeogrid.hh:137
    \n+
    Grid::template Codim< 0 >::Entity Element
    Definition: dgfgeogrid.hh:132
    \n+\n+
    DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory
    Definition: dgfgeogrid.hh:135
    \n+
    GeometryGrid< HostGrid, CoordFunction, Allocator > Grid
    Definition: dgfgeogrid.hh:128
    \n+\n+
    std::vector< double > & parameter(const Entity &entity)
    Definition: dgfgeogrid.hh:197
    \n+
    DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::getCommunicator())
    Definition: dgfgeogrid.hh:148
    \n+
    bool wasInserted(const Intersection &intersection) const
    Definition: dgfgeogrid.hh:166
    \n+\n+
    static double refineWeight()
    Definition: dgfgeogrid.hh:220
    \n+\n+
    Some simple static information for a given GridType.
    Definition: io/file/dgfparser/dgfparser.hh:56
    \n+
    static int refineStepsForHalf()
    number of globalRefine steps needed to refuce h by 0.5
    \n
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n-
    The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures us...
    Definition: parser.hh:47
    \n-
    int nofvtxparams
    Definition: parser.hh:163
    \n-
    int nofbound
    Definition: parser.hh:141
    \n-
    std::pair< int, BoundaryParameter > BndParam
    Definition: parser.hh:145
    \n-
    void readTetgenTriangle(const std::string &)
    Definition: io/file/dgfparser/dgfparser.cc:795
    \n-
    static bool isDuneGridFormat(std::istream &input)
    check whether a stream is in DUNE grid format
    Definition: io/file/dgfparser/dgfparser.cc:271
    \n-
    void setOrientation(int use1, int use2, orientation_t orientation=counterclockwise)
    Definition: io/file/dgfparser/dgfparser.cc:910
    \n-
    std::vector< std::vector< double > > vtxParams
    Definition: parser.hh:165
    \n-
    void setRefinement(int use1, int use2, int is1=-1, int is2=-1)
    Definition: io/file/dgfparser/dgfparser.cc:989
    \n-
    friend struct DGFBaseFactory
    Definition: parser.hh:181
    \n-
    static std::string temporaryFileName()
    Definition: io/file/dgfparser/dgfparser.cc:1096
    \n-
    DuneGridFormatParser(int rank, int size)
    constructor
    Definition: io/file/dgfparser/dgfparser.cc:97
    \n-
    void removeCopies()
    Definition: io/file/dgfparser/dgfparser.cc:464
    \n-
    int dimw
    Definition: parser.hh:122
    \n-
    int dimgrid
    Definition: parser.hh:122
    \n-
    element_t element
    Definition: parser.hh:153
    \n-
    DGFBoundaryParameter::type BoundaryParameter
    Definition: parser.hh:144
    \n-
    int nofelements
    Definition: parser.hh:136
    \n-
    orientation_t
    Definition: parser.hh:51
    \n-
    @ clockwise
    Definition: parser.hh:51
    \n-
    @ counterclockwise
    Definition: parser.hh:51
    \n-
    double testTriang(int snr)
    Definition: io/file/dgfparser/dgfparser.cc:1050
    \n-
    double minVertexDistance
    Definition: parser.hh:131
    \n-
    bool simplexgrid
    Definition: parser.hh:157
    \n-
    std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t
    Definition: parser.hh:146
    \n-
    std::vector< std::vector< int > > bound
    Definition: parser.hh:139
    \n-
    void generateSimplexGrid(std::istream &)
    Definition: io/file/dgfparser/dgfparser.cc:624
    \n-
    std::vector< double > emptyParam_
    Definition: parser.hh:170
    \n-
    int nofelparams
    Definition: parser.hh:163
    \n-
    std::vector< std::vector< double > > elParams
    Definition: parser.hh:165
    \n-
    facemap_t facemap
    Definition: parser.hh:147
    \n-
    element_t
    Definition: parser.hh:49
    \n-
    @ General
    Definition: parser.hh:49
    \n-
    @ Cube
    Definition: parser.hh:49
    \n-
    @ Simplex
    Definition: parser.hh:49
    \n-
    bool cube2simplex
    Definition: parser.hh:160
    \n-
    int nofvtx
    Definition: parser.hh:127
    \n-
    void writeTetgenPoly(const std::string &, std::string &, std::string &)
    method to write in Tetgen/Triangle Poly Format
    Definition: io/file/dgfparser/dgfparser.cc:123
    \n-
    std::vector< std::vector< double > > vtx
    Definition: parser.hh:125
    \n-
    int vtxoffset
    Definition: parser.hh:129
    \n-
    bool readDuneGrid(std::istream &input, int dimG, int dimW)
    parse dune grid format from stream
    Definition: io/file/dgfparser/dgfparser.cc:298
    \n-
    std ::vector< std ::vector< unsigned int > > elements
    Definition: parser.hh:134
    \n-
    bool haveBndParameters
    Definition: parser.hh:150
    \n-
    DGFPrintInfo * info
    Definition: parser.hh:168
    \n-
    void generateBoundaries(std::istream &, bool)
    Definition: io/file/dgfparser/dgfparser.cc:502
    \n-
    std::vector< double > & getVtxParam(int i, std::vector< double > &coord)
    Definition: io/file/dgfparser/dgfparser.cc:1086
    \n-
    std::vector< double > & getElParam(int i, std::vector< double > &coord)
    Definition: io/file/dgfparser/dgfparser.cc:1070
    \n+\n+\n+\n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -7,336 +7,425 @@\n \n \n * dune\n * grid\n * io\n * file\n * dgfparser\n-parser.hh\n+dgfgeogrid.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_DUNEGRIDFORMATPARSER_HH\n- 6#define DUNE_DGF_DUNEGRIDFORMATPARSER_HH\n+ 5#ifndef DUNE_DGFGEOGRID_HH\n+ 6#define DUNE_DGFGEOGRID_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12\n- 13#include \n- 14\n- 15namespace Dune\n- 16{\n+ 8#include \n+ 9\n+ 10#include \n+ 11#include \n+ 12#include \n+ 13#include \n+ 14#include \n+ 15\n+ 16#include \n 17\n- 18 class DGFPrintInfo;\n- 19\n-22 struct DGFBoundaryParameter\n- 23 {\n-25 typedef std::string type;\n- 26\n-28 static const type &defaultValue ()\n- 29 {\n- 30 static type value;\n- 31 return value;\n- 32 }\n+ 18\n+ 19namespace Dune\n+ 20{\n+ 21\n+ 22 /************************************************************************\n+ 23 * Warning:\n+ 24 * Reading DGF files directly into a GeometryGrid is a dirty hack for\n+ 25 * two reasons:\n+ 26 * 1) The host grid and coordinate function are never deleted (dangling\n+ 27 * pointers).\n+ 28 * 2) The coordinate function has to provide a default constructor\n+ 29 ************************************************************************/\n+ 30\n+ 31 // External Forward Declarations\n+ 32 // -----------------------------\n 33\n-35 static type convert ( const std::string & parameter )\n- 36 {\n- 37 return parameter;\n- 38 }\n- 39\n-41 static const char delimiter = ':';\n- 42 };\n- 43\n-46 class DuneGridFormatParser\n- 47 {\n- 48 public:\n-49 typedef enum {Simplex,Cube,General} element_t;\n- 50\n-51 typedef enum {counterclockwise=1,clockwise=-1} orientation_t;\n+ 34 template< class GridImp, class IntersectionImp >\n+ 35 class Intersection;\n+ 36\n+ 37\n+ 38\n+ 39 // DGFCoordFunction\n+ 40 // ----------------\n+ 41\n+ 42 template< int dimD, int dimR >\n+43 class DGFCoordFunction\n+ 44 : public AnalyticalCoordFunction< double, dimD, dimR, DGFCoordFunction<\n+dimD, dimR > >\n+ 45 {\n+ 46 typedef DGFCoordFunction<_dimD,_dimR_> This;\n+ 47 typedef AnalyticalCoordFunction<_double,_dimD,_dimR,_This_> Base;\n+ 48\n+ 49 public:\n+50 typedef typename Base::DomainVector DomainVector;\n+51 typedef typename Base::RangeVector RangeVector;\n 52\n- 54 DuneGridFormatParser ( int rank, int size );\n- 55\n- 66 static bool isDuneGridFormat ( std::istream &input );\n- 67\n- 77 static bool isDuneGridFormat ( const std::string &filename );\n- 78\n- 91 bool readDuneGrid( std::istream &input, int dimG, int dimW );\n- 92\n- 94 void writeTetgenPoly ( const std::string &, std::string &, std::string & );\n- 95\n- 96 void writeTetgenPoly ( std::ostream & out, const bool writeSegments = true\n-);\n- 97\n- 98 protected:\n- 99 void generateBoundaries ( std::istream &, bool );\n- 100\n- 101 // call to tetgen/triangle\n- 102 void generateSimplexGrid ( std::istream & );\n- 103 void readTetgenTriangle ( const std::string & );\n+53 typedef dgf::ProjectionBlock::Expression Expression;\n+ 54\n+55 DGFCoordFunction ( const Expression *expression )\n+ 56 : expression_( expression )\n+ 57 {}\n+ 58\n+59 void evaluate ( const DomainVector &x, RangeVector &y ) const\n+ 60 {\n+ 61 std::vector< double > vx( dimD );\n+ 62 std::vector< double > vy;\n+ 63 for( int i = 0; i < dimD; ++i )\n+ 64 vx[ i ] = x[ i ];\n+ 65 expression_->evaluate( vx, vy );\n+ 66 assert( vy.size() == size_t( dimR ) );\n+ 67 for( int i = 0; i < dimR; ++i )\n+ 68 y[ i ] = vy[ i ];\n+ 69 }\n+ 70\n+ 71 private:\n+ 72 const Expression *expression_;\n+ 73 };\n+ 74\n+ 75\n+ 76\n+ 77 // DGFCoordFunctionFactory\n+ 78 // -----------------------\n+ 79\n+ 80 template< class HostGrid, class CoordFunction,\n+ 81 bool discrete = GeoGrid::isDiscreteCoordFunctionInterface<_typename\n+CoordFunction::Interface_>::value >\n+82 struct DGFCoordFunctionFactory;\n+ 83\n+ 84\n+ 85 template< class HostGrid, class CoordFunction >\n+86 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, false >\n+ 87 {\n+88 static CoordFunction *create ( std::istream &, const HostGrid & )\n+ 89 {\n+ 90 return new CoordFunction;\n+ 91 }\n+ 92 };\n+ 93\n+ 94\n+ 95 template< class HostGrid, class CoordFunction >\n+96 struct DGFCoordFunctionFactory< HostGrid, CoordFunction, true >\n+ 97 {\n+98 static CoordFunction *create ( std::istream &, const HostGrid &hostGrid )\n+ 99 {\n+ 100 return new CoordFunction( hostGrid );\n+ 101 }\n+ 102 };\n+ 103\n 104\n- 105 // helper methods\n- 106 void removeCopies ();\n- 107\n- 108 void setOrientation ( int use1, int use2,\n- 109 orientation_t orientation=counterclockwise );\n- 110\n- 111 void setRefinement ( int use1, int use2, int is1=-1, int is2=-1 );\n- 112\n- 113 double testTriang ( int snr );\n- 114\n- 115 std::vector< double > & getElParam ( int i, std::vector< double > & coord\n-);\n- 116\n- 117 std::vector< double > & getVtxParam ( int i, std::vector< double > & coord\n-);\n- 118\n- 119 static std::string temporaryFileName ();\n+ 105 template< class HostGrid, int dimD, int dimR >\n+106 struct DGFCoordFunctionFactory< HostGrid, DGFCoordFunction< dimD, dimR >,\n+false >\n+ 107 {\n+108 typedef DGFCoordFunction<_dimD,_dimR_> CoordFunction;\n+ 109\n+110 static CoordFunction *create ( std::istream &input, const HostGrid\n+&hostGrid )\n+ 111 {\n+ 112 dgf::ProjectionBlock projectionBlock( input, dimR );\n+ 113 const typename CoordFunction::Expression *expression =\n+projectionBlock.function( \"coordfunction\" );\n+ 114 if( expression == 0 )\n+ 115 DUNE_THROW( DGFException, \"no coordfunction specified in DGF file.\" );\n+ 116 return new CoordFunction( expression );\n+ 117 }\n+ 118 };\n+ 119\n 120\n- 121 // dimension of world and problem: set through the readDuneGrid() method\n-122 int dimw, dimgrid;\n- 123\n- 124 // vector of vertex coordinates\n-125 std::vector < std::vector < double > > vtx;\n- 126\n-127 int nofvtx;\n- 128\n-129 int vtxoffset;\n- 130\n-131 double minVertexDistance; // min. L^1 distance of distinct points\n- 132\n- 133 // vector of elements\n-134 std :: vector< std :: vector< unsigned int > > elements;\n- 135\n-136 int nofelements;\n- 137\n- 138 // vector of boundary segments + identifier\n-139 std::vector < std::vector < int > > bound;\n- 140\n-141 int nofbound;\n- 142\n- 143 // map to generate and find boundary segments\n-144 typedef DGFBoundaryParameter::type BoundaryParameter;\n-145 typedef std::pair < int, BoundaryParameter > BndParam;\n-146 typedef std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t;\n-147 facemap_t facemap;\n- 148\n- 149 // true if parameters on a boundary found\n-150 bool haveBndParameters;\n- 151\n- 152 // set by generator depending on element type wanted\n-153 element_t element;\n- 154\n- 155 // set by the readDuneGrid method depending\n- 156 // on what type the elements were generated\n-157 bool simplexgrid;\n- 158\n- 159 // true if grid is generated using the intervall Block\n-160 bool cube2simplex;\n- 161\n- 162 // parameters on elements\n-163 int nofvtxparams,nofelparams;\n+ 121\n+ 122 // DGFGridFactory for GeometryGrid\n+ 123 // -------------------------------\n+ 124\n+ 125 template< class HostGrid, class CoordFunction, class Allocator >\n+126 struct DGFGridFactory< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n+ 127 {\n+128 typedef GeometryGrid<_HostGrid,_CoordFunction,_Allocator_> Grid;\n+ 129\n+130 const static int dimension = Grid::dimension;\n+131 typedef MPIHelper::MPICommunicator MPICommunicator;\n+132 typedef typename Grid::template Codim<0>::Entity Element;\n+133 typedef typename Grid::template Codim::Entity Vertex;\n+ 134\n+135 typedef DGFCoordFunctionFactory<_HostGrid,_CoordFunction_>\n+CoordFunctionFactory;\n+ 136\n+137 explicit DGFGridFactory ( std::istream &input,\n+ 138 MPICommunicator comm = MPIHelper::getCommunicator() )\n+ 139 : dgfHostFactory_( input, comm ),\n+ 140 grid_( 0 )\n+ 141 {\n+ 142 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid());\n+ 143 assert( hostGrid != 0 );\n+ 144 auto coordFunction = std::shared_ptr(CoordFunctionFactory::\n+create( input, *hostGrid ));\n+ 145 grid_ = new Grid( hostGrid, coordFunction );\n+ 146 }\n+ 147\n+148 explicit DGFGridFactory ( const std::string &filename,\n+ 149 MPICommunicator comm = MPIHelper::getCommunicator() )\n+ 150 : dgfHostFactory_( filename, comm ),\n+ 151 grid_( 0 )\n+ 152 {\n+ 153 auto hostGrid = std::shared_ptr(dgfHostFactory_.grid());\n+ 154 assert( hostGrid != 0 );\n+ 155 std::ifstream input( filename.c_str() );\n+ 156 auto coordFunction = std::shared_ptr(CoordFunctionFactory::\n+create( input, *hostGrid ));\n+ 157 grid_ = new Grid( hostGrid, coordFunction );\n+ 158 }\n+ 159\n+160 Grid *grid () const\n+ 161 {\n+ 162 return grid_;\n+ 163 }\n 164\n-165 std::vector< std::vector< double > > vtxParams,elParams;\n- 166\n- 167 // write information about generation process\n-168 DGFPrintInfo * info;\n- 169\n-170 std::vector < double > emptyParam_;\n- 171\n- 172\n- 173 private:\n- 174 int rank_;\n- 175 int size_;\n+ 165 template< class Intersection >\n+166 bool wasInserted ( const Intersection &intersection ) const\n+ 167 {\n+ 168 return dgfHostFactory_.wasInserted( HostGridAccess<_Grid_>::\n+hostIntersection( intersection ) );\n+ 169 }\n+ 170\n+ 171 template< class Intersection >\n+172 int boundaryId ( const Intersection &intersection ) const\n+ 173 {\n+ 174 return dgfHostFactory_.boundaryId( HostGridAccess<_Grid_>::\n+hostIntersection( intersection ) );\n+ 175 }\n 176\n- 177 template< class GridType >\n-178 friend struct DGFGridFactory;\n- 179\n- 180 template< class GridType >\n-181 friend struct DGFBaseFactory;\n+ 177 template< int codim >\n+178 int numParameters () const\n+ 179 {\n+ 180 return dgfHostFactory_.template numParameters< codim >();\n+ 181 }\n 182\n- 183 };\n- 184\n- 185} // end namespace Dune\n- 186\n- 187#endif\n-entitykey.hh\n+ 183 // return true if boundary parameters found\n+184 bool haveBoundaryParameters () const\n+ 185 {\n+ 186 return dgfHostFactory_.haveBoundaryParameters();\n+ 187 }\n+ 188\n+ 189 template< class GG, class II >\n+ 190 const typename DGFBoundaryParameter::type &\n+191 boundaryParameter ( const Dune::Intersection<_GG,_II_> & intersection )\n+const\n+ 192 {\n+ 193 return dgfHostFactory_.boundaryParameter( HostGridAccess<_Grid_>::\n+hostIntersection( intersection ) );\n+ 194 }\n+ 195\n+ 196 template< class Entity >\n+197 std::vector< double > ¶meter ( const Entity &entity )\n+ 198 {\n+ 199 return dgfHostFactory_.parameter( HostGridAccess<_Grid_>::hostEntity\n+( entity ) );\n+ 200 }\n+ 201\n+ 202 private:\n+ 203 DGFGridFactory<_HostGrid_> dgfHostFactory_;\n+ 204 Grid *grid_;\n+ 205 };\n+ 206\n+ 207\n+ 208\n+ 209 // DGFGridInfo for GeometryGrid\n+ 210 // ----------------------------\n+ 211\n+ 212 template< class HostGrid, class CoordFunction, class Allocator >\n+213 struct DGFGridInfo< GeometryGrid< HostGrid, CoordFunction, Allocator > >\n+ 214 {\n+215 static int refineStepsForHalf ()\n+ 216 {\n+ 217 return DGFGridInfo<_HostGrid_>::refineStepsForHalf();\n+ 218 }\n+ 219\n+220 static double refineWeight ()\n+ 221 {\n+ 222 return -1.0;\n+ 223 }\n+ 224 };\n+ 225\n+ 226}\n+ 227\n+ 228#endif // #ifndef DUNE_DGFGEOGRID_HH\n+geometrygrid.hh\n+parser.hh\n+hostgridaccess.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::DGFGridFactory\n Definition: dgfgridfactory.hh:38\n-Dune::DGFPrintInfo\n-Definition: io/file/dgfparser/dgfparser.cc:26\n-Dune::DGFBoundaryParameter\n-Contains types for additional features.\n-Definition: parser.hh:23\n-Dune::DGFBoundaryParameter::defaultValue\n-static const type & defaultValue()\n-default constructor\n-Definition: parser.hh:28\n-Dune::DGFBoundaryParameter::delimiter\n-static const char delimiter\n-delimiter\n-Definition: parser.hh:41\n-Dune::DGFBoundaryParameter::convert\n-static type convert(const std::string ¶meter)\n-copy from string\n-Definition: parser.hh:35\n+Dune::DGFGridFactory::Grid\n+G Grid\n+Definition: dgfgridfactory.hh:39\n+Dune::DGFGridFactory::dimension\n+static const int dimension\n+Definition: dgfgridfactory.hh:40\n+Dune::Intersection\n+Intersection of a mesh entity of codimension 0 (\"element\") with a \"neighboring\"\n+element or with the d...\n+Definition: common/intersection.hh:164\n+Dune::Entity\n+Wrapper class for entities.\n+Definition: common/entity.hh:66\n+Dune::Grid\n+Grid abstract base class.\n+Definition: common/grid.hh:375\n+Dune::Grid::dimension\n+static constexpr int dimension\n+The dimension of the grid.\n+Definition: common/grid.hh:387\n+Dune::AnalyticalCoordFunction\n+Derive an implementation of an analytical coordinate function from this class.\n+Definition: coordfunction.hh:134\n+Dune::AnalyticalCoordFunction::DomainVector\n+Base::DomainVector DomainVector\n+Definition: coordfunction.hh:139\n+Dune::AnalyticalCoordFunction::RangeVector\n+Base::RangeVector RangeVector\n+Definition: coordfunction.hh:140\n+Dune::GeoGrid::isDiscreteCoordFunctionInterface::value\n+static const bool value\n+Definition: coordfunction.hh:308\n+Dune::GeometryGrid\n+grid wrapper replacing the geometries\n+Definition: geometrygrid/grid.hh:86\n+Dune::HostGridAccess\n+provides access to host grid objects from GeometryGrid\n+Definition: identitygrid.hh:37\n+Dune::dgf::ProjectionBlock\n+Definition: io/file/dgfparser/blocks/projection.hh:24\n+Dune::dgf::ProjectionBlock::function\n+ExpressionPointer function(const std::string &name) const\n+Definition: io/file/dgfparser/blocks/projection.hh:100\n+Dune::dgf::ProjectionBlock::Expression\n+Definition: io/file/dgfparser/blocks/projection.hh:160\n+Dune::dgf::ProjectionBlock::Expression::evaluate\n+virtual void evaluate(const Vector &argument, Vector &result) const =0\n+Dune::DGFException\n+exception class for IO errors in the DGF parser\n+Definition: dgfexception.hh:16\n+Dune::DGFCoordFunction\n+Definition: dgfgeogrid.hh:45\n+Dune::DGFCoordFunction::DomainVector\n+Base::DomainVector DomainVector\n+Definition: dgfgeogrid.hh:50\n+Dune::DGFCoordFunction::evaluate\n+void evaluate(const DomainVector &x, RangeVector &y) const\n+Definition: dgfgeogrid.hh:59\n+Dune::DGFCoordFunction::Expression\n+dgf::ProjectionBlock::Expression Expression\n+Definition: dgfgeogrid.hh:53\n+Dune::DGFCoordFunction::DGFCoordFunction\n+DGFCoordFunction(const Expression *expression)\n+Definition: dgfgeogrid.hh:55\n+Dune::DGFCoordFunction::RangeVector\n+Base::RangeVector RangeVector\n+Definition: dgfgeogrid.hh:51\n+Dune::DGFCoordFunctionFactory\n+Definition: dgfgeogrid.hh:82\n+Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_false_>::create\n+static CoordFunction * create(std::istream &, const HostGrid &)\n+Definition: dgfgeogrid.hh:88\n+Dune::DGFCoordFunctionFactory<_HostGrid,_CoordFunction,_true_>::create\n+static CoordFunction * create(std::istream &, const HostGrid &hostGrid)\n+Definition: dgfgeogrid.hh:98\n+Dune::DGFCoordFunctionFactory<_HostGrid,_DGFCoordFunction<_dimD,_dimR_>,_false\n+>::create\n+static CoordFunction * create(std::istream &input, const HostGrid &hostGrid)\n+Definition: dgfgeogrid.hh:110\n+Dune::DGFCoordFunctionFactory<_HostGrid,_DGFCoordFunction<_dimD,_dimR_>,_false\n+>::CoordFunction\n+DGFCoordFunction< dimD, dimR > CoordFunction\n+Definition: dgfgeogrid.hh:108\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+Vertex\n+Grid::template Codim< dimension >::Entity Vertex\n+Definition: dgfgeogrid.hh:133\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+boundaryId\n+int boundaryId(const Intersection &intersection) const\n+Definition: dgfgeogrid.hh:172\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+MPICommunicator\n+MPIHelper::MPICommunicator MPICommunicator\n+Definition: dgfgeogrid.hh:131\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+boundaryParameter\n+const DGFBoundaryParameter::type & boundaryParameter(const Dune::Intersection<\n+GG, II > &intersection) const\n+Definition: dgfgeogrid.hh:191\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+DGFGridFactory\n+DGFGridFactory(std::istream &input, MPICommunicator comm=MPIHelper::\n+getCommunicator())\n+Definition: dgfgeogrid.hh:137\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+Element\n+Grid::template Codim< 0 >::Entity Element\n+Definition: dgfgeogrid.hh:132\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+grid\n+Grid * grid() const\n+Definition: dgfgeogrid.hh:160\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+CoordFunctionFactory\n+DGFCoordFunctionFactory< HostGrid, CoordFunction > CoordFunctionFactory\n+Definition: dgfgeogrid.hh:135\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+Grid\n+GeometryGrid< HostGrid, CoordFunction, Allocator > Grid\n+Definition: dgfgeogrid.hh:128\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+numParameters\n+int numParameters() const\n+Definition: dgfgeogrid.hh:178\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+parameter\n+std::vector< double > & parameter(const Entity &entity)\n+Definition: dgfgeogrid.hh:197\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+DGFGridFactory\n+DGFGridFactory(const std::string &filename, MPICommunicator comm=MPIHelper::\n+getCommunicator())\n+Definition: dgfgeogrid.hh:148\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+wasInserted\n+bool wasInserted(const Intersection &intersection) const\n+Definition: dgfgeogrid.hh:166\n+Dune::DGFGridFactory<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+haveBoundaryParameters\n+bool haveBoundaryParameters() const\n+Definition: dgfgeogrid.hh:184\n+Dune::DGFGridInfo<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+refineWeight\n+static double refineWeight()\n+Definition: dgfgeogrid.hh:220\n+Dune::DGFGridInfo<_GeometryGrid<_HostGrid,_CoordFunction,_Allocator_>_>::\n+refineStepsForHalf\n+static int refineStepsForHalf()\n+Definition: dgfgeogrid.hh:215\n+Dune::DGFGridInfo\n+Some simple static information for a given GridType.\n+Definition: io/file/dgfparser/dgfparser.hh:56\n+Dune::DGFGridInfo::refineStepsForHalf\n+static int refineStepsForHalf()\n+number of globalRefine steps needed to refuce h by 0.5\n Dune::DGFBoundaryParameter::type\n std::string type\n type of additional boundary parameters\n Definition: parser.hh:25\n-Dune::DuneGridFormatParser\n-The DuneGridFormatParser class: reads a DGF file and stores build information\n-in vector structures us...\n-Definition: parser.hh:47\n-Dune::DuneGridFormatParser::nofvtxparams\n-int nofvtxparams\n-Definition: parser.hh:163\n-Dune::DuneGridFormatParser::nofbound\n-int nofbound\n-Definition: parser.hh:141\n-Dune::DuneGridFormatParser::BndParam\n-std::pair< int, BoundaryParameter > BndParam\n-Definition: parser.hh:145\n-Dune::DuneGridFormatParser::readTetgenTriangle\n-void readTetgenTriangle(const std::string &)\n-Definition: io/file/dgfparser/dgfparser.cc:795\n-Dune::DuneGridFormatParser::isDuneGridFormat\n-static bool isDuneGridFormat(std::istream &input)\n-check whether a stream is in DUNE grid format\n-Definition: io/file/dgfparser/dgfparser.cc:271\n-Dune::DuneGridFormatParser::setOrientation\n-void setOrientation(int use1, int use2, orientation_t\n-orientation=counterclockwise)\n-Definition: io/file/dgfparser/dgfparser.cc:910\n-Dune::DuneGridFormatParser::vtxParams\n-std::vector< std::vector< double > > vtxParams\n-Definition: parser.hh:165\n-Dune::DuneGridFormatParser::setRefinement\n-void setRefinement(int use1, int use2, int is1=-1, int is2=-1)\n-Definition: io/file/dgfparser/dgfparser.cc:989\n-Dune::DuneGridFormatParser::DGFBaseFactory\n-friend struct DGFBaseFactory\n-Definition: parser.hh:181\n-Dune::DuneGridFormatParser::temporaryFileName\n-static std::string temporaryFileName()\n-Definition: io/file/dgfparser/dgfparser.cc:1096\n-Dune::DuneGridFormatParser::DuneGridFormatParser\n-DuneGridFormatParser(int rank, int size)\n-constructor\n-Definition: io/file/dgfparser/dgfparser.cc:97\n-Dune::DuneGridFormatParser::removeCopies\n-void removeCopies()\n-Definition: io/file/dgfparser/dgfparser.cc:464\n-Dune::DuneGridFormatParser::dimw\n-int dimw\n-Definition: parser.hh:122\n-Dune::DuneGridFormatParser::dimgrid\n-int dimgrid\n-Definition: parser.hh:122\n-Dune::DuneGridFormatParser::element\n-element_t element\n-Definition: parser.hh:153\n-Dune::DuneGridFormatParser::BoundaryParameter\n-DGFBoundaryParameter::type BoundaryParameter\n-Definition: parser.hh:144\n-Dune::DuneGridFormatParser::nofelements\n-int nofelements\n-Definition: parser.hh:136\n-Dune::DuneGridFormatParser::orientation_t\n-orientation_t\n-Definition: parser.hh:51\n-Dune::DuneGridFormatParser::clockwise\n-@ clockwise\n-Definition: parser.hh:51\n-Dune::DuneGridFormatParser::counterclockwise\n-@ counterclockwise\n-Definition: parser.hh:51\n-Dune::DuneGridFormatParser::testTriang\n-double testTriang(int snr)\n-Definition: io/file/dgfparser/dgfparser.cc:1050\n-Dune::DuneGridFormatParser::minVertexDistance\n-double minVertexDistance\n-Definition: parser.hh:131\n-Dune::DuneGridFormatParser::simplexgrid\n-bool simplexgrid\n-Definition: parser.hh:157\n-Dune::DuneGridFormatParser::facemap_t\n-std::map< DGFEntityKey< unsigned int >, BndParam > facemap_t\n-Definition: parser.hh:146\n-Dune::DuneGridFormatParser::bound\n-std::vector< std::vector< int > > bound\n-Definition: parser.hh:139\n-Dune::DuneGridFormatParser::generateSimplexGrid\n-void generateSimplexGrid(std::istream &)\n-Definition: io/file/dgfparser/dgfparser.cc:624\n-Dune::DuneGridFormatParser::emptyParam_\n-std::vector< double > emptyParam_\n-Definition: parser.hh:170\n-Dune::DuneGridFormatParser::nofelparams\n-int nofelparams\n-Definition: parser.hh:163\n-Dune::DuneGridFormatParser::elParams\n-std::vector< std::vector< double > > elParams\n-Definition: parser.hh:165\n-Dune::DuneGridFormatParser::facemap\n-facemap_t facemap\n-Definition: parser.hh:147\n-Dune::DuneGridFormatParser::element_t\n-element_t\n-Definition: parser.hh:49\n-Dune::DuneGridFormatParser::General\n-@ General\n-Definition: parser.hh:49\n-Dune::DuneGridFormatParser::Cube\n-@ Cube\n-Definition: parser.hh:49\n-Dune::DuneGridFormatParser::Simplex\n-@ Simplex\n-Definition: parser.hh:49\n-Dune::DuneGridFormatParser::cube2simplex\n-bool cube2simplex\n-Definition: parser.hh:160\n-Dune::DuneGridFormatParser::nofvtx\n-int nofvtx\n-Definition: parser.hh:127\n-Dune::DuneGridFormatParser::writeTetgenPoly\n-void writeTetgenPoly(const std::string &, std::string &, std::string &)\n-method to write in Tetgen/Triangle Poly Format\n-Definition: io/file/dgfparser/dgfparser.cc:123\n-Dune::DuneGridFormatParser::vtx\n-std::vector< std::vector< double > > vtx\n-Definition: parser.hh:125\n-Dune::DuneGridFormatParser::vtxoffset\n-int vtxoffset\n-Definition: parser.hh:129\n-Dune::DuneGridFormatParser::readDuneGrid\n-bool readDuneGrid(std::istream &input, int dimG, int dimW)\n-parse dune grid format from stream\n-Definition: io/file/dgfparser/dgfparser.cc:298\n-Dune::DuneGridFormatParser::elements\n-std ::vector< std ::vector< unsigned int > > elements\n-Definition: parser.hh:134\n-Dune::DuneGridFormatParser::haveBndParameters\n-bool haveBndParameters\n-Definition: parser.hh:150\n-Dune::DuneGridFormatParser::info\n-DGFPrintInfo * info\n-Definition: parser.hh:168\n-Dune::DuneGridFormatParser::generateBoundaries\n-void generateBoundaries(std::istream &, bool)\n-Definition: io/file/dgfparser/dgfparser.cc:502\n-Dune::DuneGridFormatParser::getVtxParam\n-std::vector< double > & getVtxParam(int i, std::vector< double > &coord)\n-Definition: io/file/dgfparser/dgfparser.cc:1086\n-Dune::DuneGridFormatParser::getElParam\n-std::vector< double > & getElParam(int i, std::vector< double > &coord)\n-Definition: io/file/dgfparser/dgfparser.cc:1070\n+dgfparser.hh\n+intersection.hh\n+projection.hh\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00869_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00911_source.html", "comments": ["Files 24% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: periodicfacetrans.hh Source File\n+dune-grid: simplexgeneration.hh Source File\n \n \n \n \n \n \n \n@@ -62,163 +62,129 @@\n \n \n
    \n
    \n-
    periodicfacetrans.hh
    \n+
    simplexgeneration.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH
    \n-
    6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH
    \n+
    5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
    \n+
    6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH
    \n
    7
    \n
    8#include <iostream>
    \n-
    9#include <vector>
    \n-
    10
    \n-\n-
    12
    \n-
    13
    \n-
    14namespace Dune
    \n-
    15{
    \n-
    16
    \n-
    17 namespace dgf
    \n-
    18 {
    \n-
    19
    \n-
    20 // PeriodicFaceTransformationBlock
    \n-
    21 // -------------------------------
    \n-
    22
    \n-\n-
    24 : public BasicBlock
    \n-
    25 {
    \n-
    26 template< class T >
    \n-
    27 class Matrix;
    \n-
    28
    \n-\n-
    30
    \n-
    31 private:
    \n-
    32 std::vector< AffineTransformation > transformations_;
    \n-
    33
    \n-
    34 // copy not implemented
    \n-\n-
    36
    \n-
    37 public:
    \n-
    38 // initialize block and get dimension of world
    \n-
    39 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );
    \n+
    9
    \n+\n+
    11
    \n+
    12namespace Dune
    \n+
    13{
    \n+
    14
    \n+
    15 namespace dgf
    \n+
    16 {
    \n+
    17
    \n+\n+
    19 : public BasicBlock
    \n+
    20 {
    \n+
    21 double area_;
    \n+
    22 double angle_;
    \n+
    23 bool display_;
    \n+
    24 std::string path_;
    \n+
    25 bool haspath_;
    \n+
    26 std::string filename_;
    \n+
    27 std::string filetype_;
    \n+
    28 std::string parameter_;
    \n+
    29 std::string dumpfilename_;
    \n+
    30 bool hasfile_;
    \n+
    31 int dimension_;
    \n+
    32
    \n+
    33 public:
    \n+
    34 SimplexGenerationBlock ( std :: istream &in );
    \n+
    35
    \n+
    36 double maxArea ()
    \n+
    37 {
    \n+
    38 return area_;
    \n+
    39 }
    \n
    40
    \n-
    41 const AffineTransformation &transformation ( int i ) const
    \n-
    42 {
    \n-
    43 assert( i < numTransformations() );
    \n-
    44 return transformations_[ i ];
    \n-
    45 }
    \n-
    46
    \n-
    47 int numTransformations () const
    \n-
    48 {
    \n-
    49 return transformations_.size();
    \n-
    50 }
    \n-
    51
    \n-
    52 private:
    \n-
    53 void match ( char what );
    \n-
    54 };
    \n+
    41 double minAngle ()
    \n+
    42 {
    \n+
    43 return angle_;
    \n+
    44 }
    \n+
    45
    \n+
    46 bool display ()
    \n+
    47 {
    \n+
    48 return display_;
    \n+
    49 }
    \n+
    50
    \n+
    51 bool haspath ()
    \n+
    52 {
    \n+
    53 return haspath_;
    \n+
    54 }
    \n
    55
    \n-
    56
    \n-
    57 // PeriodicFaceTransformationBlock::Matrix
    \n-
    58 // ---------------------------------------
    \n-
    59
    \n-
    60 template< class T >
    \n-\n-
    62 {
    \n-
    63 int rows_;
    \n-
    64 int cols_;
    \n-
    65 std::vector< T > fields_;
    \n-
    66
    \n-
    67 public:
    \n-
    68 Matrix ( int rows, int cols )
    \n-
    69 : rows_( rows ),
    \n-
    70 cols_( cols ),
    \n-
    71 fields_( rows * cols )
    \n-
    72 {}
    \n-
    73
    \n-
    74 const T &operator() ( int i, int j ) const
    \n-
    75 {
    \n-
    76 return fields_[ i * cols_ + j ];
    \n-
    77 }
    \n-
    78
    \n-
    79 T &operator() ( int i, int j )
    \n-
    80 {
    \n-
    81 return fields_[ i * cols_ + j ];
    \n-
    82 }
    \n-
    83
    \n-
    84 int rows () const
    \n-
    85 {
    \n-
    86 return rows_;
    \n-
    87 }
    \n-
    88
    \n-
    89 int cols () const
    \n-
    90 {
    \n-
    91 return cols_;
    \n-
    92 }
    \n-
    93 };
    \n-
    94
    \n+
    56 std :: string path ()
    \n+
    57 {
    \n+
    58 return path_;
    \n+
    59 }
    \n+
    60
    \n+
    61 bool hasfile ()
    \n+
    62 {
    \n+
    63 return hasfile_;
    \n+
    64 }
    \n+
    65
    \n+
    66 std :: string filename ()
    \n+
    67 {
    \n+
    68 return filename_;
    \n+
    69 }
    \n+
    70
    \n+
    71 std :: string filetype ()
    \n+
    72 {
    \n+
    73 return filetype_;
    \n+
    74 }
    \n+
    75
    \n+
    76 int dimension ()
    \n+
    77 {
    \n+
    78 return dimension_;
    \n+
    79 }
    \n+
    80
    \n+
    81 std :: string parameter ()
    \n+
    82 {
    \n+
    83 return parameter_;
    \n+
    84 }
    \n+
    85
    \n+
    86 const std::string dumpFileName ( ) const
    \n+
    87 {
    \n+
    88 return dumpfilename_;
    \n+
    89 }
    \n+
    90 };
    \n+
    91
    \n+
    92 } // end namespace dgf
    \n+
    93
    \n+
    94} // end namespace Dune
    \n
    95
    \n-
    96 // PeriodicFaceTransformationBlock::AffineTransformation
    \n-
    97 // -----------------------------------------------------
    \n-
    98
    \n-\n-
    100 {
    \n-\n-
    102 std::vector< double > shift;
    \n-
    103
    \n-
    104 explicit AffineTransformation ( int dimworld )
    \n-
    105 : matrix( dimworld, dimworld ),
    \n-
    106 shift( dimworld )
    \n-
    107 {}
    \n-
    108 };
    \n-
    109
    \n-
    110
    \n-
    111 inline std::ostream &
    \n-\n-
    113 {
    \n-
    114 for( int i = 0; i < trafo.matrix.rows(); ++i )
    \n-
    115 {
    \n-
    116 out << (i > 0 ? ", " : "");
    \n-
    117 for( int j = 0; j < trafo.matrix.cols(); ++j )
    \n-
    118 out << (j > 0 ? " " : "") << trafo.matrix( i, j );
    \n-
    119 }
    \n-
    120 out << " +";
    \n-
    121 for( unsigned int i = 0; i < trafo.shift.size(); ++i )
    \n-
    122 out << " " << trafo.shift[ i ];
    \n-
    123 return out;
    \n-
    124 }
    \n-
    125
    \n-
    126 } // end namespace dgf
    \n-
    127
    \n-
    128} // end namespace Dune
    \n-
    129
    \n-
    130#endif
    \n-\n+
    96#endif
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval &interval)
    Definition: interval.hh:123
    \n
    Definition: basic.hh:31
    \n-
    Definition: periodicfacetrans.hh:25
    \n-
    int numTransformations() const
    Definition: periodicfacetrans.hh:47
    \n-
    const AffineTransformation & transformation(int i) const
    Definition: periodicfacetrans.hh:41
    \n-
    Definition: periodicfacetrans.hh:62
    \n-
    int rows() const
    Definition: periodicfacetrans.hh:84
    \n-
    const T & operator()(int i, int j) const
    Definition: periodicfacetrans.hh:74
    \n-
    int cols() const
    Definition: periodicfacetrans.hh:89
    \n-
    Matrix(int rows, int cols)
    Definition: periodicfacetrans.hh:68
    \n-\n-
    Matrix< double > matrix
    Definition: periodicfacetrans.hh:101
    \n-
    std::vector< double > shift
    Definition: periodicfacetrans.hh:102
    \n-
    AffineTransformation(int dimworld)
    Definition: periodicfacetrans.hh:104
    \n+
    Definition: simplexgeneration.hh:20
    \n+
    std::string filename()
    Definition: simplexgeneration.hh:66
    \n+
    double maxArea()
    Definition: simplexgeneration.hh:36
    \n+
    bool haspath()
    Definition: simplexgeneration.hh:51
    \n+
    std::string parameter()
    Definition: simplexgeneration.hh:81
    \n+
    int dimension()
    Definition: simplexgeneration.hh:76
    \n+
    std::string path()
    Definition: simplexgeneration.hh:56
    \n+
    const std::string dumpFileName() const
    Definition: simplexgeneration.hh:86
    \n+
    bool display()
    Definition: simplexgeneration.hh:46
    \n+
    SimplexGenerationBlock(std ::istream &in)
    Definition: simplexgeneration.cc:18
    \n+
    double minAngle()
    Definition: simplexgeneration.hh:41
    \n+
    bool hasfile()
    Definition: simplexgeneration.hh:61
    \n+
    std::string filetype()
    Definition: simplexgeneration.hh:71
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,189 +8,153 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-periodicfacetrans.hh\n+simplexgeneration.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_PERIODICFACETRANSBLOCK_HH\n- 6#define DUNE_DGF_PERIODICFACETRANSBLOCK_HH\n+ 5#ifndef DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH\n+ 6#define DUNE_DGF_SIMPLEXGENERATIONBLOCK_HH\n 7\n 8#include \n- 9#include \n- 10\n- 11#include \n- 12\n- 13\n- 14namespace Dune\n- 15{\n- 16\n- 17 namespace dgf\n- 18 {\n- 19\n- 20 // PeriodicFaceTransformationBlock\n- 21 // -------------------------------\n- 22\n-23 struct PeriodicFaceTransformationBlock\n- 24 : public BasicBlock\n- 25 {\n- 26 template< class T >\n- 27 class Matrix;\n- 28\n- 29 struct AffineTransformation;\n- 30\n- 31 private:\n- 32 std::vector< AffineTransformation > transformations_;\n- 33\n- 34 // copy not implemented\n- 35 PeriodicFaceTransformationBlock ( const PeriodicFaceTransformationBlock &\n-);\n- 36\n- 37 public:\n- 38 // initialize block and get dimension of world\n- 39 PeriodicFaceTransformationBlock ( std::istream &in, int dimworld );\n+ 9\n+ 10#include \n+ 11\n+ 12namespace Dune\n+ 13{\n+ 14\n+ 15 namespace dgf\n+ 16 {\n+ 17\n+18 class SimplexGenerationBlock\n+ 19 : public BasicBlock\n+ 20 {\n+ 21 double area_;\n+ 22 double angle_;\n+ 23 bool display_;\n+ 24 std::string path_;\n+ 25 bool haspath_;\n+ 26 std::string filename_;\n+ 27 std::string filetype_;\n+ 28 std::string parameter_;\n+ 29 std::string dumpfilename_;\n+ 30 bool hasfile_;\n+ 31 int dimension_;\n+ 32\n+ 33 public:\n+ 34 SimplexGenerationBlock ( std :: istream &in );\n+ 35\n+36 double maxArea ()\n+ 37 {\n+ 38 return area_;\n+ 39 }\n 40\n-41 const AffineTransformation &transformation ( int i ) const\n+41 double minAngle ()\n 42 {\n- 43 assert( i < numTransformations() );\n- 44 return transformations_[ i ];\n- 45 }\n- 46\n-47 int numTransformations () const\n- 48 {\n- 49 return transformations_.size();\n- 50 }\n- 51\n- 52 private:\n- 53 void match ( char what );\n- 54 };\n+ 43 return angle_;\n+ 44 }\n+ 45\n+46 bool display ()\n+ 47 {\n+ 48 return display_;\n+ 49 }\n+ 50\n+51 bool haspath ()\n+ 52 {\n+ 53 return haspath_;\n+ 54 }\n 55\n- 56\n- 57 // PeriodicFaceTransformationBlock::Matrix\n- 58 // ---------------------------------------\n- 59\n- 60 template< class T >\n-61 class PeriodicFaceTransformationBlock::Matrix\n+56 std :: string path ()\n+ 57 {\n+ 58 return path_;\n+ 59 }\n+ 60\n+61 bool hasfile ()\n 62 {\n- 63 int rows_;\n- 64 int cols_;\n- 65 std::vector< T > fields_;\n- 66\n- 67 public:\n-68 Matrix ( int rows, int cols )\n- 69 : rows_( rows ),\n- 70 cols_( cols ),\n- 71 fields_( rows * cols )\n- 72 {}\n- 73\n-74 const T &operator()( int i, int j ) const\n- 75 {\n- 76 return fields_[ i * cols_ + j ];\n- 77 }\n- 78\n-79 T &operator()( int i, int j )\n- 80 {\n- 81 return fields_[ i * cols_ + j ];\n- 82 }\n- 83\n-84 int rows () const\n- 85 {\n- 86 return rows_;\n- 87 }\n- 88\n-89 int cols () const\n- 90 {\n- 91 return cols_;\n- 92 }\n- 93 };\n- 94\n+ 63 return hasfile_;\n+ 64 }\n+ 65\n+66 std :: string filename ()\n+ 67 {\n+ 68 return filename_;\n+ 69 }\n+ 70\n+71 std :: string filetype ()\n+ 72 {\n+ 73 return filetype_;\n+ 74 }\n+ 75\n+76 int dimension ()\n+ 77 {\n+ 78 return dimension_;\n+ 79 }\n+ 80\n+81 std :: string parameter ()\n+ 82 {\n+ 83 return parameter_;\n+ 84 }\n+ 85\n+86 const std::string dumpFileName ( ) const\n+ 87 {\n+ 88 return dumpfilename_;\n+ 89 }\n+ 90 };\n+ 91\n+ 92 } // end namespace dgf\n+ 93\n+ 94} // end namespace Dune\n 95\n- 96 // PeriodicFaceTransformationBlock::AffineTransformation\n- 97 // -----------------------------------------------------\n- 98\n-99 struct PeriodicFaceTransformationBlock::AffineTransformation\n- 100 {\n-101 Matrix<_double_> matrix;\n-102 std::vector< double > shift;\n- 103\n-104 explicit AffineTransformation ( int dimworld )\n- 105 : matrix( dimworld, dimworld ),\n- 106 shift( dimworld )\n- 107 {}\n- 108 };\n- 109\n- 110\n-111 inline std::ostream &\n- 112 operator<<( std::ostream &out, const PeriodicFaceTransformationBlock::\n-AffineTransformation &trafo )\n- 113 {\n- 114 for( int i = 0; i < trafo.matrix.rows(); ++i )\n- 115 {\n- 116 out << (i > 0 ? \", \" : \"\");\n- 117 for( int j = 0; j < trafo.matrix.cols(); ++j )\n- 118 out << (j > 0 ? \" \" : \"\") << trafo.matrix( i, j );\n- 119 }\n- 120 out << \" +\";\n- 121 for( unsigned int i = 0; i < trafo.shift.size(); ++i )\n- 122 out << \" \" << trafo.shift[ i ];\n- 123 return out;\n- 124 }\n- 125\n- 126 } // end namespace dgf\n- 127\n- 128} // end namespace Dune\n- 129\n- 130#endif\n+ 96#endif\n basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::dgf::operator<<\n-std::ostream & operator<<(std::ostream &out, const IntervalBlock::Interval\n-&interval)\n-Definition: interval.hh:123\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n-Dune::dgf::PeriodicFaceTransformationBlock\n-Definition: periodicfacetrans.hh:25\n-Dune::dgf::PeriodicFaceTransformationBlock::numTransformations\n-int numTransformations() const\n-Definition: periodicfacetrans.hh:47\n-Dune::dgf::PeriodicFaceTransformationBlock::transformation\n-const AffineTransformation & transformation(int i) const\n-Definition: periodicfacetrans.hh:41\n-Dune::dgf::PeriodicFaceTransformationBlock::Matrix\n-Definition: periodicfacetrans.hh:62\n-Dune::dgf::PeriodicFaceTransformationBlock::Matrix::rows\n-int rows() const\n-Definition: periodicfacetrans.hh:84\n-Dune::dgf::PeriodicFaceTransformationBlock::Matrix::operator()\n-const T & operator()(int i, int j) const\n-Definition: periodicfacetrans.hh:74\n-Dune::dgf::PeriodicFaceTransformationBlock::Matrix::cols\n-int cols() const\n-Definition: periodicfacetrans.hh:89\n-Dune::dgf::PeriodicFaceTransformationBlock::Matrix::Matrix\n-Matrix(int rows, int cols)\n-Definition: periodicfacetrans.hh:68\n-Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation\n-Definition: periodicfacetrans.hh:100\n-Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation::matrix\n-Matrix< double > matrix\n-Definition: periodicfacetrans.hh:101\n-Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation::shift\n-std::vector< double > shift\n-Definition: periodicfacetrans.hh:102\n-Dune::dgf::PeriodicFaceTransformationBlock::AffineTransformation::\n-AffineTransformation\n-AffineTransformation(int dimworld)\n-Definition: periodicfacetrans.hh:104\n+Dune::dgf::SimplexGenerationBlock\n+Definition: simplexgeneration.hh:20\n+Dune::dgf::SimplexGenerationBlock::filename\n+std::string filename()\n+Definition: simplexgeneration.hh:66\n+Dune::dgf::SimplexGenerationBlock::maxArea\n+double maxArea()\n+Definition: simplexgeneration.hh:36\n+Dune::dgf::SimplexGenerationBlock::haspath\n+bool haspath()\n+Definition: simplexgeneration.hh:51\n+Dune::dgf::SimplexGenerationBlock::parameter\n+std::string parameter()\n+Definition: simplexgeneration.hh:81\n+Dune::dgf::SimplexGenerationBlock::dimension\n+int dimension()\n+Definition: simplexgeneration.hh:76\n+Dune::dgf::SimplexGenerationBlock::path\n+std::string path()\n+Definition: simplexgeneration.hh:56\n+Dune::dgf::SimplexGenerationBlock::dumpFileName\n+const std::string dumpFileName() const\n+Definition: simplexgeneration.hh:86\n+Dune::dgf::SimplexGenerationBlock::display\n+bool display()\n+Definition: simplexgeneration.hh:46\n+Dune::dgf::SimplexGenerationBlock::SimplexGenerationBlock\n+SimplexGenerationBlock(std ::istream &in)\n+Definition: simplexgeneration.cc:18\n+Dune::dgf::SimplexGenerationBlock::minAngle\n+double minAngle()\n+Definition: simplexgeneration.hh:41\n+Dune::dgf::SimplexGenerationBlock::hasfile\n+bool hasfile()\n+Definition: simplexgeneration.hh:61\n+Dune::dgf::SimplexGenerationBlock::filetype\n+std::string filetype()\n+Definition: simplexgeneration.hh:71\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00881_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00854_source.html", "comments": ["Files 11% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: general.hh Source File\n+dune-grid: dim.hh Source File\n \n \n \n \n \n \n \n@@ -62,89 +62,68 @@\n \n \n
    \n
    \n-
    general.hh
    \n+
    dim.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
    \n-
    6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
    \n+
    5#ifndef DUNE_DGF_DIMBLOCK_HH
    \n+
    6#define DUNE_DGF_DIMBLOCK_HH
    \n
    7
    \n
    8#include <iostream>
    \n-
    9#include <vector>
    \n-
    10
    \n-\n+
    9
    \n+\n+
    11
    \n
    12
    \n-
    13
    \n-
    14namespace Dune
    \n-
    15{
    \n-
    16
    \n-
    17 namespace dgf
    \n-
    18 {
    \n-
    19
    \n-
    20 // GeneralBlock
    \n-
    21 // ---------
    \n-
    22
    \n-\n-
    24 : public BasicBlock
    \n-
    25 {
    \n-
    26 unsigned int nofvtx;
    \n-
    27 int dimgrid;
    \n-
    28 bool goodline; // active line describes a vertex
    \n-
    29 std :: vector< unsigned int > map; // active vertex
    \n-
    30 int nofparams;
    \n-
    31 int vtxoffset;
    \n-
    32
    \n-
    33 public:
    \n-
    34 GeneralBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid );
    \n-
    35
    \n-
    36 int get ( std :: vector< std :: vector< unsigned int> > &simplex,
    \n-
    37 std :: vector< std :: vector< double > > &params,
    \n-
    38 int &nofp );
    \n+
    13namespace Dune
    \n+
    14{
    \n+
    15
    \n+
    16 namespace dgf
    \n+
    17 {
    \n+
    18 class DimBlock : public BasicBlock {
    \n+
    19 int _dimworld; // dimension of world
    \n+
    20 int _dim; // dimension of grid
    \n+
    21 public:
    \n+
    22 const static char* ID;
    \n+
    23 // initialize block and get dimension of world
    \n+
    24 DimBlock ( std :: istream &in );
    \n+
    25 // get dimension of world found in block
    \n+
    26 int dim() {
    \n+
    27 return _dim;
    \n+
    28 }
    \n+
    29 int dimworld() {
    \n+
    30 return _dimworld;
    \n+
    31 }
    \n+
    32 // some information
    \n+
    33 bool ok() {
    \n+
    34 return true;
    \n+
    35 }
    \n+
    36 };
    \n+
    37
    \n+
    38 } // end namespace dgf
    \n
    39
    \n-
    40 // some information
    \n-
    41 bool ok ()
    \n-
    42 {
    \n-
    43 return goodline;
    \n-
    44 }
    \n-
    45
    \n-\n-
    47 {
    \n-
    48 return noflines();
    \n-
    49 }
    \n-
    50
    \n-
    51 private:
    \n-
    52 // get the dimension of the grid
    \n-
    53 int getDimGrid ();
    \n-
    54 // get next simplex
    \n-
    55 bool next ( std :: vector< unsigned int > &simplex,
    \n-
    56 std :: vector< double > &param );
    \n-
    57 };
    \n-
    58
    \n-
    59 } // end namespace dgf
    \n-
    60
    \n-
    61} // end namespace Dune
    \n-
    62
    \n-
    63#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH
    \n-\n+
    40} // end namespace Dune
    \n+
    41
    \n+
    42#endif
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n
    Definition: basic.hh:31
    \n-
    int & noflines()
    Definition: basic.hh:87
    \n-
    Definition: general.hh:25
    \n-
    GeneralBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)
    Definition: general.cc:19
    \n-
    int nofsimplex()
    Definition: general.hh:46
    \n-
    int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector< std ::vector< double > > &params, int &nofp)
    Definition: general.cc:101
    \n-
    bool ok()
    Definition: general.hh:41
    \n+
    Definition: dim.hh:18
    \n+
    int dimworld()
    Definition: dim.hh:29
    \n+
    static const char * ID
    Definition: dim.hh:22
    \n+
    DimBlock(std ::istream &in)
    Definition: dim.cc:17
    \n+
    bool ok()
    Definition: dim.hh:33
    \n+
    int dim()
    Definition: dim.hh:26
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,101 +8,78 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-general.hh\n+dim.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH\n- 6#define DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH\n+ 5#ifndef DUNE_DGF_DIMBLOCK_HH\n+ 6#define DUNE_DGF_DIMBLOCK_HH\n 7\n 8#include \n- 9#include \n- 10\n- 11#include \n+ 9\n+ 10#include \n+ 11\n 12\n- 13\n- 14namespace Dune\n- 15{\n- 16\n- 17 namespace dgf\n- 18 {\n- 19\n- 20 // GeneralBlock\n- 21 // ---------\n- 22\n-23 class GeneralBlock\n- 24 : public BasicBlock\n- 25 {\n- 26 unsigned int nofvtx;\n- 27 int dimgrid;\n- 28 bool goodline; // active line describes a vertex\n- 29 std :: vector< unsigned int > map; // active vertex\n- 30 int nofparams;\n- 31 int vtxoffset;\n- 32\n- 33 public:\n- 34 GeneralBlock ( std :: istream &in, int pnofvtx, int pvtxoffset, int\n-&pdimgrid );\n- 35\n- 36 int get ( std :: vector< std :: vector< unsigned int> > &simplex,\n- 37 std :: vector< std :: vector< double > > ¶ms,\n- 38 int &nofp );\n+ 13namespace Dune\n+ 14{\n+ 15\n+ 16 namespace dgf\n+ 17 {\n+18 class DimBlock : public BasicBlock {\n+ 19 int _dimworld; // dimension of world\n+ 20 int _dim; // dimension of grid\n+ 21 public:\n+22 const static char* ID;\n+ 23 // initialize block and get dimension of world\n+ 24 DimBlock ( std :: istream &in );\n+ 25 // get dimension of world found in block\n+26 int dim() {\n+ 27 return _dim;\n+ 28 }\n+29 int dimworld() {\n+ 30 return _dimworld;\n+ 31 }\n+ 32 // some information\n+33 bool ok() {\n+ 34 return true;\n+ 35 }\n+ 36 };\n+ 37\n+ 38 } // end namespace dgf\n 39\n- 40 // some information\n-41 bool ok ()\n- 42 {\n- 43 return goodline;\n- 44 }\n- 45\n-46 int nofsimplex ()\n- 47 {\n- 48 return noflines();\n- 49 }\n- 50\n- 51 private:\n- 52 // get the dimension of the grid\n- 53 int getDimGrid ();\n- 54 // get next simplex\n- 55 bool next ( std :: vector< unsigned int > &simplex,\n- 56 std :: vector< double > ¶m );\n- 57 };\n- 58\n- 59 } // end namespace dgf\n- 60\n- 61} // end namespace Dune\n- 62\n- 63#endif // #ifndef DUNE_GRID_IO_FILE_DGFPARSER_BLOCKS_GENERAL_HH\n+ 40} // end namespace Dune\n+ 41\n+ 42#endif\n basic.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n-Dune::dgf::BasicBlock::noflines\n-int & noflines()\n-Definition: basic.hh:87\n-Dune::dgf::GeneralBlock\n-Definition: general.hh:25\n-Dune::dgf::GeneralBlock::GeneralBlock\n-GeneralBlock(std ::istream &in, int pnofvtx, int pvtxoffset, int &pdimgrid)\n-Definition: general.cc:19\n-Dune::dgf::GeneralBlock::nofsimplex\n-int nofsimplex()\n-Definition: general.hh:46\n-Dune::dgf::GeneralBlock::get\n-int get(std ::vector< std ::vector< unsigned int > > &simplex, std ::vector<\n-std ::vector< double > > ¶ms, int &nofp)\n-Definition: general.cc:101\n-Dune::dgf::GeneralBlock::ok\n+Dune::dgf::DimBlock\n+Definition: dim.hh:18\n+Dune::dgf::DimBlock::dimworld\n+int dimworld()\n+Definition: dim.hh:29\n+Dune::dgf::DimBlock::ID\n+static const char * ID\n+Definition: dim.hh:22\n+Dune::dgf::DimBlock::DimBlock\n+DimBlock(std ::istream &in)\n+Definition: dim.cc:17\n+Dune::dgf::DimBlock::ok\n bool ok()\n-Definition: general.hh:41\n+Definition: dim.hh:33\n+Dune::dgf::DimBlock::dim\n+int dim()\n+Definition: dim.hh:26\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00887_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00875_source.html", "comments": ["Files 18% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: polyhedron.hh Source File\n+dune-grid: boundaryseg.hh Source File\n \n \n \n \n \n \n \n@@ -62,101 +62,113 @@\n \n \n
    \n
    \n-
    polyhedron.hh
    \n+
    boundaryseg.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n-
    3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    4// vi: set et ts=2 sw=2 sts=2:
    \n-
    5#ifndef DUNE_POLYHEDRON_HH
    \n-
    6#define DUNE_POLYHEDRON_HH
    \n+
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    4// vi: set et ts=4 sw=2 sts=2:
    \n+
    5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH
    \n+
    6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH
    \n
    7
    \n-
    8#include <algorithm>
    \n-
    9
    \n-\n-
    11
    \n-
    12namespace Dune
    \n-
    13{
    \n-
    14
    \n-
    15 namespace dgf
    \n-
    16 {
    \n+
    8#include <cassert>
    \n+
    9#include <iostream>
    \n+
    10#include <string>
    \n+
    11#include <vector>
    \n+
    12#include <map>
    \n+
    13
    \n+\n+\n+
    16
    \n
    17
    \n-
    18 // PolyhedronBlock
    \n-
    19 // ---------------
    \n+
    18namespace Dune
    \n+
    19{
    \n
    20
    \n-\n-
    22 : public BasicBlock
    \n-
    23 {
    \n-
    24 explicit PolyhedronBlock ( std::istream &in, int numPolys )
    \n-
    25 : BasicBlock( in, "Polyhedron" ), numPolys_( numPolys )
    \n-
    26 {}
    \n-
    27
    \n-
    28 int get ( std::vector< std::vector< int > > &polyhedra )
    \n-
    29 {
    \n-
    30 reset();
    \n-
    31 std::vector< int > polyhedron;
    \n-
    32 int minPolyId = 1;
    \n-
    33 while( getnextline() )
    \n-
    34 {
    \n-
    35 polyhedron.clear();
    \n-
    36 for( int polyIdx; getnextentry( polyIdx ); )
    \n-
    37 {
    \n-
    38 if( (polyIdx < 0) || (polyIdx > numPolys_) )
    \n-
    39 DUNE_THROW( DGFException, "Error in " << *this << ": Invalid polygon index (" << polyIdx << " not int [0, " << numPolys_ << "])" );
    \n-
    40
    \n-
    41 minPolyId = std::min( minPolyId, polyIdx );
    \n-
    42 polyhedron.push_back( polyIdx );
    \n-
    43 }
    \n-
    44
    \n-
    45 polyhedra.push_back( polyhedron );
    \n-
    46 }
    \n+
    21 namespace dgf
    \n+
    22 {
    \n+\n+
    24 : public BasicBlock
    \n+
    25 {
    \n+
    26 int dimworld; // the dimension of the vertices (is given from user)
    \n+
    27 bool goodline; // active line describes a vertex
    \n+
    28 std :: vector< unsigned int > p; // active vertex
    \n+
    29 int bndid;
    \n+
    30 typedef DGFBoundaryParameter::type BoundaryParameter;
    \n+
    31 BoundaryParameter parameter;
    \n+
    32 bool simplexgrid;
    \n+
    33
    \n+
    34 public:
    \n+\n+
    36 typedef std::pair < int, BoundaryParameter > BndParam;
    \n+
    37
    \n+
    38 // initialize vertex block and get first vertex
    \n+
    39 BoundarySegBlock ( std :: istream &in, int pnofvtx,
    \n+
    40 int pdimworld, bool psimplexgrid );
    \n+
    41
    \n+
    42 // some information
    \n+
    43 int get( std :: map< EntityKey, BndParam > & facemap,
    \n+
    44 bool fixedsize,
    \n+
    45 int vtxoffset
    \n+
    46 );
    \n
    47
    \n-
    48 // subtract minimal number to have 0 starting numbering
    \n-
    49 if( minPolyId > 0 )
    \n-
    50 {
    \n-
    51 const size_t polySize = polyhedra.size();
    \n-
    52 for( size_t i=0; i<polySize; ++i )
    \n-
    53 {
    \n-
    54 const size_t pSize = polyhedra[ i ].size();
    \n-
    55 for( size_t j=0; j<pSize; ++j )
    \n-
    56 {
    \n-
    57 polyhedra[ i ][ j ] -= minPolyId;
    \n-
    58 }
    \n-
    59 }
    \n-
    60 }
    \n-
    61 return polyhedra.size();
    \n-
    62 }
    \n-
    63
    \n-
    64 protected:
    \n-
    65 const int numPolys_;
    \n-
    66 };
    \n-
    67
    \n-
    68 } // namespace dgf
    \n-
    69} // end namespace Dune
    \n-
    70
    \n-
    71#endif // #ifndef DUNE_POLYHEDRON_HH
    \n-\n+
    48 bool ok()
    \n+
    49 {
    \n+
    50 return goodline;
    \n+
    51 }
    \n+
    52
    \n+\n+
    54 {
    \n+
    55 return noflines();
    \n+
    56 }
    \n+
    57
    \n+
    58 private:
    \n+
    59 bool next();
    \n+
    60
    \n+
    61 // get coordinates of active vertex
    \n+
    62 int operator[] (int i)
    \n+
    63 {
    \n+
    64 assert(ok());
    \n+
    65 assert(linenumber()>=0);
    \n+
    66 assert(0<=i && i<dimworld+1);
    \n+
    67 return p[i];
    \n+
    68 }
    \n+
    69
    \n+
    70 int size()
    \n+
    71 {
    \n+
    72 return p.size();
    \n+
    73 }
    \n+
    74
    \n+
    75 };
    \n+
    76
    \n+
    77 } // end namespace dgf
    \n+
    78
    \n+
    79} // end namespace Dune
    \n+
    80
    \n+
    81#endif
    \n+\n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    int min(const DofVectorPointer< int > &dofVector)
    Definition: dofvector.hh:348
    \n-
    @ polyhedron
    Definition: common.hh:142
    \n
    Definition: basic.hh:31
    \n-
    void reset()
    Definition: basic.hh:51
    \n-
    bool getnextline()
    Definition: basic.cc:94
    \n-
    bool getnextentry(ENTRY &entry)
    Definition: basic.hh:63
    \n-
    Definition: polyhedron.hh:23
    \n-
    const int numPolys_
    Definition: polyhedron.hh:65
    \n-
    PolyhedronBlock(std::istream &in, int numPolys)
    Definition: polyhedron.hh:24
    \n-
    int get(std::vector< std::vector< int > > &polyhedra)
    Definition: polyhedron.hh:28
    \n-
    exception class for IO errors in the DGF parser
    Definition: dgfexception.hh:16
    \n+
    int & noflines()
    Definition: basic.hh:87
    \n+
    int linenumber()
    Definition: basic.hh:92
    \n+
    Definition: boundaryseg.hh:25
    \n+
    bool ok()
    Definition: boundaryseg.hh:48
    \n+
    int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int vtxoffset)
    Definition: boundaryseg.cc:35
    \n+
    std::pair< int, BoundaryParameter > BndParam
    Definition: boundaryseg.hh:36
    \n+
    BoundarySegBlock(std ::istream &in, int pnofvtx, int pdimworld, bool psimplexgrid)
    Definition: boundaryseg.cc:18
    \n+
    DGFEntityKey< unsigned int > EntityKey
    Definition: boundaryseg.hh:35
    \n+
    int nofbound()
    Definition: boundaryseg.hh:53
    \n+\n+
    std::string type
    type of additional boundary parameters
    Definition: parser.hh:25
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -8,120 +8,134 @@\n \n * dune\n * grid\n * io\n * file\n * dgfparser\n * blocks\n-polyhedron.hh\n+boundaryseg.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n- 3// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n- 4// vi: set et ts=2 sw=2 sts=2:\n- 5#ifndef DUNE_POLYHEDRON_HH\n- 6#define DUNE_POLYHEDRON_HH\n+ 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+ 4// vi: set et ts=4 sw=2 sts=2:\n+ 5#ifndef DUNE_DGF_BOUNDARYSEGBLOCK_HH\n+ 6#define DUNE_DGF_BOUNDARYSEGBLOCK_HH\n 7\n- 8#include \n- 9\n- 10#include \n- 11\n- 12namespace Dune\n- 13{\n- 14\n- 15 namespace dgf\n- 16 {\n+ 8#include \n+ 9#include \n+ 10#include \n+ 11#include \n+ 12#include \n+ 13\n+ 14#include \n+ 15#include \n+ 16\n 17\n- 18 // PolyhedronBlock\n- 19 // ---------------\n+ 18namespace Dune\n+ 19{\n 20\n-21 struct PolyhedronBlock\n- 22 : public BasicBlock\n- 23 {\n-24 explicit PolyhedronBlock ( std::istream &in, int numPolys )\n- 25 : BasicBlock( in, \"Polyhedron\" ), numPolys_( numPolys )\n- 26 {}\n- 27\n-28 int get ( std::vector< std::vector< int > > &polyhedra )\n- 29 {\n- 30 reset();\n- 31 std::vector< int > polyhedron;\n- 32 int minPolyId = 1;\n- 33 while( getnextline() )\n- 34 {\n- 35 polyhedron.clear();\n- 36 for( int polyIdx; getnextentry( polyIdx ); )\n- 37 {\n- 38 if( (polyIdx < 0) || (polyIdx > numPolys_) )\n- 39 DUNE_THROW( DGFException, \"Error in \" << *this << \": Invalid polygon index\n-(\" << polyIdx << \" not int [0, \" << numPolys_ << \"])\" );\n- 40\n- 41 minPolyId = std::min( minPolyId, polyIdx );\n- 42 polyhedron.push_back( polyIdx );\n- 43 }\n- 44\n- 45 polyhedra.push_back( polyhedron );\n- 46 }\n+ 21 namespace dgf\n+ 22 {\n+23 class BoundarySegBlock\n+ 24 : public BasicBlock\n+ 25 {\n+ 26 int dimworld; // the dimension of the vertices (is given from user)\n+ 27 bool goodline; // active line describes a vertex\n+ 28 std :: vector< unsigned int > p; // active vertex\n+ 29 int bndid;\n+ 30 typedef DGFBoundaryParameter::type BoundaryParameter;\n+ 31 BoundaryParameter parameter;\n+ 32 bool simplexgrid;\n+ 33\n+ 34 public:\n+35 typedef DGFEntityKey<_unsigned_int> EntityKey;\n+36 typedef std::pair < int, BoundaryParameter > BndParam;\n+ 37\n+ 38 // initialize vertex block and get first vertex\n+ 39 BoundarySegBlock ( std :: istream &in, int pnofvtx,\n+ 40 int pdimworld, bool psimplexgrid );\n+ 41\n+ 42 // some information\n+ 43 int get( std :: map< EntityKey, BndParam > & facemap,\n+ 44 bool fixedsize,\n+ 45 int vtxoffset\n+ 46 );\n 47\n- 48 // subtract minimal number to have 0 starting numbering\n- 49 if( minPolyId > 0 )\n- 50 {\n- 51 const size_t polySize = polyhedra.size();\n- 52 for( size_t i=0; i=0);\n+ 66 assert(0<=i && i &dofVector)\n-Definition: dofvector.hh:348\n-Dune::VTK::polyhedron\n-@ polyhedron\n-Definition: common.hh:142\n Dune::dgf::BasicBlock\n Definition: basic.hh:31\n-Dune::dgf::BasicBlock::reset\n-void reset()\n-Definition: basic.hh:51\n-Dune::dgf::BasicBlock::getnextline\n-bool getnextline()\n-Definition: basic.cc:94\n-Dune::dgf::BasicBlock::getnextentry\n-bool getnextentry(ENTRY &entry)\n-Definition: basic.hh:63\n-Dune::dgf::PolyhedronBlock\n-Definition: polyhedron.hh:23\n-Dune::dgf::PolyhedronBlock::numPolys_\n-const int numPolys_\n-Definition: polyhedron.hh:65\n-Dune::dgf::PolyhedronBlock::PolyhedronBlock\n-PolyhedronBlock(std::istream &in, int numPolys)\n-Definition: polyhedron.hh:24\n-Dune::dgf::PolyhedronBlock::get\n-int get(std::vector< std::vector< int > > &polyhedra)\n-Definition: polyhedron.hh:28\n-Dune::DGFException\n-exception class for IO errors in the DGF parser\n-Definition: dgfexception.hh:16\n+Dune::dgf::BasicBlock::noflines\n+int & noflines()\n+Definition: basic.hh:87\n+Dune::dgf::BasicBlock::linenumber\n+int linenumber()\n+Definition: basic.hh:92\n+Dune::dgf::BoundarySegBlock\n+Definition: boundaryseg.hh:25\n+Dune::dgf::BoundarySegBlock::ok\n+bool ok()\n+Definition: boundaryseg.hh:48\n+Dune::dgf::BoundarySegBlock::get\n+int get(std ::map< EntityKey, BndParam > &facemap, bool fixedsize, int\n+vtxoffset)\n+Definition: boundaryseg.cc:35\n+Dune::dgf::BoundarySegBlock::BndParam\n+std::pair< int, BoundaryParameter > BndParam\n+Definition: boundaryseg.hh:36\n+Dune::dgf::BoundarySegBlock::BoundarySegBlock\n+BoundarySegBlock(std ::istream &in, int pnofvtx, int pdimworld, bool\n+psimplexgrid)\n+Definition: boundaryseg.cc:18\n+Dune::dgf::BoundarySegBlock::EntityKey\n+DGFEntityKey< unsigned int > EntityKey\n+Definition: boundaryseg.hh:35\n+Dune::dgf::BoundarySegBlock::nofbound\n+int nofbound()\n+Definition: boundaryseg.hh:53\n+Dune::DGFEntityKey<_unsigned_int_>\n+Dune::DGFBoundaryParameter::type\n+std::string type\n+type of additional boundary parameters\n+Definition: parser.hh:25\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00917_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00566_source.html", "comments": ["Files 21% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: dim.hh Source File\n+dune-grid: identity.hh Source File\n \n \n \n \n \n \n \n@@ -58,72 +58,69 @@\n \n
    \n \n \n \n
    \n-
    dim.hh
    \n+
    identity.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_DGF_DIMBLOCK_HH
    \n-
    6#define DUNE_DGF_DIMBLOCK_HH
    \n+
    5#ifndef DUNE_GEOGRID_IDENTITY_HH
    \n+
    6#define DUNE_GEOGRID_IDENTITY_HH
    \n
    7
    \n-
    8#include <iostream>
    \n+\n
    9
    \n-\n-
    11
    \n+
    10namespace Dune
    \n+
    11{
    \n
    12
    \n-
    13namespace Dune
    \n-
    14{
    \n-
    15
    \n-
    16 namespace dgf
    \n+
    13 template< class ctype, unsigned int dim >
    \n+\n+\n+
    16 < ctype, dim, dim, IdenticalCoordFunction< ctype, dim > >
    \n
    17 {
    \n-
    18 class DimBlock : public BasicBlock {
    \n-
    19 int _dimworld; // dimension of world
    \n-
    20 int _dim; // dimension of grid
    \n-
    21 public:
    \n-
    22 const static char* ID;
    \n-
    23 // initialize block and get dimension of world
    \n-
    24 DimBlock ( std :: istream &in );
    \n-
    25 // get dimension of world found in block
    \n-
    26 int dim() {
    \n-
    27 return _dim;
    \n-
    28 }
    \n-
    29 int dimworld() {
    \n-
    30 return _dimworld;
    \n-
    31 }
    \n-
    32 // some information
    \n-
    33 bool ok() {
    \n-
    34 return true;
    \n-
    35 }
    \n-
    36 };
    \n+\n+\n+
    20
    \n+
    21 public:
    \n+\n+\n+
    24
    \n+
    25 template< typename... Args >
    \n+\n+
    27 {}
    \n+
    28
    \n+\n+
    30 {
    \n+
    31 return x;
    \n+
    32 }
    \n+
    33
    \n+
    34 };
    \n+
    35
    \n+
    36}
    \n
    37
    \n-
    38 } // end namespace dgf
    \n-
    39
    \n-
    40} // end namespace Dune
    \n-
    41
    \n-
    42#endif
    \n-\n+
    38#endif
    \n+\n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    Definition: basic.hh:31
    \n-
    Definition: dim.hh:18
    \n-
    int dimworld()
    Definition: dim.hh:29
    \n-
    static const char * ID
    Definition: dim.hh:22
    \n-
    DimBlock(std ::istream &in)
    Definition: dim.cc:17
    \n-
    bool ok()
    Definition: dim.hh:33
    \n-
    int dim()
    Definition: dim.hh:26
    \n+
    Derive an implementation of an analytical coordinate function from this class.
    Definition: coordfunction.hh:134
    \n+
    Base::DomainVector DomainVector
    Definition: coordfunction.hh:139
    \n+
    Base::RangeVector RangeVector
    Definition: coordfunction.hh:140
    \n+
    Definition: identity.hh:17
    \n+
    IdenticalCoordFunction(Args &...)
    Definition: identity.hh:26
    \n+
    Base::RangeVector RangeVector
    Definition: identity.hh:23
    \n+
    RangeVector operator()(const DomainVector &x) const
    Definition: identity.hh:29
    \n+
    Base::DomainVector DomainVector
    Definition: identity.hh:22
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,82 +4,79 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * io\n- * file\n- * dgfparser\n- * blocks\n-dim.hh\n+ * geometrygrid\n+identity.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_DGF_DIMBLOCK_HH\n- 6#define DUNE_DGF_DIMBLOCK_HH\n+ 5#ifndef DUNE_GEOGRID_IDENTITY_HH\n+ 6#define DUNE_GEOGRID_IDENTITY_HH\n 7\n- 8#include \n+ 8#include \n 9\n- 10#include \n- 11\n+ 10namespace Dune\n+ 11{\n 12\n- 13namespace Dune\n- 14{\n- 15\n- 16 namespace dgf\n+ 13 template< class ctype, unsigned int dim >\n+14 class IdenticalCoordFunction\n+ 15 : public AnalyticalCoordFunction\n+ 16 < ctype, dim, dim, IdenticalCoordFunction< ctype, dim > >\n 17 {\n-18 class DimBlock : public BasicBlock {\n- 19 int _dimworld; // dimension of world\n- 20 int _dim; // dimension of grid\n+ 18 typedef IdenticalCoordFunction<_ctype,_dim_> This;\n+ 19 typedef AnalyticalCoordFunction<_ctype,_dim,_dim,_This_> Base;\n+ 20\n 21 public:\n-22 const static char* ID;\n- 23 // initialize block and get dimension of world\n- 24 DimBlock ( std :: istream &in );\n- 25 // get dimension of world found in block\n-26 int dim() {\n- 27 return _dim;\n- 28 }\n-29 int dimworld() {\n- 30 return _dimworld;\n- 31 }\n- 32 // some information\n-33 bool ok() {\n- 34 return true;\n- 35 }\n- 36 };\n+22 typedef typename Base_::_DomainVector DomainVector;\n+23 typedef typename Base_::_RangeVector RangeVector;\n+ 24\n+ 25 template< typename... Args >\n+26 IdenticalCoordFunction( Args&... )\n+ 27 {}\n+ 28\n+29 RangeVector operator()(const DomainVector& x) const\n+ 30 {\n+ 31 return x;\n+ 32 }\n+ 33\n+ 34 };\n+ 35\n+ 36}\n 37\n- 38 } // end namespace dgf\n- 39\n- 40} // end namespace Dune\n- 41\n- 42#endif\n-basic.hh\n+ 38#endif\n+coordfunction.hh\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::dgf::BasicBlock\n-Definition: basic.hh:31\n-Dune::dgf::DimBlock\n-Definition: dim.hh:18\n-Dune::dgf::DimBlock::dimworld\n-int dimworld()\n-Definition: dim.hh:29\n-Dune::dgf::DimBlock::ID\n-static const char * ID\n-Definition: dim.hh:22\n-Dune::dgf::DimBlock::DimBlock\n-DimBlock(std ::istream &in)\n-Definition: dim.cc:17\n-Dune::dgf::DimBlock::ok\n-bool ok()\n-Definition: dim.hh:33\n-Dune::dgf::DimBlock::dim\n-int dim()\n-Definition: dim.hh:26\n+Dune::AnalyticalCoordFunction\n+Derive an implementation of an analytical coordinate function from this class.\n+Definition: coordfunction.hh:134\n+Dune::AnalyticalCoordFunction::DomainVector\n+Base::DomainVector DomainVector\n+Definition: coordfunction.hh:139\n+Dune::AnalyticalCoordFunction::RangeVector\n+Base::RangeVector RangeVector\n+Definition: coordfunction.hh:140\n+Dune::IdenticalCoordFunction\n+Definition: identity.hh:17\n+Dune::IdenticalCoordFunction::IdenticalCoordFunction\n+IdenticalCoordFunction(Args &...)\n+Definition: identity.hh:26\n+Dune::IdenticalCoordFunction::RangeVector\n+Base::RangeVector RangeVector\n+Definition: identity.hh:23\n+Dune::IdenticalCoordFunction::operator()\n+RangeVector operator()(const DomainVector &x) const\n+Definition: identity.hh:29\n+Dune::IdenticalCoordFunction::DomainVector\n+Base::DomainVector DomainVector\n+Definition: identity.hh:22\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}, {"source1": "./usr/share/doc/libdune-grid-doc/doxygen/a00953_source.html", "source2": "./usr/share/doc/libdune-grid-doc/doxygen/a00278_source.html", "comments": ["Files 21% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid: gmshwriter.hh Source File\n+dune-grid: datahandleif.hh Source File\n \n \n \n \n \n \n \n@@ -58,236 +58,181 @@\n \n
    \n \n \n \n
    \n-
    gmshwriter.hh
    \n+
    datahandleif.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    \n
    3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    4// vi: set et ts=4 sw=2 sts=2:
    \n-
    5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH
    \n-
    6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH
    \n+
    5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH
    \n+
    6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH
    \n
    7
    \n-
    8#include <fstream>
    \n-
    9#include <iostream>
    \n-
    10#include <iomanip>
    \n-
    11#include <string>
    \n-
    12#include <vector>
    \n-
    13
    \n-
    14#include <dune/common/exceptions.hh>
    \n-
    15#include <dune/geometry/type.hh>
    \n-
    16#include <dune/geometry/referenceelements.hh>
    \n-\n-\n-
    19
    \n-
    20namespace Dune {
    \n-
    21
    \n-
    35 template <class GridView>
    \n-\n-
    37 {
    \n-
    38 private:
    \n-
    39 const GridView gv;
    \n-
    40 int precision;
    \n-
    41
    \n-
    42 static const unsigned int dim = GridView::dimension;
    \n-
    43 static const unsigned int dimWorld = GridView::dimensionworld;
    \n-
    44 static_assert( (dimWorld <= 3), "GmshWriter requires dimWorld <= 3." );
    \n-
    45
    \n-
    47 template<typename Entity>
    \n-
    48 std::size_t nodeIndexFromEntity(const Entity& entity, int i) const {
    \n-
    49 return gv.indexSet().subIndex(entity, i, dim)+1;
    \n-
    50 }
    \n-
    51
    \n-
    55 static std::size_t translateDuneToGmshType(const GeometryType& type) {
    \n-
    56 std::size_t element_type;
    \n-
    57
    \n-
    58 if (type.isLine())
    \n-
    59 element_type = 1;
    \n-
    60 else if (type.isTriangle())
    \n-
    61 element_type = 2;
    \n-
    62 else if (type.isQuadrilateral())
    \n-
    63 element_type = 3;
    \n-
    64 else if (type.isTetrahedron())
    \n-
    65 element_type = 4;
    \n-
    66 else if (type.isHexahedron())
    \n-
    67 element_type = 5;
    \n-
    68 else if (type.isPrism())
    \n-
    69 element_type = 6;
    \n-
    70 else if (type.isPyramid())
    \n-
    71 element_type = 7;
    \n-
    72 else if (type.isVertex())
    \n-
    73 element_type = 15;
    \n-
    74 else
    \n-
    75 DUNE_THROW(Dune::IOError, "GeometryType " << type << " is not supported by gmsh.");
    \n-
    76
    \n-
    77 return element_type;
    \n-
    78 }
    \n-
    79
    \n-
    94 void outputElements(std::ofstream& file, const std::vector<int>& physicalEntities, const std::vector<int>& physicalBoundaries) const {
    \n-\n-
    96 std::size_t counter(1);
    \n-
    97 for (const auto& entity : elements(gv)) {
    \n-
    98 // Check whether the type is compatible. If not, close file and rethrow exception.
    \n-
    99 try {
    \n-
    100 std::size_t element_type = translateDuneToGmshType(entity.type());
    \n-
    101
    \n-
    102 file << counter << " " << element_type;
    \n-
    103 // If present, set the first tag to the physical entity
    \n-
    104 if (!physicalEntities.empty())
    \n-
    105 file << " " << 1 << " " << physicalEntities[elementMapper.index(entity)];
    \n-
    106 else
    \n-
    107 file << " " << 0; // "0" for "I do not use any tags."
    \n-
    108
    \n-
    109 // Output list of nodes.
    \n-
    110 // 3, 5 and 7 got different vertex numbering compared to Dune
    \n-
    111 if (3 == element_type)
    \n-
    112 file << " "
    \n-
    113 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
    \n-
    114 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2);
    \n-
    115 else if (5 == element_type)
    \n-
    116 file << " "
    \n-
    117 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
    \n-
    118 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
    \n-
    119 << nodeIndexFromEntity(entity, 4) << " " << nodeIndexFromEntity(entity, 5) << " "
    \n-
    120 << nodeIndexFromEntity(entity, 7) << " " << nodeIndexFromEntity(entity, 6);
    \n-
    121 else if (7 == element_type)
    \n-
    122 file << " "
    \n-
    123 << nodeIndexFromEntity(entity, 0) << " " << nodeIndexFromEntity(entity, 1) << " "
    \n-
    124 << nodeIndexFromEntity(entity, 3) << " " << nodeIndexFromEntity(entity, 2) << " "
    \n-
    125 << nodeIndexFromEntity(entity, 4);
    \n-
    126 else {
    \n-
    127 for (int k = 0; k < entity.geometry().corners(); ++k)
    \n-
    128 file << " " << nodeIndexFromEntity(entity, k);
    \n-
    129 }
    \n-
    130 ++counter;
    \n-
    131
    \n-
    132 file << std::endl;
    \n-
    133
    \n-
    134 // Write boundaries
    \n-
    135 if (!physicalBoundaries.empty()) {
    \n-
    136 auto refElement = referenceElement<typename GridView::ctype,dim>(entity.type());
    \n-
    137 for(const auto& intersection : intersections(gv, entity)) {
    \n-
    138 if(intersection.boundary()) {
    \n-
    139 const auto faceLocalIndex(intersection.indexInInside());
    \n-
    140 file << counter << " " << translateDuneToGmshType(intersection.type())
    \n-
    141 << " " << 1 << " " << physicalBoundaries[intersection.boundarySegmentIndex()];
    \n-
    142 for (int k = 0; k < intersection.geometry().corners(); ++k)
    \n-
    143 {
    \n-
    144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim));
    \n-
    145 file << " " << nodeIndexFromEntity(entity, vtxLocalIndex);
    \n-
    146 }
    \n-
    147 ++counter;
    \n-
    148 file << std::endl;
    \n-
    149 }
    \n-
    150 }
    \n-
    151 }
    \n+
    14#include <dune/common/bartonnackmanifcheck.hh>
    \n+
    15
    \n+
    16namespace Dune
    \n+
    17{
    \n+
    18
    \n+
    31 template <class MessageBufferImp>
    \n+\n+
    33 {
    \n+
    34 MessageBufferImp & buff_;
    \n+
    35 public:
    \n+
    37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}
    \n+
    38
    \n+
    44 template <class T>
    \n+
    45 void write(const T & val)
    \n+
    46 {
    \n+
    47 buff_.write(val);
    \n+
    48 }
    \n+
    49
    \n+
    58 template <class T>
    \n+
    59 void read(T & val)
    \n+
    60 {
    \n+
    61 buff_.read(val);
    \n+
    62 }
    \n+
    63 }; // end class MessageBufferIF
    \n+
    64
    \n+
    65
    \n+
    76 template <class DataHandleImp, class DataTypeImp>
    \n+\n+
    78 {
    \n+
    79 template <class M>
    \n+
    80 class CheckFixedSizeMethod
    \n+
    81 {
    \n+
    82 // check for old signature of deprecated fixedsize method.
    \n+
    83 template <class T>
    \n+
    84 static std::true_type testSignature(bool (T::*)(int, int) const);
    \n+
    85
    \n+
    86 template <class T>
    \n+
    87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t);
    \n+
    88
    \n+
    89 template <class T>
    \n+
    90 static std::false_type test(...);
    \n+
    91
    \n+
    92 using type = decltype(test<M>(nullptr));
    \n+
    93 public:
    \n+
    94 static const bool value = type::value;
    \n+
    95 };
    \n+
    96
    \n+
    97
    \n+
    98 template <class DH, bool>
    \n+
    99 struct CallFixedSize
    \n+
    100 {
    \n+
    101 static bool fixedSize( const DH& dh, int dim, int codim )
    \n+
    102 {
    \n+
    103 return dh.fixedSize( dim, codim );
    \n+
    104 }
    \n+
    105 };
    \n+
    106
    \n+
    107 // old, deprecated implementation
    \n+
    108 template <class DH>
    \n+
    109 struct CallFixedSize< DH, true >
    \n+
    110 {
    \n+
    111 static bool fixedSize( const DH& dh, int dim, int codim )
    \n+
    112 {
    \n+
    113 return dh.overloaded_deprecated_fixedsize( dim, codim );
    \n+
    114 }
    \n+
    115 };
    \n+
    116
    \n+
    117 public:
    \n+
    119 typedef DataTypeImp DataType;
    \n+
    120
    \n+
    121 protected:
    \n+
    122 // one should not create an explicit instance of this interface object
    \n+\n+
    124
    \n+
    125 public:
    \n+
    131 bool contains (int dim, int codim) const
    \n+
    132 {
    \n+
    133 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));
    \n+
    134 return asImp().contains(dim,codim);
    \n+
    135 }
    \n+
    136
    \n+
    147 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
    \n+
    148 int fixedsize (int dim, int codim) const
    \n+
    149 {
    \n+
    150 return int(fixedSize( dim, codim ));
    \n+
    151 }
    \n
    152
    \n-
    153 } catch(Exception& e) {
    \n-
    154 file.close();
    \n-
    155 throw;
    \n-
    156 }
    \n-
    157 }
    \n-
    158 }
    \n-
    159
    \n-
    160
    \n-
    167 void outputNodes(std::ofstream& file) const {
    \n-
    168 for (const auto& vertex : vertices(gv)) {
    \n-
    169 const auto globalCoord = vertex.geometry().center();
    \n-
    170 const auto nodeIndex = gv.indexSet().index(vertex)+1; // Start counting indices by "1".
    \n-
    171
    \n-
    172 if (1 == dimWorld)
    \n-
    173 file << nodeIndex << " " << globalCoord[0] << " " << 0 << " " << 0 << std::endl;
    \n-
    174 else if (2 == dimWorld)
    \n-
    175 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << 0 << std::endl;
    \n-
    176 else // (3 == dimWorld)
    \n-
    177 file << nodeIndex << " " << globalCoord[0] << " " << globalCoord[1] << " " << globalCoord[2] << std::endl;
    \n-
    178 }
    \n-
    179 }
    \n-
    180
    \n-
    181 public:
    \n-
    187 GmshWriter(const GridView& gridView, int numDigits=6) : gv(gridView), precision(numDigits) {}
    \n-
    188
    \n-
    193 void setPrecision(int numDigits) {
    \n-
    194 precision = numDigits;
    \n-
    195 }
    \n-
    196
    \n-
    218 void write(const std::string& fileName,
    \n-
    219 const std::vector<int>& physicalEntities=std::vector<int>(),
    \n-
    220 const std::vector<int>& physicalBoundaries=std::vector<int>()) const {
    \n-
    221 // Open file
    \n-
    222 std::ofstream file(fileName.c_str());
    \n-
    223 if (!file.is_open())
    \n-
    224 DUNE_THROW(Dune::IOError, "Could not open " << fileName << " with write access.");
    \n+
    153 // if this deprecation appears then the DataHandle implementation
    \n+
    154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize'
    \n+
    155 // method.
    \n+
    156 [[deprecated("fixedsize (lower case s) will be removed after release 2.8. Implement and call fixedSize (camelCase) instead!")]]
    \n+
    157 bool overloaded_deprecated_fixedsize( int dim, int codim ) const
    \n+
    158 {
    \n+
    159 return asImp().fixedsize( dim, codim );
    \n+
    160 }
    \n+
    161
    \n+
    169 bool fixedSize (int dim, int codim) const
    \n+
    170 {
    \n+
    171 // this should be enabled once the old fixedsize is removed
    \n+
    172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim)));
    \n+
    173 return CallFixedSize< DataHandleImp,
    \n+
    174 CheckFixedSizeMethod< DataHandleImp >::value >::fixedSize( asImp(), dim, codim );
    \n+
    175 }
    \n+
    176
    \n+
    181 template<class EntityType>
    \n+
    182 size_t size (const EntityType& e) const
    \n+
    183 {
    \n+
    184 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));
    \n+
    185 return asImp().size(e);
    \n+
    186 }
    \n+
    187
    \n+
    192 template<class MessageBufferImp, class EntityType>
    \n+
    193 void gather (MessageBufferImp& buff, const EntityType& e) const
    \n+
    194 {
    \n+\n+
    196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));
    \n+
    197 }
    \n+
    198
    \n+
    206 template<class MessageBufferImp, class EntityType>
    \n+
    207 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)
    \n+
    208 {
    \n+\n+
    210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));
    \n+
    211 }
    \n+
    212
    \n+
    213 private:
    \n+
    215 DataHandleImp& asImp () {return static_cast<DataHandleImp &> (*this);}
    \n+
    217 const DataHandleImp& asImp () const
    \n+
    218 {
    \n+
    219 return static_cast<const DataHandleImp &>(*this);
    \n+
    220 }
    \n+
    221 }; // end class CommDataHandleIF
    \n+
    222
    \n+
    223#undef CHECK_INTERFACE_IMPLEMENTATION
    \n+
    224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION
    \n
    225
    \n-
    226 // Set precision
    \n-
    227 file << std::setprecision( precision );
    \n-
    228
    \n-
    229 // Output Header
    \n-
    230 file << "$MeshFormat" << std::endl
    \n-
    231 << "2.0 0 " << sizeof(double) << std::endl // "2.0" for "version 2.0", "0" for ASCII
    \n-
    232 << "$EndMeshFormat" << std::endl;
    \n-
    233
    \n-
    234 // Output Nodes
    \n-
    235 file << "$Nodes" << std::endl
    \n-
    236 << gv.size(dim) << std::endl;
    \n-
    237
    \n-
    238 outputNodes(file);
    \n-
    239
    \n-
    240 file << "$EndNodes" << std::endl;
    \n-
    241
    \n-
    242 // Output Elements;
    \n-
    243 int boundariesSize(0);
    \n-
    244 if(!physicalBoundaries.empty())
    \n-
    245 for(const auto& entity : elements(gv))
    \n-
    246 for(const auto& intersection : intersections(gv, entity))
    \n-
    247 if(intersection.boundary())
    \n-
    248 ++boundariesSize;
    \n-
    249
    \n-
    250 file << "$Elements" << std::endl
    \n-
    251 << gv.size(0) + boundariesSize<< std::endl;
    \n-
    252
    \n-
    253 outputElements(file, physicalEntities, physicalBoundaries);
    \n-
    254
    \n-
    255 file << "$EndElements" << std::endl;
    \n-
    256 }
    \n-
    257
    \n-
    258 };
    \n-
    259
    \n-
    260} // namespace Dune
    \n-
    261
    \n-
    262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH
    \n-
    Mapper for multiple codim and multiple geometry types.
    \n-
    const IndexSet & indexSet() const
    obtain the index set
    Definition: common/gridview.hh:191
    \n-
    int size(int codim) const
    obtain number of entities in a given codimension
    Definition: common/gridview.hh:197
    \n-
    static constexpr int dimension
    The dimension of the grid.
    Definition: common/gridview.hh:148
    \n-
    static constexpr int dimensionworld
    The dimension of the world the grid lives in.
    Definition: common/gridview.hh:151
    \n-
    MCMGLayout mcmgElementLayout()
    layout for elements (codim-0 entities)
    Definition: mcmgmapper.hh:97
    \n+
    226} // end namespace Dune
    \n+
    227#endif
    \n
    Include standard header files.
    Definition: agrid.hh:60
    \n-
    GeometryType
    Type representing VTK's entity geometry types.
    Definition: common.hh:132
    \n-
    @ vertex
    Definition: common.hh:133
    \n-
    Wrapper class for entities.
    Definition: common/entity.hh:66
    \n-
    Geometry geometry() const
    obtain geometric realization of the entity
    Definition: common/entity.hh:141
    \n-
    GeometryType type() const
    Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
    Definition: common/entity.hh:146
    \n-
    Grid view abstract base class.
    Definition: common/gridview.hh:66
    \n-
    Implementation class for a multiple codim and multiple geometry type mapper.
    Definition: mcmgmapper.hh:129
    \n-
    Index index(const EntityType &e) const
    Map entity to starting index in array for dof block.
    Definition: mcmgmapper.hh:171
    \n-
    Write Gmsh mesh file.
    Definition: gmshwriter.hh:37
    \n-
    GmshWriter(const GridView &gridView, int numDigits=6)
    Constructor expecting GridView of Grid to be written.
    Definition: gmshwriter.hh:187
    \n-
    void setPrecision(int numDigits)
    Set the number of digits to be used when writing the vertices. By default is 6.
    Definition: gmshwriter.hh:193
    \n-
    void write(const std::string &fileName, const std::vector< int > &physicalEntities=std::vector< int >(), const std::vector< int > &physicalBoundaries=std::vector< int >()) const
    Write given grid in Gmsh 2.0 compatible ASCII file.
    Definition: gmshwriter.hh:218
    \n-
    Different resources needed by all grid implementations.
    \n+
    Communication message buffer interface. This class describes the interface for reading and writing da...
    Definition: datahandleif.hh:33
    \n+
    MessageBufferIF(MessageBufferImp &buff)
    stores reference to original buffer buff
    Definition: datahandleif.hh:37
    \n+
    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
    \n+
    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
    \n+
    CommDataHandleIF describes the features of a data handle for communication in parallel runs using the...
    Definition: datahandleif.hh:78
    \n+
    CommDataHandleIF()
    Definition: datahandleif.hh:123
    \n+
    void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
    unpack data from message buffer to user.
    Definition: datahandleif.hh:207
    \n+
    int fixedsize(int dim, int codim) const
    returns true if size of data per entity of given dim and codim is a constant
    Definition: datahandleif.hh:148
    \n+
    bool contains(int dim, int codim) const
    returns true if data for given valid codim should be communicated
    Definition: datahandleif.hh:131
    \n+
    size_t size(const EntityType &e) const
    how many objects of type DataType have to be sent for a given entity
    Definition: datahandleif.hh:182
    \n+
    void gather(MessageBufferImp &buff, const EntityType &e) const
    pack data from user to message buffer
    Definition: datahandleif.hh:193
    \n+
    bool fixedSize(int dim, int codim) const
    returns true if size of data per entity of given dim and codim is a constant
    Definition: datahandleif.hh:169
    \n+
    DataTypeImp DataType
    data type of data to communicate
    Definition: datahandleif.hh:119
    \n+
    bool overloaded_deprecated_fixedsize(int dim, int codim) const
    Definition: datahandleif.hh:157
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.4\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -4,304 +4,221 @@\n \n \n dune-grid\u00a02.9.0\n \n \n * dune\n * grid\n- * io\n- * file\n-gmshwriter.hh\n+ * common\n+datahandleif.hh\n Go_to_the_documentation_of_this_file.\n 1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception\n 3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 4// vi: set et ts=4 sw=2 sts=2:\n- 5#ifndef DUNE_GRID_IO_FILE_GMSHWRITER_HH\n- 6#define DUNE_GRID_IO_FILE_GMSHWRITER_HH\n+ 5#ifndef DUNE_GRID_COMMON_DATAHANDLEIF_HH\n+ 6#define DUNE_GRID_COMMON_DATAHANDLEIF_HH\n 7\n- 8#include \n- 9#include \n- 10#include \n- 11#include \n- 12#include \n- 13\n- 14#include \n- 15#include \n- 16#include \n- 17#include \n- 18#include \n- 19\n- 20namespace Dune {\n- 21\n- 35 template \n-36 class GmshWriter\n- 37 {\n- 38 private:\n- 39 const GridView gv;\n- 40 int precision;\n- 41\n- 42 static const unsigned int dim = GridView::dimension;\n- 43 static const unsigned int dimWorld = GridView::dimensionworld;\n- 44 static_assert( (dimWorld <= 3), \"GmshWriter requires dimWorld <= 3.\" );\n- 45\n- 47 template\n- 48 std::size_t nodeIndexFromEntity(const Entity& entity, int i) const {\n- 49 return gv.indexSet().subIndex(entity, i, dim)+1;\n- 50 }\n- 51\n- 55 static std::size_t translateDuneToGmshType(const GeometryType& type) {\n- 56 std::size_t element_type;\n- 57\n- 58 if (type.isLine())\n- 59 element_type = 1;\n- 60 else if (type.isTriangle())\n- 61 element_type = 2;\n- 62 else if (type.isQuadrilateral())\n- 63 element_type = 3;\n- 64 else if (type.isTetrahedron())\n- 65 element_type = 4;\n- 66 else if (type.isHexahedron())\n- 67 element_type = 5;\n- 68 else if (type.isPrism())\n- 69 element_type = 6;\n- 70 else if (type.isPyramid())\n- 71 element_type = 7;\n- 72 else if (type.isVertex())\n- 73 element_type = 15;\n- 74 else\n- 75 DUNE_THROW(Dune::IOError, \"GeometryType \" << type << \" is not supported by\n-gmsh.\");\n- 76\n- 77 return element_type;\n- 78 }\n- 79\n- 94 void outputElements(std::ofstream& file, const std::vector&\n-physicalEntities, const std::vector& physicalBoundaries) const {\n- 95 MultipleCodimMultipleGeomTypeMapper elementMapper(gv,\n-mcmgElementLayout());\n- 96 std::size_t counter(1);\n- 97 for (const auto& entity : elements(gv)) {\n- 98 // Check whether the type is compatible. If not, close file and rethrow\n-exception.\n- 99 try {\n- 100 std::size_t element_type = translateDuneToGmshType(entity.type());\n- 101\n- 102 file << counter << \" \" << element_type;\n- 103 // If present, set the first tag to the physical entity\n- 104 if (!physicalEntities.empty())\n- 105 file << \" \" << 1 << \" \" << physicalEntities[elementMapper.index(entity)];\n- 106 else\n- 107 file << \" \" << 0; // \"0\" for \"I do not use any tags.\"\n- 108\n- 109 // Output list of nodes.\n- 110 // 3, 5 and 7 got different vertex numbering compared to Dune\n- 111 if (3 == element_type)\n- 112 file << \" \"\n- 113 << nodeIndexFromEntity(entity, 0) << \" \" << nodeIndexFromEntity(entity, 1)\n-<< \" \"\n- 114 << nodeIndexFromEntity(entity, 3) << \" \" << nodeIndexFromEntity(entity,\n-2);\n- 115 else if (5 == element_type)\n- 116 file << \" \"\n- 117 << nodeIndexFromEntity(entity, 0) << \" \" << nodeIndexFromEntity(entity, 1)\n-<< \" \"\n- 118 << nodeIndexFromEntity(entity, 3) << \" \" << nodeIndexFromEntity(entity, 2)\n-<< \" \"\n- 119 << nodeIndexFromEntity(entity, 4) << \" \" << nodeIndexFromEntity(entity, 5)\n-<< \" \"\n- 120 << nodeIndexFromEntity(entity, 7) << \" \" << nodeIndexFromEntity(entity,\n-6);\n- 121 else if (7 == element_type)\n- 122 file << \" \"\n- 123 << nodeIndexFromEntity(entity, 0) << \" \" << nodeIndexFromEntity(entity, 1)\n-<< \" \"\n- 124 << nodeIndexFromEntity(entity, 3) << \" \" << nodeIndexFromEntity(entity, 2)\n-<< \" \"\n- 125 << nodeIndexFromEntity(entity, 4);\n- 126 else {\n- 127 for (int k = 0; k < entity.geometry().corners(); ++k)\n- 128 file << \" \" << nodeIndexFromEntity(entity, k);\n- 129 }\n- 130 ++counter;\n- 131\n- 132 file << std::endl;\n- 133\n- 134 // Write boundaries\n- 135 if (!physicalBoundaries.empty()) {\n- 136 auto refElement = referenceElement\n-(entity.type());\n- 137 for(const auto& intersection : intersections(gv, entity)) {\n- 138 if(intersection.boundary()) {\n- 139 const auto faceLocalIndex(intersection.indexInInside());\n- 140 file << counter << \" \" << translateDuneToGmshType(intersection.type())\n- 141 << \" \" << 1 << \" \" << physicalBoundaries[intersection.boundarySegmentIndex\n-()];\n- 142 for (int k = 0; k < intersection.geometry().corners(); ++k)\n- 143 {\n- 144 const auto vtxLocalIndex(refElement.subEntity(faceLocalIndex, 1, k, dim));\n- 145 file << \" \" << nodeIndexFromEntity(entity, vtxLocalIndex);\n- 146 }\n- 147 ++counter;\n- 148 file << std::endl;\n- 149 }\n- 150 }\n+ 14#include \n+ 15\n+ 16namespace Dune\n+ 17{\n+ 18\n+ 31 template \n+32 class MessageBufferIF\n+ 33 {\n+ 34 MessageBufferImp & buff_;\n+ 35 public:\n+37 MessageBufferIF(MessageBufferImp & buff) : buff_(buff) {}\n+ 38\n+ 44 template \n+45 void write(const T & val)\n+ 46 {\n+ 47 buff_.write(val);\n+ 48 }\n+ 49\n+ 58 template \n+59 void read(T & val)\n+ 60 {\n+ 61 buff_.read(val);\n+ 62 }\n+ 63 }; // end class MessageBufferIF\n+ 64\n+ 65\n+ 76 template \n+77 class CommDataHandleIF\n+ 78 {\n+ 79 template \n+ 80 class CheckFixedSizeMethod\n+ 81 {\n+ 82 // check for old signature of deprecated fixedsize method.\n+ 83 template \n+ 84 static std::true_type testSignature(bool (T::*)(int, int) const);\n+ 85\n+ 86 template \n+ 87 static decltype(testSignature(&T::fixedsize)) test(std::nullptr_t);\n+ 88\n+ 89 template \n+ 90 static std::false_type test(...);\n+ 91\n+ 92 using type = decltype(test(nullptr));\n+ 93 public:\n+ 94 static const bool value = type::value;\n+ 95 };\n+ 96\n+ 97\n+ 98 template \n+ 99 struct CallFixedSize\n+ 100 {\n+ 101 static bool fixedSize( const DH& dh, int dim, int codim )\n+ 102 {\n+ 103 return dh.fixedSize( dim, codim );\n+ 104 }\n+ 105 };\n+ 106\n+ 107 // old, deprecated implementation\n+ 108 template \n+ 109 struct CallFixedSize< DH, true >\n+ 110 {\n+ 111 static bool fixedSize( const DH& dh, int dim, int codim )\n+ 112 {\n+ 113 return dh.overloaded_deprecated_fixedsize( dim, codim );\n+ 114 }\n+ 115 };\n+ 116\n+ 117 public:\n+119 typedef DataTypeImp DataType;\n+ 120\n+ 121 protected:\n+ 122 // one should not create an explicit instance of this interface object\n+123 CommDataHandleIF() {}\n+ 124\n+ 125 public:\n+131 bool contains (int dim, int codim) const\n+ 132 {\n+ 133 CHECK_INTERFACE_IMPLEMENTATION((asImp().contains(dim,codim)));\n+ 134 return asImp().contains(dim,codim);\n+ 135 }\n+ 136\n+ 147 [[deprecated(\"fixedsize (lower case s) will be removed after release 2.8.\n+Implement and call fixedSize (camelCase) instead!\")]]\n+148 int fixedsize (int dim, int codim) const\n+ 149 {\n+ 150 return int(fixedSize( dim, codim ));\n 151 }\n 152\n- 153 } catch(Exception& e) {\n- 154 file.close();\n- 155 throw;\n- 156 }\n- 157 }\n- 158 }\n- 159\n- 160\n- 167 void outputNodes(std::ofstream& file) const {\n- 168 for (const auto& vertex : vertices(gv)) {\n- 169 const auto globalCoord = vertex.geometry().center();\n- 170 const auto nodeIndex = gv.indexSet().index(vertex)+1; // Start counting\n-indices by \"1\".\n- 171\n- 172 if (1 == dimWorld)\n- 173 file << nodeIndex << \" \" << globalCoord[0] << \" \" << 0 << \" \" << 0 <<\n-std::endl;\n- 174 else if (2 == dimWorld)\n- 175 file << nodeIndex << \" \" << globalCoord[0] << \" \" << globalCoord[1] << \" \"\n-<< 0 << std::endl;\n- 176 else // (3 == dimWorld)\n- 177 file << nodeIndex << \" \" << globalCoord[0] << \" \" << globalCoord[1] << \" \"\n-<< globalCoord[2] << std::endl;\n- 178 }\n- 179 }\n- 180\n- 181 public:\n-187 GmshWriter(const GridView& gridView, int numDigits=6) : gv(gridView),\n-precision(numDigits) {}\n- 188\n-193 void setPrecision(int numDigits) {\n- 194 precision = numDigits;\n- 195 }\n- 196\n-218 void write(const std::string& fileName,\n- 219 const std::vector& physicalEntities=std::vector(),\n- 220 const std::vector& physicalBoundaries=std::vector()) const {\n- 221 // Open file\n- 222 std::ofstream file(fileName.c_str());\n- 223 if (!file.is_open())\n- 224 DUNE_THROW(Dune::IOError, \"Could not open \" << fileName << \" with write\n-access.\");\n+ 153 // if this deprecation appears then the DataHandle implementation\n+ 154 // is overloaded in the old 'fixedsize' method but not the new 'fixedSize'\n+ 155 // method.\n+ 156 [[deprecated(\"fixedsize (lower case s) will be removed after release 2.8.\n+Implement and call fixedSize (camelCase) instead!\")]]\n+157 bool overloaded_deprecated_fixedsize( int dim, int codim ) const\n+ 158 {\n+ 159 return asImp().fixedsize( dim, codim );\n+ 160 }\n+ 161\n+169 bool fixedSize (int dim, int codim) const\n+ 170 {\n+ 171 // this should be enabled once the old fixedsize is removed\n+ 172 //CHECK_INTERFACE_IMPLEMENTATION((asImp().fixedSize(dim,codim)));\n+ 173 return CallFixedSize< DataHandleImp,\n+ 174 CheckFixedSizeMethod< DataHandleImp >::value >::fixedSize( asImp(), dim,\n+codim );\n+ 175 }\n+ 176\n+ 181 template\n+182 size_t size (const EntityType& e) const\n+ 183 {\n+ 184 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(e)));\n+ 185 return asImp().size(e);\n+ 186 }\n+ 187\n+ 192 template\n+193 void gather (MessageBufferImp& buff, const EntityType& e) const\n+ 194 {\n+ 195 MessageBufferIF buffIF(buff);\n+ 196 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e)));\n+ 197 }\n+ 198\n+ 206 template\n+207 void scatter (MessageBufferImp& buff, const EntityType& e, size_t n)\n+ 208 {\n+ 209 MessageBufferIF buffIF(buff);\n+ 210 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,n)));\n+ 211 }\n+ 212\n+ 213 private:\n+ 215 DataHandleImp& asImp () {return static_cast (*this);}\n+ 217 const DataHandleImp& asImp () const\n+ 218 {\n+ 219 return static_cast(*this);\n+ 220 }\n+ 221 }; // end class CommDataHandleIF\n+ 222\n+ 223#undef CHECK_INTERFACE_IMPLEMENTATION\n+ 224#undef CHECK_AND_CALL_INTERFACE_IMPLEMENTATION\n 225\n- 226 // Set precision\n- 227 file << std::setprecision( precision );\n- 228\n- 229 // Output Header\n- 230 file << \"$MeshFormat\" << std::endl\n- 231 << \"2.0 0 \" << sizeof(double) << std::endl // \"2.0\" for \"version 2.0\", \"0\"\n-for ASCII\n- 232 << \"$EndMeshFormat\" << std::endl;\n- 233\n- 234 // Output Nodes\n- 235 file << \"$Nodes\" << std::endl\n- 236 << gv.size(dim) << std::endl;\n- 237\n- 238 outputNodes(file);\n- 239\n- 240 file << \"$EndNodes\" << std::endl;\n- 241\n- 242 // Output Elements;\n- 243 int boundariesSize(0);\n- 244 if(!physicalBoundaries.empty())\n- 245 for(const auto& entity : elements(gv))\n- 246 for(const auto& intersection : intersections(gv, entity))\n- 247 if(intersection.boundary())\n- 248 ++boundariesSize;\n- 249\n- 250 file << \"$Elements\" << std::endl\n- 251 << gv.size(0) + boundariesSize<< std::endl;\n- 252\n- 253 outputElements(file, physicalEntities, physicalBoundaries);\n- 254\n- 255 file << \"$EndElements\" << std::endl;\n- 256 }\n- 257\n- 258 };\n- 259\n- 260} // namespace Dune\n- 261\n- 262#endif // DUNE_GRID_IO_FILE_GMSHWRITER_HH\n-mcmgmapper.hh\n-Mapper for multiple codim and multiple geometry types.\n-Dune::GridView::indexSet\n-const IndexSet & indexSet() const\n-obtain the index set\n-Definition: common/gridview.hh:191\n-Dune::GridView::size\n-int size(int codim) const\n-obtain number of entities in a given codimension\n-Definition: common/gridview.hh:197\n-Dune::GridView::dimension\n-static constexpr int dimension\n-The dimension of the grid.\n-Definition: common/gridview.hh:148\n-Dune::GridView::dimensionworld\n-static constexpr int dimensionworld\n-The dimension of the world the grid lives in.\n-Definition: common/gridview.hh:151\n-Dune::mcmgElementLayout\n-MCMGLayout mcmgElementLayout()\n-layout for elements (codim-0 entities)\n-Definition: mcmgmapper.hh:97\n+ 226} // end namespace Dune\n+ 227#endif\n Dune\n Include standard header files.\n Definition: agrid.hh:60\n-Dune::VTK::GeometryType\n-GeometryType\n-Type representing VTK's entity geometry types.\n-Definition: common.hh:132\n-Dune::VTK::vertex\n-@ vertex\n-Definition: common.hh:133\n-Dune::Entity\n-Wrapper class for entities.\n-Definition: common/entity.hh:66\n-Dune::Entity::geometry\n-Geometry geometry() const\n-obtain geometric realization of the entity\n-Definition: common/entity.hh:141\n-Dune::Entity::type\n-GeometryType type() const\n-Return the name of the reference element. The type can be used to access the\n-Dune::ReferenceElement.\n-Definition: common/entity.hh:146\n-Dune::GridView\n-Grid view abstract base class.\n-Definition: common/gridview.hh:66\n-Dune::MultipleCodimMultipleGeomTypeMapper\n-Implementation class for a multiple codim and multiple geometry type mapper.\n-Definition: mcmgmapper.hh:129\n-Dune::MultipleCodimMultipleGeomTypeMapper::index\n-Index index(const EntityType &e) const\n-Map entity to starting index in array for dof block.\n-Definition: mcmgmapper.hh:171\n-Dune::GmshWriter\n-Write Gmsh mesh file.\n-Definition: gmshwriter.hh:37\n-Dune::GmshWriter::GmshWriter\n-GmshWriter(const GridView &gridView, int numDigits=6)\n-Constructor expecting GridView of Grid to be written.\n-Definition: gmshwriter.hh:187\n-Dune::GmshWriter::setPrecision\n-void setPrecision(int numDigits)\n-Set the number of digits to be used when writing the vertices. By default is 6.\n-Definition: gmshwriter.hh:193\n-Dune::GmshWriter::write\n-void write(const std::string &fileName, const std::vector< int >\n-&physicalEntities=std::vector< int >(), const std::vector< int >\n-&physicalBoundaries=std::vector< int >()) const\n-Write given grid in Gmsh 2.0 compatible ASCII file.\n-Definition: gmshwriter.hh:218\n-grid.hh\n-Different resources needed by all grid implementations.\n+Dune::MessageBufferIF\n+Communication message buffer interface. This class describes the interface for\n+reading and writing da...\n+Definition: datahandleif.hh:33\n+Dune::MessageBufferIF::MessageBufferIF\n+MessageBufferIF(MessageBufferImp &buff)\n+stores reference to original buffer buff\n+Definition: datahandleif.hh:37\n+Dune::MessageBufferIF::write\n+void write(const T &val)\n+just wraps the call of the internal buffer method write which writes the data\n+of type T from the buff...\n+Definition: datahandleif.hh:45\n+Dune::MessageBufferIF::read\n+void read(T &val)\n+just wraps the call of the internal buffer method read which reads the data of\n+type T from the buffer...\n+Definition: datahandleif.hh:59\n+Dune::CommDataHandleIF\n+CommDataHandleIF describes the features of a data handle for communication in\n+parallel runs using the...\n+Definition: datahandleif.hh:78\n+Dune::CommDataHandleIF::CommDataHandleIF\n+CommDataHandleIF()\n+Definition: datahandleif.hh:123\n+Dune::CommDataHandleIF::scatter\n+void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)\n+unpack data from message buffer to user.\n+Definition: datahandleif.hh:207\n+Dune::CommDataHandleIF::fixedsize\n+int fixedsize(int dim, int codim) const\n+returns true if size of data per entity of given dim and codim is a constant\n+Definition: datahandleif.hh:148\n+Dune::CommDataHandleIF::contains\n+bool contains(int dim, int codim) const\n+returns true if data for given valid codim should be communicated\n+Definition: datahandleif.hh:131\n+Dune::CommDataHandleIF::size\n+size_t size(const EntityType &e) const\n+how many objects of type DataType have to be sent for a given entity\n+Definition: datahandleif.hh:182\n+Dune::CommDataHandleIF::gather\n+void gather(MessageBufferImp &buff, const EntityType &e) const\n+pack data from user to message buffer\n+Definition: datahandleif.hh:193\n+Dune::CommDataHandleIF::fixedSize\n+bool fixedSize(int dim, int codim) const\n+returns true if size of data per entity of given dim and codim is a constant\n+Definition: datahandleif.hh:169\n+Dune::CommDataHandleIF::DataType\n+DataTypeImp DataType\n+data type of data to communicate\n+Definition: datahandleif.hh:119\n+Dune::CommDataHandleIF::overloaded_deprecated_fixedsize\n+bool overloaded_deprecated_fixedsize(int dim, int codim) const\n+Definition: datahandleif.hh:157\n \n ===============================================================================\n Generated by\u00a0[doxygen] 1.9.4\n"}]}]}]}]}]}